Skip to content

Commit cf337d1

Browse files
authored
PWGHF: fix the tests for .ini of corr. bkg and ptHardBins (#2136)
* PWGHF: fix the tests for .ini of `corr. bkg` and `ptHardBins` * remove the Xic0(4132) and OmegaC(4332) from the vector `checkPdgHadron`, and correspongding decay channels
1 parent 24e0cac commit cf337d1

File tree

2 files changed

+130
-63
lines changed

2 files changed

+130
-63
lines changed

MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb_corrBkg.C

Lines changed: 60 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,66 @@ int External() {
88

99
std::vector<int> checkPdgHadron{411, 421, 431, 4122, 4232};
1010
std::map<int, std::vector<std::vector<int>>> checkHadronDecays{ // sorted pdg of daughters
11-
{411, {
12-
{-321, 211, 211}, // K- π+ π+ (non-resonant)
13-
{-313, 321}, // K*0(892) K+
14-
{-10311, 321}, // K*0(1430) K+
15-
{211, 333}, // φ π+
16-
{-321, 321, 211}, // K- K+ π+ (non-resonant)
17-
{113, 211}, // ρ0 π+
18-
{225, 211}, // f2(1270) π+
19-
{-211, 211, 211} // π- π+ π+ (non-resonant)
20-
}},
2111
{421, {
22-
{-321, 211}, // K- π+ (non-resonant)
23-
{-321, 111, 211}, // K- π+ π0
24-
{213, -321}, // ρ+ K-
25-
{-313, 111}, // antiK*0(892) π0
26-
{-323, 211}, // K*-(892) π+
27-
{-211, 211}, // π- π+
28-
{213, -211}, // ρ+ π-
29-
{-211, 211, 111}, // π- π+ π0
30-
{-321, 321} // K- K+
31-
}},
32-
{431, {
33-
{211, 333}, // φ π+
34-
{-313, 321}, // antiK*(892) K+
35-
{333, 213}, // φ ρ
36-
{113, 211}, // ρ π+
37-
{225, 211}, // f2(1270) π+
38-
{-211, 211, 211}, // π- π+ π+ (s-wave)
39-
{313, 211}, // K*(892)0 π+
40-
{10221, 321}, // f0(1370) K+
41-
{113, 321}, // ρ0 K+
42-
{-211, 321, 211}, // π- K+ π+ (non-resonant)
43-
{221, 211} // η π+
44-
}},
45-
{4122, {
46-
{2212, -321, 211}, // p K- π+ (non-resonant)
47-
{2212, -313}, // p K*0(892)
48-
{2224, -321}, // Δ++ K-
49-
{102134, 211}, // Λ(1520) K-
50-
{2212, -321, 211, 111}, // p K- π+ π0
51-
{2212, -211, 211}, // p π- π+
52-
{2212, 333} // p φ
53-
}},
54-
{4232, {
55-
{-313, 2212}, // antiK*0(892) p
56-
{2212, -321, 211}, // p K- π+
57-
{2212, 333}, // p φ
58-
{3222, -211, 211} // Σ+ π- π+
59-
}},
12+
{-321, 211}, // D0 -> K-, pi+
13+
{-321, 211, 111}, // D0 -> K-, pi+, pi0
14+
{213, -321}, // D0 -> rho(770)+, K-
15+
{-313, 111}, // D0 -> Kbar^*(892)0, pi0
16+
{-323, 211}, // D0 -> K^*(892)-, pi+
17+
{-211, 211}, // D0 -> pi-, pi+
18+
{213, -211}, // D0 -> rho(770)+, pi-
19+
{-211, 211, 111}, // D0 -> pi-, pi+, pi0
20+
{-321, 321}, // D0 -> K-, K+
21+
}},
22+
23+
{411, {
24+
{-321, 211, 211}, // D+ -> K-, pi+, pi+
25+
{-10311, 211}, // D+ -> Kbar0^*(1430)0, pi+
26+
{-313, 211}, // D+ -> Kbar^*(892)0, pi+
27+
{-321, 211, 211, 111}, // D+ -> K-, pi+, pi+, pi0
28+
{333, 211}, // D+ -> phi(1020)0, pi+
29+
{-313, 321}, // D+ -> Kbar^*(892)0, K+
30+
{-10311, 321}, // D+ -> Kbar0^*(1430)0, K+
31+
{-321, 321, 211}, // D+ -> K-, K+, pi+
32+
{113, 211}, // D+ -> rho(770)0, pi+
33+
{225, 211}, // D+ -> f2(1270)0, pi+
34+
{-211, 211, 211}, // D+ -> pi-, pi+, pi+
35+
}},
36+
37+
{431, {
38+
{333, 211}, // Ds+ -> phi(1020)0, pi+
39+
{-313, 321}, // Ds+ -> Kbar^*(892)0, K+
40+
{333, 213}, // Ds+ -> phi(1020)0, rho(770)+
41+
{113, 211}, // Ds+ -> rho(770)0, pi+
42+
{225, 211}, // Ds+ -> f2(1270)0, pi+
43+
{-211, 211, 211}, // Ds+ -> pi-, pi+, pi+
44+
{313, 211}, // Ds+ -> K^*(892)0, pi+
45+
{10221, 321}, // Ds+ -> f0(1370)0, K+
46+
{113, 321}, // Ds+ -> rho(770)0, K+
47+
{-211, 321, 211}, // Ds+ -> pi-, K+, pi+
48+
{221, 211}, // Ds+ -> eta, pi+
49+
}},
50+
51+
{4122, {
52+
{2212, -321, 211}, // Lambdac+ -> p, K-, pi+
53+
{2212, -313}, // Lambdac+ -> p, Kbar^*(892)0
54+
{2224, -321}, // Lambdac+ -> Delta(1232)++, K-
55+
{102134, 211}, // Lambdac+ -> 102134, pi+
56+
{2212, 311}, // Lambdac+ -> p, K0
57+
{2212, -321, 211, 111}, // Lambdac+ -> p, K-, pi+, pi0
58+
{2212, -211, 211}, // Lambdac+ -> p, pi-, pi+
59+
{2212, 333}, // Lambdac+ -> p, phi(1020)0
60+
}},
61+
62+
{4232, {
63+
{2212, -321, 211}, // Xic+ -> p, K-, pi+
64+
{2212, -313}, // Xic+ -> p, Kbar^*(892)0
65+
{3312, 211, 211}, // Xic+ -> Xi-, pi+, pi+
66+
{2212, 333}, // Xic+ -> p, phi(1020)0
67+
{3222, -211, 211}, // Xic+ -> Sigma+, pi-, pi+
68+
{3324, 211}, // Xic+ -> Xi(1530)0, pi+
69+
}},
6070
};
61-
6271

