Skip to content

Commit aa2877a

Browse files
lgansbartlLaura Gansbartl
andauthored
[PWGEM] Add configs for Dalitz-decay MC (#2263)
* first comit * Fix missing new line * Add Pythia8 Forced Dalitz test config for pp 13.6 TeV * update * update --------- Co-authored-by: Laura Gansbartl <lgansbartl@pcikf5.ikf.uni-frankfurt.de>
1 parent 81286d2 commit aa2877a

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[GeneratorPythia8]
2+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/configPythia_ForcedDalitz.cfg
3+
4+
[DecayerPythia8]
5+
config[0]=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/decayer/force_dummy.cfg
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
int External() {
2+
std::string path{"o2sim_Kine.root"};
3+
// Check that file exists, can be opened and has the correct tree
4+
TFile file(path.c_str(), "READ");
5+
if (file.IsZombie())
6+
{
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree *)file.Get("o2sim");
11+
if (!tree)
12+
{
13+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
14+
return 1;
15+
}
16+
std::vector<o2::MCTrack> *tracks{};
17+
tree->SetBranchAddress("MCTrack", &tracks);
18+
19+
// Check if all events are filled
20+
auto nEvents = tree->GetEntries();
21+
for (Long64_t i = 0; i < nEvents; ++i)
22+
{
23+
tree->GetEntry(i);
24+
if (tracks->empty())
25+
{
26+
std::cerr << "Empty entry found at event " << i << "\n";
27+
return 1;
28+
}
29+
}
30+
31+
32+
return 0;
33+
}
34+
35+
int pythia8()
36+
{
37+
return External();
38+
}
39+

MC/config/PWGEM/pythia8/decayer/force_dummy.cfg

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ProcessLevel:all on
2+
3+
### beams
4+
Beams:idA 2212 # proton
5+
Beams:idB 2212 # proton
6+
Beams:eCM 13600. # GeV
7+
8+
### processes
9+
SoftQCD:inelastic on # all inelastic processes
10+
11+
ParticleDecays:limitTau0 on
12+
ParticleDecays:tau0Max 10
13+
14+
15+
#decay eta -> e+ e- gamma BR = 100%
16+
221:onMode = off
17+
221:onIfMatch = 22 11 -11
18+
#221:addChannel = 1 1 0 22 11 -11
19+
20+
#decay pi0 -> e+ e- gamma BR = 10%
21+
111:addChannel = 1 0.10 0 22 11 -11"

0 commit comments

Comments
 (0)