Skip to content

Commit c81e279

Browse files
sahilupadhyaya92Sahil Upadhyaya
andauthored
[PWGDQ] Adding MCSignal for POWHEG Drell-Yan muon selection (#10817)
Co-authored-by: Sahil Upadhyaya <upadhyay@cern.ch>
1 parent 27fbc27 commit c81e279

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

PWGDQ/Core/MCProng.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ std::map<TString, int> MCProng::fgSourceNames = {
2222
{"kProducedInTransport", MCProng::kProducedInTransport},
2323
{"kProducedByGenerator", MCProng::kProducedByGenerator},
2424
{"kFromBackgroundEvent", MCProng::kFromBackgroundEvent},
25-
{"kHEPMCFinalState", MCProng::kHEPMCFinalState}};
25+
{"kHEPMCFinalState", MCProng::kHEPMCFinalState},
26+
{"kIsPowhegDYMuon", MCProng::kIsPowhegDYMuon}};
2627

2728
//________________________________________________________________________________________________________________
2829
MCProng::MCProng() : fNGenerations(0),

PWGDQ/Core/MCProng.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class MCProng
7373
kProducedByGenerator, // Produced by generator (if not, then produced by GEANT)
7474
kFromBackgroundEvent, // Produced in the underlying event
7575
kHEPMCFinalState, // HEPMC code 11
76+
kIsPowhegDYMuon, // POWHEG muons based on Pythia Status Code (=23) -> Drell-Yan signal
7677
kNSources
7778
};
7879

PWGDQ/Core/MCSignal.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ bool MCSignal::CheckProng(int i, bool checkSources, const T& track)
253253
sourcesDecision |= (static_cast<uint64_t>(1) << MCProng::kHEPMCFinalState);
254254
}
255255
}
256+
// Check kIsPowhegDYMuon
257+
if (fProngs[i].fSourceBits[j] & (static_cast<uint64_t>(1) << MCProng::kIsPowhegDYMuon)) {
258+
if ((fProngs[i].fExcludeSource[j] & (static_cast<uint64_t>(1) << MCProng::kIsPowhegDYMuon)) != (currentMCParticle.getGenStatusCode() == 23)) {
259+
sourcesDecision |= (static_cast<uint64_t>(1) << MCProng::kIsPowhegDYMuon);
260+
}
261+
}
256262
} // end if(hasSources)
257263
// no source bit is fulfilled
258264
if (hasSources && !sourcesDecision) {

PWGDQ/Core/MCSignalLibrary.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
348348
signal = new MCSignal(name, "electron from a photon conversion", {prong}, {-1});
349349
return signal;
350350
}
351+
if (!nameStr.compare("PowhegDYMuon1")) {
352+
MCProng prong(1, {13}, {true}, {false}, {0}, {0}, {false}); // selecting muons
353+
prong.SetSourceBit(0, MCProng::kIsPowhegDYMuon); // set source to be Muon from POWHEG
354+
signal = new MCSignal(name, "POWHEG Muon singles", {prong}, {-1}); // define a signal with 1-prong
355+
return signal;
356+
}
351357

352358
// 2-prong signals
353359
if (!nameStr.compare("dielectron")) {
@@ -381,6 +387,12 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
381387
signal = new MCSignal(name, "dielectron from a photon conversion from a pi0", {prong, prong}, {1, 1});
382388
return signal;
383389
}
390+
if (!nameStr.compare("PowhegDYMuon2")) {
391+
MCProng prong(1, {13}, {true}, {false}, {0}, {0}, {false}); // selecting muons
392+
prong.SetSourceBit(0, MCProng::kIsPowhegDYMuon); // set source to be Muon from POWHEG
393+
signal = new MCSignal(name, "POWHEG Muon pair", {prong, prong}, {-1, -1}); // define a signal with 2-prong
394+
return signal;
395+
}
384396

385397
// LMEE single signals
386398
// electron signals with mother X: e from mother X

0 commit comments

Comments
 (0)