Skip to content

Commit 98821ab

Browse files
committed
changing reflection and corr bkg handling
1 parent 70bea2d commit 98821ab

1 file changed

Lines changed: 26 additions & 8 deletions

File tree

PWGJE/Tasks/jetCorrelationD0.cxx

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ DECLARE_SOA_COLUMN(D0MD, d0MD, float);
8787
DECLARE_SOA_COLUMN(D0PtD, d0PtD, float);
8888
DECLARE_SOA_COLUMN(D0EtaD, d0EtaD, float);
8989
DECLARE_SOA_COLUMN(D0PhiD, d0PhiD, float);
90-
DECLARE_SOA_COLUMN(D0MatchedFrom, d0MatchedFrom, int);
91-
DECLARE_SOA_COLUMN(D0SelectedAs, d0SelectedAs, int);
90+
DECLARE_SOA_COLUMN(D0Category, d0Category, int);
9291
DECLARE_SOA_COLUMN(D0DecayChannel, d0DecayChannel, int8_t);
9392
} // namespace d0Info
9493

@@ -115,9 +114,7 @@ DECLARE_SOA_TABLE(D0McDTables, "AOD", "D0MCDTABLE",
115114
d0Info::D0Eta,
116115
d0Info::D0Phi,
117116
d0Info::D0Y,
118-
d0Info::D0MatchedFrom,
119-
d0Info::D0SelectedAs,
120-
d0Info::D0DecayChannel);
117+
d0Info::D0Category);
121118

122119
DECLARE_SOA_TABLE(D0McPTables, "AOD", "D0MCPTABLE",
123120
o2::soa::Index<>,
@@ -358,6 +355,7 @@ struct JetCorrelationD0 {
358355

359356
int matchedFrom = 0;
360357
int selectedAs = 0;
358+
int category; // 0 signal, 1 reflection, 2-5 correlated backgrounds
361359

362360
if (d0DecayChannel > 0) { // matched to a D0 on truth level (any channel)
363361
matchedFrom = 1;
@@ -369,6 +367,28 @@ struct JetCorrelationD0 {
369367
} else if (d0Candidate.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as D0bar
370368
selectedAs = -1;
371369
}
370+
if ((d0DecayChannel == 1) && (selectedAs == matchedFrom)) {
371+
category = 0; // signal -> D0 or D0bar, π+ K− π+
372+
}
373+
if ((d0DecayChannel == 1) && (selectedAs == -1*matchedFrom)) {
374+
category = 1; // reflection
375+
}
376+
if (d0DecayChannel == 2) {
377+
category = 2; // corr bkg: π+ K− π0
378+
}
379+
380+
if (d0DecayChannel == 3) {
381+
category = 3; // corr bkg: π+ π−
382+
}
383+
if (d0DecayChannel == 4) {
384+
category = 4; // corr bkg: π+ π− π0
385+
}
386+
if (d0DecayChannel == 5) {
387+
category = 5; // corr bkg: K+ K−
388+
}
389+
390+
391+
372392

373393
tableD0McDetector(tableCollision.lastIndex(), // might want to add some more detector level D0 quantities like prompt or non prompt info
374394
scores[2],
@@ -379,9 +399,7 @@ struct JetCorrelationD0 {
379399
d0Candidate.eta(),
380400
d0Candidate.phi(),
381401
d0Candidate.y(),
382-
matchedFrom,
383-
selectedAs,
384-
d0DecayChannel);
402+
category);
385403
for (const auto& jet : jets) {
386404
if (jet.pt() < jetPtCutMin) {
387405
continue;

0 commit comments

Comments
 (0)