diff --git a/PWGLF/DataModel/LFhe3HadronTables.h b/PWGLF/DataModel/LFhe3HadronTables.h index 6beb5b8729e..b2876d923f4 100644 --- a/PWGLF/DataModel/LFhe3HadronTables.h +++ b/PWGLF/DataModel/LFhe3HadronTables.h @@ -85,6 +85,7 @@ DECLARE_SOA_COLUMN(ZVertex, zVertex, float); DECLARE_SOA_COLUMN(Multiplicity, multiplicity, uint16_t); DECLARE_SOA_COLUMN(CentralityFT0C, centFT0C, float); DECLARE_SOA_COLUMN(MultiplicityFT0C, multiplicityFT0C, float); +DECLARE_SOA_COLUMN(TrackOccupancy, trackOccupancy, int); /* Flags: 0 - both primary, 1 - both from Li4, @@ -137,7 +138,8 @@ DECLARE_SOA_TABLE(he3HadronMult, "AOD", "HE3HADMULT", he3HadronTablesNS::ZVertex, he3HadronTablesNS::Multiplicity, he3HadronTablesNS::CentralityFT0C, - he3HadronTablesNS::MultiplicityFT0C) + he3HadronTablesNS::MultiplicityFT0C, + he3HadronTablesNS::TrackOccupancy) DECLARE_SOA_TABLE(he3HadronQa, "AOD", "HE3HADQA", he3HadronTablesNS::TrackIDHe3, he3HadronTablesNS::TrackIDHad, diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index da049dcada4..33160b5bbb5 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -85,10 +85,39 @@ using CollisionsFull = soa::Join; using TrackCandidates = soa::Join; using TrackCandidatesMC = soa::Join; +using McCollisionMults = soa::Join; +using EventCandidatesMC = soa::Join; namespace { +std::shared_ptr hEvtMC; +std::shared_ptr hImpactParamGen; +std::shared_ptr hImpactParamReco; +std::shared_ptr hRecoCentrality; +std::shared_ptr hImpactParamGenOneReco; +std::shared_ptr hGenOneRecoCentrality; +std::shared_ptr hGenEventsNchEta05; +std::shared_ptr hGenEventsNchEta08; +std::shared_ptr hRecoCentralityColvsMultiplicityRecoEta05; +std::shared_ptr hRecoCentralityColvsMultiplicityRecoEta08; +std::shared_ptr hRecoCentralityColvsMultiplicityFT0C; +std::shared_ptr hRecoCentralityColvsImpactParamReco; +std::shared_ptr hGenCentralityColvsMultiplicityGenEta05; +std::shared_ptr hGenCentralityColvsMultiplicityGenEta08; +std::shared_ptr hGenCentralityColvsMultiplicityFT0C; +std::shared_ptr hGenCentralityColvsImpactParamGen; +std::shared_ptr hGenLi4BeforeEvtSel; +std::shared_ptr hGenLi4vsImpactParameterBeforeEvtSel; +std::shared_ptr hGenLi4vsMultiplicityGenEta05BeforeEvtSel; +std::shared_ptr hGenLi4vsMultiplicityGenEta08BeforeEvtSel; +std::shared_ptr hGenLi4vsMultiplicityFT0CBeforeEvtSel; +std::shared_ptr hGenLi4AfterSel; +std::shared_ptr hGenLi4vsImpactParameterAfterSel; +std::shared_ptr hGenLi4vsMultiplicityGenEta05AfterSel; +std::shared_ptr hGenLi4vsMultiplicityGenEta08AfterSel; +std::shared_ptr hGenLi4vsMultiplicityFT0CAfterSel; + constexpr int Li4PDG = o2::constants::physics::Pdg::kLithium4; constexpr int H3LPDG = o2::constants::physics::Pdg::kHyperTriton; constexpr int ProtonPDG = PDG_t::kProton; @@ -173,6 +202,28 @@ constexpr std::array kHePidTrkPParamsHeDefault = {0., 0., 0.}; } // namespace +struct CollisionInfo { + int64_t collisionID = -1; + uint32_t selectionFlags = 0; + float posZ = -999.f; + int numContributors = -1; + float centFT0C = -999.f; + int multFT0C = -1; + float occupancy = -999.f; + + template + void fillFromCollision(const Collision& collision, uint32_t collisionSelectionFlag) + { + collisionID = collision.globalIndex(); + selectionFlags = collisionSelectionFlag; + posZ = collision.posZ(); + numContributors = collision.numContrib(); + centFT0C = collision.centFT0C(); + multFT0C = collision.multFT0C(); + occupancy = collision.trackOccupancyInTimeRange(); + } +}; + struct He3HadCandidate { [[nodiscard]] float recoPtHe3() const { return signHe3 * std::hypot(momHe3[0], momHe3[1]); } @@ -349,6 +400,8 @@ struct he3HadronFemto { o2::aod::ITSResponse mResponseITS; std::vector mGoodCollisions; + std::vector mRecoMcCollisions; + std::vector mMcCollisionIdToRecoCollisionId; std::vector mCollisionSelectionFlags; std::vector mTrackPairs; o2::vertexing::DCAFitterN<2> mFitter; @@ -486,6 +539,47 @@ struct he3HadronFemto { mQaRegistry.get(HIST("hEmptyPool"))->GetXaxis()->SetBinLabel(1, "False"); mQaRegistry.get(HIST("hEmptyPool"))->GetXaxis()->SetBinLabel(2, "True"); + + if (doprocessEventLossMC) { + hEvtMC = mQaRegistry.add("EventLoss/hEvtMC", ";; ", HistType::kTH1D, {{3, -0.5, 2.5}}); + hEvtMC->GetXaxis()->SetBinLabel(1, "All gen evts"); + hEvtMC->GetXaxis()->SetBinLabel(2, "Gen evts with al least one reconstructed"); + hEvtMC->GetXaxis()->SetBinLabel(3, "Gen evts with no reconstructed collisions"); + + hGenEventsNchEta05 = mQaRegistry.add("EventLoss/hGenEventsNchEta05", ";;", HistType::kTH2D, {{500, 0.0f, 500.0f}, {2, -0.5f, 1.5f}}); + hGenEventsNchEta05->GetYaxis()->SetBinLabel(1, "All gen. events"); + hGenEventsNchEta05->GetYaxis()->SetBinLabel(2, "Gen evts with at least 1 rec. collisions"); + hGenEventsNchEta08 = mQaRegistry.add("EventLoss/hGenEventsNchEta08", ";;", HistType::kTH2D, {{500, 0.0f, 500.0f}, {2, -0.5f, 1.5f}}); + hGenEventsNchEta08->GetYaxis()->SetBinLabel(1, "All gen. events"); + hGenEventsNchEta08->GetYaxis()->SetBinLabel(2, "Gen evts with at least 1 rec. collisions"); + + hImpactParamGen = mQaRegistry.add("EventLoss/hImpactParamGen", "Impact parameter of generated MC events; Impact Parameter (b); Counts", HistType::kTH1D, {{200, 0.0f, 20.0f}}); + hImpactParamReco = mQaRegistry.add("EventLoss/hImpactParamReco", "Impact parameter of generated MC events with at least one rec. evt; Impact Parameter (b); Counts", HistType::kTH1D, {{200, 0.0f, 20.0f}}); + hRecoCentrality = mQaRegistry.add("EventLoss/hRecoCentrality", "Centrality distribution of reconstructed MC events passed the event selection; Centrality FT0C (%); Counts", HistType::kTH1D, {{100, 0.0f, 100.0f}}); + hRecoCentralityColvsMultiplicityRecoEta05 = mQaRegistry.add("EventLoss/hRecoCentralityColvsMultiplicityRecoEta05", "; Centrality FT0C (%); Multiplicity #eta <0.5", HistType::kTH2D, {{100, 0.0f, 100.0f}, {500, 0.0f, 500.0f}}); + hRecoCentralityColvsMultiplicityRecoEta08 = mQaRegistry.add("EventLoss/hRecoCentralityColvsMultiplicityRecoEta08", "; Centrality FT0C (%); Multiplicity #eta <0.8", HistType::kTH2D, {{100, 0.0f, 100.0f}, {500, 0.0f, 500.0f}}); + hRecoCentralityColvsMultiplicityFT0C = mQaRegistry.add("EventLoss/hRecoCentralityColvsMultiplicityFT0C", "; Centrality FT0C (%); FT0C multiplicity", HistType::kTH2D, {{100, 0.0f, 100.0f}, {500, 0.0f, 3000.0f}}); + hRecoCentralityColvsImpactParamReco = mQaRegistry.add("EventLoss/hRecoCentralityColvsImpactParamReco", "; Centrality FT0C (%); Impact Parameter (b)", HistType::kTH2D, {{100, 0.0f, 100.0f}, {200, 0.0f, 20.0f}}); + + hImpactParamGenOneReco = mQaRegistry.add("EventLoss/hImpactParamGenOneReco", "Impact parameter of generated MC events with at least one rec. evt and passed the event selection; Impact Parameter (b); Counts", HistType::kTH1D, {{200, 0.0f, 20.0f}}); + hGenOneRecoCentrality = mQaRegistry.add("EventLoss/hGenOneRecoCentrality", "Centrality distribution of generated MC events with at least one rec. evt and passed the event selection; Centrality FT0C (%); Counts", HistType::kTH1D, {{100, 0.0f, 100.0f}}); + hGenCentralityColvsMultiplicityGenEta05 = mQaRegistry.add("EventLoss/hGenCentralityColvsMultiplicityGenEta05", "; Centrality FT0C (%); Multiplicity #eta <0.5", HistType::kTH2D, {{100, 0.0f, 100.0f}, {500, 0.0f, 500.0f}}); + hGenCentralityColvsMultiplicityGenEta08 = mQaRegistry.add("EventLoss/hGenCentralityColvsMultiplicityGenEta08", "; Centrality FT0C (%); Multiplicity #eta <0.8", HistType::kTH2D, {{100, 0.0f, 100.0f}, {500, 0.0f, 500.0f}}); + hGenCentralityColvsMultiplicityFT0C = mQaRegistry.add("EventLoss/hGenCentralityColvsMultiplicityFT0C", "; Centrality FT0C (%); FT0C multiplicity", HistType::kTH2D, {{100, 0.0f, 100.0f}, {500, 0.0f, 3000.0f}}); + hGenCentralityColvsImpactParamGen = mQaRegistry.add("EventLoss/hGenCentralityColvsImpactParamGen", "; Centrality FT0C (%); Impact Parameter (b)", HistType::kTH2D, {{100, 0.0f, 100.0f}, {200, 0.0f, 20.0f}}); + + hGenLi4BeforeEvtSel = mQaRegistry.add("EventLoss/hGenLi4BeforeEvtSel", "Li4 generated #it{p}_{T} distribution in all gen evt; #it{p}_{T} (GeV/#it{c}); Counts", HistType::kTH1D, {{240, 0.0f, 12.0f}}); + hGenLi4vsImpactParameterBeforeEvtSel = mQaRegistry.add("EventLoss/hGenLi4vsImpactParameterBeforeEvtSel", "; #it{p}_{T} (GeV/#it{c}); Impact Parameter (b)", HistType::kTH2D, {{240, 0.0f, 12.0f}, {200, 0.0f, 20.0f}}); + hGenLi4vsMultiplicityGenEta05BeforeEvtSel = mQaRegistry.add("EventLoss/hGenLi4vsMultiplicityGenEta05BeforeEvtSel", "; #it{p}_{T} (GeV/#it{c}); Multiplicity #eta <0.5", HistType::kTH2D, {{240, 0.0f, 12.0f}, {500, 0.0f, 500.0f}}); + hGenLi4vsMultiplicityGenEta08BeforeEvtSel = mQaRegistry.add("EventLoss/hGenLi4vsMultiplicityGenEta08BeforeEvtSel", "; #it{p}_{T} (GeV/#it{c}); Multiplicity #eta <0.8", HistType::kTH2D, {{240, 0.0f, 12.0f}, {500, 0.0f, 500.0f}}); + hGenLi4vsMultiplicityFT0CBeforeEvtSel = mQaRegistry.add("EventLoss/hGenLi4vsMultiplicityFT0CBeforeEvtSel", "; #it{p}_{T} (GeV/#it{c}); FT0C multiplicity", HistType::kTH2D, {{240, 0.0f, 12.0f}, {500, 0.0f, 3000.0f}}); + + hGenLi4AfterSel = mQaRegistry.add("EventLoss/hGenLi4AfterSel", "Li4 generated #it{p}_{T} distribution in gen. evts with at least one rec. evt; #it{p}_{T} (GeV/#it{c}); Counts", HistType::kTH1D, {{240, 0.0f, 12.0f}}); + hGenLi4vsImpactParameterAfterSel = mQaRegistry.add("EventLoss/hGenLi4vsImpactParameterAfterSel", "; #it{p}_{T} (GeV/#it{c}); Impact Parameter (b)", HistType::kTH2D, {{240, 0.0f, 12.0f}, {200, 0.0f, 20.0f}}); + hGenLi4vsMultiplicityGenEta05AfterSel = mQaRegistry.add("EventLoss/hGenLi4vsMultiplicityGenEta05AfterSel", "; #it{p}_{T} (GeV/#it{c}); Multiplicity #eta <0.5", HistType::kTH2D, {{240, 0.0f, 12.0f}, {500, 0.0f, 500.0f}}); + hGenLi4vsMultiplicityGenEta08AfterSel = mQaRegistry.add("EventLoss/hGenLi4vsMultiplicityGenEta08AfterSel", "; #it{p}_{T} (GeV/#it{c}); Multiplicity #eta <0.8", HistType::kTH2D, {{240, 0.0f, 12.0f}, {500, 0.0f, 500.0f}}); + hGenLi4vsMultiplicityFT0CAfterSel = mQaRegistry.add("EventLoss/hGenLi4vsMultiplicityFT0CAfterSel", "; #it{p}_{T} (GeV/#it{c}); FT0C multiplicity", HistType::kTH2D, {{240, 0.0f, 12.0f}, {500, 0.0f, 3000.0f}}); + } } void initCCDB(const aod::BCsWithTimestamps::iterator& bc) @@ -533,6 +627,11 @@ struct he3HadronFemto { bool selectCollision(const Tcollision& collision, const aod::BCsWithTimestamps&, uint32_t& collisionSelectionFlag) { mQaRegistry.fill(HIST("hEvents"), 0); + if constexpr (isMC) { + if (collision.has_mcCollision()) { + mMcCollisionIdToRecoCollisionId[collision.mcCollisionId()] = collision.globalIndex(); + } + } auto bc = collision.template bc_as(); initCCDB(bc); @@ -540,6 +639,7 @@ struct he3HadronFemto { if (!nuclei::eventSelection(collision, mQaRegistry, settingEventSelections, cutSettings.settingCutVertex, collisionSelectionFlag)) { return false; } + if (settingSkimmedProcessing) { bool zorroSelected = mZorro.isSelected(collision.template bc_as().globalBC()); if (zorroSelected) { @@ -547,6 +647,12 @@ struct he3HadronFemto { } } + if constexpr (isMC) { + if (collision.has_mcCollision()) { + mRecoMcCollisions[collision.mcCollisionId()] = true; + } + } + mQaRegistry.fill(HIST("hEvents"), 1); mQaRegistry.fill(HIST("hNcontributor"), collision.numContrib()); mQaRegistry.fill(HIST("hCentralityFT0A"), collision.centFT0A()); @@ -978,10 +1084,8 @@ struct he3HadronFemto { } } - template - void fillTable(const He3HadCandidate& he3Hadcand, const Tcoll& collision, bool isMC = false) + void fillTable(const He3HadCandidate& he3Hadcand, const CollisionInfo& collisionInfo, bool isMC = false) { - const uint32_t collisionSelectionFlag = mCollisionSelectionFlags[he3Hadcand.collisionID]; outputDataTable( he3Hadcand.recoPtHe3(), he3Hadcand.recoEtaHe3(), he3Hadcand.recoPhiHe3(), he3Hadcand.recoPtHad(), he3Hadcand.recoEtaHad(), he3Hadcand.recoPhiHad(), @@ -1002,8 +1106,9 @@ struct he3HadronFemto { he3Hadcand.l4PtMC, he3Hadcand.l4MassMC, he3Hadcand.flags); } outputMultiplicityTable( - collision.globalIndex(), collisionSelectionFlag, collision.posZ(), - collision.numContrib(), collision.centFT0C(), collision.multFT0C()); + collisionInfo.collisionID, collisionInfo.selectionFlags, collisionInfo.posZ, + collisionInfo.numContributors, collisionInfo.centFT0C, collisionInfo.multFT0C, + collisionInfo.occupancy); outputQaTable( he3Hadcand.trackIDHe3, he3Hadcand.trackIDHad, he3Hadcand.massTOFHe3, he3Hadcand.pidtrkHad, he3Hadcand.sharedClustersHad); @@ -1054,7 +1159,9 @@ struct he3HadronFemto { } fillHistograms(he3Hadcand); auto collision = collisions.rawIteratorAt(he3Hadcand.collisionID); - fillTable(he3Hadcand, collision, /*isMC*/ false); + CollisionInfo collisionInfo; + collisionInfo.fillFromCollision(collision, mCollisionSelectionFlags[he3Hadcand.collisionID]); + fillTable(he3Hadcand, collisionInfo, /*isMC*/ false); } } @@ -1148,8 +1255,15 @@ struct he3HadronFemto { He3HadCandidate he3Hadcand; fillCandidateInfoMC(mcHe3, mcHad, he3Hadcand); fillMotherInfoMC(mcHe3, mcHad, mcParticle, he3Hadcand); - auto collision = collisions.rawIteratorAt(he3Hadcand.collisionID); - fillTable(he3Hadcand, collision, /*isMC*/ true); + + const auto mcCollisionId = mcParticle.mcCollisionId(); + const auto collisionId = mMcCollisionIdToRecoCollisionId[mcCollisionId]; + CollisionInfo collisionInfo; + if (collisionId >= 0) { + auto collision = collisions.rawIteratorAt(collisionId); + collisionInfo.fillFromCollision(collision, mCollisionSelectionFlags[collisionId]); + } + fillTable(he3Hadcand, collisionInfo, /*isMC*/ true); } } } @@ -1216,12 +1330,16 @@ struct he3HadronFemto { } PROCESS_SWITCH(he3HadronFemto, processMixedEvent, "Process Mixed event", false); - void processMC(const CollisionsFullMC& collisions, const aod::BCsWithTimestamps& bcs, const TrackCandidatesMC& tracks, const aod::McParticles& mcParticles) + void processMC(const CollisionsFullMC& collisions, const aod::McCollisions& mcCollisions, const aod::BCsWithTimestamps& bcs, const TrackCandidatesMC& tracks, const aod::McParticles& mcParticles) { std::vector filledMothers; mGoodCollisions.clear(); mGoodCollisions.resize(collisions.size(), false); + mRecoMcCollisions.clear(); + mRecoMcCollisions.resize(mcCollisions.size(), false); + mMcCollisionIdToRecoCollisionId.clear(); + mMcCollisionIdToRecoCollisionId.resize(mcCollisions.size(), -1); mCollisionSelectionFlags.clear(); mCollisionSelectionFlags.resize(collisions.size(), 0); @@ -1312,9 +1430,11 @@ struct he3HadronFemto { fillMotherInfoMC(mctrackHe3, mctrackHad, motherParticle, he3Hadcand); filledMothers.push_back(motherParticle.globalIndex()); } - fillHistograms(he3Hadcand, /*isMc*/ true); - fillTable(he3Hadcand, collision, /*isMC*/ true); + + CollisionInfo collisionInfo; + collisionInfo.fillFromCollision(collision, collisionSelectionFlag); + fillTable(he3Hadcand, collisionInfo, /*isMC*/ true); } } @@ -1439,6 +1559,110 @@ struct he3HadronFemto { } } PROCESS_SWITCH(he3HadronFemto, processPurityMc, "Process for purity studies mc", false); + + void processEventLossMC(McCollisionMults::iterator const& mcCollision, soa::SmallGroups const& collisions, aod::BCsWithTimestamps const& bcs, aod::McParticles const& mcParticles) + { + if (std::abs(mcCollision.posZ()) > cutSettings.settingCutVertex) { + return; + } + + //////////// Event loss estimation via impact parameter and multiplicity by MCFT0C + hEvtMC->Fill(0); + hImpactParamGen->Fill(mcCollision.impactParameter()); + hGenEventsNchEta05->Fill(mcCollision.multMCNParticlesEta05(), 0); + hGenEventsNchEta08->Fill(mcCollision.multMCNParticlesEta08(), 0); + + if (collisions.size() == 0) { + hEvtMC->Fill(2); + } + + bool atLeastOneRecoEvt = false; + auto centralityFT0C = -999.; + int biggestNContribs = -1; + + for (const auto& col : collisions) { + + uint32_t collisionSelectionFlag = 0; + // isMC == true only fills the collision vectors, which are not used in this workflow + if (!selectCollision(col, bcs, collisionSelectionFlag)) { + continue; + } + + // In case of multiple reconstructed collisions associated to the same generated one, only consider the one with the biggest number of contributors + if (biggestNContribs < col.numContrib()) { + biggestNContribs = col.numContrib(); + centralityFT0C = col.centFT0C(); + } + + atLeastOneRecoEvt = true; + hImpactParamReco->Fill(mcCollision.impactParameter()); + hRecoCentrality->Fill(col.centFT0C()); + hRecoCentralityColvsMultiplicityRecoEta05->Fill(col.centFT0C(), mcCollision.multMCNParticlesEta05()); + hRecoCentralityColvsMultiplicityRecoEta08->Fill(col.centFT0C(), mcCollision.multMCNParticlesEta08()); + hRecoCentralityColvsMultiplicityFT0C->Fill(col.centFT0C(), mcCollision.multMCFT0C()); + hRecoCentralityColvsImpactParamReco->Fill(col.centFT0C(), mcCollision.impactParameter()); + } + + if (atLeastOneRecoEvt) { + hEvtMC->Fill(1); + hGenEventsNchEta05->Fill(mcCollision.multMCNParticlesEta05(), 1); + hGenEventsNchEta08->Fill(mcCollision.multMCNParticlesEta08(), 1); + hImpactParamGenOneReco->Fill(mcCollision.impactParameter()); + hGenOneRecoCentrality->Fill(centralityFT0C); + hGenCentralityColvsMultiplicityGenEta05->Fill(centralityFT0C, mcCollision.multMCNParticlesEta05()); + hGenCentralityColvsMultiplicityGenEta08->Fill(centralityFT0C, mcCollision.multMCNParticlesEta08()); + hGenCentralityColvsMultiplicityFT0C->Fill(centralityFT0C, mcCollision.multMCFT0C()); + hGenCentralityColvsImpactParamGen->Fill(centralityFT0C, mcCollision.impactParameter()); + } + + // Construct the Li4 (He3 + hadron) 4-vector from generated daughters by PDG + ROOT::Math::PxPyPzMVector daughHe3, daughHad, mother; + const double hadMass = settingHadPDGCode == PDG_t::kPiPlus ? o2::constants::physics::MassPiPlus : o2::constants::physics::MassProton; + + for (const auto& genParticle : mcParticles) { + if (std::abs(genParticle.y()) > 1) + continue; + if (std::abs(genParticle.pdgCode()) != Li4PDG) + continue; + + auto daughters = genParticle.daughters_as(); + + bool dauHe3 = false, dauHad = false; + int he3Sign = 0, hadSign = 0; + + for (const auto& daughter : daughters) { + if (std::abs(daughter.pdgCode()) == He3PDG) { + dauHe3 = true; + he3Sign = daughter.pdgCode() > 0 ? 1 : -1; + daughHe3 = ROOT::Math::PxPyPzMVector(daughter.px(), daughter.py(), daughter.pz(), o2::constants::physics::MassHelium3); + } else if (std::abs(daughter.pdgCode()) == settingHadPDGCode) { + dauHad = true; + hadSign = daughter.pdgCode() > 0 ? 1 : -1; + daughHad = ROOT::Math::PxPyPzMVector(daughter.px(), daughter.py(), daughter.pz(), hadMass); + } + } + // Only keep the charge combination consistent with a genuine Li4 decay + if (!dauHe3 || !dauHad || (he3Sign * hadSign) < 0) + continue; + + mother = daughHe3 + daughHad; + + hGenLi4BeforeEvtSel->Fill(mother.pt()); + hGenLi4vsImpactParameterBeforeEvtSel->Fill(mother.pt(), mcCollision.impactParameter()); + hGenLi4vsMultiplicityGenEta05BeforeEvtSel->Fill(mother.pt(), mcCollision.multMCNParticlesEta05()); + hGenLi4vsMultiplicityGenEta08BeforeEvtSel->Fill(mother.pt(), mcCollision.multMCNParticlesEta08()); + hGenLi4vsMultiplicityFT0CBeforeEvtSel->Fill(mother.pt(), mcCollision.multMCFT0C()); + + if (atLeastOneRecoEvt) { + hGenLi4AfterSel->Fill(mother.pt()); + hGenLi4vsImpactParameterAfterSel->Fill(mother.pt(), mcCollision.impactParameter()); + hGenLi4vsMultiplicityGenEta05AfterSel->Fill(mother.pt(), mcCollision.multMCNParticlesEta05()); + hGenLi4vsMultiplicityGenEta08AfterSel->Fill(mother.pt(), mcCollision.multMCNParticlesEta08()); + hGenLi4vsMultiplicityFT0CAfterSel->Fill(mother.pt(), mcCollision.multMCFT0C()); + } + } + } + PROCESS_SWITCH(he3HadronFemto, processEventLossMC, "Event loss analysis", false); }; WorkflowSpec defineDataProcessing(const ConfigContext& cfgc)