1. Simulating the Signal Events

1.1. Event Generation

In order to run the simulation we first of all need to generate events. This can be done on the fly with the simulation macro, the only thing we need is a decay file for !EvtGen, which defines our decay.

In our example the decay file is given by pp_jpsi2pi_jpsi_mumu.dec which lists as:

noPhotos

Decay pbarpSystem
  1.0 J/psi pi+ pi-   PHSP;
Enddecay

Decay J/psi
  1.0 mu+ mu-      VLL;
Enddecay

End

(NB: Since we will run the simulation at the psi(2S) energy, the analysis later will consistently use psi(2S) as name for the reconstructed pbar-p system - don’t be confused about that.) The very first command noPhotos suppresses initial and final state radiation handled by the generator for simplicity of the analysis.

As you can see it basically defines, that our start resonance pbarpSystem decays to J/psi pi+ pi-, and J/psi to mu+ mu-. The names of the resonances and particles in the decay file have to match those in the file $VMCWORKDIR/pgenerators/EvtGen/evt.pdl. Make sure to define the decay chain up to final state particles (e+, mu+, pi+, K+ and p+ and their charge conjugates). For any non-final-state-particle, by default all possible decays listed in $VMCWORKDIR/pgenerators/EvtGen/DECAY.DEC are taken into account.

When you e.g. don’t define the J/psi decay in the upper example, the J/psi would, according to DECAY.DEC, decay into:

Decay J/psi
0.0593    e+   e-                PHOTOS  VLL;
0.0588    mu+  mu-               PHOTOS  VLL;
0.0042    rho0 pi0               VVS_PWAVE 1.0 0.0 0.0 0.0 0.0 0.0;
0.0043    rho+ pi-               VVS_PWAVE 1.0 0.0 0.0 0.0 0.0 0.0;
0.0043    rho- pi+               VVS_PWAVE 1.0 0.0 0.0 0.0 0.0 0.0;
0.0036    a_20  rho0             PHSP;
0.0036    a_2+  rho-             PHSP;
0.0036    a_2-  rho+             PHSP;
...

More details concerning EvtGen have been discussed in earlier tutorials and can be found under the link EvtGen.

1.2. Simulation, Digitization, Reconstruction and Particle Identification

To run the simulation for e.g. 100 events, you simply execute two macros from the directory tutorials/rho sequentially:

> root -l -b -q 'tut_sim.C(100)'

To change the decay file (here pp_Jpsi2pi_Jpsi_mumu.dec), you need to give the alternative file name as a parameter for tut_sim.C, like

> root -l -b -q 'tut_sim.C(100, "signal", "my_decay.dec")'

The second parameters “signal” is an arbitrary prefix for the output files. Be sure to put single quotes around the macro name when using ROOT in batch mode (root -b), otherwise the shell command is spoiled by the brackets. To run the digitization, reconstruction and PID reconstruction you call the macro:

> root -l -b -q tut_aod.C

without parameters for the default output name, or correspondingly for the use of another prefix:

> root -l -b -q 'tut_aod.C(100, "signal")'

There is also shortcut by simply executing the shell script:

> ./tut_runall.sh 100

which contains both commands from above.

After you ran these macros you should end up with a couple of new files in your directory, including

  • signal_sim.root - simulation stage of analysis

  • signal_pid.root - the reconstructed PndPidCandidates and PID information. This file contains the AOD and McTruth for the analysis!

  • signal_par.root - geometry parameters, magnetic fields, etc

1.3. Running Fast Simulation

A simplified simulation (e.g. for testing purpose or rougher studies) can be done by using Fast Simulations. There, the initial particles from the generator(s) are either removed based on the detector acceptance or their properties are smeared according to statistical characteristics of fully simulated events. This runs at least 2-3 orders of magnitudes faster, since no particle transport with e.g. Geant or digitization/reconstruction is needed. To run it simply type

> root -b -q 'tut_fastsim.C(1000)'

The output file signal_fast.root is created, which can be analysed afterwards with the macro tut_ana_fast.C instead of tut_ana.C. The major difference in the simulation output are the names of the PID arrays (see sec. 2.2.3), so be aware that you have to use PidChargedProbability in all places, where a PID algorithm name is required.