Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,66 @@ int External() {

std::vector<int> checkPdgHadron{411, 421, 431, 4122, 4232};
std::map<int, std::vector<std::vector<int>>> checkHadronDecays{ // sorted pdg of daughters
{411, {
{-321, 211, 211}, // K- π+ π+ (non-resonant)
{-313, 321}, // K*0(892) K+
{-10311, 321}, // K*0(1430) K+
{211, 333}, // φ π+
{-321, 321, 211}, // K- K+ π+ (non-resonant)
{113, 211}, // ρ0 π+
{225, 211}, // f2(1270) π+
{-211, 211, 211} // π- π+ π+ (non-resonant)
}},
{421, {
{-321, 211}, // K- π+ (non-resonant)
{-321, 111, 211}, // K- π+ π0
{213, -321}, // ρ+ K-
{-313, 111}, // antiK*0(892) π0
{-323, 211}, // K*-(892) π+
{-211, 211}, // π- π+
{213, -211}, // ρ+ π-
{-211, 211, 111}, // π- π+ π0
{-321, 321} // K- K+
}},
{431, {
{211, 333}, // φ π+
{-313, 321}, // antiK*(892) K+
{333, 213}, // φ ρ
{113, 211}, // ρ π+
{225, 211}, // f2(1270) π+
{-211, 211, 211}, // π- π+ π+ (s-wave)
{313, 211}, // K*(892)0 π+
{10221, 321}, // f0(1370) K+
{113, 321}, // ρ0 K+
{-211, 321, 211}, // π- K+ π+ (non-resonant)
{221, 211} // η π+
}},
{4122, {
{2212, -321, 211}, // p K- π+ (non-resonant)
{2212, -313}, // p K*0(892)
{2224, -321}, // Δ++ K-
{102134, 211}, // Λ(1520) K-
{2212, -321, 211, 111}, // p K- π+ π0
{2212, -211, 211}, // p π- π+
{2212, 333} // p φ
}},
{4232, {
{-313, 2212}, // antiK*0(892) p
{2212, -321, 211}, // p K- π+
{2212, 333}, // p φ
{3222, -211, 211} // Σ+ π- π+
}},
{-321, 211}, // D0 -> K-, pi+
{-321, 211, 111}, // D0 -> K-, pi+, pi0
{213, -321}, // D0 -> rho(770)+, K-
{-313, 111}, // D0 -> Kbar^*(892)0, pi0
{-323, 211}, // D0 -> K^*(892)-, pi+
{-211, 211}, // D0 -> pi-, pi+
{213, -211}, // D0 -> rho(770)+, pi-
{-211, 211, 111}, // D0 -> pi-, pi+, pi0
{-321, 321}, // D0 -> K-, K+
}},

{411, {
{-321, 211, 211}, // D+ -> K-, pi+, pi+
{-10311, 211}, // D+ -> Kbar0^*(1430)0, pi+
{-313, 211}, // D+ -> Kbar^*(892)0, pi+
{-321, 211, 211, 111}, // D+ -> K-, pi+, pi+, pi0
{333, 211}, // D+ -> phi(1020)0, pi+
{-313, 321}, // D+ -> Kbar^*(892)0, K+
{-10311, 321}, // D+ -> Kbar0^*(1430)0, K+
{-321, 321, 211}, // D+ -> K-, K+, pi+
{113, 211}, // D+ -> rho(770)0, pi+
{225, 211}, // D+ -> f2(1270)0, pi+
{-211, 211, 211}, // D+ -> pi-, pi+, pi+
}},

{431, {
{333, 211}, // Ds+ -> phi(1020)0, pi+
{-313, 321}, // Ds+ -> Kbar^*(892)0, K+
{333, 213}, // Ds+ -> phi(1020)0, rho(770)+
{113, 211}, // Ds+ -> rho(770)0, pi+
{225, 211}, // Ds+ -> f2(1270)0, pi+
{-211, 211, 211}, // Ds+ -> pi-, pi+, pi+
{313, 211}, // Ds+ -> K^*(892)0, pi+
{10221, 321}, // Ds+ -> f0(1370)0, K+
{113, 321}, // Ds+ -> rho(770)0, K+
{-211, 321, 211}, // Ds+ -> pi-, K+, pi+
{221, 211}, // Ds+ -> eta, pi+
}},

{4122, {
{2212, -321, 211}, // Lambdac+ -> p, K-, pi+
{2212, -313}, // Lambdac+ -> p, Kbar^*(892)0
{2224, -321}, // Lambdac+ -> Delta(1232)++, K-
{102134, 211}, // Lambdac+ -> 102134, pi+
{2212, 311}, // Lambdac+ -> p, K0
{2212, -321, 211, 111}, // Lambdac+ -> p, K-, pi+, pi0
{2212, -211, 211}, // Lambdac+ -> p, pi-, pi+
{2212, 333}, // Lambdac+ -> p, phi(1020)0
}},

{4232, {
{2212, -321, 211}, // Xic+ -> p, K-, pi+
{2212, -313}, // Xic+ -> p, Kbar^*(892)0
{3312, 211, 211}, // Xic+ -> Xi-, pi+, pi+
{2212, 333}, // Xic+ -> p, phi(1020)0
{3222, -211, 211}, // Xic+ -> Sigma+, pi-, pi+
{3324, 211}, // Xic+ -> Xi(1530)0, pi+
}},
};


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

