Skip to content

Commit 3dc3b00

Browse files
committed
Add more MC flags to table
1 parent f7a0f9b commit 3dc3b00

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,12 @@ DECLARE_SOA_COLUMN(GrandmotherID, grandmotherID, int64_t);
166166
DECLARE_SOA_COLUMN(MotherPDG, motherPDG, int64_t);
167167
DECLARE_SOA_COLUMN(GrandmotherPDG, grandmotherPDG, int64_t);
168168
DECLARE_SOA_COLUMN(NMothers, nMothers, int64_t);
169-
DECLARE_SOA_COLUMN(IsPrimaryMuon, isPrimaryMuon, bool);
170-
DECLARE_SOA_COLUMN(IsSecondaryMuon, isSecondaryMuon, bool);
169+
DECLARE_SOA_COLUMN(IsPrimary, isPrimary, bool);
170+
DECLARE_SOA_COLUMN(IsProducedInTransport, isProducedInTransport, bool);
171+
DECLARE_SOA_COLUMN(IsProducedByGenerator, isProducedByGenerator, bool);
172+
DECLARE_SOA_COLUMN(IsFromBackgroundEvent, isFromBackgroundEvent, bool);
173+
DECLARE_SOA_COLUMN(IsHEPMCFinalState, isHEPMCFinalState, bool);
174+
DECLARE_SOA_COLUMN(IsPowhegDY, isPowhegDY, bool);
171175
} // namespace dqanalysisflags
172176

173177
DECLARE_SOA_TABLE(EventCuts, "AOD", "DQANAEVCUTS", dqanalysisflags::IsEventSelected); //! joinable to ReducedEvents
@@ -204,7 +208,7 @@ DECLARE_SOA_TABLE(MuonTable, "AOD", "DQMUONTABLE",
204208
dqanalysisflags::RunNumber, dqanalysisflags::EventIdx, dqanalysisflags::EventTimestamp, dqanalysisflags::GlobalIndexassoc,
205209
dqanalysisflags::Ptassoc, dqanalysisflags::Etaassoc, dqanalysisflags::Phiassoc,
206210
dqanalysisflags::MotherID, dqanalysisflags::GrandmotherID, dqanalysisflags::MotherPDG, dqanalysisflags::GrandmotherPDG, dqanalysisflags::NMothers,
207-
dqanalysisflags::IsPrimaryMuon, dqanalysisflags::IsSecondaryMuon
211+
dqanalysisflags::IsPrimary, dqanalysisflags::IsProducedInTransport, dqanalysisflags::IsProducedByGenerator, dqanalysisflags::IsFromBackgroundEvent, dqanalysisflags::IsHEPMCFinalState, dqanalysisflags::IsPowhegDY
208212
);
209213
} // namespace o2::aod
210214

@@ -1045,14 +1049,22 @@ struct AnalysisMuonSelection {
10451049
int grandmotherPdg = -9999;
10461050
int nMothers = 0;
10471051
bool isPrimary = false;
1048-
bool isSecondary = false;
1052+
bool isProducedInTransport = false;
1053+
bool isProducedByGenerator = false;
1054+
bool isFromBackgroundEvent = false;
1055+
bool isHEPMCFinalState = false;
1056+
bool isPowhegDY = false;
10491057

10501058
if (track.has_reducedMCTrack()) {
10511059
auto mctrack = track.reducedMCTrack();
10521060

10531061
// Check if primary or secondary
10541062
isPrimary = mctrack.isPhysicalPrimary();
1055-
isSecondary = !mctrack.producedByGenerator();
1063+
isProducedInTransport = !mctrack.producedByGenerator();
1064+
isProducedByGenerator = mctrack.producedByGenerator();
1065+
isFromBackgroundEvent = mctrack.fromBackgroundEvent();
1066+
isHEPMCFinalState = mctrack.getHepMCStatusCode() == 11;
1067+
isPowhegDY = mctrack.getHepMCStatusCode() == 23;
10561068

10571069
if (mctrack.has_mothers()) {
10581070

@@ -1075,7 +1087,7 @@ struct AnalysisMuonSelection {
10751087
muonTable(event.runNumber(), event.globalIndex(), event.timestamp(),
10761088
track.globalIndex(), track.pt(), track.eta(), track.phi(),
10771089
motherID, grandmotherID, motherPdg, grandmotherPdg, nMothers,
1078-
isPrimary, isSecondary);
1090+
isPrimary, isProducedInTransport, isProducedByGenerator, isFromBackgroundEvent, isHEPMCFinalState, isPowhegDY);
10791091

10801092
// count the number of associations per track
10811093
if (fConfigPublishAmbiguity && filterMap > 0) {

0 commit comments

Comments
 (0)