Skip to content

Commit 19f8da7

Browse files
authored
PWGHF: Add new columns to tree creator for candidate indexing for HF studies (#2728)
1 parent 5a2903e commit 19f8da7

3 files changed

Lines changed: 29 additions & 13 deletions

File tree

PWGHF/TableProducer/treeCreatorBplusToD0Pi.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ DECLARE_SOA_COLUMN(NSigmaTPCTrk1Pi, nSigmaTPCTrk1Pi, float);
9494
// Events
9595
DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int);
9696
DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
97+
DECLARE_SOA_COLUMN(GlobalIndex, globalIndex, int);
9798
} // namespace full
9899

99100
// put the arguments into the table
@@ -158,7 +159,8 @@ DECLARE_SOA_TABLE(HfCandBplusFull, "AOD", "HFCANDBPFull",
158159
full::NSigmaTOFTrk1Pi,
159160
full::NSigmaTOFTrk1Ka,
160161
full::NSigmaTPCTrk1Pi,
161-
full::NSigmaTPCTrk1Ka);
162+
full::NSigmaTPCTrk1Ka,
163+
full::GlobalIndex);
162164

163165
DECLARE_SOA_TABLE(HfCandBplusFullEvents, "AOD", "HFCANDBPFullE",
164166
collision::BCId,
@@ -175,7 +177,8 @@ DECLARE_SOA_TABLE(HfCandBplusFullParticles, "AOD", "HFCANDBPFullP",
175177
full::Eta,
176178
full::Phi,
177179
full::Y,
178-
full::MCflag);
180+
full::MCflag,
181+
full::GlobalIndex);
179182

180183
} // namespace o2::aod
181184

@@ -297,7 +300,8 @@ struct HfTreeCreatorBplusToD0Pi {
297300
d0Daughter1.tofNSigmaPi(),
298301
d0Daughter1.tofNSigmaKa(),
299302
d0Daughter1.tpcNSigmaPi(),
300-
d0Daughter1.tpcNSigmaKa());
303+
d0Daughter1.tpcNSigmaKa(),
304+
candidate.globalIndex());
301305
}
302306
};
303307

@@ -315,7 +319,8 @@ struct HfTreeCreatorBplusToD0Pi {
315319
particle.eta(),
316320
particle.phi(),
317321
RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())),
318-
particle.flagMcMatchGen());
322+
particle.flagMcMatchGen(),
323+
particle.globalIndex());
319324
}
320325
}
321326
}

PWGHF/TableProducer/treeCreatorD0ToKPi.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int);
7070
DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
7171
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); // is prompt or non-prompt, reco level
7272
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); // is prompt or non-prompt, Gen level
73+
DECLARE_SOA_COLUMN(GlobalIndex, globalIndex, int);
7374
} // namespace full
7475

7576
DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull",
@@ -127,7 +128,8 @@ DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull",
127128
full::Y,
128129
full::E,
129130
full::FlagMc,
130-
full::OriginMcRec);
131+
full::OriginMcRec,
132+
full::GlobalIndex);
131133

132134
DECLARE_SOA_TABLE(HfCand2ProngFullEvents, "AOD", "HFCAND2PFullE",
133135
collision::BCId,
@@ -145,7 +147,8 @@ DECLARE_SOA_TABLE(HfCand2ProngFullParticles, "AOD", "HFCAND2PFullP",
145147
full::Phi,
146148
full::Y,
147149
full::FlagMc,
148-
full::OriginMcGen);
150+
full::OriginMcGen,
151+
full::GlobalIndex);
149152

150153
} // namespace o2::aod
151154

@@ -232,7 +235,8 @@ struct HfTreeCreatorD0ToKPi {
232235
y,
233236
e,
234237
flagMc,
235-
origin);
238+
origin,
239+
candidate.globalIndex());
236240
}
237241
}
238242

@@ -296,7 +300,8 @@ struct HfTreeCreatorD0ToKPi {
296300
particle.phi(),
297301
RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())),
298302
particle.flagMcMatchGen(),
299-
particle.originMcGen());
303+
particle.originMcGen(),
304+
particle.globalIndex());
300305
}
301306
}
302307
}

PWGHF/TableProducer/treeCreatorLcToPKPi.cxx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ DECLARE_SOA_COLUMN(IsCandidateSwapped, isCandidateSwapped, int8_t);
8181
// Events
8282
DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int);
8383
DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
84+
DECLARE_SOA_COLUMN(GlobalIndex, globalIndex, int);
8485
} // namespace full
8586

8687
DECLARE_SOA_TABLE(HfCand3ProngFull, "AOD", "HFCAND3PFull",
@@ -155,7 +156,8 @@ DECLARE_SOA_TABLE(HfCand3ProngFull, "AOD", "HFCAND3PFull",
155156
full::E,
156157
full::MCflag,
157158
full::OriginMcRec,
158-
full::IsCandidateSwapped);
159+
full::IsCandidateSwapped,
160+
full::GlobalIndex);
159161

160162
DECLARE_SOA_TABLE(HfCand3ProngFullEvents, "AOD", "HFCAND3PFullE",
161163
collision::BCId,
@@ -173,7 +175,8 @@ DECLARE_SOA_TABLE(HfCand3ProngFullParticles, "AOD", "HFCAND3PFullP",
173175
full::Phi,
174176
full::Y,
175177
full::MCflag,
176-
full::OriginMcGen);
178+
full::OriginMcGen,
179+
full::GlobalIndex);
177180

178181
} // namespace o2::aod
179182

@@ -295,7 +298,8 @@ struct HfTreeCreatorLcToPKPi {
295298
FunctionE,
296299
candidate.flagMcMatchRec(),
297300
candidate.originMcRec(),
298-
candidate.isCandidateSwapped());
301+
candidate.isCandidateSwapped(),
302+
candidate.globalIndex());
299303
}
300304
};
301305

@@ -314,7 +318,8 @@ struct HfTreeCreatorLcToPKPi {
314318
particle.phi(),
315319
RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())),
316320
particle.flagMcMatchGen(),
317-
particle.originMcGen());
321+
particle.originMcGen(),
322+
particle.globalIndex());
318323
}
319324
}
320325
}
@@ -424,7 +429,8 @@ struct HfTreeCreatorLcToPKPi {
424429
FunctionE,
425430
0.,
426431
0.,
427-
0.);
432+
0.,
433+
candidate.globalIndex());
428434
}
429435
};
430436

0 commit comments

Comments
 (0)