User Tools

Site Tools


community:hepsim:dev_truth

This is an old revision of the document!


<< back to HepSim manual

Creating truth-level samples

HepSim is optimized to keep truth-level in the “archive” format called ProMC. It allows to keep data in a compact form optimized for data streaming over the network, together with logfiles which will help to identify the MC settings.

ProMC files can be created directly by Pythi8 (the example “main46.cc” in the Pythi8). Or, you can convert files in the format “HEPMC”, “LHE”, “STDHEP” to ProMC as shown in the “example” directory of the installed ProMC package (look at $PROMC/examples). The converters are:

  • hepmc2promc
  • lhe2promc
  • stdhep2promc

Look at the ProMC manual for more examples.

Single-particle gun

ProMC files with single particles can be created using the ProMC. Download the recent ProMC package and look at the directory:

wget http://atlaswww.hep.anl.gov/asc/promc/download/current.php -O ProMC.tgz
tar -zvxf ProMC.tgz
cd examples/particle_gun
source setup.sh
javac promc_gun.java
java promc_gun pions.promc 100 211 1000 # E=0-100 GeV, PID=211, events=1000

This creates file “pions.promc” with 2 particles per event, with the maximum energy of 100 GeV (randomly distributed from 0 to 100). The particles are pions (pi+, pid=211). The total number of events 1000. The phi and theta distributions are flat After file creation, look at the events using the file browser. You can also modify the java code to change the single-particle events.

Pileups mixing

One can mix events from a signal ProMC file with inelastic (minbias) events using a “pileup” mixing program:

hs-pileup pN signal.promc minbias.promc output.promc

Here “p” indicates that N events from minbias.promc will be mixed with every event from signal.promc using a Poisson distribution. If “p” is missing, then exactly N events from minbias.promc will be mixed with single event from signal.promc. Use large number of events in minbias.promc to minimise reuse of the same events from the minbias.promc. The barcode of particles inside output.promc indicates the event origin.

Here is an example to create events with pileup for the paper http://arxiv.org/abs/1504.08042 Phys. Rev. D 91, 114018 (2015): We mix h→ HH signal file with MinBias Pythia8 (A2 tune) sample using <mu>=200 (Poisson mean):

wget http://atlaswww.hep.anl.gov/asc/hepsim/soft/hs-toolkit.tgz -O - | tar -xz;
source hs-toolkit/setup.sh
wget http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/minbias_a2_pythia8_l3/tev100_pythia8_MinBias_l3__A2_001.promc
wget http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/s0higgshiggs_alltau/tev100_s0higgshiggs_alltau_0001.promc
hs-pileup p200 tev100_s0higgshiggs_alltau_0001.promc tev100_pythia8_MinBias_l3__A2_001.promc output.promc 

Look at the “output.promc” with the browser to see how events are filled. Now you can use DELPHES to create fast simulation files using events with pileup.

Note: pileup mixer is implemented in Java, therefore it uses 64bit zip. For C++ programs, please use ProMCBook(“file.promc”, “r”, true) to open ProMC files (notice “true” as a new argument). For example, for the Delphes program, change the line

inputFile = new ProMCBook(argv[i], "r");       # 32bit zip

in readers/DelphesProMC.cpp to

inputFile = new ProMCBook(argv[i], "r", true); # 64bit zip

Sergei Chekanov 2016/04/27 09:24

community/hepsim/dev_truth.1461857323.txt.gz · Last modified: 2016/04/28 15:28 by asc