for (auto &decay : checkHadronDecays[std::abs(pdg)]) {
std::sort(decay.begin(), decay.end());
if (pdgsDecay == decay || pdgsDecayAntiPart == decay) {
nSignalGoodDecay++;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,77 @@ int External() {
int checkPdgQuarkOne{4};
int checkPdgQuarkTwo{5};
float ratioTrigger = 1.; // one event triggered out of 1
float averagePt = 0.;

std::vector<int> checkPdgHadron{411, 421, 431, 4122, 4132, 4232, 4332};
std::map<int, std::vector<std::vector<int>>> checkHadronDecays{ // sorted pdg of daughters
{411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+
{421, {{-321, 211}, {-321, 111, 211}}}, // D0
{431, {{211, 333}, {-313, 321}}}, // Ds+
{4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+
{4132, {{211, 3312}}}, // Xic0
{4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+
{4332, {{211, 3334}}} // Omegac+
{421, {
{-321, 211}, // D0 -> K-, pi+
{-321, 211, 111}, // D0 -> K-, pi+, pi0
{213, -321}, // D0 -> rho(770)+, K-
{-313, 111}, // D0 -> Kbar^*(892)0, pi0
{-323, 211}, // D0 -> K^*(892)-, pi+
{-211, 211}, // D0 -> pi-, pi+
{213, -211}, // D0 -> rho(770)+, pi-
{-211, 211, 111}, // D0 -> pi-, pi+, pi0
{-321, 321}, // D0 -> K-, K+
}},

{411, {
{-321, 211, 211}, // D+ -> K-, pi+, pi+
{-10311, 211}, // D+ -> Kbar0^*(1430)0, pi+
{-313, 211}, // D+ -> Kbar^*(892)0, pi+
{-321, 211, 211, 111}, // D+ -> K-, pi+, pi+, pi0
{333, 211}, // D+ -> phi(1020)0, pi+
{-313, 321}, // D+ -> Kbar^*(892)0, K+
{-10311, 321}, // D+ -> Kbar0^*(1430)0, K+
{-321, 321, 211}, // D+ -> K-, K+, pi+
{113, 211}, // D+ -> rho(770)0, pi+
{225, 211}, // D+ -> f2(1270)0, pi+
{-211, 211, 211}, // D+ -> pi-, pi+, pi+
}},

{431, {
{333, 211}, // Ds+ -> phi(1020)0, pi+
{-313, 321}, // Ds+ -> Kbar^*(892)0, K+
{333, 213}, // Ds+ -> phi(1020)0, rho(770)+
{113, 211}, // Ds+ -> rho(770)0, pi+
{225, 211}, // Ds+ -> f2(1270)0, pi+
{-211, 211, 211}, // Ds+ -> pi-, pi+, pi+
{313, 211}, // Ds+ -> K^*(892)0, pi+
{10221, 321}, // Ds+ -> f0(1370)0, K+
{113, 321}, // Ds+ -> rho(770)0, K+
{-211, 321, 211}, // Ds+ -> pi-, K+, pi+
{221, 211}, // Ds+ -> eta, pi+
}},

{4122, {
{2212, -321, 211}, // Lambdac+ -> p, K-, pi+
{2212, -313}, // Lambdac+ -> p, Kbar^*(892)0
{2224, -321}, // Lambdac+ -> Delta(1232)++, K-
{102134, 211}, // Lambdac+ -> 102134, pi+
{2212, 311}, // Lambdac+ -> p, K0
{2212, -321, 211, 111}, // Lambdac+ -> p, K-, pi+, pi0
{2212, -211, 211}, // Lambdac+ -> p, pi-, pi+
{2212, 333}, // Lambdac+ -> p, phi(1020)0
}},

{4232, {
{2212, -321, 211}, // Xic+ -> p, K-, pi+
{2212, -313}, // Xic+ -> p, Kbar^*(892)0
{3312, 211, 211}, // Xic+ -> Xi-, pi+, pi+
{2212, 333}, // Xic+ -> p, phi(1020)0
{3222, -211, 211}, // Xic+ -> Sigma+, pi-, pi+
{3324, 211}, // Xic+ -> Xi(1530)0, pi+
}},

{4132, {
{3312, 211}, // Xic0 -> Xi-, pi+
}},

{4332, {
{3334, 211}, // Omegac0 -> Omega-, pi+
{3312, 211}, // Omegac0 -> Xi-, pi+
}},
};

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

std::vector<int> pdgsDecay{};
std::vector<int> pdgsDecayAntiPart{};
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) {
auto pdgDau = tracks->at(j).GetPdgCode();
pdgsDecay.push_back(pdgDau);
if (pdgDau != 333) { // phi is antiparticle of itself
if (pdgDau != 333 && pdgDau != 111 && pdgDau != 221 && pdgDau != 113 && pdgDau != 225) { // phi is antiparticle of itself
pdgsDecayAntiPart.push_back(-pdgDau);
} else {
pdgsDecayAntiPart.push_back(pdgDau);
Expand All @@ -80,6 +139,7 @@ int External() {
std::sort(pdgsDecayAntiPart.begin(), pdgsDecayAntiPart.end());

for (auto &decay : checkHadronDecays[std::abs(pdg)]) {
std::sort(decay.begin(), decay.end());
if (pdgsDecay == decay || pdgsDecayAntiPart == decay) {
nSignalGoodDecay++;
break;
Expand All @@ -89,8 +149,6 @@ int External() {
}
}

averagePt /= nSignals;

std::cout << "--------------------------------\n";
std::cout << "# Events: " << nEvents << "\n";
//std::cout << "# MB events: " << nEventsMB << "\n";
Expand All @@ -100,7 +158,6 @@ int External() {
std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkTwo) << nQuarksTwo << "\n";
std::cout <<"# signal hadrons: " << nSignals << "\n";
std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n";
std::cout <<"average pT of signal hadrons: " << averagePt << "\n";

//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
// std::cerr << "Number of generated MB events different than expected\n";
Expand Down