Event generators

From Charm-Tau Detector
(Difference between revisions)
Jump to: navigation, search
Line 20: Line 20:
 
* <code>root</code> - root particle for EvtGen. <code>vpho</code> (virtual photon) should be used for non-resonant processes
 
* <code>root</code> - root particle for EvtGen. <code>vpho</code> (virtual photon) should be used for non-resonant processes
 
** Acceptable root particles: <code>vpho</code>, <code>J/psi</code>, <code>psi(2S)</code>, <code>psi(3770)</code>, <code>psi(4040)</code>, <code>psi(4160)</code>, <code>psi(4415)</code>. For more details see Generation/GenTools/GenWrappers/python/EvtGenTools.py in Aurora.
 
** Acceptable root particles: <code>vpho</code>, <code>J/psi</code>, <code>psi(2S)</code>, <code>psi(3770)</code>, <code>psi(4040)</code>, <code>psi(4160)</code>, <code>psi(4415)</code>. For more details see Generation/GenTools/GenWrappers/python/EvtGenTools.py in Aurora.
* <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>ecms</code> - center-of-mass energy (mass of the root particle). The parameter <code>ecms</code> must be set for virtual photon while for other root particles (<math>J/\psi</math>, <math>\psi(2S)</math>, ...) this parameter is optional. Mean mass of the root particle is adopted if <code>ecms</code> is omitted.
 
* <code>nevt</code> - number if events to be gnerated
 
* <code>nevt</code> - number if events to be gnerated
 
* <code>ip</code> - uniform 3D smearing (in mm) for the primary vertex
 
* <code>ip</code> - uniform 3D smearing (in mm) for the primary vertex

Revision as of 12:35, 9 October 2020

Contents

EvtGen

Default script

Script Generation/GenExamples/scripts/runevtgen.py generates Aurora script to run EvtGen. This script is added to the path and can be invoked from any place:

 runevtgen.py  

This string generates the default script ctaugen.py and produces the default output file output.root. This file contains 1000 events of inclusive psi(3770) decays in the SCT edm format.

One can run

ctaurun ctaugen.py

to invoke generator again.

Configuration

The file ctaugen.py contains two lines:

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"),

where ${CWD} is the path from where runevtgen.py was called.

generateEvtGen function has the following parameters:

  • dec - 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
  • root - root particle for EvtGen. vpho (virtual photon) should be used for non-resonant processes
    • Acceptable root particles: vpho, J/psi, psi(2S), psi(3770), psi(4040), psi(4160), psi(4415). For more details see Generation/GenTools/GenWrappers/python/EvtGenTools.py in Aurora.
  • ecms - center-of-mass energy (mass of the root particle). The parameter ecms must be set for virtual photon while for other root particles (J/\psi, \psi(2S), ...) this parameter is optional. Mean mass of the root particle is adopted if ecms is omitted.
  • nevt - number if events to be gnerated
  • ip - uniform 3D smearing (in mm) for the primary vertex
  • ofile - output file name

One can change these parameters to change behaviour of EvtGen and to produce arbitrary MC sample.

Examples

Use dec file:

generateEvtGen(dec="dkpi.dec",root="psi(3770)",ecms=0,nevt=1000,ip=[0.01, 0.01, 0.5],ofile="/gcf/stark/home/razuvaev/workarea3/run/output.root")

Some example dec files available within aurora are listed below.

File name Decay chain
cont.dec
denu.dec e+e- -> psi(3770) -> [D+ -> e+ nu] D- + c.c.
dhh.dec e+e- -> psi(3770) -> [D0 -> h+ h-] [anti-D0 -> h+ h-]
dk3pi.dec e+e- -> psi(3770) -> [D0 -> K- [pi pi pi]+] anti-D0 + c.c.
tautau.dec e+e- -> gamma* -> tau+ tau-
xic0.dec e+e- -> gamma* -> Xi_c0 anti-Xi_c0
taumugamma.dec e+e- -> [tau+ -> mu+ gamma] [tau- -> X] (and c.c.)
lambdac.dec e+e- -> gamma* -> Lambda_c+ anti-Lambda_c-

All example dec files are stored in Generation/GenExamples/share/dec folder of Aurora.


An alternative approach is to invoke runevtgen.py 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.

--V.S.Vorobev (talk) 15:00, 5 August 2019 (+07)

Personal tools