Skip to content

Commit 127c897

Browse files
authored
Update whether to use centrality
1 parent 0421db5 commit 127c897

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

PWGHF/TableProducer/treeCreatorToXiPi.cxx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ DECLARE_SOA_TABLE(HfToXiPiFulls, "AOD", "HFTOXIPIFULL",
214214
full::FlagMcMatchRec, full::DebugMcRec, full::OriginRec, full::CollisionMatched);
215215

216216
DECLARE_SOA_TABLE(HfToXiPiLites, "AOD", "HFTOXIPILITE",
217+
full::CollisionId,
217218
full::XPv, full::YPv, full::ZPv, collision::NumContrib, collision::Chi2,
218219
full::XDecayVtxCharmBaryon, full::YDecayVtxCharmBaryon, full::ZDecayVtxCharmBaryon,
219220
full::XDecayVtxCascade, full::YDecayVtxCascade, full::ZDecayVtxCascade,
@@ -248,7 +249,8 @@ struct HfTreeCreatorToXiPi {
248249
Produces<o2::aod::HfToXiPiEvs> rowEv;
249250

250251
Configurable<float> zPvCut{"zPvCut", 10., "Cut on absolute value of primary vertex z coordinate"};
251-
252+
Configurable<bool> useCentrality{"useCentrality", false, "Decide whether to use centrality information"};
253+
252254
using Cents = soa::Join<aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>;
253255
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels, aod::PVMultZeqs, Cents>;
254256
using MyTrackTable = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra>;
@@ -268,11 +270,13 @@ struct HfTreeCreatorToXiPi {
268270
float centFT0M = -1.f;
269271
float centFV0A = -1.f;
270272
float centFDDM = -1.f;
271-
centFT0A = collision.centFT0A();
272-
centFT0C = collision.centFT0C();
273-
centFT0M = collision.centFT0M();
274-
centFV0A = collision.centFV0A();
275-
centFDDM = collision.centFDDM();
273+
if (useCentrality) {
274+
centFT0A = collision.centFT0A();
275+
centFT0C = collision.centFT0C();
276+
centFT0M = collision.centFT0M();
277+
centFV0A = collision.centFV0A();
278+
centFDDM = collision.centFDDM();
279+
}
276280

277281
rowEv(
278282
collision.sel8(), std::abs(collision.posZ()) < cutZPv,
@@ -414,6 +418,7 @@ struct HfTreeCreatorToXiPi {
414418
if (candidate.resultSelections() && candidate.statusPidCharmBaryon() && candidate.statusInvMassLambda() && candidate.statusInvMassCascade() && candidate.statusInvMassCharmBaryon()) {
415419

416420
rowCandidateLite(
421+
candidate.collisionId(),
417422
candidate.xPv(),
418423
candidate.yPv(),
419424
candidate.zPv(),

0 commit comments

Comments
 (0)