Skip to content

Commit 81f0d83

Browse files
committed
Add a few EPOS4 configurations
EPOS4 physics generation always happens internally in the symmetric nucleon-nucleon CM frame. hepmc_rapcms does not change that internal physics, but it applies a rigid rapidity boost (dy = -hepmc_rapcms, applied in src/KW/out.f → fillhepmc) to every particle written to output, which means re-expressing the same collision in the lab frame. This is here used for pO and should be used for p-Pb as well (the shift there is 0.465, from the same `Δy = 0.5·ln(E_p/E_target-per-nucleon` formula).
1 parent 3418de0 commit 81f0d83

12 files changed

Lines changed: 537 additions & 0 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
!--------------------------------------------------------------------
2+
! Neon-Neon collisions with hydro and hadronic cascade
3+
!--------------------------------------------------------------------
4+
5+
!---------------------------------------
6+
! Define run
7+
!---------------------------------------
8+
9+
application hadron !hadron-hadron, hadron-nucleus, or nucleus-nucleus
10+
set laproj 10 !projectile atomic number
11+
set maproj 20 !projectile mass number
12+
set latarg 10 !target atomic number
13+
set matarg 20 !target mass number
14+
set ecms 5360 !sqrt(s)_pp
15+
set istmax 25 !max status considered for storage
16+
17+
ftime on !string formation time non-zero
18+
!suppressed decays:
19+
nodecays
20+
110 20 2130 -2130 2230 -2230 1130 -1130 1330 -1330 2330 -2330 3331 -3331
21+
end
22+
23+
set ninicon 1 !number of initial conditions used for hydro evolution
24+
core full !core/corona activated
25+
hydro off !hydro disabled
26+
eos off !eos disabled (epos standard EoS)
27+
hacas full !hadronic cascade activated (UrQMD)
28+
set nfreeze 1 !number of freeze out events per hydro event
29+
set modsho 1 !printout every modsho events
30+
set centrality 0 !0=min bias
31+
set ihepmc 2 !HepMC output enabled on stdout
32+
fillTree4(C1) !C1 sets impact parameter as centrality variable
33+
set nfull 10
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
!--------------------------------------------------------------------
2+
! Oxygen-Oxygen collisions with hydro and hadronic cascade
3+
!--------------------------------------------------------------------
4+
5+
!---------------------------------------
6+
! Define run
7+
!---------------------------------------
8+
9+
application hadron !hadron-hadron, hadron-nucleus, or nucleus-nucleus
10+
set laproj 8 !projectile atomic number
11+
set maproj 16 !projectile mass number
12+
set latarg 8 !target atomic number
13+
set matarg 16 !target mass number
14+
set ecms 5360 !sqrt(s)_pp
15+
set istmax 25 !max status considered for storage
16+
17+
ftime on !string formation time non-zero
18+
!suppressed decays:
19+
nodecays
20+
110 20 2130 -2130 2230 -2230 1130 -1130 1330 -1330 2330 -2330 3331 -3331
21+
end
22+
23+
set ninicon 1 !number of initial conditions used for hydro evolution
24+
core full !core/corona activated
25+
hydro off !hydro disabled
26+
eos off !eos disabled (epos standard EoS)
27+
hacas full !hadronic cascade activated (UrQMD)
28+
set nfreeze 1 !number of freeze out events per hydro event
29+
set modsho 1 !printout every modsho events
30+
set centrality 0 !0=min bias
31+
set ihepmc 2 !HepMC output enabled on stdout
32+
fillTree4(C1) !C1 sets impact parameter as centrality variable
33+
set nfull 10
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
!--------------------------------------------------------------------
2+
! proton-Oxigen collisions at 9.62 TeV without hydro and with hadronic cascade
3+
!--------------------------------------------------------------------
4+
5+
!---------------------------------------
6+
! Define run
7+
!---------------------------------------
8+
9+
application hadron !hadron-hadron, hadron-nucleus, or nucleus-nucleus
10+
set laproj 1 !projectile atomic number
11+
set maproj 1 !projectile mass number
12+
set latarg 8 !target atomic number
13+
set matarg 16 !target mass number
14+
set ecms 9620 !sqrt(s_NN)
15+
set istmax 25 !max status considered for storage
16+
17+
ftime on !string formation time non-zero
18+
!suppressed decays:
19+
nodecays
20+
110 20 2130 -2130 2230 -2230 1130 -1130 1330 -1330 2330 -2330 3331 -3331
21+
end
22+
23+
set ninicon 1 !number of initial conditions used for hydro evolution
24+
core full !core/corona activated
25+
hydro off !hydro disabled
26+
eos off !eos disabled (epos standard EoS)
27+
hacas full !hadronic cascade activated (UrQMD)
28+
set nfreeze 1 !number of freeze out events per hydro event
29+
set modsho 1 !printout every modsho events
30+
set centrality 0 !0=min bias
31+
set ihepmc 2 !HepMC output enabled on stdout
32+
fillTree4(C1) !C1 sets impact parameter as centrality variable
33+
hepmc_rapcms 0.346 !boost output to real asymmetric p/O beam frame (p: 6800 GeV)
34+
set nfull 10
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
!--------------------------------------------------------------------
2+
! proton-Oxigen collisions at 9.62 TeV without hydro and with hadronic cascade
3+
!--------------------------------------------------------------------
4+
5+
!---------------------------------------
6+
! Define run
7+
!---------------------------------------
8+
9+
application hadron !hadron-hadron, hadron-nucleus, or nucleus-nucleus
10+
set laproj 1 !projectile atomic number
11+
set maproj 1 !projectile mass number
12+
set latarg 8 !target atomic number
13+
set matarg 16 !target mass number
14+
set ecms 9620 !sqrt(s_NN)
15+
set istmax 25 !max status considered for storage
16+
17+
ftime on !string formation time non-zero
18+
!suppressed decays:
19+
nodecays
20+
110 20 2130 -2130 2230 -2230 1130 -1130 1330 -1330 2330 -2330 3331 -3331
21+
end
22+
23+
set ninicon 1 !number of initial conditions used for hydro evolution
24+
core full !core/corona activated
25+
hydro hlle !hydro activated
26+
eos x3ff !eos activated (epos standard EoS)
27+
hacas full !hadronic cascade activated (UrQMD)
28+
set nfreeze 1 !number of freeze out events per hydro event
29+
set modsho 1 !printout every modsho events
30+
set centrality 0 !0=min bias
31+
set ihepmc 2 !HepMC output enabled on stdout
32+
fillTree4(C1) !C1 sets impact parameter as centrality variable
33+
hepmc_rapcms 0.346 !boost output to real asymmetric p/O beam frame (p: 6800 GeV)
34+
set nfull 10
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#NEV_TEST> 10
2+
[GeneratorExternal]
3+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator_EPOS4.C
4+
funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/common/epos4/generator/NeNe_536TeV_EPOS4.optns", 2147483647)
5+
6+
[GeneratorFileOrCmd]
7+
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh
8+
bMaxSwitch=none
9+
10+
# Set to version 2 if EPOS4.0.0 is used
11+
[HepMC]
12+
version=3
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#NEV_TEST> 10
2+
[GeneratorExternal]
3+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator_EPOS4.C
4+
funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/common/epos4/generator/OO_536TeV_EPOS4.optns", 2147483647)
5+
6+
[GeneratorFileOrCmd]
7+
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh
8+
bMaxSwitch=none
9+
10+
# Set to version 2 if EPOS4.0.0 is used
11+
[HepMC]
12+
version=3
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#NEV_TEST> 10
2+
[GeneratorExternal]
3+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator_EPOS4.C
4+
funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/common/epos4/generator/pO_962TeV_EPOS4.optns", 2147483647)
5+
6+
[GeneratorFileOrCmd]
7+
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh
8+
bMaxSwitch=none
9+
10+
# Set to version 2 if EPOS4.0.0 is used
11+
[HepMC]
12+
version=3
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#NEV_TEST> 2
2+
#---> GeneratorEPOS4pO962TeV
3+
[GeneratorExternal]
4+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator_EPOS4.C
5+
funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/common/epos4/generator/pO_962TeV_EPOS4_hydro.optns", 2147483647)
6+
7+
[GeneratorFileOrCmd]
8+
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh
9+
bMaxSwitch=none
10+
11+
# Set to version 2 if EPOS4.0.0 is used
12+
[HepMC]
13+
version=3
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
int External()
2+
{
3+
std::string path{"o2sim_Kine.root"};
4+
5+
// Check that file exists, can be opened and has the correct tree
6+
TFile file(path.c_str(), "READ");
7+
if (file.IsZombie())
8+
{
9+
std::cerr << "Cannot open ROOT file " << path << "\n";
10+
return 1;
11+
}
12+
13+
auto tree = (TTree*)file.Get("o2sim");
14+
if (!tree)
15+
{
16+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
17+
return 1;
18+
}
19+
20+
std::vector<o2::MCTrack>* tracks{};
21+
tree->SetBranchAddress("MCTrack", &tracks);
22+
23+
// Check if all events are filled
24+
auto nEvents = tree->GetEntries();
25+
for (Long64_t i = 0; i < nEvents; ++i)
26+
{
27+
tree->GetEntry(i);
28+
if (tracks->empty())
29+
{
30+
std::cerr << "Empty entry found at event " << i << "\n";
31+
return 1;
32+
}
33+
}
34+
35+
// Check if there are 10 events, as customarily set in the ini file
36+
// Heavy-ion collisions with hydro and hadronic cascade are very slow to simulate
37+
if (nEvents != 10)
38+
{
39+
std::cerr << "Expected 10 events, got " << nEvents << "\n";
40+
return 1;
41+
}
42+
43+
// ---- Neon-Neon parameters ----
44+
constexpr int kNeonPDG = 1000100200; // Ne-20 ion
45+
constexpr double kEnucleon = 5360.; // GeV per nucleon
46+
constexpr int kA = 20; // Neon mass number
47+
constexpr double kNeonEnergy = kA * kEnucleon / 2.0; // beam energy in GeV
48+
49+
// Check if each event has two neon ions at expected energy
50+
for (int i = 0; i < nEvents; i++)
51+
{
52+
tree->GetEntry(i);
53+
int count = 0;
54+
55+
for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
56+
{
57+
auto track = tracks->at(idxMCTrack);
58+
double energy = track.GetEnergy();
59+
60+
// 50 MeV tolerance (floating point safety)
61+
if (std::abs(energy - kNeonEnergy) < 5e-2 &&
62+
track.GetPdgCode() == kNeonPDG)
63+
{
64+
count++;
65+
}
66+
}
67+
68+
if (count < 2)
69+
{
70+
std::cerr << "Event " << i
71+
<< " has less than 2 neon ions at "
72+
<< kNeonEnergy << " GeV\n";
73+
return 1;
74+
}
75+
}
76+
77+
return 0;
78+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
int External()
2+
{
3+
std::string path{"o2sim_Kine.root"};
4+
5+
// Check that file exists, can be opened and has the correct tree
6+
TFile file(path.c_str(), "READ");
7+
if (file.IsZombie())
8+
{
9+
std::cerr << "Cannot open ROOT file " << path << "\n";
10+
return 1;
11+
}
12+
13+
auto tree = (TTree *)file.Get("o2sim");
14+
if (!tree)
15+
{
16+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
17+
return 1;
18+
}
19+
20+
std::vector<o2::MCTrack> *tracks{};
21+
tree->SetBranchAddress("MCTrack", &tracks);
22+
23+
// Check if all events are filled
24+
auto nEvents = tree->GetEntries();
25+
for (Long64_t i = 0; i < nEvents; ++i)
26+
{
27+
tree->GetEntry(i);
28+
if (tracks->empty())
29+
{
30+
std::cerr << "Empty entry found at event " << i << "\n";
31+
return 1;
32+
}
33+
}
34+
35+
// Check if there are 10 events, as customly set in the ini file
36+
// Heavy-ion collisions with hydro and hadronic cascade are very slow to simulate
37+
if (nEvents != 10)
38+
{
39+
std::cerr << "Expected 10 event, got " << nEvents << "\n";
40+
return 1;
41+
}
42+
43+
// ---- Oxygen-Oxygen parameters ----
44+
constexpr int kOxygenPDG = 1000080160; // O-16 ion
45+
constexpr double kEnucleon = 5360.; // GeV per nucleon
46+
constexpr int kA = 16; // Oxygen mass number
47+
constexpr double kOxygenEnergy = kA * kEnucleon / 2.0; // 85760 / 2 GeV
48+
49+
// Check if each event has two oxygen ions at expected energy
50+
for (int i = 0; i < nEvents; i++)
51+
{
52+
tree->GetEntry(i);
53+
int count = 0;
54+
55+
for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
56+
{
57+
auto track = tracks->at(idxMCTrack);
58+
double energy = track.GetEnergy();
59+
60+
// 50 MeV tolerance (floating point safety)
61+
if (std::abs(energy - kOxygenEnergy) < 5e-2 &&
62+
track.GetPdgCode() == kOxygenPDG)
63+
{
64+
count++;
65+
}
66+
}
67+
68+
if (count < 2)
69+
{
70+
std::cerr << "Event " << i
71+
<< " has less than 2 oxygen ions at "
72+
<< kOxygenEnergy << " GeV\n";
73+
return 1;
74+
}
75+
}
76+
77+
return 0;
78+
}

0 commit comments

Comments
 (0)