RapidSim is a fast Monte Carlo generator for simulation of heavy-quark hadron decays. It can be useful for generating background or toy data sets for acceptance studies.
TGenPhaseSpace
to generate b/c quark hadron decays.A more detailed description can be found here https://arxiv.org/abs/1612.07489
RapidSim relies on having a working ROOT installation and gcc4.9 or clang.
Optionally, you may also compile against EvtGen as detailed in EvtGen
To build do the following, where "
$ # Set environment for gcc, it defines LD_LIBRARY_PATH and FC, CC, CXX. RapidSim also works with clang.
$ # On lxplus do this:
$ source /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_87/gcc/4.9.3/x86_64-slc6/setup.sh
$ # Set ROOT environment
$ source /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_87/ROOT/6.08.02/x86_64-slc6-gcc49-opt/bin/thisroot.sh
$ mkdir build
$ cd build
$ cmake ../ -DCMAKE_INSTALL_PREFIX=<install location>
$ make -j4
$ make -j4 install # This step is optional if you want to install in a specific location
The usage is:
$ # Setup the RAPIDSIM_ROOT environment variable (or add to .bashrc)
$ export RAPIDSIM_ROOT=<install location>
$ # Optionally setup the RAPIDSIM_CONFIG environment variable
$ export RAPIDSIM_CONFIG=/path/to/additional/configuration/files
$ $RAPIDSIM_ROOT/build/src/RapidSim.exe <decay mode> <events to generate> <save tree?> <num times to re-decay each hadron>
To run an example try:
$ $RAPIDSIM_ROOT/build/src/RapidSim.exe $RAPIDSIM_ROOT/validation/Bs2Jpsiphi 10000 1
or
$ $RAPIDSIM_ROOT/bin/RapidSim.exe $RAPIDSIM_ROOT/validation/Bs2Jpsiphi 10000 1
To run the full system validation:
$ source $RAPIDSIM_ROOT/bin/runValidation.sh
To generate a new decay mode you must write a .decay
file using the following syntax:
$RAPIDSIM_ROOT/config/particles.dat
or $RAPIDSIM_CONFIG/config/particles.dat
and separated by
spaces->
{}
, e.g.Bs0 -> { Jpsi -> mu+ mu- } { phi -> K+ K- }
When RapidSim is first run for a new decay mode it will generate a simple .config
file.
These files allow properties of the particles and global settings to be configured for each decay.
Run RapidSim with 0 events to generate if you just want to produce the .config
file.
The default values listed below are those obtained when using the automatically generated .config
file.
Note that when lines are removed from the .config
file this behaviour may change.
It is possible to specify a command-line option to re-decay a particular heavy-quark hadron. This means that for a particular hadron, the same parent kinematics are retained but the kinematics of the decay products (and their various detector-level smearings) are recomputed.
Global settings should be defined at the start of the file using the syntax:
<setting> : <value>
Particle settings should be defined after the corresponding @#
tag using the same syntax.
seed
:
acceptance
:
Any
, ParentIn
, AllIn
and AllDownstream
Any
geometry
:
4pi
and LHCb
LHCb
energy
:
7
, 8
, 13
and 14
parent
:
b
and c
rootfiles/fonll
ptRange
:
ptRange : <min> <max>
4pi
geometry) or 0–100 (for LHCb
geometry)etaRange
:
etaRange : <min> <max>
minWidth
:
maxAttempts
:
paramsStable
:
paramsStable : <params>
, where <params>
is a space separated
list of the types defined in the Parameters section.paramsStable : P PT
paramsDecaying
:
paramsDecaying : <params>
where <params>
is a space separated
list of the types defined in the Parameters section.paramsDecaying : M P PT
paramsTwoBody
:
paramsTwoBody : <params>
where <params>
is a space separated
list of the types defined in the Parameters section.paramsTwoBody : M M2
paramsThreeBody
:
paramsThreeBody : <params>
where <params>
is a space
separated list of the types defined in the Parameters
section.paramsThreeBody : M M2
param
:
param : <name> <type> <particles> [TRUE]
, where:<type>
must be one of the types defined in the Parameters section,<particles>
is a space separated list of particle indicesTRUE
argument means the parameter will be calculated using
the true unsmeared momenta of the particlesparam : mSq12 M2 1 2 TRUE
cut
:
cut : <param> <type> <min/max> [<max>]
, where<param>
is the name of a parameter (must be defined using param
)<type>
is one of "min", "max", "range" or "veto"<min>
and/or <max>
define(s) the cut value(s)shape
:
shape : <file> <hist> <paramX> [<paramY>]
, where:<file>
is the file containing the histogram (path must be absolute or relative to run directory),<hist>
is the name of the histogram,<paramX>
is the name of the parameter on the X-axis (must be defined
using param
)<paramY>
is the name of the parameter on the Y-axisuseEvtGen
:
useEvtGen : TRUE
evtGenUsePHOTOS
:
evtGenUsePHOTOS : TRUE
pid
:
pid : <scheme>
, where <scheme>
is the name of the file that defines the scheme (default LHCbGenericPID
)name
:
smear
:
LHCbGeneric
, LHCbElectron
, AtlasMuon
, or AtlasHadron
LHCbGenericIP
LHCbElectron
(for electrons/positrons), otherwise LHCbGeneric
invisible
:
AllIn
or AllDownstream
acceptance requirement for the default LHCb geometrytrue
(for neutrinos), otherwise false
altMass
:
altMass : <particles>
where <particles>
is a space separated
list of particle type names as listed in config/particles.dat
evtGenModel
:
evtGenModel : <model> [<params>]
where <model>
is the name of
the model as used in DECAY.DEC and <params>
is a space separated list of
parameters to be passed to the modelM
: The invariant mass of the combination of the given particlesM2
: The squared invariant mass of the combination of the given particlesMT
: The transverse mass of the combination of the given particlesE
: The energy of the combination of the given particlesET
: The transverse energy of the combination of the given particlesP
: The total momentum of the combination of the given particlesPX
: The X momentum of the combination of the given particlesPY
: The Y momentum of the combination of the given particlesPZ
: The Z momentum of the combination of the given particlesPT
: The transverse momentum of the combination of the given particlesvtxX
: The X coordinate of the decay vertex of the given particlesvtxY
: The Y coordinate of the decay vertex of the given particlesvtxZ
: The Z coordinate of the decay vertex of the given particlesorigX
: The X coordinate of the origin vertex of the given particlesorigY
: The Y coordinate of the origin vertex of the given particlesorigZ
: The Z coordinate of the origin vertex of the given particlesIP
: Impact parameter to own primary vertexSIGMAIP
: Error on impact parameter to own primary vertexMINIP
: Minimum impact parameter to any primary vertexSIGMAMINIP
: Error on minimum impact parameter to a primary vertexFD
: Flight distanceeta
: The pseudorapidity of the combinationphi
: The azimuthal angle of the combinationy
: The rapidity of the combinationgamma
: The relativistic gamma factor of the combinationbeta
: The velocity of the combinationtheta
: The angle between the first two particles in the rest frame of
the combination of the remaining particles
e.g. 1 2 1 3 would give the angle between 1 and 2 in the rest frame
of a resonance in m_13
(i.e. theta_13
in a 3-body decay)costheta
: The cosine of thetaMcorr
: The corrected mass of the combination of the given particles
correcting for any invisible particlesProbNNmu
: Particle ID feature for the muon hypothesisProbNNe
: Particle ID feature for the electron hypothesisProbNNpi
: Particle ID feature for the pion hypothesisProbNNk
: Particle ID feature for the kaon hypothesisProbNNp
: Particle ID feature for the proton hypothesisEvtGen may be used to generate decays allowing for non-phasespace decay models.
particles.dat
.decay
and .config
files to simplify interface