Skip to content

Commit b8289dc

Browse files
authored
MC/PWGEM: add cfg and ini for VM2ll (#2172)
* MC/PWGEM: add cfg and ini for VM2ll * Comment out Pythia8 function Comment out the Pythia8 function to disable it. * Update pythia8_OO_536_VM2ll.C
1 parent 13773b5 commit b8289dc

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Diamond]
2+
width[2]=6.0
3+
4+
[GeneratorExternal]
5+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C
6+
funcName=generator_pythia8_ALICE3()
7+
8+
[GeneratorPythia8]
9+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
// check if each event has at least two oxygen ions
31+
for (int i = 0; i < nEvents; i++)
32+
{
33+
auto check = tree->GetEntry(i);
34+
int count = 0;
35+
for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
36+
{
37+
auto track = tracks->at(idxMCTrack);
38+
if (track.GetPdgCode() == 1000080160)
39+
{
40+
count++;
41+
}
42+
}
43+
if (count < 2)
44+
{
45+
std::cerr << "Event " << i << " has less than 2 oxygen ions\n";
46+
return 1;
47+
}
48+
}
49+
50+
return 0;
51+
}
52+
53+
//int Pythia8()
54+
//{
55+
// return External();
56+
//}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### OO beams
2+
Beams:idA = 1000080160
3+
Beams:idB = 1000080160
4+
Beams:eCM = 5360.0 ### energy
5+
6+
Beams:frameType = 1
7+
ParticleDecays:limitTau0 = on
8+
ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c
9+
10+
### Save some CPU at init of jobs
11+
### To avoid refitting, add the following lines to your configuration file:
12+
HeavyIon:SigFitNGen = 0
13+
HeavyIon:SigFitDefPar = 2.15,18.42,0.33
14+
15+
Random:setSeed = on
16+
17+
# change omega, phi meson's BR below
18+
223:oneChannel = 1 0.5 0 -11 11
19+
223:addChannel = 1 0.5 0 -13 13
20+
333:oneChannel = 1 0.5 0 -11 11
21+
333:addChannel = 1 0.5 0 -13 13

0 commit comments

Comments
 (0)