gcowan / RapidSim

Phase space generation of b hadron decays
MIT License
18 stars 29 forks source link

RapidSim DOI

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.

A more detailed description can be found here https://arxiv.org/abs/1612.07489

Setup

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 "" should be the full path, up to and including the "RapidSim" folder, created by the git clone command:

$ # 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

Decays

To generate a new decay mode you must write a .decay file using the following syntax:

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.

Re-decay

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.

Configuration

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.

Global settings

Particle settings

Parameters

External Generators

EvtGen

EvtGen may be used to generate decays allowing for non-phasespace decay models.

TODO

Authors