HOWTO Use gen amp
gen_amp is an event generator used to simulate the kinematics of events for photoproduction reactions using an amplitude model or purely phasespace distributed events. The generator is most commonly used in the context of partial wave analyses (or amplitude analyses).
Input to the generator is a plain-text configuration file in the AmpTools format. Within this file, the reaction under study as well as an amplitude model are defined. When running in its normal operation mode, gen_amp will generate phasespace distributed events for the defined reaction and subsequently perform a hit-and-miss algorithm using the density distribution defined by the amplitude model. This will result in a generated Monte Carlo data sample which exactly reproduces the behavior of the amplitude model given the parameters that are also defined and initialized in the cfg file.
A command line flag (see below) allows to disable the hit-and-miss algorithm execution so that a sample of phasespace distributed ("flat") events is saved on disk. This sample may be further subjected to the detector simulation and reconstruction software and is used as an input for partial wave analysis fits using AmpTools.
-c <file> Config file -o <name> ROOT file output name -hd <name> HDDM file output name [optional] -l <value> Low edge of mass range (GeV) [optional] -u <value> Upper edge of mass range (GeV) [optional] -n <value> Minimum number of events to generate [optional] -m <value> Electron beam energy (or photon energy endpoint) [optional] -p <value> Coherent peak photon energy [optional] -a <value> Minimum photon energy to simulate events [optional] -b <value> Maximum photon energy to simulate events [optional] -r <value> Run number assigned to generated events [optional] -s <value> Random number seed initialization [optional] -t <value> Momentum transfer slope [optional] -tmin <value> Minimum momentum transfer [optional] -tmax <value> Maximum momentum transfer [optional] -v Throw vertex distribution in gen_amp, not in hdgeant(4) [not recommended] -f Generate flat in M(X) (no physics) [optional] -d Plot only diagnostic histograms [optional]
A full description of AmpTools configuration file can be found elsewhere, however this page should give an overview of the keywords and usage flags relevant for use with gen_amp.
A minimal configuration file to generate phasespace distributed (="flat") events for the reaction only has to contain one single line that defines the reaction:
reaction EtaPi0 Beam Proton Eta Pi0
The generator can now be run with various flags, in this example generating flat events up to an invariant mass of 3.0 GeV and for photon energies between 8.2 and 8.8GeV:
gen_amp -c gen_flat_etapi0_wiki.cfg -o test.root -n 1000000 -a 8.2 -b 8.8 -f -u 3.0