Skip to content

Commit c912611

Browse files
MRazza879Marta Razza
andauthored
[PWGHF] Add Pythia8 B- CRmode2 config and BToDeuteron trigger ini (#2366)
* [PWGHF] Add Pythia8 B- CRmode2 config and BToDeuteron trigger ini * [PWGHF] Add test macro for BToDeuteron HF trigger * Add O2DPG_TEST directive to GeneratorHFTrigger_BToDeuteron.ini * Switch B+ decay from offIfMatch to onIfMatch * Remove fraction check in BToDeuteron test * Fix BToDeuteron Pythia8 config * Adding all the available final states Uncommenting the decay with the lower BR * Removing empty lines --------- Co-authored-by: Marta Razza <marta.razza@cern.ch>
1 parent db02ffa commit c912611

3 files changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#NEV_TEST> 10
2+
#O2DPG_TEST> ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_BToDeuteron.C
3+
### The external generator derives from GeneratorPythia8.
4+
[GeneratorExternal]
5+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C
6+
funcName=generateHFHadToNuclei(3, {521}, {1000010020}, true, 0.5)
7+
[GeneratorPythia8]
8+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_bminus_CRmode2.cfg
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
int External()
2+
{
3+
std::string path{"o2sim_Kine.root"};
4+
std::vector<int> checkPdgHadron{521};
5+
std::vector<int> nucleiDauPdg{1000010020};
6+
7+
TFile file(path.c_str(), "READ");
8+
if (file.IsZombie())
9+
{
10+
std::cerr << "Cannot open ROOT file " << path << "\n";
11+
return 1;
12+
}
13+
14+
auto tree = (TTree *)file.Get("o2sim");
15+
std::vector<o2::MCTrack> *tracks{};
16+
tree->SetBranchAddress("MCTrack", &tracks);
17+
18+
int nSignals{}, nSignalGoodDecay{};
19+
auto nEvents = tree->GetEntries();
20+
21+
for (int i = 0; i < nEvents; i++)
22+
{
23+
tree->GetEntry(i);
24+
for (auto &track : *tracks)
25+
{
26+
auto pdg = track.GetPdgCode();
27+
if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), std::abs(pdg)) != checkPdgHadron.end())
28+
{
29+
if(std::abs(track.GetRapidity()) > 1.5) continue;
30+
nSignals++;
31+
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j)
32+
{
33+
auto pdgDau = tracks->at(j).GetPdgCode();
34+
if (std::find(nucleiDauPdg.begin(), nucleiDauPdg.end(), std::abs(pdgDau)) != nucleiDauPdg.end())
35+
{
36+
nSignalGoodDecay++;
37+
}
38+
}
39+
}
40+
}
41+
}
42+
std::cout << "--------------------------------\n";
43+
std::cout << "# Events: " << nEvents << "\n";
44+
std::cout << "# signal hadrons: " << nSignals << "\n";
45+
std::cout << "# signal hadrons decaying into nuclei: " << nSignalGoodDecay << "\n";
46+
47+
return 0;
48+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
### beams
2+
Beams:idA 2212 # proton
3+
Beams:idB 2212 # proton
4+
Beams:eCM 13600. # GeV
5+
6+
### processes
7+
SoftQCD:inelastic on # all inelastic processes
8+
9+
### decays
10+
ParticleDecays:limitTau0 on
11+
ParticleDecays:tau0Max 10.
12+
13+
### switching on Pythia Mode2
14+
ColourReconnection:mode 1
15+
ColourReconnection:allowDoubleJunRem off
16+
ColourReconnection:m0 0.3
17+
ColourReconnection:allowJunctions on
18+
ColourReconnection:junctionCorrection 1.20
19+
ColourReconnection:timeDilationMode 2
20+
ColourReconnection:timeDilationPar 0.18
21+
StringPT:sigma 0.335
22+
StringZ:aLund 0.36
23+
StringZ:bLund 0.56
24+
StringFlav:probQQtoQ 0.078
25+
StringFlav:ProbStoUD 0.2
26+
StringFlav:probQQ1toQQ0join 0.0275,0.0275,0.0275,0.0275
27+
MultiPartonInteractions:pT0Ref 2.15
28+
BeamRemnants:remnantMode 1
29+
BeamRemnants:saturation 5
30+
BeamRemnants:allowBeamJunction = off
31+
BeamRemnants:beamJunction = off
32+
ColourReconnection:allowDiquarkJunctionCR = off
33+
34+
# Correct decay lengths
35+
# B+
36+
521:tau0 = 0.4914 # PDG: 1.638 ps -> c*tau = 0.4914 mm
37+
38+
## B+ (521) decay modes – at least 2 nucleons in the final states
39+
521:onMode = off
40+
521:oneChannel = 1 3e-07 0 -2112 -2112 111 2112 2212
41+
521:addChannel = 1 3e-07 0 -3122 -2212 213 2112 2212
42+
521:addChannel = 1 3e-07 0 -2212 -2112 111 323 2112 2212
43+
521:addChannel = 1 3e-07 0 -2212 -2112 -211 211 321 2112 2212
44+
521:addChannel = 1 2e-07 0 -3122 -2212 211 2112 2212
45+
521:addChannel = 1 2e-07 0 -3122 -2212 -211 111 111 211 211 221 2112 2212
46+
521:addChannel = 1 2e-07 0 -3122 -2112 111 2112 2212
47+
521:addChannel = 1 2e-07 0 -3122 -2112 -211 111 211 2112 2212
48+
521:addChannel = 1 2e-07 0 -2214 -2212 111 211 321 2112 2212
49+
521:addChannel = 1 2e-07 0 -2212 -2212 211 211 311 2112 2212
50+
521:addChannel = 1 2e-07 0 -2212 -2212 113 211 321 2112 2212
51+
521:addChannel = 1 2e-07 0 -2212 -2212 111 111 211 211 2112 2212
52+
521:addChannel = 1 2e-07 0 -2212 -2112 211 311 2112 2212
53+
521:addChannel = 1 2e-07 0 -2212 -2112 113 321 2112 2212
54+
521:addChannel = 1 2e-07 0 -2212 -2112 111 221 321 2112 2212
55+
521:addChannel = 1 2e-07 0 -2212 -2112 111 113 211 2112 2212
56+
521:addChannel = 1 2e-07 0 -2112 -2112 -211 211 311 2112 2212
57+
521:addChannel = 1 2e-07 0 -2212 -2112 -211 113 211 211 2112 2212
58+
521:addChannel = 1 2e-07 0 -2212 -2112 -211 111 211 211 2112 2212
59+
521:addChannel = 1 2e-07 0 -2112 -2112 221 223 2112 2212
60+
521:addChannel = 1 2e-07 0 -2112 -2112 111 221 2112 2212
61+
521:onIfMatch = -2112 -2112 111 2112 2212
62+
521:onIfMatch = -3122 -2212 213 2112 2212
63+
521:onIfMatch = -2212 -2112 111 323 2112 2212
64+
521:onIfMatch = -2212 -2112 -211 211 321 2112 2212
65+
521:onIfMatch = -3122 -2212 211 2112 2212
66+
521:onIfMatch = -3122 -2212 -211 111 111 211 211 221 2112 2212
67+
521:onIfMatch = -3122 -2112 111 2112 2212
68+
521:onIfMatch = -3122 -2112 -211 111 211 2112 2212
69+
521:onIfMatch = -2214 -2212 111 211 321 2112 2212
70+
521:onIfMatch = -2212 -2212 211 211 311 2112 2212
71+
521:onIfMatch = -2212 -2212 113 211 321 2112 2212
72+
521:onIfMatch = -2212 -2212 111 111 211 211 2112 2212
73+
521:onIfMatch = -2212 -2112 211 311 2112 2212
74+
521:onIfMatch = -2212 -2112 113 321 2112 2212
75+
521:onIfMatch = -2212 -2112 111 221 321 2112 2212
76+
521:onIfMatch = -2212 -2112 111 113 211 2112 2212
77+
521:onIfMatch = -2112 -2112 -211 211 311 2112 2212
78+
521:onIfMatch = -2212 -2112 -211 113 211 211 2112 2212
79+
521:onIfMatch = -2212 -2112 -211 111 211 211 2112 2212
80+
521:onIfMatch = -2112 -2112 221 223 2112 2212
81+
521:onIfMatch = -2112 -2112 111 221 2112 2212

0 commit comments

Comments
 (0)