@@ -36,10 +36,8 @@ using namespace o2::analysis;
3636using namespace o2 ::framework;
3737using namespace o2 ::framework::expressions;
3838using namespace o2 ::hf_centrality;
39+ using namespace o2 ::hf_occupancy;
3940
40- enum OccupancyEstimator { None = 0 ,
41- ITS,
42- FT0C };
4341
4442// / D± analysis task
4543struct HfTaskDplus {
@@ -62,8 +60,8 @@ struct HfTaskDplus {
6260 using CandDplusMcRecoWithMl = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi, aod::HfCand3ProngMcRec, aod::HfMlDplusToPiKPi>>;
6361 using CandDplusMcGen = soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>;
6462
65- using CollisionsCent = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFT0As, aod::CentFV0As >;
66- using McRecoCollisionsCent = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFT0As, aod::CentFV0As >;
63+ using CollisionsCent = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs>;
64+ using McRecoCollisionsCent = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs>;
6765
6866 Filter filterDplusFlag = (o2::aod::hf_track_index::hfflag & static_cast <uint8_t >(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi))) != static_cast <uint8_t >(0 );
6967
@@ -451,10 +449,10 @@ struct HfTaskDplus {
451449 if (storeCentrality || storeOccupancy) {
452450 auto collision = candidate.template collision_as <CollisionsCent>();
453451 if (storeCentrality && centEstimator != CentralityEstimator::None) {
454- cent = o2::hf_centrality:: getCentralityColl (collision, centEstimator);
452+ cent = getCentralityColl (collision, centEstimator);
455453 }
456454 if (storeOccupancy && occEstimator != OccupancyEstimator::None) {
457- occ = o2::hf_occupancy:: getOccupancyColl (collision);
455+ occ = getOccupancyColl (collision, occEstimator );
458456 }
459457 }
460458
@@ -497,15 +495,15 @@ struct HfTaskDplus {
497495 continue ;
498496 }
499497 ptBhad = candidate.ptBhadMotherPart ();
500- flagBHad = o2::analysis:: getBHadMotherFlag (candidate.pdgBhadMotherPart ());
498+ flagBHad = getBHadMotherFlag (candidate.pdgBhadMotherPart ());
501499
502500 if (storeCentrality || storeOccupancy) {
503501 auto collision = candidate.template collision_as <McRecoCollisionsCent>();
504502 if (storeCentrality && centEstimator != CentralityEstimator::None) {
505- cent = o2::hf_centrality:: getCentralityColl (collision, centEstimator);
503+ cent = getCentralityColl (collision, centEstimator);
506504 }
507505 if (storeOccupancy && occEstimator != OccupancyEstimator::None) {
508- occ = o2::hf_occupancy:: getOccupancyColl (collision);
506+ occ = getOccupancyColl (collision, occEstimator );
509507 }
510508 }
511509
@@ -522,10 +520,10 @@ struct HfTaskDplus {
522520 }
523521 auto collision = candidate.template collision_as <McRecoCollisionsCent>();
524522 if (storeCentrality && centEstimator != CentralityEstimator::None) {
525- cent = o2::hf_centrality:: getCentralityColl (collision, centEstimator);
523+ cent = getCentralityColl (collision, centEstimator);
526524 }
527525 if (storeOccupancy && occEstimator != OccupancyEstimator::None) {
528- occ = o2::hf_occupancy:: getOccupancyColl (collision);
526+ occ = getOccupancyColl (collision, occEstimator );
529527 }
530528 fillHistoMCRec<false >(candidate);
531529 fillSparseML<true , false >(candidate, ptBhad, flagBHad, cent, occ);
@@ -552,10 +550,10 @@ struct HfTaskDplus {
552550 const auto recoCollsPerGenMcColl = mcRecoCollisions.sliceBy (recoColPerMcCollision, mcGenCollision.globalIndex ());
553551 const auto mcParticlesPerGenMcColl = mcGenParticles.sliceBy (mcParticlesPerMcCollision, mcGenCollision.globalIndex ());
554552 if (storeCentrality && centEstimator != CentralityEstimator::None) {
555- cent = o2::hf_centrality:: getCentralityGenColl (recoCollsPerGenMcColl, centEstimator);
553+ cent = getCentralityGenColl (recoCollsPerGenMcColl, centEstimator);
556554 }
557555 if (storeOccupancy && occEstimator != OccupancyEstimator::None) {
558- occ = o2::hf_occupancy:: getOccupancyGenColl (recoCollsPerGenMcColl);
556+ occ = getOccupancyGenColl (recoCollsPerGenMcColl, occEstimator );
559557 }
560558
561559 for (const auto & particle : mcParticlesPerGenMcColl) {
@@ -567,7 +565,7 @@ struct HfTaskDplus {
567565 }
568566 if (particle.originMcGen () == RecoDecay::OriginType::NonPrompt) {
569567 auto bHadMother = mcGenParticles.rawIteratorAt (particle.idxBhadMotherPart () - mcGenParticles.offset ());
570- flagGenB = o2::analysis:: getBHadMotherFlag (bHadMother.pdgCode ());
568+ flagGenB = getBHadMotherFlag (bHadMother.pdgCode ());
571569 ptGenB = bHadMother.pt ();
572570 }
573571 fillHistoMCGen (particle);
0 commit comments