hexe: syntax: hexe [options] infile1 [ [options] infile2 ... ] [options] ------------ options: --weight num -w num Weight for file. Weight is by default 1 All Events are then mixed with equal Distribution --driver driver -d driver specify an adamo/dad driver for next file (RZ,FZ,RPIP,RFIL,RMEM,WPIP,WFIL,WMEM) --evcat -c use the evcat format for this dad file orignally intended for the funnel operation. -z enable online compression/decompression for dad files --outfile file -o file Output file - defaults to hexe.fz driver=FZ,filfor=EXCH --nooutfile -n No output files. Useful for --print(see below) --seed seed -s seed Set seed for random operation. Defaults to time(0)+getpid() -append -a Don't use random distribution but append infiles to each other in outfile --print table:condition:format:value:[format:value:...] -p t:c:f:v Print the value for all elements of the table which fulfill the condition. Format is a valid C-printf format statement which can be omitted to use a default several -p statements may be given which then are printed for each table row on a line --pnull Don't suppress printing of lines with NULL links --keytabint n -k n use n integers in the default keytable if only dad input is used (def=0) This number corresponds to the fields between ID and cName --keytab Generate a keytable in the dad output file --keep don't modify existing keytables --expression expr -e expr check expression before writing the record. Expression looks like Table:Good:DadExpression with Table: Tablename or `none' Good: Number of rows that passed the condition. Or perc% or all ++[--]filter expr +[-]f expr Keep [remove] rows from a table which fulfill a given expression: Table:DadExpression with Table: Tablename --- (C) 1995 Hermes Collaboration / Wolfgang Wander
hexe -w 80 hmcpos.fz -w 20 hmcneg.fz -o hmc.fzwill generate an hmc.fz file with 60% positive target polarization. The events are randomly taken from both files with the given weights. To reproduce the distribution one can set a seed for the random number generator with the --seed option.
hexe -a hmcpos.fz hmcneg.fz -o hmc.fzwill copy the contents of hmcpos.fz to hmc.fz and append hmcneg.fz afterwards.
hexe hmc.fz -o hmc.rzconverts the FZ,filfor=EXCH-file hmc.fz into RZ format.
hexe -d RPIP deco.fifo -d FZ deco.ffzconverts input from the DAD pipe deco.fifo into the native FZ file deco.ffz. As dad files normally don't use keytables in sequential IO the parameter --keytabint can be used to build a fake keytable with n integer parameters additional to ID in which the last integer is incremented with the number of read records.
hexe -n hmc.events -p 'mcEvent:::iEvent'Prints all event numbers in an hmc event file.
hexe -n hmc.events -p 'mcTrack:iGType=2:Energy = %f:E'Prints the energy of all positrons (Geant Particle Type == 2):
Energy = 5.23412 Energy = 7.00123 ...
hexe -z -n -d RFIL hrc.devents.gz -p \ 'rcTrack:::P::NATREL("rcTrack","Backward","ECalor")'prints out the momentum and the energy of the backcluster of each track.
hexe -z -n -d RFIL hrc.devents.gz -p \ 'mcTrack:::P::NAFREL("mcTrack","mcTrack","rcTrack","P")'compares generated and reconstructed track momenta. Also new in version 1.5 is the GETROW function, which allows you to retrieve the nth row of any table. This table may be disconnected from the primary table of your print command. The function is great for accessing 1-row tables without any need for NATREL or NAFREL. For example,
hexe -z -n -d RFIL mc.smdst.gz -p \ 'g1Track:::P::GETROW("g1MEvent",1,"weight")'provides a list of reconstructed track momenta, together with the Monte Carlo weight for the corresponding event. GETROW is also great for accessing the mcUser and g1mcUser tables, where each row corresponds to a particular piece of information. For example, the gmc_disNG generator stores each event's depolarization factor in mcUser row #10. So this command would allow you to examine the dependence of depol on the kinematic variable y:
hexe -z -n -d RFIL gmc.devents -p \ 'mcEvent:::Y::GETROW("mcUser",10,"Val")'
hexe hrc.fz -o hrc.out.fz -e 'rcCluster:1:E>10'lets records pass only if one cluster in the event contains more then 10 GeV energy.
hexe hrc.fz -o hrc.out.fz -e '::counttable("rcTrack")>0'lets records pass only if there is at least one track in the event.
hexe hrc.fz -o hrc.out.fz -e rcTrack:1:1this is equivalent to the above statement.
hexe hrc.fz -o hrc.out.fz -e rcTrack:1:1 -e 'rcCluster:1:E>10'Here only events pass which have at least one track AND a calorimeter cluster of more than 10 GeV
hexe hrc.fz -o hrc.out.fz -f rcTreeLine:bUsed=0removes the treelines from the input which are not used to form a track.
hexe hrc.fz -o hrc.out.fz +f 'rcTrack:pidElec>0.5' -f rcTreeLine:1keeps only tracks which particle id probablity for an electron is higher 50% and removes all rcTreeLines from the input.