GenieHad Command Line Switches

*** Synopsis :

gevgen_redtop [-h]

[-r run#]
-f flux
-g geometry
[-b beam_pdg ]
[-k beam energy (or energy range)]
[-z beam spot]
[-p pot_normalization_of_flux_file]
[-t top_volume_name_at_geom || -t +Vol1-Vol2…]
[-P pre_gen_prob_file_name]
[-S] [output_name]
[-m max_path_lengths_xml_file]
[-M [output_name] ]
[-L length_units_at_geom]
[-D density_units_at_geom]
[-n n_of_events]
[-c flux_cycles]
[-e, -E exposure_in_POTs]
[-o output_event_file_prefix]
[-R]
[–seed random_number_seed]
–cross-sections xml_file
[–message-thresholds xml_file]
[–unphysical-event-mask mask]
[–event-record-print-level level]
[–mc-job-status-refresh-rate rate]
[–cache-file root_file]

*** Options :

[] Denotes an optional argument

-h
Prints out the gevgen_redtop syntax and exits.
-b beam_pdg
-k
Specifies the beam energy.
If what follows the -k option is a comma separated pair of values
it will be interpreted as an energy range for the flux specified
via the -f option (see below).
-z beam spot. Adopt the same units as the geometry.
Ex. -z 0.0,0.0,-100.0
-r
Specifies the MC run number [default: 1000].
-H [output_name]
Produces an hepevt output file.
-g
Input ‘geometry’.
This option can be used to specify any of:
1 > A ROOT file containing a ROOT/GEANT geometry description
[Note]
– This is the standard option for generating events in the
nd280, 2km and INGRID detectors.
[Examples]
– To use the master volume from the ROOT geometry stored
in the nd280-geom.root file, type:
‘-g /some/path/nd280-geom.root’
2 > A mix of target materials, each with its corresponding weight,
typed as a comma-separated list of nuclear PDG codes (in the
std PDG2006 convention: 10LZZZAAAI) with the weight fractions
in brackets, eg code1[fraction1],code2[fraction2],…
If that option is used (no detailed input geometry description)
then the interaction vertices are distributed in the detector
by the detector MC.
[Note]
– This is the standard option for generating events in the
SuperK detector.
[Examples]
– To use a target mix of 95% O16 and 5% H type:
‘-g 1000080160[0.95],1000010010[0.05]’
– To use a target which is 100% C12, type:
‘-g 1000060120’
-t
Input ‘top volume’ for event generation –
can be used to force event generation in given sub-detector.
[default: the ‘master volume’ of the input geometry]
You can also use the -t option to switch generation on/off at
multiple volumes as, for example, in:
`-t +Vol1-Vol2+Vol3-Vol4′,
`-t “+Vol1 -Vol2 +Vol3 -Vol4″‘,
`-t -Vol2-Vol4+Vol1+Vol3’,
`-t “-Vol2 -Vol4 +Vol1 +Vol3″‘m
where:
“+Vol1” and “+Vol3” tells GENIE to `switch on’ Vol1 and Vol3, while
“-Vol2” and “-Vol4” tells GENIE to `switch off’ Vol2 and Vol4.
If the very first character is a ‘+’, GENIE will neglect all volumes
except the ones explicitly turned on. Vice versa, if the very first
character is a `-‘, GENIE will keep all volumes except the ones
explicitly turned off (feature contributed by J.Holeczek).
-P
Use exact interaction probabilities (stored in the file specified
via this option) corresponding to the flux file input in this job.
For complex geometries this will dramatically speed up event generation!
If this option is chosen then no max path length file needs to be provided.
Instead of calculating the interaction probabilities on the fly
per job you can pre-generate them using a dedicated job (see the
-S option) and tell the event generator to use them via the -P option.
This is advised when processing flux files with more than ~100k entries
as the time to pre-calculate the interaction probabilities becomes
comparable to the event generation time. For smaller flux files there is
less book-keeping if you just calculate them per job and on the fly.
-S [output_name]
Pre-generate flux interaction probabilities and save to root
output file for use with future event generation jobs. With this
option no events are generated, it is just a preparatory step
before actual event generation. When using this option care
should be taken to run with same arguments used for the actual
event generation job (same ROOT geomtery, flux file, probe
particle types, etc…).
The output root file is specified as the input for event
generation using the [pre_gen_prob_file] optional value of the
-P option. The default output interaction probabilities file
name is constructed as: [FLUXFILENAME].[TOPVOL].flxprobs.root.
Specifying [output_name] will override this.
Introducing multiple functionality to the executable is not
desirable but is less error prone than duplicating a lot of the
functionality in a separate application.
-m
Uses an XML file (generated by gmxpl with BoundingBox method or with this
executable with the -M switch) with the max (density weighted)
path-lengths for each target material in the input ROOT geometry.
If no file is input, then the geometry will be scanned at MC job
initialization to determine those max path lengths.
Supplying this file can speed-up the MC job initialization.
-M [output_name]
Produces an XML with the max (density weighted)
path-lengths for each target material in the input ROOT geometry.
Requires an input flux specified. Otherwise, you mustuse gMaxPathLengths()
The default output interaction probabilities file
name is constructed as: maxpl.xml.
Specifying [output_name] will override this.
-L
Input geometry length units, eg ‘m’, ‘cm’, ‘mm’, …
[default: ‘mm’]
Note that typically:
– nd280m uses: ‘mm’
– …
WARNING: if using a gdml geometry the geometry length units must be set to ‘cm’
-D
Input geometry density units, eg ‘g_cm3’, ‘clhep_def_density_unit’,…
[default: ‘g_cm3’]
Note that typically:
– nd280m uses: ‘clhep_def_density_unit’
– …
-f
Input ‘beam flux’.
This option can be used to specify any of:
1 > A JNUBEAM beam simulation output file and the detector location.
The general sytax is:
-f /full/path/flux_file.root,detector_location(,list_of_neutrino_codes)
[Notes]
– For more information on the flux ntuples, see (T2K internal):
http://jnusrv01.kek.jp/internal/t2k/nubeam/flux/
– The original HBOOK JNUBAM ntuples need to be converted to a ROOT
format using the h2root ROOT utility.
– The detector location can be any of ‘sk’ or the near detector
positions ‘nd1′,…,’nd6′,’nd13’ simulated in JNUBEAM.
See the above JNUBEAM web page for more info.
– The beam codes are the PDG ones.
– The (comma separated) list of beam codes is optional.
It may be used for considering only certain beam flavours
(eg. nu_e only).
If no beam list is specified then GENIE will consider all
possible flavours (nu_e, nu_e_bar, nu_mu, nu_mu_bar).
See examples below.
– The JNUBEAM flux ntuples are read via GENIE’s GJPARCNuFlux
driver. This customized GENIE event generation driver
passes-through the complete JPARC input flux information
(eg parent decay kinematics / position etc) for each beam
event it generates (an additional ‘flux’ branch is added at
the output event tree).
[Examples]
– To use the SuperK flux ntuple from the flux.root file,
type:
‘-f /path/flux.root,sk’
– To do the same as above, but considering only nu_mu and
nu_mu_bar, type:
‘-f /path/flux.root,sk,14,-14’
– To use the 2km flux ntuple [near detector position ‘nd1’
in the JNUBEAM flux simulation] from the flux.root file,
type:
‘-f /path/flux.root,nd1’
– To use the nd280 flux ntuple [near detector position ‘nd5’
in the JNUBEAM flux simulation] from the flux.root file,
type:
‘-f /path/flux.root,nd5’
– To do the same as above, but considering only nu_e
type:
‘-f /path/flux.root,nd5,12′
2 > A list of JNUBEAM beam simulation output files and the detector location.
The general sytax is:
-f /full/path/flux_file_prefix@first_file_number@last_file_number,detector_location(,list_of_neutrino_codes)
3 > A function expressed between parenthesis:
eg ` -f {x*x+4*exp(-x)}’
4 > A vector file fith filename specified between parentesis {}:
The vector file should contain 2 columns corresponding to
energy,flux (see $GENIE/data/flux/ for few examples).
5 > A 1-D ROOT histogram (TH1D) expessed between parenthesys:
The general syntax is `-f {/full/path/file.root,object_name}’

[Notes]
– The “.root” is assumed.
– All the files in the series between flux_file_prefix.first_file_number.root
and flux_file_prefix.last_file_number.root should exist.
– It is important that you set the -p option correctly. See note below.
– Also see notes from option 1.
[Examples]
– To use the SuperK flux ntuples from the files: flux.0.root, flux.1.root, flux.2.root, flux.3.root
type:
‘-f /path/flux.@0@3,sk’
– To use the nd280 flux ntuple [near detector position ‘nd5’
in the JNUBEAM flux simulation] from the files in the series
flux.0.root file to flux.100.root, considering only nu_e, type:
‘-f /path/flux.@0@100,nd5,12’
3 > A set of histograms stored in a ROOT file.
The general syntax is:
-f /path/histogram_file.root,neutrino_code[histo_name],…
[Notes]
– The beam codes are the PDG ones.
– The ‘neutrino_code[histogram_name]’ part of the option can be
repeated multiple times (separated by commas), once for each
flux beam species you want to consider, eg
‘-f somefile.root,12[nuehst],-12[nuebarhst],14[numuhst]’
– When using flux from histograms then there is no point in using
a ‘detailed detector geometry description’ as your flux input
contains no directional information for those flux neutrinos.
The beam direction is conventionally set to be +z {x=0,y=0}.
So, when using this option you must be using a simple ‘target mix’
See the -g option for possible geometry settings.
If you want to use the detailed detector geometry description
then you should be feeding this driver with the JNUBEAM flux
simulation outputs.
– When using flux from histograms there is no branch with beam
parent information (code, decay mode, 4-momentum at prod & decay)
added in the output event tree as your flux input contains no
such information. If you want to be getting the beam parent
information written out as well then you should be feeding this
driver with the JNUBEAM flux simulation outputs.
– Note that the relative normalization of the flux histograms is
taken into account and is reflected in the relative frequency
of flux neutrinos thrown by the flux driver
[Examples]
– To use the histogram ‘h100’ (representing the nu_mu flux) and
the histogram ‘h300’ (representing the nu_e flux) and the
histogram ‘h301’ (representing the nu_e_bar flux) from the
flux.root file in /path/
type:
‘-f /path/flux.root,14[h100],12[h300],-12[h301]
-p
POT normalization of the input flux file.
[default: The ‘standard’ JNUBEAM flux ntuple normalization of
1E+21 POT/detector for the near detectors and
1E+21 POT/cm2 for the far detector]
That will be used to interpret the flux weights & calculate the actual
POT normalization for the generated event sample.
[Note]
– If you are using the multiple JNUBEAM flux file entry method it is
very important that you set this. It should be set to the total POT
of all input flux files.
[Examples]
– If you have 10 standard JNUBEAM files use ‘-p 10E+21’
-c
Specifies how many times to cycle a JNUBEAM flux ntuple.
Due to the large rejection factor when generating unweighted events
in the full energy range (approximately ~500 flux neutrinos will be
rejected before getting an interaction in nd280), an option is
provided to recycle the flux ntuples for a number of times.
That option can be used to boost the generated statistics without
requiring enormous flux files.
See also ‘Note on exposure / statistics’ below.
-e
Specifies how many POTs to generate.
If that option is set, gevgen_redtop will work out how many times it has
to cycle through the input flux ntuple in order to accumulate the
requested statistics. The program will stop at the earliest complete
flux ntuple cycle after accumulating the required statistics, so the
actual statistics will ‘slightly’ overshoot that number.
See also ‘Note on exposure / statistics’ below.
-E
Specifies how many POTs to generate.
That option is similar to -e but the program will stop immediatelly
after the requested POT has been accumulated. That reduces the
generated POT overshoot of the requested POT, but the POT calculation
may not be as exact as with -e.
See also ‘Note on exposure / statistics’ below.
-n
Specifies how many events to generate.

————————–
[Note on setting the exposure / statistics]
All -c, -e (-E) and -n options can be used to set the exposure.
– If the input flux is a JNUBEAM ntuple then any of these options can
be used (only one at a time).
If no option is set, then the program will automatically set ‘-c 1’
– If the input flux is described with histograms then only the -n
option is available.
————————–

-o
Sets the prefix of the output event file.
The output filename is built as:
[prefix].[run_number].[event_tree_format].[file_format]
The default output filename is:
gntp.[run_number].ghep.root
This cmd line arguments lets you override ‘gntp’
If the flag is not present, no output .ghep.root file is written
-R
Tell the flux driver to start looping over the flux ntuples with a
random offset. May be necessary to avoid biases introduced by always
starting at the same point when using very large flux input files.
–seed
Random number seed.
–cross-sections
Name (incl. full path) of an XML file with pre-computed
cross-section values used for constructing splines.
–message-thresholds
Allows users to customize the message stream thresholds.
The thresholds are specified using an XML file.
See $GENIE/config/Messenger.xml for the XML schema.
–unphysical-event-mask
Allows users to specify a 16-bit mask to allow certain types of
unphysical events to be written in the output file.
[default: all unphysical events are rejected]
–event-record-print-level
Allows users to set the level of information shown when the event
record is printed in the screen. See GHepRecord::Print().
–mc-job-status-refresh-rate
Allows users to customize the refresh rate of the status file.
–cache-file
Allows users to specify a cache file so that the cache can be
re-used in subsequent MC jobs.

*** Examples:

(0) shell% gevgen_redtop

-r 1001
-n 10
-b 2212
-k 2.8,3.0
-z 0.011,0.022,-80.0
-f {x*x+4*exp(-x)}
-g C://slic_3_1_6-VC10//redtop//redtop.gdml
-t world_volume
-L cm
-D g_cm3
–event-generator-list REDTOP_ETA_CPV
-m $(GENIE)data/geo/samples/redtop_cm.xml
-P world_volume.flxprobs.exclusiveeta.root
-H redtop.etaCPV

Generate 10 events (run number 1001) using a proton beam with energy in
the range [2.8-3.0] GeV and spectrum {x*x+4*exp(-x)}. The beam will
originate in the space-point 0.011,0.022,-80.0. The job will load the
REDTOP detector geometry description from C://slic_3_1_6-VC10//redtop//redtop.gdml
and use it thinking that the geometry length unit is ‘cm’ and the density
unit is ‘g_cm3’. The event generator list in the \config\EventGeneratorListAssembler.xml
file is REDTOP_ETA_CPV (corresponding to p + Be -> eta + X -> 4 pi0 + X).
The job will use pre-computed interaction probabilities stored in the file
world_volume.flxprobs.exclusiveeta.root. Pre-computed cross-sections for all relevant
initial states are loaded from data/geo/samples/redtop_cm.xml. The output file with
the list of generated final state particles is redtop.etaCPV.hepevt and it has
the (long) hepevt format.