|
|
(11 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | = EvtGen = | + | = Physical = |
− | == Default script ==
| + | * [[KKMC]] |
− | Script <code>Generation/GenExamples/scripts/runevtgen.py</code> generates Aurora script to run <code>EvtGen</code>. This script is added to the path and can be invoked from any place:
| + | * [[KKMCee v5]] |
− | <code> runevtgen.py </code>
| + | * [[EvtGen]] |
| | | |
− | This string generates the default script <code>ctaugen.py</code> and produces the default output file <code>output.root</code>. This file contains 1000 events of inclusive psi(3770) decays in the SCT edm format.
| + | = Technical = |
− | | + | * [[Particle Gun]] |
− | One can run
| + | |
− | <code>ctaurun ctaugen.py</code>
| + | |
− | to invoke generator again.
| + | |
− | | + | |
− | == Configuration ==
| + | |
− | The file <code>ctaugen.py</code> contains two lines:
| + | |
− | <code>from GenWrappers.EvtGenTools import generateEvtGen
| + | |
− | generateEvtGen(dec="",root="psi(3770)",ecms=0.0,nevt=1000,ip=[0.01, 0.01, 0.5],ofile="{CWD}/output.root")</code>,
| + | |
− | where ${CWD} is the path from where <code>runevtgen.py</code> was called.
| + | |
− | | + | |
− | <code>generateEvtGen</code> function has the following parameters:
| + | |
− | * <code>dec</code> - EvtGen users decay file. It can be one of the included in Aurora files or absolute path to your own decay file. Inclusive MC generation does not require user decay file | + | |
− | * <code>root</code> - root particle for EvtGen. <code>vpho</code> (virtual photon) should be used for non-resonant processes
| + | |
− | * <code>ecms</code> - Total center-of-mass energy. This parameter should be set for virtual photon. This parameter is ignored for if root particle is a resonance (it's mass is the center-of-mass energy)
| + | |
− | * <code>nevt</code> - number if events to be gnerated
| + | |
− | * <code>ip</code> - uniform 3D smearing (in mm) for the primary vertex
| + | |
− | * <code>ofile</code> - output file name
| + | |
− | One can change these parameters to change behaviour of EvtGen and to produce arbitrary MC sample.
| + | |
− | | + | |
− | An alternative approach is to invoke <code>runevtgen.py</code> script with command line arguments. Here is the code snippet of the parameters defined:
| + | |
− | usage = 'evtgen.py [options]'
| + | |
− | parser = OptionParser(usage=usage)
| + | |
− | parser.add_option('-w', '--wdir', dest='workdir', default='.')
| + | |
− | parser.add_option('-s', '--scr', dest='scrfile', default='ctaugen.py')
| + | |
− | parser.add_option('-d', '--dec', dest='decfile', default='')
| + | |
− | parser.add_option('-r', '--root', dest='rootParticle', default='psi(3770)')
| + | |
− | parser.add_option('-o', '--out', dest='outfile', default='output.root')
| + | |
− | parser.add_option('-n', '--numevt', dest='nevt', default=1000)
| + | |
− | parser.add_option('-e', '--energy', dest='energy', default=0.)
| + | |
− | I hope the meaning of parameters is self-evident.
| + | |
− | | + | |
− | --[[User:V.S.Vorobev|V.S.Vorobev]] ([[User talk:V.S.Vorobev|talk]]) 15:00, 5 August 2019 (+07)
| + | |