From 6ca6ce24a506e781d2b6382dbe3a4b96b1577331 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Tue, 14 Nov 2023 17:11:06 +0100 Subject: [PATCH 01/21] Update cascade-bachelor skimming --- .../DataModel/CandidateReconstructionTables.h | 2 +- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 252 +++++++++--------- 2 files changed, 128 insertions(+), 126 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index 97cc4c6e6ea..26632194abf 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -851,7 +851,7 @@ DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! particle origin, DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! particle origin, generator level // mapping of decay types -enum DecayType { XiczeroToXiPi = 0, +enum DecayType { XiczeroOmegaczeroToXiPi = 0, OmegaczeroToOmegaPi, N2ProngDecays }; // always keep N2ProngDecays at the end diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index d1ed5213122..bdfdc1d9fdb 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2844,53 +2844,55 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable fillHistograms{"fillHistograms", true, "fill histograms"}; Configurable do3Prong{"do3Prong", false, "do 3-prong cascade"}; - // vertexing parameters - Configurable propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"}; + Configurable doPvRefit{"doPvRefit", false, "set to true if you do PV refit in trackIndexSkimCreator.cxx"}; + Configurable rejDiffCollTrack{"rejDiffCollTrack", true, "Reject tracks coming from different collisions"}; + + // DCAFitter settings + Configurable propagateToPCA{"propagateToPCA", false, "create tracks version propagated to PCA"}; + Configurable useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"}; + Configurable useWeightedFinalPCA{"useWeightedFinalPCA", true, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"}; Configurable maxR{"maxR", 200., "reject PCA's above this radius"}; Configurable maxDZIni{"maxDZIni", 4., "reject (if>0) PCA candidate if tracks DZ exceeds threshold"}; + Configurable maxDXYIni{"maxDXYIni", 4., "reject (if>0) PCA candidate if tracks DXY exceeds threshold"}; Configurable minParamChange{"minParamChange", 1.e-3, "stop iterations if largest change of any X is smaller than this"}; - Configurable minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations if chi2/chi2old > this"}; - Configurable useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"}; - Configurable useWeightedFinalPCA{"useWeightedFinalPCA", true, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"}; - Configurable rejDiffCollTrack{"rejDiffCollTrack", true, "Reject tracks coming from different collisions"}; + Configurable minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"}; + Configurable maxChi2{"maxChi2", 100., "discard vertices with chi2/Nprongs > this (or sum{DCAi^2}/Nprongs for abs. distance minimization)"}; + Configurable refitWithMatCorr{"refitWithMatCorr", true, "when doing propagateTracksToVertex, propagate tracks to vtx with material corrections and rerun minimization"}; // quality cut Configurable doCutQuality{"doCutQuality", true, "apply quality cuts"}; // Selection criteria + Configurable v0TransvRadius{"v0TransvRadius", 0.9, "V0 radius"}; + Configurable cascTransvRadius{"cascTransvRadius", 0.9, "Cascade radius"}; + Configurable dcaBachToPv{"dcaBachToPv", .05, "DCA Bach To PV"}; + Configurable dcaV0ToPv{"dcaV0ToPv", .05, "DCA V0 To PV"}; Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; Configurable dcaCascDau{"dcaCascDau", 1.0, "DCA Casc Daughters"}; Configurable dcaNegToPv{"dcaNegToPv", .05, "DCA Neg To PV"}; Configurable dcaPosToPv{"dcaPosToPv", .05, "DCA Pos To PV"}; - Configurable dcaBachToPv{"dcaBachToPv", .05, "DCA Bach To PV"}; - Configurable dcaV0ToPv{"dcaV0ToPv", .05, "DCA V0 To PV"}; - Configurable v0Radius{"v0Radius", 0.9, "V0 radius"}; - Configurable cascRadius{"cascRadius", 0.5, "Casc radius"}; Configurable v0MassWindow{"v0MassWindow", 0.008, "V0 mass window"}; - - // Track identification configurables - Configurable tpcNsigmaBachelor{"tpcNsigmaBachelor", 4, "TPC NSigma bachelor (>10 is no cut)"}; - Configurable tpcNsigmaProton{"tpcNsigmaProton", 4, "TPC NSigma proton <- lambda (>10 is no cut)"}; - Configurable tpcNsigmaPion{"tpcNsigmaPion", 4, "TPC NSigma pion <- lambda (>10 is no cut)"}; + Configurable cascMassWindow{"cascMassWindow", 0.008, "Cascade mass window"}; // magnetic field setting from CCDB Configurable isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"}; - Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "URL of the CCDB repository"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; Service ccdb; o2::base::MatLayerCylSet* lut; - o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; + o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; + int runNumber; static constexpr int kN2ProngDecays = hf_cand_casc_lf_2prong::DecayType::N2ProngDecays; // number of 2-prong hadron types static constexpr int kN3ProngDecays = hf_cand_casc_lf_3prong::DecayType::N3ProngDecays; // number of 3-prong hadron types - std::array, 2>, kN2ProngDecays> arrMass2Prong; - std::array, 2>, kN3ProngDecays> arrMass3Prong; + std::array, kN2ProngDecays> arrMass2Prong; + std::array, kN3ProngDecays> arrMass3Prong; double massP{0.}; double massPi{0.}; @@ -2915,14 +2917,9 @@ struct HfTrackIndexSkimCreatorLfCascades { massXiczero = o2::analysis::pdg::MassXiCZero; massXicplus = o2::analysis::pdg::MassXiCPlus; - arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroToXiPi] = std::array{std::array{massXi, massPi}, - std::array{massPi, massXi}}; - - arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi] = std::array{std::array{massOmega, massPi}, - std::array{massPi, massOmega}}; - - arrMass3Prong[hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi] = std::array{std::array{massXi, massPi, massPi}, - std::array{massPi, massPi, massXi}}; + arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi] = std::array{massXi, massPi}; + arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi] = std::array{massOmega, massPi}; + arrMass3Prong[hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi] = std::array{massXi, massPi, massPi}; ccdb->setURL(ccdbUrl); ccdb->setCaching(true); @@ -2963,29 +2960,31 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.add("hVtx2ProngX", "2-prong candidates;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx2ProngY", "2-prong candidates;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx2ProngZ", "2-prong candidates;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); - registry.add("hMassXicToXiPi", "2-prong candidates;inv. mass (#Xi pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{100, 2., 3.}}}); registry.add("hVtx3ProngX", "3-prong candidates;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx3ProngY", "3-prong candidates;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx3ProngZ", "3-prong candidates;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); // mass spectra - registry.add("hMassXicZeroToXiPi", "2-prong candidates;inv. mass (#Xi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{100, 2., 3.}}}); - registry.add("hMassOmegacZeroToOmegaPi", "2-prong candidates;inv. mass (#Omega #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{100, 2., 3.}}}); - registry.add("hMassXicPlusToXiPiPi", "3-prong candidates;inv. mass (#Xi #pi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{100, 2., 3.}}}); + registry.add("hMassXicZeroOmegacZeroToXiPi", "2-prong candidates;inv. mass (#Xi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 2., 3.}}}); + registry.add("hMassOmegacZeroToOmegaPi", "2-prong candidates;inv. mass (#Omega #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 2., 3.}}}); + registry.add("hMassXicPlusToXiPiPi", "3-prong candidates;inv. mass (#Xi #pi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 2., 3.}}}); } } Filter filterSelectCollisions = (aod::hf_sel_collision::whyRejectColl == 0); - Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng > 0); + Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng >= 4); //select tracks passing bachelor selection using SelectedCollisions = soa::Filtered>; - using TracksWithPVRefitAndDCA = soa::Join; + using TracksCovDcaPVRefit = soa::Join; + using SelectedHfTrackAssoc = soa::Filtered>; + using CascFull = soa::Join; using V0Full = soa::Join; - Preslice tracksPerCollision = aod::track::collisionId; // needed for PV refit - using FilteredTrackAssocSel = soa::Filtered>; - Preslice trackIndicesPerCollision = aod::track_association::collisionId; - Preslice cascadesPerCollision = aod::cascdata::collisionId; + Preslice tracksPerCollision = aod::track::collisionId; // needed for PV refit + Preslice trackIndicesPerCollision = aod::track_association::collisionId; // aod::hf_track_association::collisionId + Preslice cascadesPerCollision = aod::cascdata::collisionId; + + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /// Single-cascade cuts for 2-prongs or 3-prongs /// From cascadeanalysis.cxx w/o PID and Centrality study @@ -2993,9 +2992,7 @@ struct HfTrackIndexSkimCreatorLfCascades { template bool isPreselectedCascade(const TCascade& casc, const T1& bachTrackCast, const T2& posTrackCast, const T3& negTrackCast, const float& pvx, const float& pvy, const float& pvz) { - // Logic: either you have enough TPC clusters, OR you enabled ITSSA and have enough ITS clusters as requested - // N.B.: This will require dedicated studies! - registry.fill(HIST("hCandidateCounter"), 2.5); // okay track quality + registry.fill(HIST("hCandidateCounter"), 2.5); if (casc.v0cosPA(pvx, pvy, pvz) > v0CosPA && casc.casccosPA(pvx, pvy, pvz) > cascCosPA && @@ -3050,6 +3047,31 @@ struct HfTrackIndexSkimCreatorLfCascades { aod::V0sLinked const&, V0Full const&) { + + // Define o2 fitter, 2-prong + o2::vertexing::DCAFitterN<2> df2; + df2.setPropagateToPCA(propagateToPCA); + df2.setMaxR(maxR); + df2.setMaxDZIni(maxDZIni); + df2.setMaxDXYIni(maxDXYIni); + df2.setMinParamChange(minParamChange); + df2.setMinRelChi2Change(minRelChi2Change); + df2.setMaxChi2(maxChi2); + df2.setUseAbsDCA(useAbsDCA); + df2.setWeightedFinalPCA(useWeightedFinalPCA); + + // 3-prong vertex fitter + o2::vertexing::DCAFitterN<3> df3; + df3.setPropagateToPCA(propagateToPCA); + df3.setMaxR(maxR); + df3.setMaxDZIni(maxDZIni); + df3.setMaxDXYIni(maxDXYIni); + df3.setMinParamChange(minParamChange); + df3.setMinRelChi2Change(minRelChi2Change); + df3.setMaxChi2(maxChi2); + df3.setUseAbsDCA(useAbsDCA); + df3.setWeightedFinalPCA(useWeightedFinalPCA); + for (const auto& collision : collisions) { // set the magnetic field from CCDB @@ -3057,54 +3079,41 @@ struct HfTrackIndexSkimCreatorLfCascades { initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2); auto magneticField = o2::base::Propagator::Instance()->getNominalBz(); // z component - // Define o2 fitter, 2-prong - o2::vertexing::DCAFitterN<2> df2; df2.setBz(magneticField); - df2.setPropagateToPCA(propagateToPCA); - df2.setMaxR(maxR); - df2.setMaxDZIni(maxDZIni); - df2.setMinParamChange(minParamChange); - df2.setMinRelChi2Change(minRelChi2Change); - df2.setUseAbsDCA(useAbsDCA); - df2.setWeightedFinalPCA(useWeightedFinalPCA); + df2.setRefitWithMatCorr(refitWithMatCorr); - // 3-prong vertex fitter - o2::vertexing::DCAFitterN<3> df3; df3.setBz(magneticField); - df3.setPropagateToPCA(propagateToPCA); - df3.setMaxR(maxR); - df3.setMaxDZIni(maxDZIni); - df3.setMinParamChange(minParamChange); - df3.setMinRelChi2Change(minRelChi2Change); - df3.setUseAbsDCA(useAbsDCA); - df3.setWeightedFinalPCA(useWeightedFinalPCA); + df3.setRefitWithMatCorr(refitWithMatCorr); // cascade loop auto thisCollId = collision.globalIndex(); auto groupedCascades = cascades.sliceBy(cascadesPerCollision, thisCollId); + for (const auto& casc : groupedCascades) { - registry.fill(HIST("hCandidateCounter"), 0.5); // all candidates + registry.fill(HIST("hCandidateCounter"), 0.5); // all cascade candidates - auto trackXiDauCharged = casc.bachelor_as(); // pion <- xi track from TracksWithPVRefitAndDCA table + //----------------accessing particles in the decay chain------------- + // cascade daughter - charged particle + auto trackXiDauCharged = casc.bachelor_as(); // pion <- xi track // cascade daughter - V0 - if (!casc.v0_as().has_v0Data()) { // check that V0 data are stored + if (!casc.v0_as().has_v0Data()) { // check if V0 data are stored continue; } registry.fill(HIST("hCandidateCounter"), 1.5); // v0data exists - auto v0index = casc.v0_as(); - auto v0 = v0index.v0Data_as(); // V0 element from LF table containing V0 info + auto v0 = casc.v0_as(); + auto v0Element = v0.v0Data_as(); // V0 element from LF table containing V0 info // V0 positive daughter - auto trackV0DauPos = v0.posTrack_as(); // p <- V0 track (positive track) from TracksWithPVRefitAndDCA table + auto trackV0PosDau = v0Element.posTrack_as(); // p <- V0 track (positive track) 0 // V0 negative daughter - auto trackV0DauNeg = v0.negTrack_as(); // pion <- V0 track (negative track) from TracksWithPVRefitAndDCA table + auto trackV0NegDau = v0Element.negTrack_as(); // pion <- V0 track (negative track) 1 // check that particles come from the same collision if (rejDiffCollTrack) { - if (trackV0DauPos.collisionId() != trackV0DauNeg.collisionId()) { + if (trackV0Dau0.collisionId() != trackV0Dau1.collisionId()) { continue; } - if (trackXiDauCharged.collisionId() != trackV0DauPos.collisionId()) { + if (trackXiDauCharged.collisionId() != trackV0Dau0.collisionId()) { continue; } } @@ -3113,54 +3122,38 @@ struct HfTrackIndexSkimCreatorLfCascades { continue; } - o2::vertexing::DCAFitterN<2> dfc; - dfc.setBz(magneticField); - dfc.setPropagateToPCA(propagateToPCA); - dfc.setMaxR(maxR); - dfc.setMaxDZIni(maxDZIni); - dfc.setMinParamChange(minParamChange); - dfc.setMinRelChi2Change(minRelChi2Change); - dfc.setUseAbsDCA(useAbsDCA); - dfc.setWeightedFinalPCA(useWeightedFinalPCA); + //-------------------------- V0 info--------------------------- + // pion & p <- V0 tracks + auto trackParCovV0PosDau0 = getTrackParCov(trackV0PosDau); + auto trackParCovV0NegDau1 = getTrackParCov(trackV0NegDau); - auto trackParVarXiDauCharged = getTrackParCov(trackXiDauCharged); + //-------------------------- cascade info---------------------- + auto trackParCovXiDauCharged = getTrackParCov(trackXiDauCharged); // pion <- casc track to be processed with DCAfitter - // Set up covariance matrices (should in fact be optional) - std::array covV = {0.}; + std::array vertexCasc = {casc.x(), casc.y(), casc.z()}; + std::array pVecCasc = {casc.px(), casc.py(), casc.pz()}; + std::array covCasc = {0.}; constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component for (int i = 0; i < 6; i++) { - covV[MomInd[i]] = v0.momentumCovMat()[i]; - covV[i] = v0.positionCovMat()[i]; + covCasc[MomInd[i]] = casc.momentumCovMat()[i]; + covCasc[i] = casc.positionCovMat()[i]; } - auto trackV0 = o2::track::TrackParCov( - {v0.x(), v0.y(), v0.z()}, - {v0.pxpos() + v0.pxneg(), v0.pypos() + v0.pyneg(), v0.pzpos() + v0.pzneg()}, - covV, 0, true); - trackV0.setAbsCharge(0); - trackV0.setPID(o2::track::PID::Lambda); - - // reconstruct the cascade - if (dfc.process(trackV0, trackParVarXiDauCharged) == 0) { + // create cascade track + o2::track::TrackParCov trackCasc; + if (trackXiDauCharged.sign() > 0) { + trackCasc = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, 1, true); + } else if (trackXiDauCharged.sign() < 0) { + trackCasc = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, -1, true); + } else { continue; } + trackCasc.setAbsCharge(1); - std::array pvecV0; // V0 - std::array pvecXiDauPion; // bach pion - - dfc.getTrack(0).getPxPyPzGlo(pvecV0); - dfc.getTrack(1).getPxPyPzGlo(pvecXiDauPion); - - std::array coordVtxCasc = dfc.getPCACandidatePos(); - std::array covVtxCasc = dfc.calcPCACovMatrixFlat(); - std::array pvecCascAsM = {pvecV0[0] + pvecXiDauPion[0], pvecV0[1] + pvecXiDauPion[1], pvecV0[2] + pvecXiDauPion[2]}; - - auto trackCasc = o2::dataformats::V0(coordVtxCasc, pvecCascAsM, covVtxCasc, trackV0, trackParVarXiDauCharged); - - //-------------------combining cascade and pion tracks-------------------------- - // first loop over positive tracks + //--------------combining cascade and pion tracks-------------- auto groupedBachTrackIndices = trackIndices.sliceBy(trackIndicesPerCollision, thisCollId); for (auto trackIdPion1 = groupedBachTrackIndices.begin(); trackIdPion1 != groupedBachTrackIndices.end(); ++trackIdPion1) { - auto trackPion1 = trackIdPion1.track_as(); + + auto trackPion1 = trackIdPion1.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion1.collisionId())) { continue; @@ -3172,7 +3165,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } // check not to take the same particle twice in the decay chain - if (trackPion1.globalIndex() == trackXiDauCharged.globalIndex() || trackPion1.globalIndex() == trackV0DauPos.globalIndex() || trackPion1.globalIndex() == trackV0DauNeg.globalIndex() || trackPion1.globalIndex() == casc.globalIndex()) { + if (trackPion1.globalIndex() == trackXiDauCharged.globalIndex() || trackPion1.globalIndex() == trackV0PosDau.globalIndex() || trackPion1.globalIndex() == trackV0NegDau.globalIndex()) { continue; } @@ -3183,7 +3176,8 @@ struct HfTrackIndexSkimCreatorLfCascades { if (do3Prong) { // second loop over positive tracks for (auto trackIdPion2 = trackIdPion1 + 1; trackIdPion2 != groupedBachTrackIndices.end(); ++trackIdPion2) { - auto trackPion2 = trackIdPion2.track_as(); + + auto trackPion2 = trackIdPion2.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion2.collisionId())) { continue; @@ -3195,7 +3189,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } // check not to take the same particle twice in the decay chain - if (trackPion2.globalIndex() == trackXiDauCharged.globalIndex() || trackPion2.globalIndex() == trackV0DauPos.globalIndex() || trackPion2.globalIndex() == trackV0DauNeg.globalIndex() || trackPion2.globalIndex() == casc.globalIndex()) { + if (trackPion2.globalIndex() == trackPion1.globalIndex() || trackPion2.globalIndex() == trackXiDauCharged.globalIndex() || trackPion2.globalIndex() == trackV0PosDau.globalIndex() || trackPion2.globalIndex() == trackV0NegDau.globalIndex()) { continue; } @@ -3203,20 +3197,24 @@ struct HfTrackIndexSkimCreatorLfCascades { auto trackParVarPion2 = getTrackParCov(trackPion2); // reconstruct Xic with DCAFitter - if (df3.process(trackCasc, trackParVarPion1, trackParVarPion2) == 0) { + int nVtxFrom3ProngFitter = df3.process(trackCasc, trackParVarPion1, trackParVarPion2); + if ( nVtxFrom3ProngFitter == 0) { + continue; + } + df3.propagateTracksToVertex(); + if (!df3.isPropagateTracksToVertexDone()) { continue; } std::array pVec1 = {0.}; std::array pVec2 = {0.}; std::array pVec3 = {0.}; - df3.getTrack(0).getPxPyPzGlo(pVec1); // take the momentum at the Xic vertex df3.getTrack(1).getPxPyPzGlo(pVec2); df3.getTrack(2).getPxPyPzGlo(pVec3); // std::array secondaryVertex3 = {0., 0., 0.}; - const auto& secondaryVertex3 = df3.getPCACandidate(); + auto secondaryVertex3 = df3.getPCACandidate(); // fill table row rowTrackIndexCasc3Prong(casc.globalIndex(), @@ -3231,7 +3229,7 @@ struct HfTrackIndexSkimCreatorLfCascades { std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; for (int iDecay3P = 0; iDecay3P < kN3ProngDecays; iDecay3P++) { - auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P][0]); + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P]); switch (iDecay3P) { case hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi: registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); @@ -3242,17 +3240,21 @@ struct HfTrackIndexSkimCreatorLfCascades { } } - if (df2.process(trackCasc, trackParVarPion1) == 0) { + int nVtxFrom2ProngFitter = df2.process(trackCasc, trackParVarPion1); + if (nVtxFrom2ProngFitter == 0) { + continue; + } + df2.propagateTracksToVertex(); + if (!df2.isPropagateTracksToVertexDone()) { continue; } - std::array pVec1 = {0.}; - std::array pVec2 = {0.}; - - df2.getTrack(0).getPxPyPzGlo(pVec1); - df2.getTrack(1).getPxPyPzGlo(pVec2); + std::array pVecCasc = {0.}; + std::array pVecPion1 = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecCasc); + df2.getTrack(1).getPxPyPzGlo(pVecPion1); - const auto& secondaryVertex2 = df2.getPCACandidate(); + auto secondaryVertex2 = df2.getPCACandidate(); // fill table row rowTrackIndexCasc2Prong(casc.globalIndex(), @@ -3264,15 +3266,15 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.fill(HIST("hVtx2ProngY"), secondaryVertex2[1]); registry.fill(HIST("hVtx2ProngZ"), secondaryVertex2[2]); - std::array, 2> arrMom = {pVec1, pVec2}; + std::array, 2> arrMom = {pVecCasc, pVecPion1}; for (int iDecay2P = 0; iDecay2P < kN2ProngDecays; iDecay2P++) { - auto mass2Prong = RecoDecay::m(arrMom, arrMass2Prong[iDecay2P][0]); + auto mass2Prong = RecoDecay::m(arrMom, arrMass2Prong[iDecay2P]); switch (iDecay2P) { - case hf_cand_casc_lf_2prong::DecayType::XiczeroToXiPi: - registry.fill(HIST("hMassXicZeroToXiPi"), mass2Prong); + case hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi: + registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2Prong); break; case hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi: - registry.fill(HIST("hMassOmegacZeroToXiPi"), mass2Prong); + registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2Prong); break; } } @@ -3282,7 +3284,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } // loop over collisions } // processLfCascades - PROCESS_SWITCH(HfTrackIndexSkimCreatorLfCascades, processLfCascades, "Skim LF cascades", false); + PROCESS_SWITCH(HfTrackIndexSkimCreatorLfCascades, processLfCascades, "Skim HF -> LF cascade + bachelor", false); }; //________________________________________________________________________________________________________________________ From 333506d57b15518846b8352426cf5d213b95ced4 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Tue, 14 Nov 2023 17:11:53 +0100 Subject: [PATCH 02/21] Remove symbols --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index bdfdc1d9fdb..1ad8b9f496c 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2984,7 +2984,6 @@ struct HfTrackIndexSkimCreatorLfCascades { Preslice trackIndicesPerCollision = aod::track_association::collisionId; // aod::hf_track_association::collisionId Preslice cascadesPerCollision = aod::cascdata::collisionId; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /// Single-cascade cuts for 2-prongs or 3-prongs /// From cascadeanalysis.cxx w/o PID and Centrality study From d529085b795cccfaca96438b3a9370a218551e88 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Tue, 14 Nov 2023 17:12:14 +0100 Subject: [PATCH 03/21] Remove symbols --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 1ad8b9f496c..102f49ad8d5 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2984,7 +2984,6 @@ struct HfTrackIndexSkimCreatorLfCascades { Preslice trackIndicesPerCollision = aod::track_association::collisionId; // aod::hf_track_association::collisionId Preslice cascadesPerCollision = aod::cascdata::collisionId; - /// Single-cascade cuts for 2-prongs or 3-prongs /// From cascadeanalysis.cxx w/o PID and Centrality study /// Function to process cascades and generate corresponding invariant-mass distributions From 9dae5a98d98bda2c854d5ea67afb471be448cf5b Mon Sep 17 00:00:00 2001 From: ZFederica Date: Tue, 14 Nov 2023 23:37:28 +0100 Subject: [PATCH 04/21] Update authors --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 102f49ad8d5..281d34b1d07 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -18,6 +18,7 @@ /// \author Mattia Faggin , University and INFN Padova /// \author Jinjoo Seo , Inha University /// \author Fabrizio Grosa , CERN +/// \author Federica Zanone , Heidelberg University #include // std::find #include // std::distance From 78fcc0f571c57574bd6d06139d2b4760414cdd8c Mon Sep 17 00:00:00 2001 From: ZFederica Date: Thu, 16 Nov 2023 12:27:11 +0100 Subject: [PATCH 05/21] Continue development --- .../DataModel/CandidateReconstructionTables.h | 2 + PWGHF/TableProducer/trackIndexSkimCreator.cxx | 55 ++++++++++--------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index 26632194abf..b0c35ffaf53 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -258,12 +258,14 @@ using Hf3Prong = Hf3Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf2Prongs, "AOD", "HFCASCLF2PRONG", //! Table for HF 2 prong candidates with a Cascade o2::soa::Index<>, + hf_track_index::CollisionId hf_track_index::CascadeId, hf_track_index::Prong0Id); using HfCascLf2Prong = HfCascLf2Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 prong candidates with a Cascade o2::soa::Index<>, + hf_track_index::CollisionId hf_track_index::CascadeId, hf_track_index::Prong0Id, hf_track_index::Prong1Id); diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 281d34b1d07..8ce469f76d5 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2864,18 +2864,19 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable doCutQuality{"doCutQuality", true, "apply quality cuts"}; // Selection criteria - Configurable v0TransvRadius{"v0TransvRadius", 0.9, "V0 radius"}; - Configurable cascTransvRadius{"cascTransvRadius", 0.9, "Cascade radius"}; - Configurable dcaBachToPv{"dcaBachToPv", .05, "DCA Bach To PV"}; - Configurable dcaV0ToPv{"dcaV0ToPv", .05, "DCA V0 To PV"}; - Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; - Configurable dcaCascDau{"dcaCascDau", 1.0, "DCA Casc Daughters"}; - Configurable dcaNegToPv{"dcaNegToPv", .05, "DCA Neg To PV"}; - Configurable dcaPosToPv{"dcaPosToPv", .05, "DCA Pos To PV"}; - Configurable v0MassWindow{"v0MassWindow", 0.008, "V0 mass window"}; - Configurable cascMassWindow{"cascMassWindow", 0.008, "Cascade mass window"}; + // selections have been set to run2 lambda dedicated cuts + // selections for cascade have been set to the loosest value between xi and omega + Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius"}; //0.5 in run2 + Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius"}; //0.5 cm for xi and 0.6 for omega + Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 + Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; //0.06 in run2 + Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; //0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; //0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; //conservative, a cut ar 1.0 should also be fine + Configurable dcaCascDau{"dcaCascDau", 2.0, "DCA Casc Daughters"}; //conservative, a cut ar 1.0 should also be fine + Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; //0.06 in run2 + Configurable dcaPosToPv{"dcaPosToPv", .08, "DCA Pos To PV"}; //0.06 in run2 + Configurable v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"}; // 0.008 in run2 // magnetic field setting from CCDB Configurable isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"}; @@ -2929,34 +2930,34 @@ struct HfTrackIndexSkimCreatorLfCascades { runNumber = 0; if (fillHistograms) { - AxisSpec ptAxis = {200, 0.0f, 10.0f, "it{p}_{T} (GeV/c)"}; + AxisSpec ptAxis = {400, 0.0f, 20.0f, "it{p}_{T} (GeV/c)"}; AxisSpec massAxisXi = {200, 1.222f, 1.422f, "Inv. Mass (GeV/c^{2})"}; AxisSpec massAxisOmega = {200, 1.572f, 1.772f, "Inv. Mass (GeV/c^{2})"}; registry.add("hCandidateCounter", "hCandidateCounter", {HistType::kTH1F, {{10, 0.0f, 10.0f}}}); // Cascade mass spectra - registry.add("hMassXiMinus", "hMassXiMinus", {HistType::kTH1F, {{3000, 0.0f, 3.0f, "Inv. Mass (GeV/c^{2})"}}}); - registry.add("hMassXiPlus", "hMassXiPlus", {HistType::kTH1F, {{3000, 0.0f, 3.0f, "Inv. Mass (GeV/c^{2}²)"}}}); - registry.add("hMassOmegaMinus", "hMassOmegaMinus", {HistType::kTH1F, {{3000, 0.0f, 3.0f, "Inv. Mass (GeV/c^{2})"}}}); - registry.add("hMassOmegaPlus", "hMassOmegaPlus", {HistType::kTH1F, {{3000, 0.0f, 3.0f, "Inv. Mass (GeV/c^{2})"}}}); + registry.add("hMassXiMinus", "hMassXiMinus", {HistType::kTH1F, {{400, 1.122f, 1.522f, "Inv. Mass (GeV/c^{2})"}}}); + registry.add("hMassXiPlus", "hMassXiPlus", {HistType::kTH1F, {{400, 1.122f, 1.522f, "Inv. Mass (GeV/c^{2}²)"}}}); + registry.add("hMassOmegaMinus", "hMassOmegaMinus", {HistType::kTH1F, {{400, 1.472f, 1.872f, "Inv. Mass (GeV/c^{2})"}}}); + registry.add("hMassOmegaPlus", "hMassOmegaPlus", {HistType::kTH1F, {{400, 1.472f, 1.872f, "Inv. Mass (GeV/c^{2})"}}}); registry.add("h2dMassXiMinus", "h2dMassXiMinus", {HistType::kTH2F, {ptAxis, massAxisXi}}); registry.add("h2dMassXiPlus", "h2dMassXiPlus", {HistType::kTH2F, {ptAxis, massAxisXi}}); registry.add("h2dMassOmegaMinus", "h2dMassOmegaMinus", {HistType::kTH2F, {ptAxis, massAxisOmega}}); registry.add("h2dMassOmegaPlus", "h2dMassOmegaPlus", {HistType::kTH2F, {ptAxis, massAxisOmega}}); // Cascade topology - registry.add("hV0Radius", "hV0Radius", {HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}}}); - registry.add("hCascRadius", "hCascRadius", {HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}}}); - registry.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {{1000, 0.95f, 1.0f}}}); - registry.add("hCascCosPA", "hCascCosPA", {HistType::kTH1F, {{1000, 0.95f, 1.0f}}}); + registry.add("hV0Radius", "hV0Radius", {HistType::kTH1F, {{500, 0.0, 100.0, "cm"}}}); + registry.add("hCascRadius", "hCascRadius", {HistType::kTH1F, {{500, 0.0, 100.0, "cm"}}}); + registry.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {{100, 0.9f, 1.0f}}}); + registry.add("hCascCosPA", "hCascCosPA", {HistType::kTH1F, {{100, 0.9f, 1.0f}}}); registry.add("hDCAPosToPV", "hDCAPosToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}); registry.add("hDCANegToPV", "hDCANegToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}); registry.add("hDCABachToPV", "hDCABachToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}); registry.add("hDCAV0ToPV", "hDCAV0ToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}); - registry.add("hDCAV0Dau", "hDCAV0Dau", {HistType::kTH1F, {{1000, 0.0f, 10.0f, "cm^{2}"}}}); - registry.add("hDCACascDau", "hDCACascDau", {HistType::kTH1F, {{1000, 0.0f, 10.0f, "cm^{2}"}}}); - registry.add("hLambdaMass", "hLambdaMass", {HistType::kTH1F, {{1000, 0.0f, 10.0f, "Inv. Mass (GeV/c^{2})"}}}); + registry.add("hDCAV0Dau", "hDCAV0Dau", {HistType::kTH1F, {{500, 0.0f, 5.0f, "cm^{2}"}}}); + registry.add("hDCACascDau", "hDCACascDau", {HistType::kTH1F, {{500, 0.0f, 5.0f, "cm^{2}"}}}); + registry.add("hLambdaMass", "hLambdaMass", {HistType::kTH1F, {{400, 0.916f, 1.316f, "Inv. Mass (GeV/c^{2})"}}}); registry.add("hVtx2ProngX", "2-prong candidates;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx2ProngY", "2-prong candidates;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); @@ -3216,7 +3217,8 @@ struct HfTrackIndexSkimCreatorLfCascades { auto secondaryVertex3 = df3.getPCACandidate(); // fill table row - rowTrackIndexCasc3Prong(casc.globalIndex(), + rowTrackIndexCasc3Prong(thisCollId, + casc.globalIndex(), trackPion1.globalIndex(), trackPion2.globalIndex()); @@ -3256,7 +3258,8 @@ struct HfTrackIndexSkimCreatorLfCascades { auto secondaryVertex2 = df2.getPCACandidate(); // fill table row - rowTrackIndexCasc2Prong(casc.globalIndex(), + rowTrackIndexCasc2Prong(thisCollId, + casc.globalIndex(), trackPion1.globalIndex()); // fill histograms From 4f64fbe57bc2d90c4885b783c501c2674048c3e8 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Thu, 16 Nov 2023 12:45:36 +0100 Subject: [PATCH 06/21] Continue development --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 8ce469f76d5..1e23036b999 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2900,6 +2900,7 @@ struct HfTrackIndexSkimCreatorLfCascades { double massPi{0.}; double massXi{0.}; double massOmega{0.}; + double massLambda{0.}; double massXiczero{0.}; double massXicplus{0.}; @@ -2916,6 +2917,7 @@ struct HfTrackIndexSkimCreatorLfCascades { massPi = o2::analysis::pdg::MassPiPlus; massXi = o2::analysis::pdg::MassXiMinus; massOmega = o2::analysis::pdg::MassOmegaMinus; + massLambda = = o2::analysis::pdg::MassLambda0; massXiczero = o2::analysis::pdg::MassXiCZero; massXicplus = o2::analysis::pdg::MassXiCPlus; @@ -2994,19 +2996,19 @@ struct HfTrackIndexSkimCreatorLfCascades { { registry.fill(HIST("hCandidateCounter"), 2.5); - if (casc.v0cosPA(pvx, pvy, pvz) > v0CosPA && - casc.casccosPA(pvx, pvy, pvz) > cascCosPA && - casc.dcacascdaughters() > dcaCascDau && - casc.dcaV0daughters() > dcaV0Dau && - casc.dcanegtopv() > dcaNegToPv && - casc.dcapostopv() > dcaPosToPv && - casc.dcabachtopv() > dcaBachToPv && - casc.dcav0topv(pvx, pvy, pvz) > dcaV0ToPv && - casc.v0radius() > v0Radius && - casc.cascradius() > cascRadius && - std::abs(casc.mLambda() - 1.115683) < v0MassWindow) { + if (casc.v0cosPA() > v0CosPA && + casc.casccosPA() > cascCosPA && + casc.dcacascdaughters() < dcaCascDau && + casc.dcaV0daughters() < dcaV0Dau && + casc.dcanegtopv() > dcaNegToPv && + casc.dcapostopv() > dcaPosToPv && + casc.dcabachtopv() > dcaBachToPv && + casc.dcav0topv() > dcaV0ToPv && + casc.v0radius() > v0Radius && + casc.cascradius() > cascRadius && + std::abs(casc.mLambda() - massLambda) < v0MassWindow) { registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections - if (casc.sign() < 0) { // FIXME: could be done better... + if (casc.sign() < 0) { registry.fill(HIST("hMassXiMinus"), casc.mXi()); registry.fill(HIST("hMassOmegaMinus"), casc.mOmega()); } else { @@ -3018,12 +3020,12 @@ struct HfTrackIndexSkimCreatorLfCascades { // The basic eleven! registry.fill(HIST("hV0Radius"), casc.v0radius()); registry.fill(HIST("hCascRadius"), casc.cascradius()); - registry.fill(HIST("hV0CosPA"), casc.v0cosPA(pvx, pvy, pvz)); - registry.fill(HIST("hCascCosPA"), casc.casccosPA(pvx, pvy, pvz)); + registry.fill(HIST("hV0CosPA"), casc.v0cosPA()); + registry.fill(HIST("hCascCosPA"), casc.casccosPA()); registry.fill(HIST("hDCAPosToPV"), casc.dcapostopv()); registry.fill(HIST("hDCANegToPV"), casc.dcanegtopv()); registry.fill(HIST("hDCABachToPV"), casc.dcabachtopv()); - registry.fill(HIST("hDCAV0ToPV"), casc.dcav0topv(pvx, pvy, pvz)); + registry.fill(HIST("hDCAV0ToPV"), casc.dcav0topv()); registry.fill(HIST("hDCAV0Dau"), casc.dcaV0daughters()); registry.fill(HIST("hDCACascDau"), casc.dcacascdaughters()); registry.fill(HIST("hLambdaMass"), casc.mLambda()); From 9c9bb1ca5220d74b3e4abb000cd6ba7179ce32fb Mon Sep 17 00:00:00 2001 From: ZFederica Date: Thu, 16 Nov 2023 18:00:19 +0100 Subject: [PATCH 07/21] Continue development --- .../DataModel/CandidateReconstructionTables.h | 7 +- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 211 +++++++++++------- 2 files changed, 130 insertions(+), 88 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index b0c35ffaf53..c92d4268f7f 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -195,6 +195,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Prong2, prong2, int, Tracks, "_2"); //! Index to t DECLARE_SOA_INDEX_COLUMN(V0, v0); //! Index to V0 prong DECLARE_SOA_INDEX_COLUMN(Cascade, cascade); //! Index to cascade prong DECLARE_SOA_COLUMN(HFflag, hfflag, uint8_t); //! +DECLARE_SOA_COLUMN(CascadePIDHyp, cascadePIDHyp, int) DECLARE_SOA_COLUMN(FlagD0ToKPi, flagD0ToKPi, uint8_t); //! DECLARE_SOA_COLUMN(FlagJpsiToEE, flagJpsiToEE, uint8_t); //! @@ -260,7 +261,8 @@ DECLARE_SOA_TABLE(HfCascLf2Prongs, "AOD", "HFCASCLF2PRONG", //! Table for HF 2 p o2::soa::Index<>, hf_track_index::CollisionId hf_track_index::CascadeId, - hf_track_index::Prong0Id); + hf_track_index::Prong0Id, + hf_track_index::CascadePIDHyp); using HfCascLf2Prong = HfCascLf2Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 prong candidates with a Cascade @@ -268,7 +270,8 @@ DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 p hf_track_index::CollisionId hf_track_index::CascadeId, hf_track_index::Prong0Id, - hf_track_index::Prong1Id); + hf_track_index::Prong1Id, + hf_track_index::CascadePIDHyp); using HfCascLf3Prong = HfCascLf3Prongs::iterator; namespace hf_track_index diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 1e23036b999..a9bf0cf9aa2 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1700,7 +1700,7 @@ struct HfTrackIndexSkimCreator { auto bc = collision.bc_as(); initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2); - // 2-prong vertex fitter + // charm baryon vertex fitter o2::vertexing::DCAFitterN<2> df2; df2.setBz(o2::base::Propagator::Instance()->getNominalBz()); df2.setPropagateToPCA(propagateToPCA); @@ -2837,6 +2837,11 @@ struct HfTrackIndexSkimCreatorCascades { PROCESS_SWITCH(HfTrackIndexSkimCreatorCascades, processCascades, "Skim HF -> V0 cascades", false); }; +enum cascadeType { + kXi = 0, + kOmega +}; + struct HfTrackIndexSkimCreatorLfCascades { Produces rowTrackIndexCasc2Prong; Produces rowTrackIndexCasc3Prong; @@ -2845,7 +2850,6 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable fillHistograms{"fillHistograms", true, "fill histograms"}; Configurable do3Prong{"do3Prong", false, "do 3-prong cascade"}; - Configurable doPvRefit{"doPvRefit", false, "set to true if you do PV refit in trackIndexSkimCreator.cxx"}; Configurable rejDiffCollTrack{"rejDiffCollTrack", true, "Reject tracks coming from different collisions"}; // DCAFitter settings @@ -2860,12 +2864,10 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable maxChi2{"maxChi2", 100., "discard vertices with chi2/Nprongs > this (or sum{DCAi^2}/Nprongs for abs. distance minimization)"}; Configurable refitWithMatCorr{"refitWithMatCorr", true, "when doing propagateTracksToVertex, propagate tracks to vtx with material corrections and rerun minimization"}; - // quality cut - Configurable doCutQuality{"doCutQuality", true, "apply quality cuts"}; - // Selection criteria // selections have been set to run2 lambda dedicated cuts // selections for cascade have been set to the loosest value between xi and omega + // a tolerance has been added to be more conservative Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius"}; //0.5 in run2 Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius"}; //0.5 cm for xi and 0.6 for omega Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 @@ -2891,11 +2893,13 @@ struct HfTrackIndexSkimCreatorLfCascades { int runNumber; + // array of PDG masses of possible charm baryon daughters static constexpr int kN2ProngDecays = hf_cand_casc_lf_2prong::DecayType::N2ProngDecays; // number of 2-prong hadron types static constexpr int kN3ProngDecays = hf_cand_casc_lf_3prong::DecayType::N3ProngDecays; // number of 3-prong hadron types std::array, kN2ProngDecays> arrMass2Prong; std::array, kN3ProngDecays> arrMass3Prong; + //PDG masses double massP{0.}; double massPi{0.}; double massXi{0.}; @@ -2943,10 +2947,6 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.add("hMassXiPlus", "hMassXiPlus", {HistType::kTH1F, {{400, 1.122f, 1.522f, "Inv. Mass (GeV/c^{2}²)"}}}); registry.add("hMassOmegaMinus", "hMassOmegaMinus", {HistType::kTH1F, {{400, 1.472f, 1.872f, "Inv. Mass (GeV/c^{2})"}}}); registry.add("hMassOmegaPlus", "hMassOmegaPlus", {HistType::kTH1F, {{400, 1.472f, 1.872f, "Inv. Mass (GeV/c^{2})"}}}); - registry.add("h2dMassXiMinus", "h2dMassXiMinus", {HistType::kTH2F, {ptAxis, massAxisXi}}); - registry.add("h2dMassXiPlus", "h2dMassXiPlus", {HistType::kTH2F, {ptAxis, massAxisXi}}); - registry.add("h2dMassOmegaMinus", "h2dMassOmegaMinus", {HistType::kTH2F, {ptAxis, massAxisOmega}}); - registry.add("h2dMassOmegaPlus", "h2dMassOmegaPlus", {HistType::kTH2F, {ptAxis, massAxisOmega}}); // Cascade topology registry.add("hV0Radius", "hV0Radius", {HistType::kTH1F, {{500, 0.0, 100.0, "cm"}}}); @@ -2961,9 +2961,15 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.add("hDCACascDau", "hDCACascDau", {HistType::kTH1F, {{500, 0.0f, 5.0f, "cm^{2}"}}}); registry.add("hLambdaMass", "hLambdaMass", {HistType::kTH1F, {{400, 0.916f, 1.316f, "Inv. Mass (GeV/c^{2})"}}}); - registry.add("hVtx2ProngX", "2-prong candidates;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx2ProngY", "2-prong candidates;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx2ProngZ", "2-prong candidates;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); + // charm baryon decay vertex + registry.add("hVtx2ProngXXiHyp", "2-prong candidates - #Xi hypothesis;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); + registry.add("hVtx2ProngYXiHyp", "2-prong candidates - #Xi hypothesis;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); + registry.add("hVtx2ProngZXiHyp", "2-prong candidates - #Xi hypothesis;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); + + registry.add("hVtx2ProngXOmegaHyp", "2-prong candidates - #Omega hypothesis;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); + registry.add("hVtx2ProngYOmegaHyp", "2-prong candidates - #Omega hypothesis;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); + registry.add("hVtx2ProngZOmegaHyp", "2-prong candidates - #Omega hypothesis;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); + registry.add("hVtx3ProngX", "3-prong candidates;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx3ProngY", "3-prong candidates;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); registry.add("hVtx3ProngZ", "3-prong candidates;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); @@ -2988,11 +2994,9 @@ struct HfTrackIndexSkimCreatorLfCascades { Preslice trackIndicesPerCollision = aod::track_association::collisionId; // aod::hf_track_association::collisionId Preslice cascadesPerCollision = aod::cascdata::collisionId; - /// Single-cascade cuts for 2-prongs or 3-prongs - /// From cascadeanalysis.cxx w/o PID and Centrality study - /// Function to process cascades and generate corresponding invariant-mass distributions - template - bool isPreselectedCascade(const TCascade& casc, const T1& bachTrackCast, const T2& posTrackCast, const T3& negTrackCast, const float& pvx, const float& pvy, const float& pvz) + /// Single-cascade cuts + template + bool isPreselectedCascade(const TCascade& casc) { registry.fill(HIST("hCandidateCounter"), 2.5); @@ -3007,16 +3011,10 @@ struct HfTrackIndexSkimCreatorLfCascades { casc.v0radius() > v0Radius && casc.cascradius() > cascRadius && std::abs(casc.mLambda() - massLambda) < v0MassWindow) { - registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections - if (casc.sign() < 0) { - registry.fill(HIST("hMassXiMinus"), casc.mXi()); - registry.fill(HIST("hMassOmegaMinus"), casc.mOmega()); - } else { - registry.fill(HIST("hMassXiPlus"), casc.mXi()); - registry.fill(HIST("hMassOmegaPlus"), casc.mOmega()); - } - if (fillHistograms) { + registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections + + if (fillHistograms) { // The basic eleven! registry.fill(HIST("hV0Radius"), casc.v0radius()); registry.fill(HIST("hCascRadius"), casc.cascradius()); @@ -3029,7 +3027,14 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.fill(HIST("hDCAV0Dau"), casc.dcaV0daughters()); registry.fill(HIST("hDCACascDau"), casc.dcacascdaughters()); registry.fill(HIST("hLambdaMass"), casc.mLambda()); - } + if (casc.sign() < 0) { + registry.fill(HIST("hMassXiMinus"), casc.mXi()); + registry.fill(HIST("hMassOmegaMinus"), casc.mOmega()); + } else { + registry.fill(HIST("hMassXiPlus"), casc.mXi()); + registry.fill(HIST("hMassOmegaPlus"), casc.mOmega()); + } + } return true; } return false; @@ -3049,28 +3054,25 @@ struct HfTrackIndexSkimCreatorLfCascades { aod::V0sLinked const&, V0Full const&) { + int cascType = 0; - // Define o2 fitter, 2-prong + // Define o2 fitter for charm baryon decay vertex, 2prong o2::vertexing::DCAFitterN<2> df2; df2.setPropagateToPCA(propagateToPCA); df2.setMaxR(maxR); df2.setMaxDZIni(maxDZIni); - df2.setMaxDXYIni(maxDXYIni); df2.setMinParamChange(minParamChange); df2.setMinRelChi2Change(minRelChi2Change); - df2.setMaxChi2(maxChi2); df2.setUseAbsDCA(useAbsDCA); df2.setWeightedFinalPCA(useWeightedFinalPCA); - // 3-prong vertex fitter + // Define o2 fitter for charm baryon decay vertex, 3prong o2::vertexing::DCAFitterN<3> df3; df3.setPropagateToPCA(propagateToPCA); df3.setMaxR(maxR); df3.setMaxDZIni(maxDZIni); - df3.setMaxDXYIni(maxDXYIni); df3.setMinParamChange(minParamChange); df3.setMinRelChi2Change(minRelChi2Change); - df3.setMaxChi2(maxChi2); df3.setUseAbsDCA(useAbsDCA); df3.setWeightedFinalPCA(useWeightedFinalPCA); @@ -3120,7 +3122,11 @@ struct HfTrackIndexSkimCreatorLfCascades { } } - if (!(isPreselectedCascade(casc, trackXiDauCharged, trackV0DauPos, trackV0DauNeg, collision.posX(), collision.posY(), collision.posZ()))) { + if(trackV0PosDau.globalIndex() == trackV0NegDau.globalIndex()){ + continue; + } + + if (!(isPreselectedCascade(casc))) { continue; } @@ -3141,15 +3147,20 @@ struct HfTrackIndexSkimCreatorLfCascades { covCasc[i] = casc.positionCovMat()[i]; } // create cascade track - o2::track::TrackParCov trackCasc; + o2::track::TrackParCov trackCascXi; if (trackXiDauCharged.sign() > 0) { - trackCasc = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, 1, true); + trackCascXi = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, 1, true); } else if (trackXiDauCharged.sign() < 0) { - trackCasc = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, -1, true); + trackCascXi = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, -1, true); } else { continue; } - trackCasc.setAbsCharge(1); + trackCascXi.setAbsCharge(1); + + auto trackCascOmega = trackCascXi; + + trackCascXi.setPID(o2::track::PID::XiMinus); + trackCascOmega.setPID(o2::track::PID::OmegaMinus); //--------------combining cascade and pion tracks-------------- auto groupedBachTrackIndices = trackIndices.sliceBy(trackIndicesPerCollision, thisCollId); @@ -3174,6 +3185,72 @@ struct HfTrackIndexSkimCreatorLfCascades { // primary pion track to be processed with DCAFitter auto trackParVarPion1 = getTrackParCov(trackPion1); + // find charm baryon decay using xi PID hypothesis + int nVtxFrom2ProngFitterXiHyp = df2.process(trackCascXi, trackParVarPion1); + if (nVtxFrom2ProngFitterXiHyp > 0) { + + df2.propagateTracksToVertex(); + + std::array pVecXi = {0.}; + std::array pVecPion1XiHyp = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecXi); + df2.getTrack(1).getPxPyPzGlo(pVecPion1iHyp); + + auto secondaryVertex2XiHyp = df2.getPCACandidate(); + + cascType = 0; + SETBIT(cascType, kXi); + + // fill table row + rowTrackIndexCasc2Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + cascType); + + // fill histograms + if (fillHistograms) { + registry.fill(HIST("hVtx2ProngXXiHyp"), secondaryVertex2XiHyp[0]); + registry.fill(HIST("hVtx2ProngYXiHyp"), secondaryVertex2XiHyp[1]); + registry.fill(HIST("hVtx2ProngZXiHyp"), secondaryVertex2XiHyp[2]); + std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; + auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi]); + registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); + } + } + + // find charm baryon decay using omega PID hypothesis + int nVtxFrom2ProngFitterOmegaHyp = df2.process(trackCascOmega, trackParVarPion1); + if (nVtxFrom2ProngFitterOmegaHyp > 0) { + + df2.propagateTracksToVertex(); + + std::array pVecOmega = {0.}; + std::array pVecPion1OmegaHyp = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecOmega); + df2.getTrack(1).getPxPyPzGlo(pVecPion1OmegaHyp); + + auto secondaryVertex2OmegaHyp = df2.getPCACandidate(); + + cascType = 0; + SETBIT(cascType, kOmega); + + // fill table row + rowTrackIndexCasc2Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + cascType); + + // fill histograms + if (fillHistograms) { + registry.fill(HIST("hVtx2ProngXOmegaHyp"), secondaryVertex2OmegaHyp[0]); + registry.fill(HIST("hVtx2ProngYOmegaHyp"), secondaryVertex2OmegaHyp[1]); + registry.fill(HIST("hVtx2ProngZOmegaHyp"), secondaryVertex2OmegaHyp[2]); + std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; + auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi]); + registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); + } + } + // first loop over tracks if (do3Prong) { // second loop over positive tracks @@ -3199,14 +3276,10 @@ struct HfTrackIndexSkimCreatorLfCascades { auto trackParVarPion2 = getTrackParCov(trackPion2); // reconstruct Xic with DCAFitter - int nVtxFrom3ProngFitter = df3.process(trackCasc, trackParVarPion1, trackParVarPion2); - if ( nVtxFrom3ProngFitter == 0) { - continue; - } + int nVtxFrom3ProngFitterXiHyp = df3.process(trackCascXi, trackParVarPion1, trackParVarPion2); + if ( nVtxFrom3ProngFitterXiHyp > 0) { + df3.propagateTracksToVertex(); - if (!df3.isPropagateTracksToVertexDone()) { - continue; - } std::array pVec1 = {0.}; std::array pVec2 = {0.}; @@ -3218,18 +3291,21 @@ struct HfTrackIndexSkimCreatorLfCascades { // std::array secondaryVertex3 = {0., 0., 0.}; auto secondaryVertex3 = df3.getPCACandidate(); + cascType = 0; + SETBIT(cascType, kXi); + // fill table row rowTrackIndexCasc3Prong(thisCollId, casc.globalIndex(), trackPion1.globalIndex(), - trackPion2.globalIndex()); + trackPion2.globalIndex(), + cascType); // fill histograms if (fillHistograms) { registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); - std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; for (int iDecay3P = 0; iDecay3P < kN3ProngDecays; iDecay3P++) { auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P]); @@ -3241,48 +3317,11 @@ struct HfTrackIndexSkimCreatorLfCascades { } } } - } - - int nVtxFrom2ProngFitter = df2.process(trackCasc, trackParVarPion1); - if (nVtxFrom2ProngFitter == 0) { - continue; - } - df2.propagateTracksToVertex(); - if (!df2.isPropagateTracksToVertexDone()) { - continue; - } - std::array pVecCasc = {0.}; - std::array pVecPion1 = {0.}; - df2.getTrack(0).getPxPyPzGlo(pVecCasc); - df2.getTrack(1).getPxPyPzGlo(pVecPion1); - auto secondaryVertex2 = df2.getPCACandidate(); + }// end 3prong loop + } // end 3prong condition - // fill table row - rowTrackIndexCasc2Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex()); - - // fill histograms - if (fillHistograms) { - registry.fill(HIST("hVtx2ProngX"), secondaryVertex2[0]); - registry.fill(HIST("hVtx2ProngY"), secondaryVertex2[1]); - registry.fill(HIST("hVtx2ProngZ"), secondaryVertex2[2]); - - std::array, 2> arrMom = {pVecCasc, pVecPion1}; - for (int iDecay2P = 0; iDecay2P < kN2ProngDecays; iDecay2P++) { - auto mass2Prong = RecoDecay::m(arrMom, arrMass2Prong[iDecay2P]); - switch (iDecay2P) { - case hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi: - registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2Prong); - break; - case hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi: - registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2Prong); - break; - } - } - } } // loop over pion } // loop over cascade } // loop over collisions From 68537eb11934483991f01e09a766326604aefcfa Mon Sep 17 00:00:00 2001 From: ZFederica Date: Thu, 16 Nov 2023 18:07:27 +0100 Subject: [PATCH 08/21] Continue development --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index a9bf0cf9aa2..09791b95e99 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1700,7 +1700,7 @@ struct HfTrackIndexSkimCreator { auto bc = collision.bc_as(); initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2); - // charm baryon vertex fitter + // 2-prong vertex fitter o2::vertexing::DCAFitterN<2> df2; df2.setBz(o2::base::Propagator::Instance()->getNominalBz()); df2.setPropagateToPCA(propagateToPCA); From 0a560cc033cf16369412ae869c8665b5c496d598 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Thu, 16 Nov 2023 18:12:56 +0100 Subject: [PATCH 09/21] Continue development --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 09791b95e99..b60f60b5fad 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2985,12 +2985,11 @@ struct HfTrackIndexSkimCreatorLfCascades { Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng >= 4); //select tracks passing bachelor selection using SelectedCollisions = soa::Filtered>; - using TracksCovDcaPVRefit = soa::Join; using SelectedHfTrackAssoc = soa::Filtered>; using CascFull = soa::Join; using V0Full = soa::Join; - Preslice tracksPerCollision = aod::track::collisionId; // needed for PV refit + Preslice tracksPerCollision = aod::track::collisionId; // needed for PV refit Preslice trackIndicesPerCollision = aod::track_association::collisionId; // aod::hf_track_association::collisionId Preslice cascadesPerCollision = aod::cascdata::collisionId; @@ -3099,7 +3098,7 @@ struct HfTrackIndexSkimCreatorLfCascades { //----------------accessing particles in the decay chain------------- // cascade daughter - charged particle - auto trackXiDauCharged = casc.bachelor_as(); // pion <- xi track + auto trackXiDauCharged = casc.bachelor_as(); // pion <- xi track // cascade daughter - V0 if (!casc.v0_as().has_v0Data()) { // check if V0 data are stored continue; @@ -3108,16 +3107,16 @@ struct HfTrackIndexSkimCreatorLfCascades { auto v0 = casc.v0_as(); auto v0Element = v0.v0Data_as(); // V0 element from LF table containing V0 info // V0 positive daughter - auto trackV0PosDau = v0Element.posTrack_as(); // p <- V0 track (positive track) 0 + auto trackV0PosDau = v0Element.posTrack_as(); // p <- V0 track (positive track) 0 // V0 negative daughter - auto trackV0NegDau = v0Element.negTrack_as(); // pion <- V0 track (negative track) 1 + auto trackV0NegDau = v0Element.negTrack_as(); // pion <- V0 track (negative track) 1 // check that particles come from the same collision if (rejDiffCollTrack) { - if (trackV0Dau0.collisionId() != trackV0Dau1.collisionId()) { + if (trackV0PosDau.collisionId() != trackV0NegDau.collisionId()) { continue; } - if (trackXiDauCharged.collisionId() != trackV0Dau0.collisionId()) { + if (trackXiDauCharged.collisionId() != trackV0PosDau.collisionId()) { continue; } } @@ -3166,7 +3165,7 @@ struct HfTrackIndexSkimCreatorLfCascades { auto groupedBachTrackIndices = trackIndices.sliceBy(trackIndicesPerCollision, thisCollId); for (auto trackIdPion1 = groupedBachTrackIndices.begin(); trackIdPion1 != groupedBachTrackIndices.end(); ++trackIdPion1) { - auto trackPion1 = trackIdPion1.track_as(); + auto trackPion1 = trackIdPion1.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion1.collisionId())) { continue; @@ -3256,7 +3255,7 @@ struct HfTrackIndexSkimCreatorLfCascades { // second loop over positive tracks for (auto trackIdPion2 = trackIdPion1 + 1; trackIdPion2 != groupedBachTrackIndices.end(); ++trackIdPion2) { - auto trackPion2 = trackIdPion2.track_as(); + auto trackPion2 = trackIdPion2.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion2.collisionId())) { continue; From 5c500f74d92bf2726b4f410f7bf1acb7ec4c264f Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 16 Nov 2023 17:16:07 +0000 Subject: [PATCH 10/21] Please consider the following formatting changes --- .../DataModel/CandidateReconstructionTables.h | 4 +- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 223 +++++++++--------- 2 files changed, 113 insertions(+), 114 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index feba8362933..ea33f5fe066 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -260,7 +260,7 @@ using Hf3Prong = Hf3Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf2Prongs, "AOD", "HFCASCLF2PRONG", //! Table for HF 2 prong candidates with a Cascade o2::soa::Index<>, hf_track_index::CollisionId - hf_track_index::CascadeId, + hf_track_index::CascadeId, hf_track_index::Prong0Id, hf_track_index::CascadePIDHyp); using HfCascLf2Prong = HfCascLf2Prongs::iterator; @@ -268,7 +268,7 @@ using HfCascLf2Prong = HfCascLf2Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 prong candidates with a Cascade o2::soa::Index<>, hf_track_index::CollisionId - hf_track_index::CascadeId, + hf_track_index::CascadeId, hf_track_index::Prong0Id, hf_track_index::Prong1Id, hf_track_index::CascadePIDHyp); diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index c0aac778590..2266114d610 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2918,17 +2918,17 @@ struct HfTrackIndexSkimCreatorLfCascades { // selections have been set to run2 lambda dedicated cuts // selections for cascade have been set to the loosest value between xi and omega // a tolerance has been added to be more conservative - Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius"}; //0.5 in run2 - Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius"}; //0.5 cm for xi and 0.6 for omega - Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 - Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; //0.06 in run2 - Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; //0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; //0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; //conservative, a cut ar 1.0 should also be fine - Configurable dcaCascDau{"dcaCascDau", 2.0, "DCA Casc Daughters"}; //conservative, a cut ar 1.0 should also be fine - Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; //0.06 in run2 - Configurable dcaPosToPv{"dcaPosToPv", .08, "DCA Pos To PV"}; //0.06 in run2 - Configurable v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"}; // 0.008 in run2 + Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius"}; // 0.5 in run2 + Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius"}; // 0.5 cm for xi and 0.6 for omega + Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 + Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; // 0.06 in run2 + Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; // conservative, a cut ar 1.0 should also be fine + Configurable dcaCascDau{"dcaCascDau", 2.0, "DCA Casc Daughters"}; // conservative, a cut ar 1.0 should also be fine + Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; // 0.06 in run2 + Configurable dcaPosToPv{"dcaPosToPv", .08, "DCA Pos To PV"}; // 0.06 in run2 + Configurable v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"}; // 0.008 in run2 // magnetic field setting from CCDB Configurable isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"}; @@ -2947,9 +2947,9 @@ struct HfTrackIndexSkimCreatorLfCascades { static constexpr int kN2ProngDecays = hf_cand_casc_lf_2prong::DecayType::N2ProngDecays; // number of 2-prong hadron types static constexpr int kN3ProngDecays = hf_cand_casc_lf_3prong::DecayType::N3ProngDecays; // number of 3-prong hadron types std::array, kN2ProngDecays> arrMass2Prong; - std::array, kN3ProngDecays> arrMass3Prong; + std::array, kN3ProngDecays> arrMass3Prong; - //PDG masses + // PDG masses double massP{0.}; double massPi{0.}; double massXi{0.}; @@ -2975,7 +2975,7 @@ struct HfTrackIndexSkimCreatorLfCascades { massXiczero = o2::analysis::pdg::MassXiCZero; massXicplus = o2::analysis::pdg::MassXiCPlus; - arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi] = std::array{massXi, massPi}; + arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi] = std::array{massXi, massPi}; arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi] = std::array{massOmega, massPi}; arrMass3Prong[hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi] = std::array{massXi, massPi, massPi}; @@ -3032,14 +3032,14 @@ struct HfTrackIndexSkimCreatorLfCascades { } Filter filterSelectCollisions = (aod::hf_sel_collision::whyRejectColl == 0); - Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng >= 4); //select tracks passing bachelor selection + Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng >= 4); // select tracks passing bachelor selection using SelectedCollisions = soa::Filtered>; using SelectedHfTrackAssoc = soa::Filtered>; - using CascFull = soa::Join; + using CascFull = soa::Join; using V0Full = soa::Join; - Preslice tracksPerCollision = aod::track::collisionId; // needed for PV refit + Preslice tracksPerCollision = aod::track::collisionId; // needed for PV refit Preslice trackIndicesPerCollision = aod::track_association::collisionId; // aod::hf_track_association::collisionId Preslice cascadesPerCollision = aod::cascdata::collisionId; @@ -3047,23 +3047,23 @@ struct HfTrackIndexSkimCreatorLfCascades { template bool isPreselectedCascade(const TCascade& casc) { - registry.fill(HIST("hCandidateCounter"), 2.5); - - if (casc.v0cosPA() > v0CosPA && - casc.casccosPA() > cascCosPA && - casc.dcacascdaughters() < dcaCascDau && - casc.dcaV0daughters() < dcaV0Dau && - casc.dcanegtopv() > dcaNegToPv && - casc.dcapostopv() > dcaPosToPv && - casc.dcabachtopv() > dcaBachToPv && + registry.fill(HIST("hCandidateCounter"), 2.5); + + if (casc.v0cosPA() > v0CosPA && + casc.casccosPA() > cascCosPA && + casc.dcacascdaughters() < dcaCascDau && + casc.dcaV0daughters() < dcaV0Dau && + casc.dcanegtopv() > dcaNegToPv && + casc.dcapostopv() > dcaPosToPv && + casc.dcabachtopv() > dcaBachToPv && casc.dcav0topv() > dcaV0ToPv && - casc.v0radius() > v0Radius && - casc.cascradius() > cascRadius && + casc.v0radius() > v0Radius && + casc.cascradius() > cascRadius && std::abs(casc.mLambda() - massLambda) < v0MassWindow) { - registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections + registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections - if (fillHistograms) { + if (fillHistograms) { // The basic eleven! registry.fill(HIST("hV0Radius"), casc.v0radius()); registry.fill(HIST("hCascRadius"), casc.cascradius()); @@ -3083,7 +3083,7 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.fill(HIST("hMassXiPlus"), casc.mXi()); registry.fill(HIST("hMassOmegaPlus"), casc.mOmega()); } - } + } return true; } return false; @@ -3171,7 +3171,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } } - if(trackV0PosDau.globalIndex() == trackV0NegDau.globalIndex()){ + if (trackV0PosDau.globalIndex() == trackV0NegDau.globalIndex()) { continue; } @@ -3208,7 +3208,7 @@ struct HfTrackIndexSkimCreatorLfCascades { auto trackCascOmega = trackCascXi; - trackCascXi.setPID(o2::track::PID::XiMinus); + trackCascXi.setPID(o2::track::PID::XiMinus); trackCascOmega.setPID(o2::track::PID::OmegaMinus); //--------------combining cascade and pion tracks-------------- @@ -3238,67 +3238,67 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom2ProngFitterXiHyp = df2.process(trackCascXi, trackParVarPion1); if (nVtxFrom2ProngFitterXiHyp > 0) { - df2.propagateTracksToVertex(); + df2.propagateTracksToVertex(); - std::array pVecXi = {0.}; - std::array pVecPion1XiHyp = {0.}; - df2.getTrack(0).getPxPyPzGlo(pVecXi); - df2.getTrack(1).getPxPyPzGlo(pVecPion1iHyp); + std::array pVecXi = {0.}; + std::array pVecPion1XiHyp = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecXi); + df2.getTrack(1).getPxPyPzGlo(pVecPion1iHyp); - auto secondaryVertex2XiHyp = df2.getPCACandidate(); + auto secondaryVertex2XiHyp = df2.getPCACandidate(); - cascType = 0; - SETBIT(cascType, kXi); + cascType = 0; + SETBIT(cascType, kXi); - // fill table row - rowTrackIndexCasc2Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - cascType); + // fill table row + rowTrackIndexCasc2Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + cascType); - // fill histograms - if (fillHistograms) { - registry.fill(HIST("hVtx2ProngXXiHyp"), secondaryVertex2XiHyp[0]); - registry.fill(HIST("hVtx2ProngYXiHyp"), secondaryVertex2XiHyp[1]); - registry.fill(HIST("hVtx2ProngZXiHyp"), secondaryVertex2XiHyp[2]); - std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; - auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi]); - registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); + // fill histograms + if (fillHistograms) { + registry.fill(HIST("hVtx2ProngXXiHyp"), secondaryVertex2XiHyp[0]); + registry.fill(HIST("hVtx2ProngYXiHyp"), secondaryVertex2XiHyp[1]); + registry.fill(HIST("hVtx2ProngZXiHyp"), secondaryVertex2XiHyp[2]); + std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; + auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi]); + registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); + } } - } // find charm baryon decay using omega PID hypothesis int nVtxFrom2ProngFitterOmegaHyp = df2.process(trackCascOmega, trackParVarPion1); if (nVtxFrom2ProngFitterOmegaHyp > 0) { - df2.propagateTracksToVertex(); - - std::array pVecOmega = {0.}; - std::array pVecPion1OmegaHyp = {0.}; - df2.getTrack(0).getPxPyPzGlo(pVecOmega); - df2.getTrack(1).getPxPyPzGlo(pVecPion1OmegaHyp); + df2.propagateTracksToVertex(); - auto secondaryVertex2OmegaHyp = df2.getPCACandidate(); + std::array pVecOmega = {0.}; + std::array pVecPion1OmegaHyp = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecOmega); + df2.getTrack(1).getPxPyPzGlo(pVecPion1OmegaHyp); - cascType = 0; - SETBIT(cascType, kOmega); + auto secondaryVertex2OmegaHyp = df2.getPCACandidate(); - // fill table row - rowTrackIndexCasc2Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - cascType); + cascType = 0; + SETBIT(cascType, kOmega); - // fill histograms - if (fillHistograms) { - registry.fill(HIST("hVtx2ProngXOmegaHyp"), secondaryVertex2OmegaHyp[0]); - registry.fill(HIST("hVtx2ProngYOmegaHyp"), secondaryVertex2OmegaHyp[1]); - registry.fill(HIST("hVtx2ProngZOmegaHyp"), secondaryVertex2OmegaHyp[2]); - std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; - auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi]); - registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); + // fill table row + rowTrackIndexCasc2Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + cascType); + + // fill histograms + if (fillHistograms) { + registry.fill(HIST("hVtx2ProngXOmegaHyp"), secondaryVertex2OmegaHyp[0]); + registry.fill(HIST("hVtx2ProngYOmegaHyp"), secondaryVertex2OmegaHyp[1]); + registry.fill(HIST("hVtx2ProngZOmegaHyp"), secondaryVertex2OmegaHyp[2]); + std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; + auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi]); + registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); + } } - } // first loop over tracks if (do3Prong) { @@ -3326,50 +3326,49 @@ struct HfTrackIndexSkimCreatorLfCascades { // reconstruct Xic with DCAFitter int nVtxFrom3ProngFitterXiHyp = df3.process(trackCascXi, trackParVarPion1, trackParVarPion2); - if ( nVtxFrom3ProngFitterXiHyp > 0) { + if (nVtxFrom3ProngFitterXiHyp > 0) { - df3.propagateTracksToVertex(); + df3.propagateTracksToVertex(); - std::array pVec1 = {0.}; - std::array pVec2 = {0.}; - std::array pVec3 = {0.}; - df3.getTrack(0).getPxPyPzGlo(pVec1); // take the momentum at the Xic vertex - df3.getTrack(1).getPxPyPzGlo(pVec2); - df3.getTrack(2).getPxPyPzGlo(pVec3); + std::array pVec1 = {0.}; + std::array pVec2 = {0.}; + std::array pVec3 = {0.}; + df3.getTrack(0).getPxPyPzGlo(pVec1); // take the momentum at the Xic vertex + df3.getTrack(1).getPxPyPzGlo(pVec2); + df3.getTrack(2).getPxPyPzGlo(pVec3); - // std::array secondaryVertex3 = {0., 0., 0.}; - auto secondaryVertex3 = df3.getPCACandidate(); + // std::array secondaryVertex3 = {0., 0., 0.}; + auto secondaryVertex3 = df3.getPCACandidate(); - cascType = 0; - SETBIT(cascType, kXi); + cascType = 0; + SETBIT(cascType, kXi); - // fill table row - rowTrackIndexCasc3Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - trackPion2.globalIndex(), - cascType); + // fill table row + rowTrackIndexCasc3Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + trackPion2.globalIndex(), + cascType); - // fill histograms - if (fillHistograms) { - registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); - registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); - registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); - std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; - for (int iDecay3P = 0; iDecay3P < kN3ProngDecays; iDecay3P++) { - auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P]); - switch (iDecay3P) { - case hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi: - registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); - break; + // fill histograms + if (fillHistograms) { + registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); + registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); + registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); + std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; + for (int iDecay3P = 0; iDecay3P < kN3ProngDecays; iDecay3P++) { + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P]); + switch (iDecay3P) { + case hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi: + registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); + break; + } } } } - } - - }// end 3prong loop - } // end 3prong condition + } // end 3prong loop + } // end 3prong condition } // loop over pion } // loop over cascade From 37ebec84cfad9d4c535a831f4d9d43c5e4d5334c Mon Sep 17 00:00:00 2001 From: ZFederica Date: Thu, 16 Nov 2023 18:24:02 +0100 Subject: [PATCH 11/21] Fix missing ; --- PWGHF/DataModel/CandidateReconstructionTables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index ea33f5fe066..cf168878cd8 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -195,7 +195,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Prong2, prong2, int, Tracks, "_2"); //! Index to t DECLARE_SOA_INDEX_COLUMN(V0, v0); //! Index to V0 prong DECLARE_SOA_INDEX_COLUMN(Cascade, cascade); //! Index to cascade prong DECLARE_SOA_COLUMN(HFflag, hfflag, uint8_t); //! -DECLARE_SOA_COLUMN(CascadePIDHyp, cascadePIDHyp, int) +DECLARE_SOA_COLUMN(CascadePIDHyp, cascadePIDHyp, int); DECLARE_SOA_COLUMN(FlagD0ToKPi, flagD0ToKPi, uint8_t); //! DECLARE_SOA_COLUMN(FlagJpsiToEE, flagJpsiToEE, uint8_t); //! From 3ee7d0c80784de70958c8bd3d4a1a37d718cf671 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Mon, 20 Nov 2023 10:08:33 +0100 Subject: [PATCH 12/21] Fix errors --- .../DataModel/CandidateReconstructionTables.h | 8 +++---- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 22 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index cf168878cd8..7ce81c0a6a8 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -259,16 +259,16 @@ using Hf3Prong = Hf3Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf2Prongs, "AOD", "HFCASCLF2PRONG", //! Table for HF 2 prong candidates with a Cascade o2::soa::Index<>, - hf_track_index::CollisionId - hf_track_index::CascadeId, + hf_track_index::CollisionId, + hf_track_index::CascadeId, hf_track_index::Prong0Id, hf_track_index::CascadePIDHyp); using HfCascLf2Prong = HfCascLf2Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 prong candidates with a Cascade o2::soa::Index<>, - hf_track_index::CollisionId - hf_track_index::CascadeId, + hf_track_index::CollisionId, + hf_track_index::CascadeId, hf_track_index::Prong0Id, hf_track_index::Prong1Id, hf_track_index::CascadePIDHyp); diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 2c25f2b46c7..7d8c3db2339 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2949,8 +2949,8 @@ struct HfTrackIndexSkimCreatorLfCascades { // selections have been set to run2 lambda dedicated cuts // selections for cascade have been set to the loosest value between xi and omega // a tolerance has been added to be more conservative - Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius"}; // 0.5 in run2 - Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius"}; // 0.5 cm for xi and 0.6 for omega + Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius in xy plane"}; // 0.5 in run2 + Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius in xy plane"}; // 0.5 cm for xi and 0.6 for omega Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; // 0.06 in run2 Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) @@ -2978,7 +2978,7 @@ struct HfTrackIndexSkimCreatorLfCascades { static constexpr int kN2ProngDecays = hf_cand_casc_lf_2prong::DecayType::N2ProngDecays; // number of 2-prong hadron types static constexpr int kN3ProngDecays = hf_cand_casc_lf_3prong::DecayType::N3ProngDecays; // number of 3-prong hadron types std::array, kN2ProngDecays> arrMass2Prong; - std::array, kN3ProngDecays> arrMass3Prong; + std::array, kN3ProngDecays> arrMass3Prong; // PDG masses double massP{0.}; @@ -3002,7 +3002,7 @@ struct HfTrackIndexSkimCreatorLfCascades { massPi = o2::analysis::pdg::MassPiPlus; massXi = o2::analysis::pdg::MassXiMinus; massOmega = o2::analysis::pdg::MassOmegaMinus; - massLambda = = o2::analysis::pdg::MassLambda0; + massLambda = o2::analysis::pdg::MassLambda0; massXiczero = o2::analysis::pdg::MassXiCZero; massXicplus = o2::analysis::pdg::MassXiCPlus; @@ -3066,7 +3066,7 @@ struct HfTrackIndexSkimCreatorLfCascades { Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng >= 4); // select tracks passing bachelor selection using SelectedCollisions = soa::Filtered>; - using SelectedHfTrackAssoc = soa::Filtered>; + using SelectedHfTrackAssoc = soa::Filtered>; using CascFull = soa::Join; using V0Full = soa::Join; @@ -3088,8 +3088,8 @@ struct HfTrackIndexSkimCreatorLfCascades { casc.dcapostopv() > dcaPosToPv && casc.dcabachtopv() > dcaBachToPv && casc.dcav0topv() > dcaV0ToPv && - casc.v0radius() > v0Radius && - casc.cascradius() > cascRadius && + casc.v0radius() > v0TransvRadius && + casc.cascradius() > cascTransvRadius && std::abs(casc.mLambda() - massLambda) < v0MassWindow) { registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections @@ -3127,8 +3127,8 @@ struct HfTrackIndexSkimCreatorLfCascades { PROCESS_SWITCH(HfTrackIndexSkimCreatorLfCascades, processNoLfCascades, "Do not skim LF cascades", true); void processLfCascades(SelectedCollisions const& collisions, - aod::CascDataFull const& cascades, - FilteredTrackAssocSel const& trackIndices, + CascFull const& cascades, + SelectedHfTrackAssoc const& trackIndices, aod::TracksWCovDca const& tracks, aod::BCsWithTimestamps const&, aod::V0sLinked const&, @@ -3274,7 +3274,7 @@ struct HfTrackIndexSkimCreatorLfCascades { std::array pVecXi = {0.}; std::array pVecPion1XiHyp = {0.}; df2.getTrack(0).getPxPyPzGlo(pVecXi); - df2.getTrack(1).getPxPyPzGlo(pVecPion1iHyp); + df2.getTrack(1).getPxPyPzGlo(pVecPion1XiHyp); auto secondaryVertex2XiHyp = df2.getPCACandidate(); @@ -3336,7 +3336,7 @@ struct HfTrackIndexSkimCreatorLfCascades { // second loop over positive tracks for (auto trackIdPion2 = trackIdPion1 + 1; trackIdPion2 != groupedBachTrackIndices.end(); ++trackIdPion2) { - auto trackPion2 = trackIdPion2.track_as(); + auto trackPion2 = trackIdPion2.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion2.collisionId())) { continue; From c1591db4f491a5cbc3ade7d7ec4cff152a8cfbdf Mon Sep 17 00:00:00 2001 From: ZFederica Date: Mon, 20 Nov 2023 11:42:07 +0100 Subject: [PATCH 13/21] Implement suggestions --- .../DataModel/CandidateReconstructionTables.h | 72 ++-------- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 125 +++++++++++------- 2 files changed, 89 insertions(+), 108 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index 7ce81c0a6a8..afe866a7aa0 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -195,7 +195,6 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Prong2, prong2, int, Tracks, "_2"); //! Index to t DECLARE_SOA_INDEX_COLUMN(V0, v0); //! Index to V0 prong DECLARE_SOA_INDEX_COLUMN(Cascade, cascade); //! Index to cascade prong DECLARE_SOA_COLUMN(HFflag, hfflag, uint8_t); //! -DECLARE_SOA_COLUMN(CascadePIDHyp, cascadePIDHyp, int); DECLARE_SOA_COLUMN(FlagD0ToKPi, flagD0ToKPi, uint8_t); //! DECLARE_SOA_COLUMN(FlagJpsiToEE, flagJpsiToEE, uint8_t); //! @@ -262,7 +261,7 @@ DECLARE_SOA_TABLE(HfCascLf2Prongs, "AOD", "HFCASCLF2PRONG", //! Table for HF 2 p hf_track_index::CollisionId, hf_track_index::CascadeId, hf_track_index::Prong0Id, - hf_track_index::CascadePIDHyp); + hf_track_index::HFflag); using HfCascLf2Prong = HfCascLf2Prongs::iterator; DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 prong candidates with a Cascade @@ -271,7 +270,7 @@ DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 p hf_track_index::CascadeId, hf_track_index::Prong0Id, hf_track_index::Prong1Id, - hf_track_index::CascadePIDHyp); + hf_track_index::HFflag); using HfCascLf3Prong = HfCascLf3Prongs::iterator; namespace hf_track_index @@ -829,70 +828,17 @@ DECLARE_SOA_TABLE(HfCand3ProngMcGen, "AOD", "HFCAND3PMCGEN", //! hf_cand_3prong::OriginMcGen, hf_cand_3prong::FlagMcDecayChanGen); -namespace hf_cand_casc_lf_2prong +namespace hf_cand_casc_lf { -DECLARE_SOA_EXPRESSION_COLUMN(Px, px, //! - float, 1.f * aod::hf_cand::pxProng0 + 1.f * aod::hf_cand::pxProng1); -DECLARE_SOA_EXPRESSION_COLUMN(Py, py, //! - float, 1.f * aod::hf_cand::pyProng0 + 1.f * aod::hf_cand::pyProng1); -DECLARE_SOA_EXPRESSION_COLUMN(Pz, pz, //! - float, 1.f * aod::hf_cand::pzProng0 + 1.f * aod::hf_cand::pzProng1); -DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProduct, impactParameterProduct, //! - [](float dca1, float dca2) -> float { return dca1 * dca2; }); -DECLARE_SOA_DYNAMIC_COLUMN(M, m, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const std::array& m) -> float { return RecoDecay::m(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}}, m); }); -DECLARE_SOA_DYNAMIC_COLUMN(M2, m2, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const std::array& m) -> float { return RecoDecay::m2(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}}, m); }); -DECLARE_SOA_DYNAMIC_COLUMN(CosThetaStar, cosThetaStar, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const std::array& m, double mTot, int iProng) -> float { return RecoDecay::cosThetaStar(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}}, m, mTot, iProng); }); -DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProngSqSum, impactParameterProngSqSum, //! - [](float impParProng0, float impParProng1) -> float { return RecoDecay::sumOfSquares(impParProng0, impParProng1); }); -DECLARE_SOA_DYNAMIC_COLUMN(MaxNormalisedDeltaIP, maxNormalisedDeltaIP, //! - [](float xVtxP, float yVtxP, float xVtxS, float yVtxS, float errDlxy, float pxM, float pyM, float ip0, float errIp0, float ip1, float errIp1, float px0, float py0, float px1, float py1) -> float { return RecoDecay::maxNormalisedDeltaIP(std::array{xVtxP, yVtxP}, std::array{xVtxS, yVtxS}, errDlxy, std::array{pxM, pyM}, std::array{ip0, ip1}, std::array{errIp0, errIp1}, std::array{std::array{px0, py0}, std::array{px1, py1}}); }); -// MC matching result: -DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); //! reconstruction level -DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); //! generator level -DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! particle origin, reconstruction level -DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! particle origin, generator level - // mapping of decay types -enum DecayType { XiczeroOmegaczeroToXiPi = 0, - OmegaczeroToOmegaPi, - N2ProngDecays }; // always keep N2ProngDecays at the end - -} // namespace hf_cand_casc_lf_2prong - -namespace hf_cand_casc_lf_3prong -{ -DECLARE_SOA_EXPRESSION_COLUMN(Px, px, //! - float, 1.f * aod::hf_cand::pxProng0 + 1.f * aod::hf_cand::pxProng1); -DECLARE_SOA_EXPRESSION_COLUMN(Py, py, //! - float, 1.f * aod::hf_cand::pyProng0 + 1.f * aod::hf_cand::pyProng1); -DECLARE_SOA_EXPRESSION_COLUMN(Pz, pz, //! - float, 1.f * aod::hf_cand::pzProng0 + 1.f * aod::hf_cand::pzProng1); -DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProduct, impactParameterProduct, //! - [](float dca1, float dca2) -> float { return dca1 * dca2; }); -DECLARE_SOA_DYNAMIC_COLUMN(M, m, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const std::array& m) -> float { return RecoDecay::m(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}}, m); }); -DECLARE_SOA_DYNAMIC_COLUMN(M2, m2, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const std::array& m) -> float { return RecoDecay::m2(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}}, m); }); -DECLARE_SOA_DYNAMIC_COLUMN(CosThetaStar, cosThetaStar, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const std::array& m, double mTot, int iProng) -> float { return RecoDecay::cosThetaStar(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}}, m, mTot, iProng); }); -DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProngSqSum, impactParameterProngSqSum, //! - [](float impParProng0, float impParProng1) -> float { return RecoDecay::sumOfSquares(impParProng0, impParProng1); }); -DECLARE_SOA_DYNAMIC_COLUMN(MaxNormalisedDeltaIP, maxNormalisedDeltaIP, //! - [](float xVtxP, float yVtxP, float xVtxS, float yVtxS, float errDlxy, float pxM, float pyM, float ip0, float errIp0, float ip1, float errIp1, float px0, float py0, float px1, float py1) -> float { return RecoDecay::maxNormalisedDeltaIP(std::array{xVtxP, yVtxP}, std::array{xVtxS, yVtxS}, errDlxy, std::array{pxM, pyM}, std::array{ip0, ip1}, std::array{errIp0, errIp1}, std::array{std::array{px0, py0}, std::array{px1, py1}}); }); -// MC matching result: -DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); //! reconstruction level -DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); //! generator level -DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! particle origin, reconstruction level -DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! particle origin, generator level +enum DecayType2Prong { XiczeroOmegaczeroToXiPi = 0, + OmegaczeroToOmegaPi, + N2ProngDecays }; // always keep N2ProngDecays at the end // mapping of decay types -enum DecayType { XicplusToXiPiPi = 0, - N3ProngDecays }; // always keep N3ProngDecays at the end - -} // namespace hf_cand_casc_lf_3prong +enum DecayType3Prong { XicplusToXiPiPi = 0, + N3ProngDecays }; // always keep N3ProngDecays at the end +} // namespace hf_cand_casc_lf namespace hf_cand_x { diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 7d8c3db2339..7562451c485 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2931,7 +2931,14 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable fillHistograms{"fillHistograms", true, "fill histograms"}; Configurable do3Prong{"do3Prong", false, "do 3-prong cascade"}; + // charm baryon invariant mass spectra limits Configurable rejDiffCollTrack{"rejDiffCollTrack", true, "Reject tracks coming from different collisions"}; + Configurable massXiPiMin{"massXiPiMin", 2.1, "Invariant mass lower limit for xi pi decay channel"}; + Configurable massXiPiMax{"massXiPiMax", 3., "Invariant mass upper limit for xi pi decay channel"}; + Configurable massOmegaPiMin{"massOmegaPiMin", 2.4, "Invariant mass lower limit for omega pi decay channel"}; + Configurable massOmegaPiMax{"massOmegaPiMax", 3., "Invariant mass upper limit for omega pi decay channel"}; + Configurable massXiPiPiMin{"massXiPiPiMin", 2.1, "Invariant mass lower limit for xi pi pi decay channel"}; + Configurable massXiPiPiMax{"massXiPiPiMax", 2.8, "Invariant mass upper limit for xi pi pi decay channel"}; // DCAFitter settings Configurable propagateToPCA{"propagateToPCA", false, "create tracks version propagated to PCA"}; @@ -2960,6 +2967,7 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; // 0.06 in run2 Configurable dcaPosToPv{"dcaPosToPv", .08, "DCA Pos To PV"}; // 0.06 in run2 Configurable v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"}; // 0.008 in run2 + Configurable cascadeMassWindow{"cascadeMassWindow", 0.01, "Cascade mass window"}; // magnetic field setting from CCDB Configurable isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"}; @@ -2975,8 +2983,8 @@ struct HfTrackIndexSkimCreatorLfCascades { int runNumber; // array of PDG masses of possible charm baryon daughters - static constexpr int kN2ProngDecays = hf_cand_casc_lf_2prong::DecayType::N2ProngDecays; // number of 2-prong hadron types - static constexpr int kN3ProngDecays = hf_cand_casc_lf_3prong::DecayType::N3ProngDecays; // number of 3-prong hadron types + static constexpr int kN2ProngDecays = hf_cand_casc_lf::DecayType2Prong::N2ProngDecays; // number of 2-prong hadron types + static constexpr int kN3ProngDecays = hf_cand_casc_lf::DecayType3Prong::N3ProngDecays; // number of 3-prong hadron types std::array, kN2ProngDecays> arrMass2Prong; std::array, kN3ProngDecays> arrMass3Prong; @@ -3006,9 +3014,9 @@ struct HfTrackIndexSkimCreatorLfCascades { massXiczero = o2::analysis::pdg::MassXiCZero; massXicplus = o2::analysis::pdg::MassXiCPlus; - arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi] = std::array{massXi, massPi}; - arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi] = std::array{massOmega, massPi}; - arrMass3Prong[hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi] = std::array{massXi, massPi, massPi}; + arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi] = std::array{massXi, massPi}; + arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi] = std::array{massOmega, massPi}; + arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi] = std::array{massXi, massPi, massPi}; ccdb->setURL(ccdbUrl); ccdb->setCaching(true); @@ -3134,7 +3142,6 @@ struct HfTrackIndexSkimCreatorLfCascades { aod::V0sLinked const&, V0Full const&) { - int cascType = 0; // Define o2 fitter for charm baryon decay vertex, 2prong o2::vertexing::DCAFitterN<2> df2; @@ -3156,6 +3163,11 @@ struct HfTrackIndexSkimCreatorLfCascades { df3.setUseAbsDCA(useAbsDCA); df3.setWeightedFinalPCA(useWeightedFinalPCA); + uint8_t hfFlag = 0; + bool statusMassXiPiChannel = true; + bool statusMassOmegaPiChannel = true; + bool statusMassXiPiPiChannel = true; + for (const auto& collision : collisions) { // set the magnetic field from CCDB @@ -3202,7 +3214,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } } - if (trackV0PosDau.globalIndex() == trackV0NegDau.globalIndex()) { + if (trackV0PosDau.globalIndex() == trackV0NegDau.globalIndex() || trackV0PosDau.globalIndex() == trackXiDauCharged.globalIndex() || trackV0NegDau.globalIndex() == trackXiDauCharged.globalIndex()) { continue; } @@ -3246,6 +3258,8 @@ struct HfTrackIndexSkimCreatorLfCascades { auto groupedBachTrackIndices = trackIndices.sliceBy(trackIndicesPerCollision, thisCollId); for (auto trackIdPion1 = groupedBachTrackIndices.begin(); trackIdPion1 != groupedBachTrackIndices.end(); ++trackIdPion1) { + hfFlag = 0; + auto trackPion1 = trackIdPion1.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion1.collisionId())) { @@ -3269,6 +3283,8 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom2ProngFitterXiHyp = df2.process(trackCascXi, trackParVarPion1); if (nVtxFrom2ProngFitterXiHyp > 0) { + statusMassXiPiChannel = true; + df2.propagateTracksToVertex(); std::array pVecXi = {0.}; @@ -3278,22 +3294,22 @@ struct HfTrackIndexSkimCreatorLfCascades { auto secondaryVertex2XiHyp = df2.getPCACandidate(); - cascType = 0; - SETBIT(cascType, kXi); + if(std::abs(casc.mXi() - massXi) < cascadeMassWindow){ + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi); + } - // fill table row - rowTrackIndexCasc2Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - cascType); + std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; + auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi]); + + if(mass2ProngXiHyp < massXiPiMin || mass2ProngXiHyp > massXiPiMax){ + statusMassXiPiChannel = false; + } // fill histograms - if (fillHistograms) { + if (fillHistograms && statusMassXiPiChannel) { registry.fill(HIST("hVtx2ProngXXiHyp"), secondaryVertex2XiHyp[0]); registry.fill(HIST("hVtx2ProngYXiHyp"), secondaryVertex2XiHyp[1]); registry.fill(HIST("hVtx2ProngZXiHyp"), secondaryVertex2XiHyp[2]); - std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; - auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::XiczeroOmegaczeroToXiPi]); registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); } } @@ -3302,6 +3318,8 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom2ProngFitterOmegaHyp = df2.process(trackCascOmega, trackParVarPion1); if (nVtxFrom2ProngFitterOmegaHyp > 0) { + statusMassOmegaPiChannel = true; + df2.propagateTracksToVertex(); std::array pVecOmega = {0.}; @@ -3311,31 +3329,43 @@ struct HfTrackIndexSkimCreatorLfCascades { auto secondaryVertex2OmegaHyp = df2.getPCACandidate(); - cascType = 0; - SETBIT(cascType, kOmega); + if(std::abs(casc.mOmega() - massOmega) < cascadeMassWindow){ + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi); + } - // fill table row - rowTrackIndexCasc2Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - cascType); + std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; + auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi]); + + if(mass2ProngOmegaHyp < massOmegaPiMin || mass2ProngOmegaHyp > massOmegaPiMax){ + statusMassOmegaPiChannel = false; + } // fill histograms - if (fillHistograms) { + if (fillHistograms && statusMassOmegaPiChannel) { registry.fill(HIST("hVtx2ProngXOmegaHyp"), secondaryVertex2OmegaHyp[0]); registry.fill(HIST("hVtx2ProngYOmegaHyp"), secondaryVertex2OmegaHyp[1]); registry.fill(HIST("hVtx2ProngZOmegaHyp"), secondaryVertex2OmegaHyp[2]); - std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; - auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf_2prong::DecayType::OmegaczeroToOmegaPi]); registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); } } + + // fill table row only if a vertex was found + if((nVtxFrom2ProngFitterXiHyp!=0 && statusMassXiPiChannel) || (nVtxFrom2ProngFitterOmegaHyp!=0 && statusMassOmegaPiChannel)){ + rowTrackIndexCasc2Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + hfFlag); + } + // first loop over tracks if (do3Prong) { + // second loop over positive tracks for (auto trackIdPion2 = trackIdPion1 + 1; trackIdPion2 != groupedBachTrackIndices.end(); ++trackIdPion2) { + hfFlag = 0; + auto trackPion2 = trackIdPion2.track_as(); if ((rejDiffCollTrack) && (trackXiDauCharged.collisionId() != trackPion2.collisionId())) { @@ -3359,6 +3389,8 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom3ProngFitterXiHyp = df3.process(trackCascXi, trackParVarPion1, trackParVarPion2); if (nVtxFrom3ProngFitterXiHyp > 0) { + statusMassXiPiPiChannel = true; + df3.propagateTracksToVertex(); std::array pVec1 = {0.}; @@ -3371,33 +3403,36 @@ struct HfTrackIndexSkimCreatorLfCascades { // std::array secondaryVertex3 = {0., 0., 0.}; auto secondaryVertex3 = df3.getPCACandidate(); - cascType = 0; - SETBIT(cascType, kXi); - // fill table row - rowTrackIndexCasc3Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - trackPion2.globalIndex(), - cascType); + if(std::abs(casc.mXi() - massXi) < cascadeMassWindow){ + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi); + } + + std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]); + + if(mass3Prong < massXiPiPiMin || mass3Prong > massXiPiPiMax){ + statusMassXiPiPiChannel = false; + } // fill histograms - if (fillHistograms) { + if (fillHistograms && statusMassXiPiPiChannel) { registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); - std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; - for (int iDecay3P = 0; iDecay3P < kN3ProngDecays; iDecay3P++) { - auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P]); - switch (iDecay3P) { - case hf_cand_casc_lf_3prong::DecayType::XicplusToXiPiPi: - registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); - break; - } - } + registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); } } + // fill table row only if a vertex was found + if(nVtxFrom3ProngFitterXiHyp!=0 && statusMassXiPiPiChannel){ + rowTrackIndexCasc3Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + trackPion2.globalIndex(), + hfFlag); + } + } // end 3prong loop } // end 3prong condition From 962b471b4b8748c0df4ed1f8017515e0d0819e1b Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 20 Nov 2023 10:42:44 +0000 Subject: [PATCH 14/21] Please consider the following formatting changes --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 7562451c485..da004a7e620 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2958,15 +2958,15 @@ struct HfTrackIndexSkimCreatorLfCascades { // a tolerance has been added to be more conservative Configurable v0TransvRadius{"v0TransvRadius", 0.6, "V0 radius in xy plane"}; // 0.5 in run2 Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius in xy plane"}; // 0.5 cm for xi and 0.6 for omega - Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 - Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; // 0.06 in run2 - Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; // conservative, a cut ar 1.0 should also be fine - Configurable dcaCascDau{"dcaCascDau", 2.0, "DCA Casc Daughters"}; // conservative, a cut ar 1.0 should also be fine - Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; // 0.06 in run2 - Configurable dcaPosToPv{"dcaPosToPv", .08, "DCA Pos To PV"}; // 0.06 in run2 - Configurable v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"}; // 0.008 in run2 + Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 + Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; // 0.06 in run2 + Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; // conservative, a cut ar 1.0 should also be fine + Configurable dcaCascDau{"dcaCascDau", 2.0, "DCA Casc Daughters"}; // conservative, a cut ar 1.0 should also be fine + Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; // 0.06 in run2 + Configurable dcaPosToPv{"dcaPosToPv", .08, "DCA Pos To PV"}; // 0.06 in run2 + Configurable v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"}; // 0.008 in run2 Configurable cascadeMassWindow{"cascadeMassWindow", 0.01, "Cascade mass window"}; // magnetic field setting from CCDB @@ -3074,7 +3074,7 @@ struct HfTrackIndexSkimCreatorLfCascades { Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng >= 4); // select tracks passing bachelor selection using SelectedCollisions = soa::Filtered>; - using SelectedHfTrackAssoc = soa::Filtered>; + using SelectedHfTrackAssoc = soa::Filtered>; using CascFull = soa::Join; using V0Full = soa::Join; @@ -3294,14 +3294,14 @@ struct HfTrackIndexSkimCreatorLfCascades { auto secondaryVertex2XiHyp = df2.getPCACandidate(); - if(std::abs(casc.mXi() - massXi) < cascadeMassWindow){ + if (std::abs(casc.mXi() - massXi) < cascadeMassWindow) { SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi); } std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi]); - if(mass2ProngXiHyp < massXiPiMin || mass2ProngXiHyp > massXiPiMax){ + if (mass2ProngXiHyp < massXiPiMin || mass2ProngXiHyp > massXiPiMax) { statusMassXiPiChannel = false; } @@ -3329,14 +3329,14 @@ struct HfTrackIndexSkimCreatorLfCascades { auto secondaryVertex2OmegaHyp = df2.getPCACandidate(); - if(std::abs(casc.mOmega() - massOmega) < cascadeMassWindow){ + if (std::abs(casc.mOmega() - massOmega) < cascadeMassWindow) { SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi); } std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi]); - if(mass2ProngOmegaHyp < massOmegaPiMin || mass2ProngOmegaHyp > massOmegaPiMax){ + if (mass2ProngOmegaHyp < massOmegaPiMin || mass2ProngOmegaHyp > massOmegaPiMax) { statusMassOmegaPiChannel = false; } @@ -3349,9 +3349,8 @@ struct HfTrackIndexSkimCreatorLfCascades { } } - // fill table row only if a vertex was found - if((nVtxFrom2ProngFitterXiHyp!=0 && statusMassXiPiChannel) || (nVtxFrom2ProngFitterOmegaHyp!=0 && statusMassOmegaPiChannel)){ + if ((nVtxFrom2ProngFitterXiHyp != 0 && statusMassXiPiChannel) || (nVtxFrom2ProngFitterOmegaHyp != 0 && statusMassOmegaPiChannel)) { rowTrackIndexCasc2Prong(thisCollId, casc.globalIndex(), trackPion1.globalIndex(), @@ -3403,15 +3402,14 @@ struct HfTrackIndexSkimCreatorLfCascades { // std::array secondaryVertex3 = {0., 0., 0.}; auto secondaryVertex3 = df3.getPCACandidate(); - - if(std::abs(casc.mXi() - massXi) < cascadeMassWindow){ + if (std::abs(casc.mXi() - massXi) < cascadeMassWindow) { SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi); } std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]); - if(mass3Prong < massXiPiPiMin || mass3Prong > massXiPiPiMax){ + if (mass3Prong < massXiPiPiMin || mass3Prong > massXiPiPiMax) { statusMassXiPiPiChannel = false; } @@ -3424,14 +3422,14 @@ struct HfTrackIndexSkimCreatorLfCascades { } } - // fill table row only if a vertex was found - if(nVtxFrom3ProngFitterXiHyp!=0 && statusMassXiPiPiChannel){ - rowTrackIndexCasc3Prong(thisCollId, - casc.globalIndex(), - trackPion1.globalIndex(), - trackPion2.globalIndex(), - hfFlag); - } + // fill table row only if a vertex was found + if (nVtxFrom3ProngFitterXiHyp != 0 && statusMassXiPiPiChannel) { + rowTrackIndexCasc3Prong(thisCollId, + casc.globalIndex(), + trackPion1.globalIndex(), + trackPion2.globalIndex(), + hfFlag); + } } // end 3prong loop } // end 3prong condition From b489a12ec20d7883c93726b6d1e263422206b7c4 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Mon, 20 Nov 2023 13:19:51 +0100 Subject: [PATCH 15/21] Implement suggestions --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 80 +++---------------- 1 file changed, 11 insertions(+), 69 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index da004a7e620..c522b94a91a 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -3050,19 +3050,6 @@ struct HfTrackIndexSkimCreatorLfCascades { registry.add("hDCACascDau", "hDCACascDau", {HistType::kTH1F, {{500, 0.0f, 5.0f, "cm^{2}"}}}); registry.add("hLambdaMass", "hLambdaMass", {HistType::kTH1F, {{400, 0.916f, 1.316f, "Inv. Mass (GeV/c^{2})"}}}); - // charm baryon decay vertex - registry.add("hVtx2ProngXXiHyp", "2-prong candidates - #Xi hypothesis;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx2ProngYXiHyp", "2-prong candidates - #Xi hypothesis;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx2ProngZXiHyp", "2-prong candidates - #Xi hypothesis;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); - - registry.add("hVtx2ProngXOmegaHyp", "2-prong candidates - #Omega hypothesis;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx2ProngYOmegaHyp", "2-prong candidates - #Omega hypothesis;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx2ProngZOmegaHyp", "2-prong candidates - #Omega hypothesis;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); - - registry.add("hVtx3ProngX", "3-prong candidates;#it{x}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx3ProngY", "3-prong candidates;#it{y}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -2., 2.}}}); - registry.add("hVtx3ProngZ", "3-prong candidates;#it{z}_{sec. vtx.} (cm);entries", {HistType::kTH1F, {{1000, -20., 20.}}}); - // mass spectra registry.add("hMassXicZeroOmegacZeroToXiPi", "2-prong candidates;inv. mass (#Xi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 2., 3.}}}); registry.add("hMassOmegacZeroToOmegaPi", "2-prong candidates;inv. mass (#Omega #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 2., 3.}}}); @@ -3164,9 +3151,6 @@ struct HfTrackIndexSkimCreatorLfCascades { df3.setWeightedFinalPCA(useWeightedFinalPCA); uint8_t hfFlag = 0; - bool statusMassXiPiChannel = true; - bool statusMassOmegaPiChannel = true; - bool statusMassXiPiPiChannel = true; for (const auto& collision : collisions) { @@ -3222,14 +3206,6 @@ struct HfTrackIndexSkimCreatorLfCascades { continue; } - //-------------------------- V0 info--------------------------- - // pion & p <- V0 tracks - auto trackParCovV0PosDau0 = getTrackParCov(trackV0PosDau); - auto trackParCovV0NegDau1 = getTrackParCov(trackV0NegDau); - - //-------------------------- cascade info---------------------- - auto trackParCovXiDauCharged = getTrackParCov(trackXiDauCharged); // pion <- casc track to be processed with DCAfitter - std::array vertexCasc = {casc.x(), casc.y(), casc.z()}; std::array pVecCasc = {casc.px(), casc.py(), casc.pz()}; std::array covCasc = {0.}; @@ -3283,8 +3259,6 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom2ProngFitterXiHyp = df2.process(trackCascXi, trackParVarPion1); if (nVtxFrom2ProngFitterXiHyp > 0) { - statusMassXiPiChannel = true; - df2.propagateTracksToVertex(); std::array pVecXi = {0.}; @@ -3292,24 +3266,15 @@ struct HfTrackIndexSkimCreatorLfCascades { df2.getTrack(0).getPxPyPzGlo(pVecXi); df2.getTrack(1).getPxPyPzGlo(pVecPion1XiHyp); - auto secondaryVertex2XiHyp = df2.getPCACandidate(); - - if (std::abs(casc.mXi() - massXi) < cascadeMassWindow) { - SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi); - } - std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi]); - if (mass2ProngXiHyp < massXiPiMin || mass2ProngXiHyp > massXiPiMax) { - statusMassXiPiChannel = false; + if ((std::abs(casc.mXi() - massXi) < cascadeMassWindow) && (mass2ProngXiHyp >= massXiPiMin) && (mass2ProngXiHyp <= massXiPiMax)) { + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi); } // fill histograms - if (fillHistograms && statusMassXiPiChannel) { - registry.fill(HIST("hVtx2ProngXXiHyp"), secondaryVertex2XiHyp[0]); - registry.fill(HIST("hVtx2ProngYXiHyp"), secondaryVertex2XiHyp[1]); - registry.fill(HIST("hVtx2ProngZXiHyp"), secondaryVertex2XiHyp[2]); + if (fillHistograms && (hfFlag != 0)) { registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); } } @@ -3318,8 +3283,6 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom2ProngFitterOmegaHyp = df2.process(trackCascOmega, trackParVarPion1); if (nVtxFrom2ProngFitterOmegaHyp > 0) { - statusMassOmegaPiChannel = true; - df2.propagateTracksToVertex(); std::array pVecOmega = {0.}; @@ -3327,30 +3290,21 @@ struct HfTrackIndexSkimCreatorLfCascades { df2.getTrack(0).getPxPyPzGlo(pVecOmega); df2.getTrack(1).getPxPyPzGlo(pVecPion1OmegaHyp); - auto secondaryVertex2OmegaHyp = df2.getPCACandidate(); - - if (std::abs(casc.mOmega() - massOmega) < cascadeMassWindow) { - SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi); - } - std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi]); - if (mass2ProngOmegaHyp < massOmegaPiMin || mass2ProngOmegaHyp > massOmegaPiMax) { - statusMassOmegaPiChannel = false; + if ((std::abs(casc.mOmega() - massOmega) < cascadeMassWindow) && (mass2ProngOmegaHyp >= massOmegaPiMin) && (mass2ProngOmegaHyp <= massOmegaPiMax)) { + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi); } // fill histograms - if (fillHistograms && statusMassOmegaPiChannel) { - registry.fill(HIST("hVtx2ProngXOmegaHyp"), secondaryVertex2OmegaHyp[0]); - registry.fill(HIST("hVtx2ProngYOmegaHyp"), secondaryVertex2OmegaHyp[1]); - registry.fill(HIST("hVtx2ProngZOmegaHyp"), secondaryVertex2OmegaHyp[2]); + if (fillHistograms && (hfFlag >= 2)) { registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); } } // fill table row only if a vertex was found - if ((nVtxFrom2ProngFitterXiHyp != 0 && statusMassXiPiChannel) || (nVtxFrom2ProngFitterOmegaHyp != 0 && statusMassOmegaPiChannel)) { + if (hfFlag != 0) { rowTrackIndexCasc2Prong(thisCollId, casc.globalIndex(), trackPion1.globalIndex(), @@ -3388,8 +3342,6 @@ struct HfTrackIndexSkimCreatorLfCascades { int nVtxFrom3ProngFitterXiHyp = df3.process(trackCascXi, trackParVarPion1, trackParVarPion2); if (nVtxFrom3ProngFitterXiHyp > 0) { - statusMassXiPiPiChannel = true; - df3.propagateTracksToVertex(); std::array pVec1 = {0.}; @@ -3399,31 +3351,21 @@ struct HfTrackIndexSkimCreatorLfCascades { df3.getTrack(1).getPxPyPzGlo(pVec2); df3.getTrack(2).getPxPyPzGlo(pVec3); - // std::array secondaryVertex3 = {0., 0., 0.}; - auto secondaryVertex3 = df3.getPCACandidate(); - - if (std::abs(casc.mXi() - massXi) < cascadeMassWindow) { - SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi); - } - std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]); - if (mass3Prong < massXiPiPiMin || mass3Prong > massXiPiPiMax) { - statusMassXiPiPiChannel = false; + if ((std::abs(casc.mXi() - massXi) < cascadeMassWindow) && (mass3Prong >= massXiPiPiMin) && (mass3Prong <= massXiPiPiMax)) { + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi); } // fill histograms - if (fillHistograms && statusMassXiPiPiChannel) { - registry.fill(HIST("hVtx3ProngX"), secondaryVertex3[0]); - registry.fill(HIST("hVtx3ProngY"), secondaryVertex3[1]); - registry.fill(HIST("hVtx3ProngZ"), secondaryVertex3[2]); + if (fillHistograms && (hfFlag != 0)) { registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); } } // fill table row only if a vertex was found - if (nVtxFrom3ProngFitterXiHyp != 0 && statusMassXiPiPiChannel) { + if (hfFlag != 0) { rowTrackIndexCasc3Prong(thisCollId, casc.globalIndex(), trackPion1.globalIndex(), From 04ede3618283fc585b6e5f326784b64c0e1c3c1a Mon Sep 17 00:00:00 2001 From: Federica Zanone <94552525+ZFederica@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:42:19 +0100 Subject: [PATCH 16/21] Update PWGHF/TableProducer/trackIndexSkimCreator.cxx Co-authored-by: Fabrizio --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index c522b94a91a..721eada557d 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -3298,7 +3298,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } // fill histograms - if (fillHistograms && (hfFlag >= 2)) { + if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi))) { registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); } } From 34f38ff5d18b013053cf28b42457ff698cf37213 Mon Sep 17 00:00:00 2001 From: Federica Zanone <94552525+ZFederica@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:42:31 +0100 Subject: [PATCH 17/21] Update PWGHF/TableProducer/trackIndexSkimCreator.cxx Co-authored-by: Fabrizio --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 721eada557d..4a302dba01f 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -3274,7 +3274,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } // fill histograms - if (fillHistograms && (hfFlag != 0)) { + if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi))) { registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); } } From bdc83c7a0692ea90cf8929599b03b9129bea8311 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Mon, 20 Nov 2023 22:51:21 +0100 Subject: [PATCH 18/21] Use different xi trackParCov for 3prong --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index ab7344012bc..69dd1eb8dcb 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2960,8 +2960,8 @@ struct HfTrackIndexSkimCreatorLfCascades { Configurable cascTransvRadius{"cascTransvRadius", 0.7, "Cascade radius in xy plane"}; // 0.5 cm for xi and 0.6 for omega Configurable dcaBachToPv{"dcaBachToPv", .06, "DCA Bach To PV"}; // 0.04 in run2 Configurable dcaV0ToPv{"dcaV0ToPv", .08, "DCA V0 To PV"}; // 0.06 in run2 - Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // 0.97 in run2 - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable v0CosPA{"v0CosPA", 0.95, "V0 CosPA"}; // 0.97 in run2 - KEEP LOSE to re-cut after PVRefit! - double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable cascCosPA{"cascCosPA", 0.95, "Casc CosPA"}; // 0.97 in run2 - KEEP LOSE to re-cut after PVRefit! - double -> N.B. dcos(x)/dx = 0 at x=0) Configurable dcaV0Dau{"dcaV0Dau", 2.0, "DCA V0 Daughters"}; // conservative, a cut ar 1.0 should also be fine Configurable dcaCascDau{"dcaCascDau", 2.0, "DCA Casc Daughters"}; // conservative, a cut ar 1.0 should also be fine Configurable dcaNegToPv{"dcaNegToPv", .08, "DCA Neg To PV"}; // 0.06 in run2 @@ -3071,18 +3071,18 @@ struct HfTrackIndexSkimCreatorLfCascades { /// Single-cascade cuts template - bool isPreselectedCascade(const TCascade& casc) + bool isPreselectedCascade(const TCascade& casc, const float& pvx, const float& pvy, const float& pvz) { registry.fill(HIST("hCandidateCounter"), 2.5); - if (casc.v0cosPA() > v0CosPA && - casc.casccosPA() > cascCosPA && + if (casc.v0cosPA(pvx, pvy, pvz) > v0CosPA && + casc.casccosPA(pvx, pvy, pvz) > cascCosPA && casc.dcacascdaughters() < dcaCascDau && casc.dcaV0daughters() < dcaV0Dau && casc.dcanegtopv() > dcaNegToPv && casc.dcapostopv() > dcaPosToPv && casc.dcabachtopv() > dcaBachToPv && - casc.dcav0topv() > dcaV0ToPv && + casc.dcav0topv(pvx, pvy, pvz) > dcaV0ToPv && casc.v0radius() > v0TransvRadius && casc.cascradius() > cascTransvRadius && std::abs(casc.mLambda() - massLambda) < v0MassWindow) { @@ -3093,12 +3093,12 @@ struct HfTrackIndexSkimCreatorLfCascades { // The basic eleven! registry.fill(HIST("hV0Radius"), casc.v0radius()); registry.fill(HIST("hCascRadius"), casc.cascradius()); - registry.fill(HIST("hV0CosPA"), casc.v0cosPA()); - registry.fill(HIST("hCascCosPA"), casc.casccosPA()); + registry.fill(HIST("hV0CosPA"), casc.v0cosPA(pvx, pvy, pvz)); + registry.fill(HIST("hCascCosPA"), casc.casccosPA(pvx, pvy, pvz)); registry.fill(HIST("hDCAPosToPV"), casc.dcapostopv()); registry.fill(HIST("hDCANegToPV"), casc.dcanegtopv()); registry.fill(HIST("hDCABachToPV"), casc.dcabachtopv()); - registry.fill(HIST("hDCAV0ToPV"), casc.dcav0topv()); + registry.fill(HIST("hDCAV0ToPV"), casc.dcav0topv(pvx, pvy, pvz)); registry.fill(HIST("hDCAV0Dau"), casc.dcaV0daughters()); registry.fill(HIST("hDCACascDau"), casc.dcacascdaughters()); registry.fill(HIST("hLambdaMass"), casc.mLambda()); @@ -3202,7 +3202,7 @@ struct HfTrackIndexSkimCreatorLfCascades { continue; } - if (!(isPreselectedCascade(casc))) { + if (!(isPreselectedCascade(casc, collision.posX(), collision.posY(), collision.posZ()))) { continue; } @@ -3215,19 +3215,21 @@ struct HfTrackIndexSkimCreatorLfCascades { covCasc[i] = casc.positionCovMat()[i]; } // create cascade track - o2::track::TrackParCov trackCascXi; + o2::track::TrackParCov trackCascXi2Prong; if (trackXiDauCharged.sign() > 0) { - trackCascXi = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, 1, true); + trackCascXi2Prong = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, 1, true); } else if (trackXiDauCharged.sign() < 0) { - trackCascXi = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, -1, true); + trackCascXi2Prong = o2::track::TrackParCov(vertexCasc, pVecCasc, covCasc, -1, true); } else { continue; } - trackCascXi.setAbsCharge(1); + trackCascXi2Prong.setAbsCharge(1); - auto trackCascOmega = trackCascXi; + auto trackCascOmega = trackCascXi2Prong; + auto trackCascXi3Prong = trackCascXi2Prong; - trackCascXi.setPID(o2::track::PID::XiMinus); + trackCascXi2Prong.setPID(o2::track::PID::XiMinus); + trackCascXi3Prong.setPID(o2::track::PID::XiMinus); trackCascOmega.setPID(o2::track::PID::OmegaMinus); //--------------combining cascade and pion tracks-------------- @@ -3256,7 +3258,7 @@ struct HfTrackIndexSkimCreatorLfCascades { auto trackParVarPion1 = getTrackParCov(trackPion1); // find charm baryon decay using xi PID hypothesis - int nVtxFrom2ProngFitterXiHyp = df2.process(trackCascXi, trackParVarPion1); + int nVtxFrom2ProngFitterXiHyp = df2.process(trackCascXi2Prong, trackParVarPion1); if (nVtxFrom2ProngFitterXiHyp > 0) { df2.propagateTracksToVertex(); @@ -3339,7 +3341,7 @@ struct HfTrackIndexSkimCreatorLfCascades { auto trackParVarPion2 = getTrackParCov(trackPion2); // reconstruct Xic with DCAFitter - int nVtxFrom3ProngFitterXiHyp = df3.process(trackCascXi, trackParVarPion1, trackParVarPion2); + int nVtxFrom3ProngFitterXiHyp = df3.process(trackCascXi3Prong, trackParVarPion1, trackParVarPion2); if (nVtxFrom3ProngFitterXiHyp > 0) { df3.propagateTracksToVertex(); @@ -3359,7 +3361,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } // fill histograms - if (fillHistograms && (hfFlag != 0)) { + if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi))) { registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); } } From 216824207bd8f02cb50580a864e7df6f234a8bf8 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Tue, 21 Nov 2023 11:26:44 +0100 Subject: [PATCH 19/21] Change default configurable and catch propagation exceptions --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 93 +++++++++++-------- 1 file changed, 55 insertions(+), 38 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 69dd1eb8dcb..6f1dbf3e0e1 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2929,10 +2929,11 @@ struct HfTrackIndexSkimCreatorLfCascades { // whether to do or not validation plots Configurable fillHistograms{"fillHistograms", true, "fill histograms"}; + Configurable do3Prong{"do3Prong", false, "do 3-prong cascade"}; + Configurable rejDiffCollTrack{"rejDiffCollTrack", false, "Reject tracks coming from different collisions"}; // charm baryon invariant mass spectra limits - Configurable rejDiffCollTrack{"rejDiffCollTrack", true, "Reject tracks coming from different collisions"}; Configurable massXiPiMin{"massXiPiMin", 2.1, "Invariant mass lower limit for xi pi decay channel"}; Configurable massXiPiMax{"massXiPiMax", 3., "Invariant mass upper limit for xi pi decay channel"}; Configurable massOmegaPiMin{"massOmegaPiMin", 2.4, "Invariant mass lower limit for omega pi decay channel"}; @@ -3263,22 +3264,27 @@ struct HfTrackIndexSkimCreatorLfCascades { df2.propagateTracksToVertex(); - std::array pVecXi = {0.}; - std::array pVecPion1XiHyp = {0.}; - df2.getTrack(0).getPxPyPzGlo(pVecXi); - df2.getTrack(1).getPxPyPzGlo(pVecPion1XiHyp); + if(df2.isPropagateTracksToVertexDone()){ + std::array pVecXi = {0.}; + std::array pVecPion1XiHyp = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecXi); + df2.getTrack(1).getPxPyPzGlo(pVecPion1XiHyp); - std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; - auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi]); + std::array, 2> arrMomToXi = {pVecXi, pVecPion1XiHyp}; + auto mass2ProngXiHyp = RecoDecay::m(arrMomToXi, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi]); - if ((std::abs(casc.mXi() - massXi) < cascadeMassWindow) && (mass2ProngXiHyp >= massXiPiMin) && (mass2ProngXiHyp <= massXiPiMax)) { - SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi); - } + if ((std::abs(casc.mXi() - massXi) < cascadeMassWindow) && (mass2ProngXiHyp >= massXiPiMin) && (mass2ProngXiHyp <= massXiPiMax)) { + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi); + } - // fill histograms - if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi))) { - registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); + // fill histograms + if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi))) { + registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); + } + } else if (df2.isPropagationFailure()){ + LOGF(info, "Exception caught: failed to propagate tracks (2prong - xi) to charm baryon decay vtx"); } + } // find charm baryon decay using omega PID hypothesis @@ -3287,21 +3293,26 @@ struct HfTrackIndexSkimCreatorLfCascades { df2.propagateTracksToVertex(); - std::array pVecOmega = {0.}; - std::array pVecPion1OmegaHyp = {0.}; - df2.getTrack(0).getPxPyPzGlo(pVecOmega); - df2.getTrack(1).getPxPyPzGlo(pVecPion1OmegaHyp); + if(df2.isPropagateTracksToVertexDone()){ - std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; - auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi]); + std::array pVecOmega = {0.}; + std::array pVecPion1OmegaHyp = {0.}; + df2.getTrack(0).getPxPyPzGlo(pVecOmega); + df2.getTrack(1).getPxPyPzGlo(pVecPion1OmegaHyp); - if ((std::abs(casc.mOmega() - massOmega) < cascadeMassWindow) && (mass2ProngOmegaHyp >= massOmegaPiMin) && (mass2ProngOmegaHyp <= massOmegaPiMax)) { - SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi); - } + std::array, 2> arrMomToOmega = {pVecOmega, pVecPion1OmegaHyp}; + auto mass2ProngOmegaHyp = RecoDecay::m(arrMomToOmega, arrMass2Prong[hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi]); + + if ((std::abs(casc.mOmega() - massOmega) < cascadeMassWindow) && (mass2ProngOmegaHyp >= massOmegaPiMin) && (mass2ProngOmegaHyp <= massOmegaPiMax)) { + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi); + } - // fill histograms - if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi))) { + // fill histograms + if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi))) { registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); + } + } else if (df2.isPropagationFailure()){ + LOGF(info, "Exception caught: failed to propagate tracks (2prong - omega) to charm baryon decay vtx"); } } @@ -3346,24 +3357,30 @@ struct HfTrackIndexSkimCreatorLfCascades { df3.propagateTracksToVertex(); - std::array pVec1 = {0.}; - std::array pVec2 = {0.}; - std::array pVec3 = {0.}; - df3.getTrack(0).getPxPyPzGlo(pVec1); // take the momentum at the Xic vertex - df3.getTrack(1).getPxPyPzGlo(pVec2); - df3.getTrack(2).getPxPyPzGlo(pVec3); + if(df3.isPropagateTracksToVertexDone()){ - std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; - auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]); + std::array pVec1 = {0.}; + std::array pVec2 = {0.}; + std::array pVec3 = {0.}; + df3.getTrack(0).getPxPyPzGlo(pVec1); // take the momentum at the Xic vertex + df3.getTrack(1).getPxPyPzGlo(pVec2); + df3.getTrack(2).getPxPyPzGlo(pVec3); - if ((std::abs(casc.mXi() - massXi) < cascadeMassWindow) && (mass3Prong >= massXiPiPiMin) && (mass3Prong <= massXiPiPiMax)) { - SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi); - } + std::array, 3> arr3Mom = {pVec1, pVec2, pVec3}; + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]); - // fill histograms - if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi))) { - registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); + if ((std::abs(casc.mXi() - massXi) < cascadeMassWindow) && (mass3Prong >= massXiPiPiMin) && (mass3Prong <= massXiPiPiMax)) { + SETBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi); + } + + // fill histograms + if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi))) { + registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); + } + } else if (df3.isPropagationFailure()){ + LOGF(info, "Exception caught: failed to propagate tracks (3prong) to charm baryon decay vtx"); } + } // fill table row only if a vertex was found From 0d64d1eaf077519de37cb3df0d4a09ad1d204075 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 21 Nov 2023 10:27:52 +0000 Subject: [PATCH 20/21] Please consider the following formatting changes --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 6f1dbf3e0e1..c4c8a45676e 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -3264,7 +3264,7 @@ struct HfTrackIndexSkimCreatorLfCascades { df2.propagateTracksToVertex(); - if(df2.isPropagateTracksToVertexDone()){ + if (df2.isPropagateTracksToVertexDone()) { std::array pVecXi = {0.}; std::array pVecPion1XiHyp = {0.}; df2.getTrack(0).getPxPyPzGlo(pVecXi); @@ -3281,10 +3281,9 @@ struct HfTrackIndexSkimCreatorLfCascades { if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::XiczeroOmegaczeroToXiPi))) { registry.fill(HIST("hMassXicZeroOmegacZeroToXiPi"), mass2ProngXiHyp); } - } else if (df2.isPropagationFailure()){ + } else if (df2.isPropagationFailure()) { LOGF(info, "Exception caught: failed to propagate tracks (2prong - xi) to charm baryon decay vtx"); } - } // find charm baryon decay using omega PID hypothesis @@ -3293,7 +3292,7 @@ struct HfTrackIndexSkimCreatorLfCascades { df2.propagateTracksToVertex(); - if(df2.isPropagateTracksToVertexDone()){ + if (df2.isPropagateTracksToVertexDone()) { std::array pVecOmega = {0.}; std::array pVecPion1OmegaHyp = {0.}; @@ -3309,9 +3308,9 @@ struct HfTrackIndexSkimCreatorLfCascades { // fill histograms if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi))) { - registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); + registry.fill(HIST("hMassOmegacZeroToOmegaPi"), mass2ProngOmegaHyp); } - } else if (df2.isPropagationFailure()){ + } else if (df2.isPropagationFailure()) { LOGF(info, "Exception caught: failed to propagate tracks (2prong - omega) to charm baryon decay vtx"); } } @@ -3357,7 +3356,7 @@ struct HfTrackIndexSkimCreatorLfCascades { df3.propagateTracksToVertex(); - if(df3.isPropagateTracksToVertexDone()){ + if (df3.isPropagateTracksToVertexDone()) { std::array pVec1 = {0.}; std::array pVec2 = {0.}; @@ -3377,10 +3376,9 @@ struct HfTrackIndexSkimCreatorLfCascades { if (fillHistograms && (TESTBIT(hfFlag, aod::hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi))) { registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong); } - } else if (df3.isPropagationFailure()){ + } else if (df3.isPropagationFailure()) { LOGF(info, "Exception caught: failed to propagate tracks (3prong) to charm baryon decay vtx"); } - } // fill table row only if a vertex was found From fc7135728da92dfc43420e0602d2719341b7599f Mon Sep 17 00:00:00 2001 From: ZFederica Date: Tue, 21 Nov 2023 14:39:43 +0100 Subject: [PATCH 21/21] Remove hfFlag for 3prong --- PWGHF/DataModel/CandidateReconstructionTables.h | 3 +-- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index a3b690d704b..2f54fc36730 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -269,8 +269,7 @@ DECLARE_SOA_TABLE(HfCascLf3Prongs, "AOD", "HFCASCLF3PRONG", //! Table for HF 3 p hf_track_index::CollisionId, hf_track_index::CascadeId, hf_track_index::Prong0Id, - hf_track_index::Prong1Id, - hf_track_index::HFflag); + hf_track_index::Prong1Id); using HfCascLf3Prong = HfCascLf3Prongs::iterator; namespace hf_track_index diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index c4c8a45676e..e1437855318 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -3386,8 +3386,7 @@ struct HfTrackIndexSkimCreatorLfCascades { rowTrackIndexCasc3Prong(thisCollId, casc.globalIndex(), trackPion1.globalIndex(), - trackPion2.globalIndex(), - hfFlag); + trackPion2.globalIndex()); } } // end 3prong loop