6372
TFile file(path.c_str(), "READ");
6473
if (file.IsZombie()) {
@@ -110,7 +119,7 @@ int External() {
110119
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) {
111120
auto pdgDau = tracks->at(j).GetPdgCode();
112121
pdgsDecay.push_back(pdgDau);
113-
if (pdgDau != 333) { // phi is antiparticle of itself
122+
if (pdgDau != 333 && pdgDau != 111 && pdgDau != 221 && pdgDau != 113 && pdgDau != 225) { // phi is antiparticle of itself
114123
pdgsDecayAntiPart.push_back(-pdgDau);
115124
} else {
116125
pdgsDecayAntiPart.push_back(pdgDau);
@@ -121,6 +130,7 @@ int External() {
121130
std::sort(pdgsDecayAntiPart.begin(), pdgsDecayAntiPart.end());
122131

123132
for (auto &decay : checkHadronDecays[std::abs(pdg)]) {
133+
std::sort(decay.begin(), decay.end());
124134
if (pdgsDecay == decay || pdgsDecayAntiPart == decay) {
125135
nSignalGoodDecay++;
126136
break;

MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb_ptHardBins.C

Lines changed: 70 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,77 @@ int External() {
55
int checkPdgQuarkOne{4};
66
int checkPdgQuarkTwo{5};
77
float ratioTrigger = 1.; // one event triggered out of 1
8-
float averagePt = 0.;
98

109
std::vector<int> checkPdgHadron{411, 421, 431, 4122, 4132, 4232, 4332};
1110
std::map<int, std::vector<std::vector<int>>> checkHadronDecays{ // sorted pdg of daughters
12-
{411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+
13-
{421, {{-321, 211}, {-321, 111, 211}}}, // D0
14-
{431, {{211, 333}, {-313, 321}}}, // Ds+
15-
{4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+
16-
{4132, {{211, 3312}}}, // Xic0
17-
{4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+
18-
{4332, {{211, 3334}}} // Omegac+
11+
{421, {
12+
{-321, 211}, // D0 -> K-, pi+
13+
{-321, 211, 111}, // D0 -> K-, pi+, pi0
14+
{213, -321}, // D0 -> rho(770)+, K-
15+
{-313, 111}, // D0 -> Kbar^*(892)0, pi0
16+
{-323, 211}, // D0 -> K^*(892)-, pi+
17+
{-211, 211}, // D0 -> pi-, pi+
18+
{213, -211}, // D0 -> rho(770)+, pi-
19+
{-211, 211, 111}, // D0 -> pi-, pi+, pi0
20+
{-321, 321}, // D0 -> K-, K+
21+
}},
22+
23+
{411, {
24+
{-321, 211, 211}, // D+ -> K-, pi+, pi+
25+
{-10311, 211}, // D+ -> Kbar0^*(1430)0, pi+
26+
{-313, 211}, // D+ -> Kbar^*(892)0, pi+
27+
{-321, 211, 211, 111}, // D+ -> K-, pi+, pi+, pi0
28+
{333, 211}, // D+ -> phi(1020)0, pi+
29+
{-313, 321}, // D+ -> Kbar^*(892)0, K+
30+
{-10311, 321}, // D+ -> Kbar0^*(1430)0, K+
31+
{-321, 321, 211}, // D+ -> K-, K+, pi+
32+
{113, 211}, // D+ -> rho(770)0, pi+
33+
{225, 211}, // D+ -> f2(1270)0, pi+
34+
{-211, 211, 211}, // D+ -> pi-, pi+, pi+
35+
}},
36+
37+
{431, {
38+
{333, 211}, // Ds+ -> phi(1020)0, pi+
39+
{-313, 321}, // Ds+ -> Kbar^*(892)0, K+
40+
{333, 213}, // Ds+ -> phi(1020)0, rho(770)+
41+
{113, 211}, // Ds+ -> rho(770)0, pi+
42+
{225, 211}, // Ds+ -> f2(1270)0, pi+
43+
{-211, 211, 211}, // Ds+ -> pi-, pi+, pi+
44+
{313, 211}, // Ds+ -> K^*(892)0, pi+
45+
{10221, 321}, // Ds+ -> f0(1370)0, K+
46+
{113, 321}, // Ds+ -> rho(770)0, K+
47+
{-211, 321, 211}, // Ds+ -> pi-, K+, pi+
48+
{221, 211}, // Ds+ -> eta, pi+
49+
}},
50+
51+
{4122, {
52+
{2212, -321, 211}, // Lambdac+ -> p, K-, pi+
53+
{2212, -313}, // Lambdac+ -> p, Kbar^*(892)0
54+
{2224, -321}, // Lambdac+ -> Delta(1232)++, K-
55+
{102134, 211}, // Lambdac+ -> 102134, pi+
56+
{2212, 311}, // Lambdac+ -> p, K0
57+
{2212, -321, 211, 111}, // Lambdac+ -> p, K-, pi+, pi0
58+
{2212, -211, 211}, // Lambdac+ -> p, pi-, pi+
59+
{2212, 333}, // Lambdac+ -> p, phi(1020)0
60+
}},
61+
62+
{4232, {
63+
{2212, -321, 211}, // Xic+ -> p, K-, pi+
64+
{2212, -313}, // Xic+ -> p, Kbar^*(892)0
65+
{3312, 211, 211}, // Xic+ -> Xi-, pi+, pi+
66+
{2212, 333}, // Xic+ -> p, phi(1020)0
67+
{3222, -211, 211}, // Xic+ -> Sigma+, pi-, pi+
68+
{3324, 211}, // Xic+ -> Xi(1530)0, pi+
69+
}},
70+
71+
{4132, {
72+
{3312, 211}, // Xic0 -> Xi-, pi+
73+
}},
74+
75+
{4332, {
76+
{3334, 211}, // Omegac0 -> Omega-, pi+
77+
{3312, 211}, // Omegac0 -> Xi-, pi+
78+
}},
1979
};
2080

2181
TFile file(path.c_str(), "READ");
@@ -62,14 +122,13 @@ int External() {
62122
}
63123
if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), std::abs(pdg)) != checkPdgHadron.end()) { // found signal
64124
nSignals++; // count signal PDG
65-
averagePt += track.GetPt();
66125

67126
std::vector<int> pdgsDecay{};
68127
std::vector<int> pdgsDecayAntiPart{};
69128
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) {
70129
auto pdgDau = tracks->at(j).GetPdgCode();
71130
pdgsDecay.push_back(pdgDau);
72-
if (pdgDau != 333) { // phi is antiparticle of itself
131+
if (pdgDau != 333 && pdgDau != 111 && pdgDau != 221 && pdgDau != 113 && pdgDau != 225) { // phi is antiparticle of itself
73132
pdgsDecayAntiPart.push_back(-pdgDau);
74133
} else {
75134
pdgsDecayAntiPart.push_back(pdgDau);
@@ -80,6 +139,7 @@ int External() {
80139
std::sort(pdgsDecayAntiPart.begin(), pdgsDecayAntiPart.end());
81140

82141
for (auto &decay : checkHadronDecays[std::abs(pdg)]) {
142+
std::sort(decay.begin(), decay.end());
83143
if (pdgsDecay == decay || pdgsDecayAntiPart == decay) {
84144
nSignalGoodDecay++;
85145
break;
@@ -89,8 +149,6 @@ int External() {
89149
}
90150
}
91151

92-
averagePt /= nSignals;
93-
94152
std::cout << "--------------------------------\n";
95153
std::cout << "# Events: " << nEvents << "\n";
96154
//std::cout << "# MB events: " << nEventsMB << "\n";
@@ -100,7 +158,6 @@ int External() {
100158
std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkTwo) << nQuarksTwo << "\n";
101159
std::cout <<"# signal hadrons: " << nSignals << "\n";
102160
std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n";
103-
std::cout <<"average pT of signal hadrons: " << averagePt << "\n";
104161

105162
//if (nEventsMB < nEvents * (1 - ratioTrigger) * 0.95 || nEventsMB > nEvents * (1 - ratioTrigger) * 1.05) { // we put some tolerance since the number of generated events is small
106163
// std::cerr << "Number of generated MB events different than expected\n";

0 commit comments

Comments
 (0)