diff --git a/PWGHF/DataModel/HFSecondaryVertex.h b/PWGHF/DataModel/HFSecondaryVertex.h index 0a99dc94911..b29d10682bc 100644 --- a/PWGHF/DataModel/HFSecondaryVertex.h +++ b/PWGHF/DataModel/HFSecondaryVertex.h @@ -42,12 +42,18 @@ namespace hf_seltrack DECLARE_SOA_COLUMN(IsSelProng, isSelProng, int); //! DECLARE_SOA_COLUMN(DCAPrim0, dcaPrim0, float); //! DECLARE_SOA_COLUMN(DCAPrim1, dcaPrim1, float); //! +DECLARE_SOA_COLUMN(PxProng, pxProng, float); //! +DECLARE_SOA_COLUMN(PyProng, pyProng, float); //! +DECLARE_SOA_COLUMN(PzProng, pzProng, float); //! } // namespace hf_seltrack DECLARE_SOA_TABLE(HFSelTrack, "AOD", "HFSELTRACK", //! hf_seltrack::IsSelProng, hf_seltrack::DCAPrim0, - hf_seltrack::DCAPrim1); + hf_seltrack::DCAPrim1, + hf_seltrack::PxProng, + hf_seltrack::PyProng, + hf_seltrack::PzProng); using BigTracks = soa::Join; using BigTracksMC = soa::Join; diff --git a/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx b/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx index 5d2a341487f..eb60e00bd28 100644 --- a/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx +++ b/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx @@ -129,40 +129,43 @@ struct HfTagSelCollisions { template void selectVertex(const Col& collision, int& statusCollision) { - registry.fill(HIST("hNContributors"), collision.numContrib()); + if (fillHistograms) { + registry.fill(HIST("hNContributors"), collision.numContrib()); + } + // x position if (collision.posX() < xVertexMin || collision.posX() > xVertexMax) { SETBIT(statusCollision, EventRejection::PositionX); if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(3 + EventRejection::PositionX); + registry.fill(HIST("hEvents"), 3 + EventRejection::PositionX); } } // y position if (collision.posY() < yVertexMin || collision.posY() > yVertexMax) { SETBIT(statusCollision, EventRejection::PositionY); if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(3 + EventRejection::PositionY); + registry.fill(HIST("hEvents"), 3 + EventRejection::PositionY); } } // z position if (collision.posZ() < zVertexMin || collision.posZ() > zVertexMax) { SETBIT(statusCollision, EventRejection::PositionZ); if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(3 + EventRejection::PositionZ); + registry.fill(HIST("hEvents"), 3 + EventRejection::PositionZ); } } // number of contributors if (collision.numContrib() < nContribMin) { SETBIT(statusCollision, EventRejection::NContrib); if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(3 + EventRejection::NContrib); + registry.fill(HIST("hEvents"), 3 + EventRejection::NContrib); } } // chi^2 if (chi2Max > 0. && collision.chi2() > chi2Max) { SETBIT(statusCollision, EventRejection::Chi2); if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(3 + EventRejection::Chi2); + registry.fill(HIST("hEvents"), 3 + EventRejection::Chi2); } } } @@ -174,14 +177,14 @@ struct HfTagSelCollisions { // processed events if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(1); + registry.fill(HIST("hEvents"), 1); } // trigger selection if (!collision.alias()[triggerClass]) { SETBIT(statusCollision, EventRejection::Trigger); if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(3 + EventRejection::Trigger); + registry.fill(HIST("hEvents"), 3 + EventRejection::Trigger); } } @@ -192,7 +195,7 @@ struct HfTagSelCollisions { // selected events if (fillHistograms && statusCollision == 0) { - registry.get(HIST("hEvents"))->Fill(2); + registry.fill(HIST("hEvents"), 2); } // fill table row @@ -208,7 +211,7 @@ struct HfTagSelCollisions { // processed events if (fillHistograms) { - registry.get(HIST("hEvents"))->Fill(1); + registry.fill(HIST("hEvents"), 1); } // vertex selection @@ -216,7 +219,7 @@ struct HfTagSelCollisions { // selected events if (fillHistograms && statusCollision == 0) { - registry.get(HIST("hEvents"))->Fill(2); + registry.fill(HIST("hEvents"), 2); } // fill table row @@ -346,7 +349,7 @@ struct HfTagSelTracks { auto trackEta = track.eta(); if (fillHistograms) { - registry.get(HIST("hPtNoCuts"))->Fill(trackPt); + registry.fill(HIST("hPtNoCuts"), trackPt); } int iDebugCut = 2; @@ -356,7 +359,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::Cand2Prong][0] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } } } @@ -365,7 +368,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::Cand3Prong][0] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } } } @@ -376,7 +379,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::CandV0bachelor][0] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } } } @@ -388,7 +391,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::Cand2Prong][1] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } } } @@ -397,7 +400,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::Cand3Prong][1] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } } } @@ -408,7 +411,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::CandV0bachelor][1] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } } } @@ -428,7 +431,7 @@ struct HfTagSelTracks { for (int iCandType = 0; iCandType < CandidateType::NCandidateTypes; iCandType++) { cutStatus[iCandType][2] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * iCandType + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * iCandType + iDebugCut); } } } @@ -444,7 +447,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::Cand2Prong][3] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } } } @@ -453,7 +456,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::Cand3Prong][3] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } } } @@ -462,7 +465,7 @@ struct HfTagSelTracks { if (debug) { cutStatus[CandidateType::CandV0bachelor][3] = false; if (fillHistograms) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } } } @@ -473,34 +476,34 @@ struct HfTagSelTracks { if (fillHistograms) { iDebugCut = 1; if (TESTBIT(statusProng, CandidateType::Cand2Prong)) { - registry.get(HIST("hPtCuts2Prong"))->Fill(trackPt); - registry.get(HIST("hEtaCuts2Prong"))->Fill(trackEta); - registry.get(HIST("hDCAToPrimXYVsPtCuts2Prong"))->Fill(trackPt, dca[0]); + registry.fill(HIST("hPtCuts2Prong"), trackPt); + registry.fill(HIST("hEtaCuts2Prong"), trackEta); + registry.fill(HIST("hDCAToPrimXYVsPtCuts2Prong"), trackPt, dca[0]); if (debug) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } } if (TESTBIT(statusProng, CandidateType::Cand3Prong)) { - registry.get(HIST("hPtCuts3Prong"))->Fill(trackPt); - registry.get(HIST("hEtaCuts3Prong"))->Fill(trackEta); - registry.get(HIST("hDCAToPrimXYVsPtCuts3Prong"))->Fill(trackPt, dca[0]); + registry.fill(HIST("hPtCuts3Prong"), trackPt); + registry.fill(HIST("hEtaCuts3Prong"), trackEta); + registry.fill(HIST("hDCAToPrimXYVsPtCuts3Prong"), trackPt, dca[0]); if (debug) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } } if (TESTBIT(statusProng, CandidateType::CandV0bachelor)) { MY_DEBUG_MSG(isProtonFromLc, LOG(info) << "Will be kept: Proton from Lc " << indexBach); - registry.get(HIST("hPtCutsV0bachelor"))->Fill(trackPt); - registry.get(HIST("hEtaCutsV0bachelor"))->Fill(trackEta); - registry.get(HIST("hDCAToPrimXYVsPtCutsV0bachelor"))->Fill(trackPt, dca[0]); + registry.fill(HIST("hPtCutsV0bachelor"), trackPt); + registry.fill(HIST("hEtaCutsV0bachelor"), trackEta); + registry.fill(HIST("hDCAToPrimXYVsPtCutsV0bachelor"), trackPt, dca[0]); if (debug) { - registry.get(HIST("hRejTracks"))->Fill((nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); + registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } } } // fill table row - rowSelectedTrack(statusProng, dca[0], dca[1]); + rowSelectedTrack(statusProng, dca[0], dca[1], track.px(), track.py(), track.pz()); } } }; @@ -578,8 +581,8 @@ struct HfTrackIndexSkimsCreator { static const int nCuts2Prong = 4; // how many different selections are made on 2-prongs static const int nCuts3Prong = 4; // how many different selections are made on 3-prongs - array, 2>, n2ProngDecays> arrMass2Prong; - array, 2>, n3ProngDecays> arrMass3Prong; + std::array, 2>, n2ProngDecays> arrMass2Prong; + std::array, 2>, n3ProngDecays> arrMass3Prong; // arrays of 2-prong and 3-prong cuts std::array, n2ProngDecays> cut2Prong; @@ -627,9 +630,26 @@ struct HfTrackIndexSkimsCreator { template void is2ProngPreselected(T1 const& hfTrack0, T1 const& hfTrack1, T2& cutStatus, T3& whichHypo, int& isSelected) { + /// FIXME: this would be better fixed by having a convention on the position of min and max in the 2D Array + static std::vector massMinIndex; + static std::vector massMaxIndex; + static std::vector d0d0Index; + static auto cacheIndices = [](std::array, n2ProngDecays>& cut2Prong, std::vector& mins, std::vector& maxs, std::vector& d0d0) { + mins.resize(cut2Prong.size()); + maxs.resize(cut2Prong.size()); + d0d0.resize(cut2Prong.size()); + for (size_t i = 0; i < cut2Prong.size(); ++i) { + mins[i] = cut2Prong[i].colmap.find("massMin")->second; + maxs[i] = cut2Prong[i].colmap.find("massMax")->second; + d0d0[i] = cut2Prong[i].colmap.find("d0d0")->second; + } + return true; + }; + static bool initIndex = cacheIndices(cut2Prong, massMinIndex, massMaxIndex, d0d0Index); + auto arrMom = array{ - array{hfTrack0.px(), hfTrack0.py(), hfTrack0.pz()}, - array{hfTrack1.px(), hfTrack1.py(), hfTrack1.pz()}}; + array{hfTrack0.pxProng(), hfTrack0.pyProng(), hfTrack0.pzProng()}, + array{hfTrack1.pxProng(), hfTrack1.pyProng(), hfTrack1.pzProng()}}; auto pT = RecoDecay::Pt(arrMom[0], arrMom[1]) + pTTolerance; // add tolerance because of no reco decay vertex @@ -646,20 +666,6 @@ struct HfTrackIndexSkimsCreator { continue; } - /// FIXME: this would be better fixed by having a convention on the position of min and max in the 2D Array - static std::vector massMinIndex; - static std::vector massMaxIndex; - static auto cacheIndices = [](std::array, n2ProngDecays>& cut2Prong, std::vector& mins, std::vector& maxs) { - mins.resize(cut2Prong.size()); - maxs.resize(cut2Prong.size()); - for (size_t i = 0; i < cut2Prong.size(); ++i) { - mins[i] = cut2Prong[i].colmap.find("massMin")->second; - maxs[i] = cut2Prong[i].colmap.find("massMax")->second; - } - return true; - }; - static bool initIndex = cacheIndices(cut2Prong, massMinIndex, massMaxIndex); - // invariant mass double massHypos[2]; whichHypo[iDecay2P] = 3; @@ -686,7 +692,7 @@ struct HfTrackIndexSkimsCreator { // imp. par. product cut if (debug || TESTBIT(isSelected, iDecay2P)) { auto impParProduct = hfTrack0.dcaPrim0() * hfTrack1.dcaPrim0(); - if (impParProduct > cut2Prong[iDecay2P].get(pTBin, "d0d0")) { + if (impParProduct > cut2Prong[iDecay2P].get(pTBin, d0d0Index[iDecay2P])) { CLRBIT(isSelected, iDecay2P); if (debug) { cutStatus[iDecay2P][2] = false; @@ -706,26 +712,27 @@ struct HfTrackIndexSkimsCreator { template void is3ProngPreselected(T1 const& hfTrack0, T1 const& hfTrack1, T1 const& hfTrack2, T2& cutStatus, T3& whichHypo, int& isSelected) { - auto arrMom = array{ - array{hfTrack0.px(), hfTrack0.py(), hfTrack0.pz()}, - array{hfTrack1.px(), hfTrack1.py(), hfTrack1.pz()}, - array{hfTrack2.px(), hfTrack2.py(), hfTrack2.pz()}}; - - auto pT = RecoDecay::Pt(arrMom[0], arrMom[1], arrMom[2]) + pTTolerance; // add tolerance because of no reco decay vertex /// FIXME: this would be better fixed by having a convention on the position of min and max in the 2D Array static std::vector massMinIndex; static std::vector massMaxIndex; static auto cacheIndices = [](std::array, n3ProngDecays>& cut3Prong, std::vector& mins, std::vector& maxs) { mins.resize(cut3Prong.size()); maxs.resize(cut3Prong.size()); - for (size_t i = 0; i < cut3Prong.size(); ++i) { - mins[i] = cut3Prong[i].colmap.find("massMin")->second; - maxs[i] = cut3Prong[i].colmap.find("massMax")->second; + for (size_t iDecay3P = 0; iDecay3P < cut3Prong.size(); ++iDecay3P) { + mins[iDecay3P] = cut3Prong[iDecay3P].colmap.find("massMin")->second; + maxs[iDecay3P] = cut3Prong[iDecay3P].colmap.find("massMax")->second; } return true; }; static bool initIndex = cacheIndices(cut3Prong, massMinIndex, massMaxIndex); + auto arrMom = array{ + array{hfTrack0.pxProng(), hfTrack0.pyProng(), hfTrack0.pzProng()}, + array{hfTrack1.pxProng(), hfTrack1.pyProng(), hfTrack1.pzProng()}, + array{hfTrack2.pxProng(), hfTrack2.pyProng(), hfTrack2.pzProng()}}; + + auto pT = RecoDecay::Pt(arrMom[0], arrMom[1], arrMom[2]) + pTTolerance; // add tolerance because of no reco decay vertex + for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { // pT @@ -774,6 +781,18 @@ struct HfTrackIndexSkimsCreator { void is2ProngSelected(const T1& pVecCand, const T2& secVtx, const T3& primVtx, T4& cutStatus, int& isSelected) { if (debug || isSelected > 0) { + + /// FIXME: this would be better fixed by having a convention on the position of min and max in the 2D Array + static std::vector cospIndex; + static auto cacheIndices = [](std::array, n2ProngDecays>& cut2Prong, std::vector& cosp) { + cosp.resize(cut2Prong.size()); + for (size_t iDecay2P = 0; iDecay2P < cut2Prong.size(); ++iDecay2P) { + cosp[iDecay2P] = cut2Prong[iDecay2P].colmap.find("cosp")->second; + } + return true; + }; + static bool initIndex = cacheIndices(cut2Prong, cospIndex); + for (int iDecay2P = 0; iDecay2P < n2ProngDecays; iDecay2P++) { // pT @@ -789,7 +808,7 @@ struct HfTrackIndexSkimsCreator { // cosp if (debug || TESTBIT(isSelected, iDecay2P)) { auto cpa = RecoDecay::CPA(primVtx, secVtx, pVecCand); - if (cpa < cut2Prong[iDecay2P].get("cosp")) { + if (cpa < cut2Prong[iDecay2P].get(pTBin, cospIndex[iDecay2P])) { CLRBIT(isSelected, iDecay2P); if (debug) { cutStatus[iDecay2P][3] = false; @@ -810,6 +829,21 @@ struct HfTrackIndexSkimsCreator { void is3ProngSelected(const T1& pVecCand, const T2& secVtx, const T3& primVtx, T4& cutStatus, int& isSelected) { if (debug || isSelected > 0) { + + /// FIXME: this would be better fixed by having a convention on the position of min and max in the 2D Array + static std::vector cospIndex; + static std::vector decLenIndex; + static auto cacheIndices = [](std::array, n3ProngDecays>& cut3Prong, std::vector& cosp, std::vector& decL) { + cosp.resize(cut3Prong.size()); + decL.resize(cut3Prong.size()); + for (size_t iDecay3P = 0; iDecay3P < cut3Prong.size(); ++iDecay3P) { + cosp[iDecay3P] = cut3Prong[iDecay3P].colmap.find("cosp")->second; + decL[iDecay3P] = cut3Prong[iDecay3P].colmap.find("decL")->second; + } + return true; + }; + static bool initIndex = cacheIndices(cut3Prong, cospIndex, decLenIndex); + for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { // pT @@ -825,7 +859,7 @@ struct HfTrackIndexSkimsCreator { // cosp if ((debug || TESTBIT(isSelected, iDecay3P))) { auto cpa = RecoDecay::CPA(primVtx, secVtx, pVecCand); - if (cpa < cut3Prong[iDecay3P].get("cosp")) { + if (cpa < cut3Prong[iDecay3P].get(pTBin, cospIndex[iDecay3P])) { CLRBIT(isSelected, iDecay3P); if (debug) { cutStatus[iDecay3P][2] = false; @@ -836,7 +870,7 @@ struct HfTrackIndexSkimsCreator { // decay length if ((debug || TESTBIT(isSelected, iDecay3P))) { auto decayLength = RecoDecay::distance(primVtx, secVtx); - if (decayLength < cut3Prong[iDecay3P].get("decL")) { + if (decayLength < cut3Prong[iDecay3P].get(pTBin, decLenIndex[iDecay3P])) { CLRBIT(isSelected, iDecay3P); if (debug) { cutStatus[iDecay3P][3] = false; @@ -995,9 +1029,9 @@ struct HfTrackIndexSkimsCreator { // fill histograms if (fillHistograms) { - registry.get(HIST("hVtx2ProngX"))->Fill(secondaryVertex2[0]); - registry.get(HIST("hVtx2ProngY"))->Fill(secondaryVertex2[1]); - registry.get(HIST("hVtx2ProngZ"))->Fill(secondaryVertex2[2]); + registry.fill(HIST("hVtx2ProngX"), secondaryVertex2[0]); + registry.fill(HIST("hVtx2ProngY"), secondaryVertex2[1]); + registry.fill(HIST("hVtx2ProngZ"), secondaryVertex2[2]); array, 2> arrMom = {pvec0, pvec1}; for (int iDecay2P = 0; iDecay2P < n2ProngDecays; iDecay2P++) { if (TESTBIT(isSelected2ProngCand, iDecay2P)) { @@ -1005,20 +1039,20 @@ struct HfTrackIndexSkimsCreator { auto mass2Prong = RecoDecay::M(arrMom, arrMass2Prong[iDecay2P][0]); switch (iDecay2P) { case hf_cand_prong2::DecayType::D0ToPiK: - registry.get(HIST("hmassD0ToPiK"))->Fill(mass2Prong); + registry.fill(HIST("hmassD0ToPiK"), mass2Prong); break; case hf_cand_prong2::DecayType::JpsiToEE: - registry.get(HIST("hmassJpsiToEE"))->Fill(mass2Prong); + registry.fill(HIST("hmassJpsiToEE"), mass2Prong); break; case hf_cand_prong2::DecayType::JpsiToMuMu: - registry.get(HIST("hmassJpsiToMuMu"))->Fill(mass2Prong); + registry.fill(HIST("hmassJpsiToMuMu"), mass2Prong); break; } } if (whichHypo2Prong[iDecay2P] >= 2) { auto mass2Prong = RecoDecay::M(arrMom, arrMass2Prong[iDecay2P][1]); if (iDecay2P == hf_cand_prong2::DecayType::D0ToPiK) { - registry.get(HIST("hmassD0ToPiK"))->Fill(mass2Prong); + registry.fill(HIST("hmassD0ToPiK"), mass2Prong); } } } @@ -1105,9 +1139,9 @@ struct HfTrackIndexSkimsCreator { // fill histograms if (fillHistograms) { - registry.get(HIST("hVtx3ProngX"))->Fill(secondaryVertex3[0]); - registry.get(HIST("hVtx3ProngY"))->Fill(secondaryVertex3[1]); - registry.get(HIST("hVtx3ProngZ"))->Fill(secondaryVertex3[2]); + registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); + registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); + registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); array, 3> arr3Mom = {pvec0, pvec1, pvec2}; for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { if (TESTBIT(isSelected3ProngCand, iDecay3P)) { @@ -1115,16 +1149,16 @@ struct HfTrackIndexSkimsCreator { auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][0]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DPlusToPiKPi: - registry.get(HIST("hmassDPlusToPiKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassDPlusToPiKPi"), mass3Prong); break; case hf_cand_prong3::DecayType::DsToPiKK: - registry.get(HIST("hmassDsToPiKK"))->Fill(mass3Prong); + registry.fill(HIST("hmassDsToPiKK"), mass3Prong); break; case hf_cand_prong3::DecayType::LcToPKPi: - registry.get(HIST("hmassLcToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassLcToPKPi"), mass3Prong); break; case hf_cand_prong3::DecayType::XicToPKPi: - registry.get(HIST("hmassXicToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassXicToPKPi"), mass3Prong); break; } } @@ -1132,13 +1166,13 @@ struct HfTrackIndexSkimsCreator { auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][1]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DsToPiKK: - registry.get(HIST("hmassDsToPiKK"))->Fill(mass3Prong); + registry.fill(HIST("hmassDsToPiKK"), mass3Prong); break; case hf_cand_prong3::DecayType::LcToPKPi: - registry.get(HIST("hmassLcToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassLcToPKPi"), mass3Prong); break; case hf_cand_prong3::DecayType::XicToPKPi: - registry.get(HIST("hmassXicToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassXicToPKPi"), mass3Prong); break; } } @@ -1217,9 +1251,9 @@ struct HfTrackIndexSkimsCreator { // fill histograms if (fillHistograms) { - registry.get(HIST("hVtx3ProngX"))->Fill(secondaryVertex3[0]); - registry.get(HIST("hVtx3ProngY"))->Fill(secondaryVertex3[1]); - registry.get(HIST("hVtx3ProngZ"))->Fill(secondaryVertex3[2]); + registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); + registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); + registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); array, 3> arr3Mom = {pvec0, pvec1, pvec2}; for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { if (TESTBIT(isSelected3ProngCand, iDecay3P)) { @@ -1227,16 +1261,16 @@ struct HfTrackIndexSkimsCreator { auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][0]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DPlusToPiKPi: - registry.get(HIST("hmassDPlusToPiKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassDPlusToPiKPi"), mass3Prong); break; case hf_cand_prong3::DecayType::DsToPiKK: - registry.get(HIST("hmassDsToPiKK"))->Fill(mass3Prong); + registry.fill(HIST("hmassDsToPiKK"), mass3Prong); break; case hf_cand_prong3::DecayType::LcToPKPi: - registry.get(HIST("hmassLcToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassLcToPKPi"), mass3Prong); break; case hf_cand_prong3::DecayType::XicToPKPi: - registry.get(HIST("hmassXicToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassXicToPKPi"), mass3Prong); break; } } @@ -1244,13 +1278,13 @@ struct HfTrackIndexSkimsCreator { auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][1]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DsToPiKK: - registry.get(HIST("hmassDsToPiKK"))->Fill(mass3Prong); + registry.fill(HIST("hmassDsToPiKK"), mass3Prong); break; case hf_cand_prong3::DecayType::LcToPKPi: - registry.get(HIST("hmassLcToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassLcToPKPi"), mass3Prong); break; case hf_cand_prong3::DecayType::XicToPKPi: - registry.get(HIST("hmassXicToPKPi"))->Fill(mass3Prong); + registry.fill(HIST("hmassXicToPKPi"), mass3Prong); break; } } @@ -1266,11 +1300,11 @@ struct HfTrackIndexSkimsCreator { nCand2 = rowTrackIndexProng2.lastIndex() - nCand2; // number of 2-prong candidates in this collision nCand3 = rowTrackIndexProng3.lastIndex() - nCand3; // number of 3-prong candidates in this collision - registry.get(HIST("hNTracks"))->Fill(nTracks); - registry.get(HIST("hNCand2Prong"))->Fill(nCand2); - registry.get(HIST("hNCand3Prong"))->Fill(nCand3); - registry.get(HIST("hNCand2ProngVsNTracks"))->Fill(nTracks, nCand2); - registry.get(HIST("hNCand3ProngVsNTracks"))->Fill(nTracks, nCand3); + registry.fill(HIST("hNTracks"), nTracks); + registry.fill(HIST("hNCand2Prong"), nCand2); + registry.fill(HIST("hNCand3Prong"), nCand3); + registry.fill(HIST("hNCand2ProngVsNTracks"), nTracks, nCand2); + registry.fill(HIST("hNCand3ProngVsNTracks"), nTracks, nCand3); } }; @@ -1537,10 +1571,10 @@ struct HfTrackIndexSkimsCreatorCascades { // fill histograms if (doValPlots) { MY_DEBUG_MSG(isK0SfromLc && isProtonFromLc && isLc, LOG(info) << "KEPT! True Lc from proton " << indexBach << " and K0S pos " << indexV0DaughPos << " and neg " << indexV0DaughNeg); - registry.get(HIST("hVtx2ProngX"))->Fill(posCasc[0]); - registry.get(HIST("hVtx2ProngY"))->Fill(posCasc[1]); - registry.get(HIST("hVtx2ProngZ"))->Fill(posCasc[2]); - registry.get(HIST("hmass2"))->Fill(mass2K0sP); + registry.fill(HIST("hVtx2ProngX"), posCasc[0]); + registry.fill(HIST("hVtx2ProngY"), posCasc[1]); + registry.fill(HIST("hVtx2ProngZ"), posCasc[2]); + registry.fill(HIST("hmass2"), mass2K0sP); } } // loop over V0s