Skip to content

Commit 005d4e6

Browse files
committed
Add extra files for HF -> mumu simulations in DQ
1 parent 6e125f1 commit 005d4e6

11 files changed

+352
-5
lines changed

MC/config/PWGDQ/external/generator/GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ FairGenerator*
162162
auto gen = new o2::eventgen::GeneratorEvtGen<o2::eventgen::GeneratorHFToMu_EvtGenFwdY_gaptriggered>();
163163
if (isbb == false) {
164164
gen->setPDG(4);
165-
pdgs = "411;421;431;4122;4232;4332";
165+
pdgs = "411;421;431;4122;4132;4232;4332";
166166
} else {
167167
gen->setPDG(5);
168168
pdgs = "511;521;531;541;5112;5122;5232;5132;5332";
@@ -171,7 +171,7 @@ FairGenerator*
171171

172172
gen->setRapidityHadron(rapidityMin,rapidityMax);
173173
gen->setHadronMultiplicity(1);
174-
TString pathO2table = gSystem->ExpandPathName("$O2DPG_MC_CONFIG_ROOT/MC/config/PWGDQ/pythia8/decayer/switchOffChadrons.cfg");
174+
TString pathO2table = gSystem->ExpandPathName("$O2DPG_MC_CONFIG_ROOT/MC/config/PWGDQ/pythia8/decayer/switchOffCBhadrons.cfg");
175175
gen->readFile(pathO2table.Data());
176176
gen->setConfigMBdecays(pathO2table);
177177
gen->setVerbose(verbose);

MC/config/PWGDQ/ini/GeneratorHF_bbbarToDDbarToMuons_fwdy_TriggerGap.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
[GeneratorExternal]
55
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/external/generator/GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq.C
6-
funcName = GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq(-4.3, -2.3, false, true, false)
6+
funcName = GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq(-4.3, -2.3, false, true, true)
77

88
### The external generator derives from GeneratorPythia8.
99
### This part configures the bits of the interface: configuration and user hooks
1010

1111
[GeneratorPythia8]
12-
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_hf.cfg
12+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/generator/pythia8_hard_cr2.cfg
1313
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
1414
hooksFuncName = pythia8_userhooks_bbbar(-4.3, -2.3)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### The setup uses an external event generator
2+
### This part sets the path of the file and the function call to retrieve it
3+
4+
[GeneratorExternal]
5+
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/external/generator/GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq.C
6+
funcName = GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq(-4.3, -2.3, false, true, true)
7+
8+
### The external generator derives from GeneratorPythia8.
9+
### This part configures the bits of the interface: configuration and user hooks
10+
11+
[GeneratorPythia8]
12+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/generator/pythia8_inel_cr2.cfg
13+
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
14+
hooksFuncName = pythia8_userhooks_bbbar(-4.3, -2.3)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### The setup uses an external event generator
2+
### This part sets the path of the file and the function call to retrieve it
3+
4+
[GeneratorExternal]
5+
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/external/generator/GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq.C
6+
funcName = GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq(-4.3, -2.3, false, true, false)
7+
8+
### The external generator derives from GeneratorPythia8.
9+
### This part configures the bits of the interface: configuration and user hooks
10+
11+
[GeneratorPythia8]
12+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/generator/pythia8_hard_cr2.cfg
13+
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
14+
hooksFuncName = pythia8_userhooks_bbbar(-4.3, -2.3)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### The setup uses an external event generator
2+
### This part sets the path of the file and the function call to retrieve it
3+
4+
[GeneratorExternal]
5+
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/external/generator/GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq.C
6+
funcName = GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq(-4.3, -2.3, false, true, false)
7+
8+
### The external generator derives from GeneratorPythia8.
9+
### This part configures the bits of the interface: configuration and user hooks
10+
11+
[GeneratorPythia8]
12+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/generator/pythia8_inel_cr2.cfg
13+
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
14+
hooksFuncName = pythia8_userhooks_bbbar(-4.3, -2.3)

MC/config/PWGDQ/ini/GeneratorHF_ccbarToMuonsSemileptonic_fwdy_inel_TriggerGap.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ funcName = GeneratorHFToMu_EvtGenFwdY_gaptriggered_dq(-4.3, -2.3, false, false,
99
### This part configures the bits of the interface: configuration and user hooks
1010

1111
[GeneratorPythia8]
12-
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_inel.cfg
12+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_inel_cr2.cfg
1313
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
1414
hooksFuncName = pythia8_userhooks_ccbar(-4.3, -2.3)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
int External()
2+
{
3+
int checkPdgDecay = 13;
4+
std::string path{"o2sim_Kine.root"};
5+
TFile file(path.c_str(), "READ");
6+
if (file.IsZombie()) {
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree*)file.Get("o2sim");
11+
std::vector<o2::MCTrack>* tracks{};
12+
tree->SetBranchAddress("MCTrack", &tracks);
13+
14+
int nLeptons{};
15+
int nLeptonsInAcceptance{};
16+
int nLeptonsToBeDone{};
17+
int nSignalPairs{};
18+
int nLeptonPairs{};
19+
int nLeptonPairsInAcceptance{};
20+
int nLeptonPairsToBeDone{};
21+
auto nEvents = tree->GetEntries();
22+
23+
for (int i = 0; i < nEvents; i++) {
24+
tree->GetEntry(i);
25+
int nleptonseinacc = 0;
26+
int nleptonse = 0;
27+
int nleptonseToBeDone = 0;
28+
int nopenHeavy = 0;
29+
for (auto& track : *tracks) {
30+
auto pdg = track.GetPdgCode();
31+
auto y = track.GetRapidity();
32+
if (std::abs(pdg) == checkPdgDecay) {
33+
int igmother = track.getMotherTrackId();
34+
if (igmother > 0) {
35+
auto gmTrack = (*tracks)[igmother];
36+
int gmpdg = gmTrack.GetPdgCode();
37+
if ( int(std::abs(gmpdg)/100.) == 4 || int(std::abs(gmpdg)/1000.) == 4 || int(std::abs(gmpdg)/100.) == 5 || int(std::abs(gmpdg)/1000.) == 5 ) {
38+
nLeptons++;
39+
nleptonse++;
40+
if (-4.3 < y && y < -2.2) {
41+
nleptonseinacc++;
42+
nLeptonsInAcceptance++;
43+
}
44+
if (track.getToBeDone()) {
45+
nLeptonsToBeDone++;
46+
nleptonseToBeDone++;
47+
}
48+
}
49+
}
50+
} else if (std::abs(pdg) == 411 || std::abs(pdg) == 421 || std::abs(pdg) == 431 || std::abs(pdg) == 4122 || std::abs(pdg) == 4132 || std::abs(pdg) == 4232 || std::abs(pdg) == 4332 || std::abs(pdg) == 511 || std::abs(pdg) == 521 || std::abs(pdg) == 531 || std::abs(pdg) == 541 || std::abs(pdg) == 5112 || std::abs(pdg) == 5122 || std::abs(pdg) == 5232 || std::abs(pdg) == 5132 || std::abs(pdg) == 5332) {
51+
nopenHeavy++;
52+
}
53+
}
54+
if (nopenHeavy > 1) nSignalPairs++;
55+
if (nleptonse > 1) nLeptonPairs++;
56+
if (nleptonseToBeDone > 1) nLeptonPairsToBeDone++;
57+
if (nleptonseinacc > 1) nLeptonPairsInAcceptance++;
58+
}
59+
std::cout << "#events: " << nEvents << "\n"
60+
<< "#muons in acceptance: " << nLeptonsInAcceptance << "\n"
61+
<< "#muon pairs in acceptance: " << nLeptonPairsInAcceptance << "\n"
62+
<< "#muons: " << nLeptons << "\n"
63+
<< "#muons to be done: " << nLeptonsToBeDone << "\n"
64+
<< "#signal pairs: " << nSignalPairs << "\n"
65+
<< "#muon pairs: " << nLeptonPairs << "\n"
66+
<< "#muon pairs to be done: " << nLeptonPairsToBeDone << "\n";
67+
if (nLeptonPairs != nLeptonPairsToBeDone) {
68+
std::cerr << "The number of muon pairs should be the same as the number of muon pairs which should be transported.\n";
69+
return 1;
70+
}
71+
if (nLeptons != nLeptonsToBeDone) {
72+
std::cerr << "The number of muons should be the same as the number of muons which should be transported.\n";
73+
return 1;
74+
}
75+
76+
return 0;
77+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
int External()
2+
{
3+
int checkPdgDecay = 13;
4+
std::string path{"o2sim_Kine.root"};
5+
TFile file(path.c_str(), "READ");
6+
if (file.IsZombie()) {
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree*)file.Get("o2sim");
11+
std::vector<o2::MCTrack>* tracks{};
12+
tree->SetBranchAddress("MCTrack", &tracks);
13+
14+
int nLeptons{};
15+
int nLeptonsInAcceptance{};
16+
int nLeptonsToBeDone{};
17+
int nSignalPairs{};
18+
int nLeptonPairs{};
19+
int nLeptonPairsInAcceptance{};
20+
int nLeptonPairsToBeDone{};
21+
auto nEvents = tree->GetEntries();
22+
23+
for (int i = 0; i < nEvents; i++) {
24+
tree->GetEntry(i);
25+
int nleptonseinacc = 0;
26+
int nleptonse = 0;
27+
int nleptonseToBeDone = 0;
28+
int nopenHeavy = 0;
29+
for (auto& track : *tracks) {
30+
auto pdg = track.GetPdgCode();
31+
auto y = track.GetRapidity();
32+
if (std::abs(pdg) == checkPdgDecay) {
33+
int igmother = track.getMotherTrackId();
34+
if (igmother > 0) {
35+
auto gmTrack = (*tracks)[igmother];
36+
int gmpdg = gmTrack.GetPdgCode();
37+
if ( int(std::abs(gmpdg)/100.) == 4 || int(std::abs(gmpdg)/1000.) == 4 || int(std::abs(gmpdg)/100.) == 5 || int(std::abs(gmpdg)/1000.) == 5 ) {
38+
nLeptons++;
39+
nleptonse++;
40+
if (-4.3 < y && y < -2.2) {
41+
nleptonseinacc++;
42+
nLeptonsInAcceptance++;
43+
}
44+
if (track.getToBeDone()) {
45+
nLeptonsToBeDone++;
46+
nleptonseToBeDone++;
47+
}
48+
}
49+
}
50+
} else if (std::abs(pdg) == 411 || std::abs(pdg) == 421 || std::abs(pdg) == 431 || std::abs(pdg) == 4122 || std::abs(pdg) == 4132 || std::abs(pdg) == 4232 || std::abs(pdg) == 4332 || std::abs(pdg) == 511 || std::abs(pdg) == 521 || std::abs(pdg) == 531 || std::abs(pdg) == 541 || std::abs(pdg) == 5112 || std::abs(pdg) == 5122 || std::abs(pdg) == 5232 || std::abs(pdg) == 5132 || std::abs(pdg) == 5332) {
51+
nopenHeavy++;
52+
}
53+
}
54+
if (nopenHeavy > 1) nSignalPairs++;
55+
if (nleptonse > 1) nLeptonPairs++;
56+
if (nleptonseToBeDone > 1) nLeptonPairsToBeDone++;
57+
if (nleptonseinacc > 1) nLeptonPairsInAcceptance++;
58+
}
59+
std::cout << "#events: " << nEvents << "\n"
60+
<< "#muons in acceptance: " << nLeptonsInAcceptance << "\n"
61+
<< "#muon pairs in acceptance: " << nLeptonPairsInAcceptance << "\n"
62+
<< "#muons: " << nLeptons << "\n"
63+
<< "#muons to be done: " << nLeptonsToBeDone << "\n"
64+
<< "#signal pairs: " << nSignalPairs << "\n"
65+
<< "#muon pairs: " << nLeptonPairs << "\n"
66+
<< "#muon pairs to be done: " << nLeptonPairsToBeDone << "\n";
67+
if (nLeptonPairs != nLeptonPairsToBeDone) {
68+
std::cerr << "The number of muon pairs should be the same as the number of muon pairs which should be transported.\n";
69+
return 1;
70+
}
71+
if (nLeptons != nLeptonsToBeDone) {
72+
std::cerr << "The number of muons should be the same as the number of muons which should be transported.\n";
73+
return 1;
74+
}
75+
76+
return 0;
77+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
int External()
2+
{
3+
int checkPdgDecay = 13;
4+
std::string path{"o2sim_Kine.root"};
5+
TFile file(path.c_str(), "READ");
6+
if (file.IsZombie()) {
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree*)file.Get("o2sim");
11+
std::vector<o2::MCTrack>* tracks{};
12+
tree->SetBranchAddress("MCTrack", &tracks);
13+
14+
int nLeptons{};
15+
int nLeptonsInAcceptance{};
16+
int nLeptonsToBeDone{};
17+
int nSignalPairs{};
18+
int nLeptonPairs{};
19+
int nLeptonPairsInAcceptance{};
20+
int nLeptonPairsToBeDone{};
21+
auto nEvents = tree->GetEntries();
22+
23+
for (int i = 0; i < nEvents; i++) {
24+
tree->GetEntry(i);
25+
int nleptonseinacc = 0;
26+
int nleptonse = 0;
27+
int nleptonseToBeDone = 0;
28+
int nopenHeavy = 0;
29+
for (auto& track : *tracks) {
30+
auto pdg = track.GetPdgCode();
31+
auto y = track.GetRapidity();
32+
if (std::abs(pdg) == checkPdgDecay) {
33+
int igmother = track.getMotherTrackId();
34+
if (igmother > 0) {
35+
auto gmTrack = (*tracks)[igmother];
36+
int gmpdg = gmTrack.GetPdgCode();
37+
if ( int(std::abs(gmpdg)/100.) == 4 || int(std::abs(gmpdg)/1000.) == 4 || int(std::abs(gmpdg)/100.) == 5 || int(std::abs(gmpdg)/1000.) == 5 ) {
38+
nLeptons++;
39+
nleptonse++;
40+
if (-4.3 < y && y < -2.2) {
41+
nleptonseinacc++;
42+
nLeptonsInAcceptance++;
43+
}
44+
if (track.getToBeDone()) {
45+
nLeptonsToBeDone++;
46+
nleptonseToBeDone++;
47+
}
48+
}
49+
}
50+
} else if (std::abs(pdg) == 411 || std::abs(pdg) == 421 || std::abs(pdg) == 431 || std::abs(pdg) == 4122 || std::abs(pdg) == 4132 || std::abs(pdg) == 4232 || std::abs(pdg) == 4332 || std::abs(pdg) == 511 || std::abs(pdg) == 521 || std::abs(pdg) == 531 || std::abs(pdg) == 541 || std::abs(pdg) == 5112 || std::abs(pdg) == 5122 || std::abs(pdg) == 5232 || std::abs(pdg) == 5132 || std::abs(pdg) == 5332) {
51+
nopenHeavy++;
52+
}
53+
}
54+
if (nopenHeavy > 1) nSignalPairs++;
55+
if (nleptonse > 1) nLeptonPairs++;
56+
if (nleptonseToBeDone > 1) nLeptonPairsToBeDone++;
57+
if (nleptonseinacc > 1) nLeptonPairsInAcceptance++;
58+
}
59+
std::cout << "#events: " << nEvents << "\n"
60+
<< "#muons in acceptance: " << nLeptonsInAcceptance << "\n"
61+
<< "#muon pairs in acceptance: " << nLeptonPairsInAcceptance << "\n"
62+
<< "#muons: " << nLeptons << "\n"
63+
<< "#muons to be done: " << nLeptonsToBeDone << "\n"
64+
<< "#signal pairs: " << nSignalPairs << "\n"
65+
<< "#muon pairs: " << nLeptonPairs << "\n"
66+
<< "#muon pairs to be done: " << nLeptonPairsToBeDone << "\n";
67+
if (nLeptonPairs != nLeptonPairsToBeDone) {
68+
std::cerr << "The number of muon pairs should be the same as the number of muon pairs which should be transported.\n";
69+
return 1;
70+
}
71+
if (nLeptons != nLeptonsToBeDone) {
72+
std::cerr << "The number of muons should be the same as the number of muons which should be transported.\n";
73+
return 1;
74+
}
75+
76+
return 0;
77+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
### beams
2+
Beams:idA 2212 # proton
3+
Beams:idB 2212 # proton
4+
Beams:eCM 13600. # GeV
5+
6+
### processes
7+
HardQCD:hardccbar on
8+
HardQCD:hardbbbar on
9+
10+
### decays
11+
ParticleDecays:limitTau0 on
12+
ParticleDecays:tau0Max 10.
13+
14+
### switching on Pythia Mode2
15+
ColourReconnection:mode 1
16+
ColourReconnection:allowDoubleJunRem off
17+
ColourReconnection:m0 0.3
18+
ColourReconnection:allowJunctions on
19+
ColourReconnection:junctionCorrection 1.20
20+
ColourReconnection:timeDilationMode 2
21+
ColourReconnection:timeDilationPar 0.18
22+
StringPT:sigma 0.335
23+
StringZ:aLund 0.36
24+
StringZ:bLund 0.56
25+
StringFlav:probQQtoQ 0.078
26+
StringFlav:ProbStoUD 0.2
27+
StringFlav:probQQ1toQQ0join 0.0275,0.0275,0.0275,0.0275
28+
MultiPartonInteractions:pT0Ref 2.15
29+
BeamRemnants:remnantMode 1
30+
BeamRemnants:saturation 5
31+
32+
# Correct decay lengths (wrong in PYTHIA8 decay table)
33+
# Lb
34+
5122:tau0 = 0.4390
35+
# Xic0
36+
4132:tau0 = 0.0455
37+
# OmegaC
38+
4332:tau0 = 0.0803

0 commit comments

Comments
 (0)