Skip to content

Commit 7de5051

Browse files
authored
[PWGDQ] Add MC signals of muons and electrons decay from HF and LF mesons in MCSignal Libaray (#10803)
1 parent 3ae0253 commit 7de5051

File tree

4 files changed

+110
-6
lines changed

4 files changed

+110
-6
lines changed

PWGDQ/Core/HistogramsLibrary.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,8 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
15121512
hm->AddHistogram(histClass, "Mass_Pt", "", false, 750, 0.0, 30.0, VarManager::kMass, 120, 0.0, 30.0, VarManager::kPt);
15131513
hm->AddHistogram(histClass, "Mass_Rapidity", "", false, 750, 0.0, 30.0, VarManager::kMass, 500, -1.0, 4.0, VarManager::kRap);
15141514
hm->AddHistogram(histClass, "Mass_VtxZ", "", true, 30, -15.0, 15.0, VarManager::kVtxZ, 750, 0.0, 30.0, VarManager::kMass);
1515-
hm->AddHistogram(histClass, "DeltaPhiPair", "", false, 130, -6.5, 6.5, VarManager::kDeltaPhiPair);
1515+
hm->AddHistogram(histClass, "DeltaPhiPair2", "", false, 600, -o2::constants::math::PIHalf, 1.5 * o2::constants::math::PI, VarManager::kDeltaPhiPair2);
1516+
hm->AddHistogram(histClass, "DeltaEtaPair2", "", false, 350, 1.5, 5.0, VarManager::kDeltaEtaPair2);
15161517
}
15171518
if (subGroupStr.Contains("correlation-emu")) {
15181519
hm->AddHistogram(histClass, "DeltaPhiPair2_DeltaEtaPair2", "", false, 600, -o2::constants::math::PIHalf, 1.5 * o2::constants::math::PI, VarManager::kDeltaPhiPair2, 350, 1.5, 5.0, VarManager::kDeltaEtaPair2);

PWGDQ/Core/MCProng.cxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#include "PWGDQ/Core/MCProng.h"
1313

14+
#include <map>
15+
#include <vector>
1416
#include <cmath>
1517
#include <iostream>
1618

@@ -128,9 +130,9 @@ void MCProng::SetSourceBit(int generation, int sourceBit, bool exclude /*=false*
128130
if (generation < 0 || generation >= fNGenerations) {
129131
return;
130132
}
131-
fSourceBits[generation] |= (uint64_t(1) << sourceBit);
133+
fSourceBits[generation] |= (static_cast<uint64_t>(1) << sourceBit);
132134
if (exclude) {
133-
fExcludeSource[generation] |= (uint64_t(1) << sourceBit);
135+
fExcludeSource[generation] |= (static_cast<uint64_t>(1) << sourceBit);
134136
}
135137
}
136138

@@ -195,6 +197,13 @@ bool MCProng::ComparePDG(int pdg, int prongPDG, bool checkBothCharges, bool excl
195197
decision = (prongPDG > 0 ? pdg >= 100 && pdg <= 199 : pdg >= -199 && pdg <= -100);
196198
}
197199
break;
200+
case 101: // all light flavoured and strange mesons
201+
if (checkBothCharges) {
202+
decision = absPDG >= 100 && absPDG <= 399;
203+
} else {
204+
decision = (prongPDG > 0 ? pdg >= 100 && pdg <= 399 : pdg >= -399 && pdg <= -100);
205+
}
206+
break;
198207
case 1000: // light flavoured baryons
199208
if (checkBothCharges) {
200209
decision = absPDG >= 1000 && absPDG <= 1999;

PWGDQ/Core/MCProng.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ A few non-existent PYTHIA codes are used to select more than one PYTHIA code.
2323
2424
0 - default, accepts all PYTHIA codes
2525
100 - light unflavoured mesons in the code range 100-199
26+
101 - all light and strange mesons in the code range 100-399
2627
200 - --"-- 200-299
2728
300 - strange mesons in the code range 300-399
2829
400 - charmed mesons in the code range 400-499
@@ -43,6 +44,7 @@ A few non-existent PYTHIA codes are used to select more than one PYTHIA code.
4344
901 - LF mesons for LMEE 111, 221, 331, 113, 223, 333
4445
902 - all open charm open beauty mesons+baryons 400-439, 500-549, 4000-4399, 5000-5499
4546
903 - all hadrons in the code range 100-599, 1000-5999
47+
904 - chic0, chic1 and chic2 445, 100441, 200443
4648
1000 - light unflavoured baryons in the code range 1000-1999
4749
2000 - --"-- 2000-2999
4850
3000 - strange baryons in the code range 3000-3999
@@ -84,7 +86,7 @@ class MCProng
8486
};
8587

8688
MCProng();
87-
MCProng(int n);
89+
explicit MCProng(int n);
8890
MCProng(int n, int m);
8991
MCProng(int n, std::vector<int> pdgs, std::vector<bool> checkBothCharges, std::vector<bool> excludePDG,
9092
std::vector<uint64_t> sourceBits, std::vector<uint64_t> excludeSource, std::vector<bool> useANDonSourceBitMap,

PWGDQ/Core/MCSignalLibrary.cxx

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// Contact: iarsene@cern.ch, i.c.arsene@fys.uio.no
1313
//
1414
#include <string>
15+
#include <vector>
1516
// #include <iostream>
1617

1718
#include <TPDGCode.h>
@@ -602,6 +603,39 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
602603
signal = new MCSignal(name, "Electrons from open charmed hadron decays with b hadron in decay history", {prong}, {-1});
603604
return signal;
604605
}
606+
if (!nameStr.compare("eFromPromptLM")) {
607+
MCProng prong(2, {11, 101}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {502, 402}, {true, true});
608+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
609+
signal = new MCSignal(name, "Electrons from light mesons without B/D in decay history", {prong}, {-1});
610+
return signal;
611+
}
612+
if (!nameStr.compare("eFromHbtoLM")) {
613+
MCProng prong(2, {11, 101}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {502}, {false});
614+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
615+
signal = new MCSignal(name, "Electrons from light mesons with B hadron in decay history", {prong}, {-1});
616+
return signal;
617+
}
618+
if (!nameStr.compare("eFromHctoLM")) {
619+
MCProng prong(2, {11, 101, 402}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {502}, {true});
620+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
621+
signal = new MCSignal(name, "Electrons from light mesons from D hadron decays and no B in decay history", {prong}, {-1});
622+
return signal;
623+
}
624+
if (!nameStr.compare("eFromUpsilon1S")) {
625+
MCProng prong(2, {11, 553}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
626+
signal = new MCSignal(name, "Electrons from Upsilon1S decays", {prong}, {-1});
627+
return signal;
628+
}
629+
if (!nameStr.compare("eFromUpsilon2S")) {
630+
MCProng prong(2, {11, 100553}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
631+
signal = new MCSignal(name, "Electrons from Upsilon2S decays", {prong}, {-1});
632+
return signal;
633+
}
634+
if (!nameStr.compare("eFromUpsilon3S")) {
635+
MCProng prong(2, {11, 200553}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
636+
signal = new MCSignal(name, "Electrons from Upsilon3S decays", {prong}, {-1});
637+
return signal;
638+
}
605639

606640
// muon signals with mother X: mu from mother X
607641
if (!nameStr.compare("muFromJpsi")) {
@@ -614,6 +648,64 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
614648
signal = new MCSignal(name, "muons from psi2s decays", {prong}, {-1});
615649
return signal;
616650
}
651+
if (!nameStr.compare("muFromHb")) {
652+
MCProng prong(2, {13, 502}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
653+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
654+
signal = new MCSignal(name, "muons from b->mu", {prong}, {-1});
655+
return signal;
656+
}
657+
if (!nameStr.compare("muFromPromptHc")) {
658+
MCProng prong(2, {13, 402}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {502}, {true});
659+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
660+
signal = new MCSignal(name, "muons from c->mu, without beauty in decay history", {prong}, {-1});
661+
return signal;
662+
}
663+
if (!nameStr.compare("muFromHbtoHc")) {
664+
MCProng prong(3, {13, 402, 502}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
665+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
666+
signal = new MCSignal(name, "muons from b->c->mu", {prong}, {-1});
667+
return signal;
668+
}
669+
if (!nameStr.compare("secondaryMuon")) {
670+
MCProng prong(1);
671+
prong.SetPDGcode(0, 13, true);
672+
prong.SetSourceBit(0, MCProng::kProducedInTransport);
673+
signal = new MCSignal(name, "muons produced during transport in detector", {prong}, {-1});
674+
return signal;
675+
}
676+
if (!nameStr.compare("muFromPromptLM")) {
677+
MCProng prong(2, {13, 101}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {502, 402}, {true, true});
678+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
679+
signal = new MCSignal(name, "muons from light mesons without B/D in decay history", {prong}, {-1});
680+
return signal;
681+
}
682+
if (!nameStr.compare("muFromHbtoLM")) {
683+
MCProng prong(2, {13, 101}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {502}, {false});
684+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
685+
signal = new MCSignal(name, "muons from light mesons with B hadron in decay history", {prong}, {-1});
686+
return signal;
687+
}
688+
if (!nameStr.compare("muFromHctoLM")) {
689+
MCProng prong(2, {13, 101, 402}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {502}, {true});
690+
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
691+
signal = new MCSignal(name, "muons from light mesons from D hadron decays and no B in decay history", {prong}, {-1});
692+
return signal;
693+
}
694+
if (!nameStr.compare("muFromUpsilon1S")) {
695+
MCProng prong(2, {13, 553}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
696+
signal = new MCSignal(name, "muons from Upsilon1S decays", {prong}, {-1});
697+
return signal;
698+
}
699+
if (!nameStr.compare("muFromUpsilon2S")) {
700+
MCProng prong(2, {13, 100553}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
701+
signal = new MCSignal(name, "muons from Upsilon2S decays", {prong}, {-1});
702+
return signal;
703+
}
704+
if (!nameStr.compare("muFromUpsilon3S")) {
705+
MCProng prong(2, {13, 200553}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
706+
signal = new MCSignal(name, "muons from Upsilon3S decays", {prong}, {-1});
707+
return signal;
708+
}
617709

618710
// Decay signal: Mother to electron: X -> e
619711
if (!nameStr.compare("AnythingToE")) {
@@ -2041,9 +2133,9 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
20412133
for (auto& s : itgen) {
20422134
bool exclude = (hasExclude ? excludeVec[is] : false);
20432135
if (s != MCProng::kNothing) {
2044-
sBits |= (uint64_t(1) << s);
2136+
sBits |= (static_cast<uint64_t>(1) << s);
20452137
if (exclude) {
2046-
sBitsExclude |= (uint64_t(1) << s);
2138+
sBitsExclude |= (static_cast<uint64_t>(1) << s);
20472139
}
20482140
}
20492141
is++;

0 commit comments

Comments
 (0)