From d2fd967231d79827494ccbc0c00f7cb57b9c5b54 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 14 Apr 2026 23:12:46 +0200 Subject: [PATCH 1/5] Add track table for ITS PIDNsigma --- PWGCF/FemtoUniverse/DataModel/FemtoDerived.h | 355 +++++++++++-------- 1 file changed, 207 insertions(+), 148 deletions(-) diff --git a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h index c9b158ce1b5..0a3119d0286 100644 --- a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h +++ b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -29,24 +29,23 @@ #include -namespace o2::aod -{ +namespace o2::aod { /// FemtoUniverseCollision -namespace femtouniversecollision -{ -DECLARE_SOA_COLUMN(MultV0M, multV0M, float); //! V0M multiplicity -DECLARE_SOA_COLUMN(MultNtr, multNtr, int); //! multiplicity of charged tracks as defined in the producer -DECLARE_SOA_COLUMN(Sphericity, sphericity, float); //! Sphericity of the event -DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the event -DECLARE_SOA_COLUMN(InteractionRate, interactionRate, float); //! Interaction rate -DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! TPC occupancy +namespace femtouniversecollision { +DECLARE_SOA_COLUMN(MultV0M, multV0M, float); //! V0M multiplicity +DECLARE_SOA_COLUMN( + MultNtr, multNtr, + int); //! multiplicity of charged tracks as defined in the producer +DECLARE_SOA_COLUMN(Sphericity, sphericity, float); //! Sphericity of the event +DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the event +DECLARE_SOA_COLUMN(InteractionRate, interactionRate, + float); //! Interaction rate +DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! TPC occupancy } // namespace femtouniversecollision -DECLARE_SOA_TABLE(FdCollisions, "AOD", "FDCOLLISION", - o2::soa::Index<>, - o2::aod::collision::PosZ, - femtouniversecollision::MultV0M, +DECLARE_SOA_TABLE(FdCollisions, "AOD", "FDCOLLISION", o2::soa::Index<>, + o2::aod::collision::PosZ, femtouniversecollision::MultV0M, femtouniversecollision::MultNtr, femtouniversecollision::Sphericity, femtouniversecollision::MagField); @@ -58,8 +57,7 @@ DECLARE_SOA_TABLE(FDExtCollisions, "AOD", "FDEXTCOLLISION", using FDExtCollision = FDExtCollisions::iterator; /// FemtoUniverseTrack -namespace femtouniverseparticle -{ +namespace femtouniverseparticle { /// Distinuishes the different particle types enum ParticleType { kTrack, //! Track @@ -76,10 +74,17 @@ enum ParticleType { kNParticleTypes //! Number of particle types }; -static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", "D0Child"}; //! Naming of the different particle types -static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"}; +static constexpr std::string_view ParticleTypeName[kNParticleTypes] = { + "Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", + "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", + "D0Child"}; //! Naming of the different particle types +static constexpr std::string_view TempFitVarName[kNParticleTypes] = { + "/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", + "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"}; -using CutContainerType = uint32_t; //! Definition of the data type for the bit-wise container for the different selection criteria +using CutContainerType = + uint32_t; //! Definition of the data type for the bit-wise container for the + //! different selection criteria enum TrackType { kNoChild, //! Not a V0 child @@ -89,19 +94,35 @@ enum TrackType { kNTrackTypes //! Number of child types }; -static constexpr std::string_view TrackTypeName[kNTrackTypes] = {"Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types +static constexpr std::string_view TrackTypeName[kNTrackTypes] = { + "Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types DECLARE_SOA_INDEX_COLUMN(FdCollision, fdCollision); -DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c) -DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta -DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi -DECLARE_SOA_COLUMN(PartType, partType, uint8_t); //! Type of the particle, according to femtouniverseparticle::ParticleType -DECLARE_SOA_COLUMN(Cut, cut, CutContainerType); //! Bit-wise container for the different selection criteria -DECLARE_SOA_COLUMN(PidCut, pidCut, CutContainerType); //! Bit-wise container for the different PID selection criteria \todo since bit-masking cannot be done yet with filters we use a second field for the PID -DECLARE_SOA_COLUMN(TempFitVar, tempFitVar, float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) -DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Children, children); //! Field for the track indices to remove auto-correlations -DECLARE_SOA_COLUMN(MLambda, mLambda, float); //! The invariant mass of V0 candidate, assuming lambda -DECLARE_SOA_COLUMN(MAntiLambda, mAntiLambda, float); //! The invariant mass of V0 candidate, assuming antilambda +DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c) +DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta +DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi +DECLARE_SOA_COLUMN(PartType, partType, + uint8_t); //! Type of the particle, according to + //! femtouniverseparticle::ParticleType +DECLARE_SOA_COLUMN(Cut, cut, CutContainerType); //! Bit-wise container for the + //! different selection criteria +DECLARE_SOA_COLUMN( + PidCut, pidCut, + CutContainerType); //! Bit-wise container for the different PID selection + //! criteria \todo since bit-masking cannot be done yet + //! with filters we use a second field for the PID +DECLARE_SOA_COLUMN( + TempFitVar, tempFitVar, + float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) +DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN( + Children, + children); //! Field for the track indices to remove auto-correlations +DECLARE_SOA_COLUMN( + MLambda, mLambda, + float); //! The invariant mass of V0 candidate, assuming lambda +DECLARE_SOA_COLUMN( + MAntiLambda, mAntiLambda, + float); //! The invariant mass of V0 candidate, assuming antilambda DECLARE_SOA_DYNAMIC_COLUMN(Theta, theta, //! Compute the theta of the track [](float eta) -> float { @@ -123,114 +144,152 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Compute the overall momentum in GeV/c [](float pt, float eta) -> float { return pt * std::cosh(eta); }); + +DECLARE_SOA_COLUMN(ITSSignal, itsSignal, float); +DECLARE_SOA_COLUMN( + ITSNSigmaEl, itsNSigmaEl, + float); //! Nsigma separation with the Its detector for electron +DECLARE_SOA_COLUMN(ITSNSigmaPi, itsNSigmaPi, + float); //! Nsigma separation with the Its detector for pion +DECLARE_SOA_COLUMN(ITSNSigmaKa, itsNSigmaKa, + float); //! Nsigma separation with the Its detector for kaon +DECLARE_SOA_COLUMN( + ITSNSigmaPr, itsNSigmaPr, + float); //! Nsigma separation with the Its detector for proton +DECLARE_SOA_COLUMN( + ITSNSigmaDe, itsNSigmaDe, + float); //! Nsigma separation with the Its detector for deuteron +DECLARE_SOA_COLUMN( + ITSNSigmaTr, itsNSigmaTr, + float); //! Nsigma separation with the Its detector for triton +DECLARE_SOA_COLUMN( + ITSNSigmaHe, itsNSigmaHe, + float); //! Nsigma separation with the Its detector for helium3 + // debug variables -DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge -DECLARE_SOA_COLUMN(TpcNClsFound, tpcNClsFound, uint8_t); //! Number of TPC clusters -DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(TpcFractionSharedCls, tpcFractionSharedCls, float); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(ItsNCls, itsNCls, uint8_t); //! Number of ITS clusters -DECLARE_SOA_COLUMN(ItsNClsInnerBarrel, itsNClsInnerBarrel, uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal -DECLARE_SOA_DYNAMIC_COLUMN(TpcCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over findable TPC clusters - [](uint8_t tpcNClsFindable, uint8_t tpcNClsCrossedRows) -> float { - return (float)tpcNClsCrossedRows / (float)tpcNClsFindable; - }); -DECLARE_SOA_COLUMN(DaughDCA, daughDCA, float); //! DCA between daughters -DECLARE_SOA_COLUMN(TransRadius, transRadius, float); //! Transverse radius of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex -DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon +DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge +DECLARE_SOA_COLUMN(TpcNClsFound, tpcNClsFound, + uint8_t); //! Number of TPC clusters +DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, + uint8_t); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(TpcFractionSharedCls, tpcFractionSharedCls, + float); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(ItsNCls, itsNCls, uint8_t); //! Number of ITS clusters +DECLARE_SOA_COLUMN( + ItsNClsInnerBarrel, itsNClsInnerBarrel, + uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal +DECLARE_SOA_DYNAMIC_COLUMN( + TpcCrossedRowsOverFindableCls, + tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over + //! findable TPC clusters + [](uint8_t tpcNClsFindable, uint8_t tpcNClsCrossedRows) -> float { + return (float)tpcNClsCrossedRows / (float)tpcNClsFindable; + }); +DECLARE_SOA_COLUMN(DaughDCA, daughDCA, float); //! DCA between daughters +DECLARE_SOA_COLUMN(TransRadius, transRadius, + float); //! Transverse radius of the decay vertex +DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, + float); //! X position of the decay vertex +DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, + float); //! Y position of the decay vertex +DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, + float); //! Z position of the decay vertex +DECLARE_SOA_COLUMN(MKaon, mKaon, + float); //! The invariant mass of V0 candidate, assuming kaon } // namespace femtouniverseparticle -DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE", - o2::soa::Index<>, +DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE", o2::soa::Index<>, femtouniverseparticle::FdCollisionId, - femtouniverseparticle::Pt, - femtouniverseparticle::Eta, - femtouniverseparticle::Phi, - femtouniverseparticle::PartType, - femtouniverseparticle::Cut, - femtouniverseparticle::PidCut, + femtouniverseparticle::Pt, femtouniverseparticle::Eta, + femtouniverseparticle::Phi, femtouniverseparticle::PartType, + femtouniverseparticle::Cut, femtouniverseparticle::PidCut, femtouniverseparticle::TempFitVar, femtouniverseparticle::ChildrenIds, femtouniverseparticle::MLambda, femtouniverseparticle::MAntiLambda, femtouniverseparticle::Theta, - femtouniverseparticle::Px, - femtouniverseparticle::Py, - femtouniverseparticle::Pz, - femtouniverseparticle::P); + femtouniverseparticle::Px, + femtouniverseparticle::Py, + femtouniverseparticle::Pz, + femtouniverseparticle::P); using FDParticle = FDParticles::iterator; /// FemtoUniverseCascadeTrack -namespace femtouniversecascparticle -{ +namespace femtouniversecascparticle { DECLARE_SOA_INDEX_COLUMN(FDParticle, fdParticle); -DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, float); //! DCA between V0 daughters -DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle -DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius -DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, float); //! cascade cosinus of pointing angle -DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, float); //! DCA between cascade daughters -DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius -DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, float); //! DCA of positive daughter to PV -DECLARE_SOA_COLUMN(Dcanegtopv, dcanegtopv, float); //! DCA of negative daughter to PV -DECLARE_SOA_COLUMN(Dcabachtopv, dcabachtopv, float); //! DCA of bachelor track to PV -DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV +DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, + float); //! DCA between V0 daughters +DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle +DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius +DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, + float); //! cascade cosinus of pointing angle +DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, + float); //! DCA between cascade daughters +DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius +DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, + float); //! DCA of positive daughter to PV +DECLARE_SOA_COLUMN(Dcanegtopv, dcanegtopv, + float); //! DCA of negative daughter to PV +DECLARE_SOA_COLUMN(Dcabachtopv, dcabachtopv, + float); //! DCA of bachelor track to PV +DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV } // namespace femtouniversecascparticle -DECLARE_SOA_TABLE(FDExtParticles, "AOD", "FDEXTPARTICLE", - femtouniverseparticle::Sign, - femtouniverseparticle::TpcNClsFound, - track::TPCNClsFindable, - femtouniverseparticle::TpcNClsCrossedRows, - track::TPCNClsShared, - femtouniverseparticle::TpcFractionSharedCls, - track::TPCInnerParam, - femtouniverseparticle::ItsNCls, - femtouniverseparticle::ItsNClsInnerBarrel, - track::DcaXY, - track::DcaZ, - track::TPCSignal, - pidtpc_tiny::TPCNSigmaStoreEl, - pidtpc_tiny::TPCNSigmaStorePi, - pidtpc_tiny::TPCNSigmaStoreKa, - pidtpc_tiny::TPCNSigmaStorePr, - pidtpc_tiny::TPCNSigmaStoreDe, - pidtof_tiny::TOFNSigmaStoreEl, - pidtof_tiny::TOFNSigmaStorePi, - pidtof_tiny::TOFNSigmaStoreKa, - pidtof_tiny::TOFNSigmaStorePr, - pidtof_tiny::TOFNSigmaStoreDe, - femtouniverseparticle::DaughDCA, - femtouniverseparticle::TransRadius, - femtouniverseparticle::DecayVtxX, - femtouniverseparticle::DecayVtxY, - femtouniverseparticle::DecayVtxZ, - femtouniverseparticle::MKaon, - femtouniverseparticle::TpcCrossedRowsOverFindableCls, - pidtpc_tiny::TPCNSigmaEl, - pidtpc_tiny::TPCNSigmaPi, - pidtpc_tiny::TPCNSigmaKa, - pidtpc_tiny::TPCNSigmaPr, - pidtpc_tiny::TPCNSigmaDe, - pidtof_tiny::TOFNSigmaEl, - pidtof_tiny::TOFNSigmaPi, - pidtof_tiny::TOFNSigmaKa, - pidtof_tiny::TOFNSigmaPr, - pidtof_tiny::TOFNSigmaDe); +DECLARE_SOA_TABLE( + FDExtParticles, "AOD", "FDEXTPARTICLE", femtouniverseparticle::Sign, + femtouniverseparticle::TpcNClsFound, track::TPCNClsFindable, + femtouniverseparticle::TpcNClsCrossedRows, track::TPCNClsShared, + femtouniverseparticle::TpcFractionSharedCls, track::TPCInnerParam, + femtouniverseparticle::ItsNCls, femtouniverseparticle::ItsNClsInnerBarrel, + track::DcaXY, track::DcaZ, track::TPCSignal, pidtpc_tiny::TPCNSigmaStoreEl, + pidtpc_tiny::TPCNSigmaStorePi, pidtpc_tiny::TPCNSigmaStoreKa, + pidtpc_tiny::TPCNSigmaStorePr, pidtpc_tiny::TPCNSigmaStoreDe, + pidtof_tiny::TOFNSigmaStoreEl, pidtof_tiny::TOFNSigmaStorePi, + pidtof_tiny::TOFNSigmaStoreKa, pidtof_tiny::TOFNSigmaStorePr, + pidtof_tiny::TOFNSigmaStoreDe, femtouniverseparticle::DaughDCA, + femtouniverseparticle::TransRadius, femtouniverseparticle::DecayVtxX, + femtouniverseparticle::DecayVtxY, femtouniverseparticle::DecayVtxZ, + femtouniverseparticle::MKaon, + femtouniverseparticle::TpcCrossedRowsOverFindableCls< + track::TPCNClsFindable, femtouniverseparticle::TpcNClsCrossedRows>, + pidtpc_tiny::TPCNSigmaEl, + pidtpc_tiny::TPCNSigmaPi, + pidtpc_tiny::TPCNSigmaKa, + pidtpc_tiny::TPCNSigmaPr, + pidtpc_tiny::TPCNSigmaDe, + pidtof_tiny::TOFNSigmaEl, + pidtof_tiny::TOFNSigmaPi, + pidtof_tiny::TOFNSigmaKa, + pidtof_tiny::TOFNSigmaPr, + pidtof_tiny::TOFNSigmaDe); using FDFullParticle = FDExtParticles::iterator; -DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", - o2::soa::Index<>, +DECLARE_SOA_TABLE(FDItsParticles, "AOD", "FDITSPARTICLE", + femtouniverseparticle::ITSNSigmaEl, + femtouniverseparticle::ITSNSigmaPi, + femtouniverseparticle::ITSNSigmaKa, + femtouniverseparticle::ITSNSigmaPr, + femtouniverseparticle::ITSNSigmaDe); +using FDItsParticle = FDItsParticles::iterator; + +DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", o2::soa::Index<>, femtouniverseparticle::FdCollisionId, femtouniversecascparticle::FDParticleId, femtouniverseparticle::Theta, - femtouniverseparticle::Px, - femtouniverseparticle::Py, - femtouniverseparticle::Pz, - femtouniverseparticle::P, + femtouniverseparticle::Px, + femtouniverseparticle::Py, + femtouniverseparticle::Pz, + femtouniverseparticle::P, femtouniversecascparticle::DcaV0daughters, femtouniversecascparticle::Cpav0, femtouniversecascparticle::V0radius, @@ -244,15 +303,17 @@ DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", using FDCascParticle = FDCascParticles::iterator; /// FemtoUniverseTrackMC -namespace femtouniverse_mc_particle -{ +namespace femtouniverse_mc_particle { /// Distinuishes the different particle origins enum ParticleOriginMCTruth { - kPrimary, //! Primary track or V0 - kDaughter, //! Particle from a decay - kMaterial, //! Particle from a material - kNotPrimary, //! Not primary particles (kept for compatibility reasons with the FullProducer task. will be removed, since we look at "non primaries" more differentially now) - kFake, //! Particle, that has NOT the PDG code of the current analysed particle + kPrimary, //! Primary track or V0 + kDaughter, //! Particle from a decay + kMaterial, //! Particle from a material + kNotPrimary, //! Not primary particles (kept for compatibility reasons with + //! the FullProducer task. will be removed, since we look at "non + //! primaries" more differentially now) + kFake, //! Particle, that has NOT the PDG code of the current analysed + //! particle kDaughterLambda, //! Daughter from a Lambda decay kDaughterSigmaplus, //! Daughter from a Sigma^plus decay kPrompt, //! Origin for D0/D0bar mesons @@ -263,16 +324,11 @@ enum ParticleOriginMCTruth { }; //! Naming of the different OriginMCTruth types -static constexpr std::string_view ParticleOriginMCTruthName[kNOriginMCTruthTypes] = { - "_Primary", - "_Daughter", - "_Material", - "_NotPrimary", - "_Fake", - "_DaughterLambda", - "DaughterSigmaPlus", - "_Prompt", - "_NonPrompt"}; +static constexpr std::string_view + ParticleOriginMCTruthName[kNOriginMCTruthTypes] = { + "_Primary", "_Daughter", "_Material", + "_NotPrimary", "_Fake", "_DaughterLambda", + "DaughterSigmaPlus", "_Prompt", "_NonPrompt"}; /// Distinguished between reconstructed and truth enum MCType { @@ -283,19 +339,21 @@ enum MCType { static constexpr std::string_view MCTypeName[kNMCTypes] = {"", "_MC"}; -DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, uint8_t); //! Origin of the particle, according to femtouniverseparticle::ParticleOriginMCTruth -DECLARE_SOA_COLUMN(PdgMCTruth, pdgMCTruth, int); //! Particle PDG +DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, + uint8_t); //! Origin of the particle, according to + //! femtouniverseparticle::ParticleOriginMCTruth +DECLARE_SOA_COLUMN(PdgMCTruth, pdgMCTruth, int); //! Particle PDG // debug variables -DECLARE_SOA_COLUMN(MotherPDG, motherPDG, int); //! Checks mother PDG, where mother is the primary particle for that decay chain +DECLARE_SOA_COLUMN(MotherPDG, motherPDG, + int); //! Checks mother PDG, where mother is the primary + //! particle for that decay chain } // namespace femtouniverse_mc_particle -DECLARE_SOA_TABLE(FdMCParticles, "AOD", "FDMCPARTICLE", - o2::soa::Index<>, +DECLARE_SOA_TABLE(FdMCParticles, "AOD", "FDMCPARTICLE", o2::soa::Index<>, femtouniverse_mc_particle::PartOriginMCTruth, femtouniverse_mc_particle::PdgMCTruth, - femtouniverseparticle::Pt, - femtouniverseparticle::Eta, + femtouniverseparticle::Pt, femtouniverseparticle::Eta, femtouniverseparticle::Phi); using FdMCParticle = FdMCParticles::iterator; @@ -303,16 +361,17 @@ DECLARE_SOA_TABLE(FDExtMCParticles, "AOD", "FDEXTMCPARTICLE", femtouniverse_mc_particle::MotherPDG); using FDExtMCParticle = FDExtMCParticles::iterator; -namespace mcfdlabel -{ -DECLARE_SOA_INDEX_COLUMN(FdMCParticle, fdMCParticle); //! MC particle for femtouniverseparticle +namespace mcfdlabel { +DECLARE_SOA_INDEX_COLUMN( + FdMCParticle, fdMCParticle); //! MC particle for femtouniverseparticle } // namespace mcfdlabel -DECLARE_SOA_TABLE(FDMCLabels, "AOD", "FDMCLabel", //! Table joinable to FemtoUniverseParticle containing the MC labels +DECLARE_SOA_TABLE(FDMCLabels, "AOD", + "FDMCLabel", //! Table joinable to FemtoUniverseParticle + //! containing the MC labels mcfdlabel::FdMCParticleId); /// Hash -namespace hash -{ +namespace hash { DECLARE_SOA_COLUMN(Bin, bin, int); //! Hash for the event mixing } // namespace hash DECLARE_SOA_TABLE(MixingHashes, "AOD", "HASH", hash::Bin); From 80934bf59f9e13cacd46b1e0018aeffa91f9cbc0 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 14 Apr 2026 23:19:30 +0200 Subject: [PATCH 2/5] Add function to fill ITS PID table --- .../Core/FemtoUniverseParticleHisto.h | 1322 ++++++-- .../Core/FemtoUniverseTrackSelection.h | 819 +++-- .../femtoUniverseProducerTask.cxx | 2989 +++++++++++------ 3 files changed, 3705 insertions(+), 1425 deletions(-) diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h index 508cb8994c4..ec7fec9e361 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -10,7 +10,8 @@ // or submit itself to any jurisdiction. /// \file FemtoUniverseParticleHisto.h -/// \brief FemtoUniverseParticleHisto - Histogram class for tracks, V0s and cascades +/// \brief FemtoUniverseParticleHisto - Histogram class for tracks, V0s and +/// cascades /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Georgios Mantzaridis, TU München, georgios.mantzaridis@tum.de /// \author Anton Riedel, TU München, anton.riedel@tum.de @@ -36,8 +37,10 @@ namespace o2::analysis::femto_universe // o2-linter: disable=name/namespace /// \class FemtoUniverseParticleHisto /// \brief Class for histogramming particle properties /// \tparam particleType Type of the particle (Track/V0/Cascade/Phi/...) -/// \tparam suffixType (optional) Takes care of the suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) -template +/// \tparam suffixType (optional) Takes care of the suffix for the folder name +/// in case of analyses of pairs of the same kind (T-T, V-V, C-C) +template class FemtoUniverseParticleHisto { public: @@ -45,291 +48,893 @@ class FemtoUniverseParticleHisto virtual ~FemtoUniverseParticleHisto() = default; /// Initializes particle histograms - /// Called by init both in case of reconstructed data/ Monte Carlo, and for Monte Carlo Truth + /// Called by init both in case of reconstructed data/ Monte Carlo, and for + /// Monte Carlo Truth /// \tparam T type of the axis Object - /// \tparam mc enum object to get the suffix ("" for data/ Monte Cartlo reconstructed, "_MC" for Monte Carlo truth) for the folder in the output file - /// \param folderName base path of the directory in the output file, in which to store the histograms - /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) - /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots + /// \tparam mc enum object to get the suffix ("" for data/ Monte Cartlo + /// reconstructed, "_MC" for Monte Carlo truth) for the folder in the output + /// file + /// \param folderName base path of the directory in the output file, in which + /// to store the histograms + /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in + /// case of tracks, CPA in case of V0s, etc.) + /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. + /// tempFitVar plots /// \param tempFitVarAxis axis object for the tempFitVar axis template - void init_base(std::string folderName, std::string tempFitVarAxisTitle, T& tempFitVarpTAxis, T& tempFitVarAxis) // o2-linter: disable=name/function-variable + void init_base(std::string folderName, std::string tempFitVarAxisTitle, + T& tempFitVarpTAxis, + T& tempFitVarAxis) // o2-linter: disable=name/function-variable { - std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]).c_str(); + std::string folderSuffix = + static_cast( + o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + .c_str(); /// Histograms of the kinematic properties - mHistogramRegistry->add((folderName + folderSuffix + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {tempFitVarpTAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hPhi").c_str(), "; #phi; Entries", kTH1F, {{200, 0, o2::constants::math::TwoPI}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hPhiEta").c_str(), "; #phi; #eta", kTH2F, {{200, 0, o2::constants::math::TwoPI}, {200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPt").c_str(), + "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, + {tempFitVarpTAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hEta").c_str(), + "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPhi").c_str(), + "; #phi; Entries", kTH1F, + {{200, 0, o2::constants::math::TwoPI}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hPhiEta").c_str(), "; #phi; #eta", kTH2F, + {{200, 0, o2::constants::math::TwoPI}, {200, -1.5, 1.5}}); - /// particle specific histogramms for the TempFitVar column in FemtoUniverseParticles + /// particle specific histogramms for the TempFitVar column in + /// FemtoUniverseParticles if constexpr (o2::aod::femtouniverse_mc_particle::MCType::kRecon == mc) { - mHistogramRegistry->add((folderName + folderSuffix + static_cast(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType])).c_str(), ("; #it{p}_{T} (GeV/#it{c}); " + tempFitVarAxisTitle).c_str(), kTH2F, {{tempFitVarpTAxis}, {tempFitVarAxis}}); + mHistogramRegistry->add( + (folderName + folderSuffix + + static_cast( + o2::aod::femtouniverseparticle::TempFitVarName[mParticleType])) + .c_str(), + ("; #it{p}_{T} (GeV/#it{c}); " + tempFitVarAxisTitle).c_str(), kTH2F, + {{tempFitVarpTAxis}, {tempFitVarAxis}}); } } // comment template - void init_debug(std::string folderName, T& tempFitVarMomAxis) // o2-linter: disable=name/function-variable + void + init_debug(std::string folderName, T& tempFitVarMomAxis, + bool isFillITSNsigma) // o2-linter: disable=name/function-variable { - std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]).c_str(); - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { - mHistogramRegistry->add((folderName + folderSuffix + "/hCharge").c_str(), "; Charge; Entries", kTH1F, {{5, -2.5, 2.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfindable").c_str(), "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfound").c_str(), "; TPC found clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCcrossedOverFindable").c_str(), "; TPC ratio findable; Entries", kTH1F, {{100, 0.5, 1.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCcrossedRows").c_str(), "; TPC crossed rows; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfindableVsCrossed").c_str(), ";TPC findable clusters ; TPC crossed rows;", kTH2F, {{163, -0.5, 162.5}, {163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCshared").c_str(), "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfractionSharedCls").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 1.0}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hITSclusters").c_str(), "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hITSclustersIB").c_str(), "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAz").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCA").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, {{100, 0, 10}, {301, 0., 1.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCdEdX").c_str(), "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, {{tempFitVarMomAxis}, {1000, 0, 1000}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { - mHistogramRegistry->add((folderName + folderSuffix + "/hDaughDCA").c_str(), "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTransRadius").c_str(), "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxX").c_str(), "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxY").c_str(), "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxZ").c_str(), "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassLambda").c_str(), "; M_{#Lambda}; Entries", kTH1F, {{2000, 1.f, 3.f}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassLambdaVsPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, {{240, 0, 6}, {2000, 1.f, 3.f}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassAntiLambda").c_str(), "; M_{#bar{#Lambda}}; Entries", kTH1F, {{2000, 1.f, 3.f}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassAntiLambdaVsPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, {{240, 0, 6}, {2000, 1.f, 3.f}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassLambdaAntiLambda").c_str(), "; M_{#Lambda}; M_{#bar{#Lambda}}", kTH2F, {{2000, 1.f, 3.f}, {2000, 1.f, 3.f}}); - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { - mHistogramRegistry->add((folderName + folderSuffix + "/hDaughDCA").c_str(), "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTransRadius").c_str(), "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxX").c_str(), "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxY").c_str(), "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxZ").c_str(), "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassXi").c_str(), "; M_{Xi}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassOmega").c_str(), "; M_{Omega}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); + std::string folderSuffix = + static_cast( + o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + .c_str(); + if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kTrack || + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0Child || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascadeBachelor || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kMCTruthTrack) { + mHistogramRegistry->add((folderName + folderSuffix + "/hCharge").c_str(), + "; Charge; Entries", kTH1F, {{5, -2.5, 2.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCfindable").c_str(), + "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCfound").c_str(), + "; TPC found clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCcrossedOverFindable").c_str(), + "; TPC ratio findable; Entries", kTH1F, {{100, 0.5, 1.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCcrossedRows").c_str(), + "; TPC crossed rows; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCfindableVsCrossed").c_str(), + ";TPC findable clusters ; TPC crossed rows;", kTH2F, + {{163, -0.5, 162.5}, {163, -0.5, 162.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCshared").c_str(), + "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTPCfractionSharedCls").c_str(), + "; TPC fraction of shared clusters; Entries", kTH1F, + {{100, 0.0, 1.0}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hITSclusters").c_str(), + "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hITSclustersIB").c_str(), + "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAz").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, + {{100, 0, 10}, {500, -5, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCA").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, + {{100, 0, 10}, {301, 0., 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCdEdX").c_str(), + "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, + {{tempFitVarMomAxis}, {1000, 0, 1000}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTPC_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTPC_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTPC_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTPC_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTPC_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTOF_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTOF_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTOF_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTOF_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaTOF_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, + {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaComb_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaComb_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaComb_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaComb_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaComb_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + if (isFillITSNsigma) { + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaITS_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{e}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaITS_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{#pi}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaITS_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{K}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaITS_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{p}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaITS_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{d}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaCombITSTPC_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{e}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaCombITSTPC_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{#pi}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaCombITSTPC_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{K}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaCombITSTPC_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{p}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/nSigmaCombITSTPC_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{d}", kTH2F, + {{tempFitVarMomAxis}, {100, 0, 5}}); + } + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0) { + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDaughDCA").c_str(), + "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTransRadius").c_str(), + "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDecayVtxX").c_str(), + "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDecayVtxY").c_str(), + "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDecayVtxZ").c_str(), + "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassLambda").c_str(), + "; M_{#Lambda}; Entries", kTH1F, {{2000, 1.f, 3.f}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassLambdaVsPt").c_str(), + "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, + {{240, 0, 6}, {2000, 1.f, 3.f}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassAntiLambda").c_str(), + "; M_{#bar{#Lambda}}; Entries", kTH1F, {{2000, 1.f, 3.f}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassAntiLambdaVsPt").c_str(), + "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, + {{240, 0, 6}, {2000, 1.f, 3.f}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassLambdaAntiLambda").c_str(), + "; M_{#Lambda}; M_{#bar{#Lambda}}", kTH2F, + {{2000, 1.f, 3.f}, {2000, 1.f, 3.f}}); + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascade) { + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDaughDCA").c_str(), + "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTransRadius").c_str(), + "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDecayVtxX").c_str(), + "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDecayVtxY").c_str(), + "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDecayVtxZ").c_str(), + "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassXi").c_str(), + "; M_{Xi}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hInvMassOmega").c_str(), + "; M_{Omega}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); } } /// Initializes specialized Monte Carlo particle histograms /// internal function called by init only in case of Monte Carlo truth /// \tparam T type of the axis Object - /// \param folderName base path of the directory in the output file, in which to store the histograms - /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) - /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots + /// \param folderName base path of the directory in the output file, in which + /// to store the histograms + /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in + /// case of tracks, CPA in case of V0s, etc.) + /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. + /// tempFitVar plots /// \param tempFitVarAxis axis object for the tempFitVar axis template - void init_MC(std::string folderName, std::string /*tempFitVarAxisTitle*/, T& tempFitVarpTAxis, T& tempFitVarAxis, bool isDebug) // o2-linter: disable=name/function-variable + void init_MC(std::string folderName, std::string /*tempFitVarAxisTitle*/, + T& tempFitVarpTAxis, T& tempFitVarAxis, + bool isDebug) // o2-linter: disable=name/function-variable { /// Particle-type specific histograms - std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]).c_str(); + std::string folderSuffix = + static_cast( + o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + .c_str(); - mHistogramRegistry->add((folderName + folderSuffix + "/hPt_ReconNoFake").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {tempFitVarpTAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hPDG").c_str(), "; PDG; Entries", kTH1I, {{6001, -3000, 3000}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hOrigin_MC").c_str(), "; Origin; Entries", kTH1I, {{100, 0, 100}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hNoMCtruthCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hPt_ReconNoFake").c_str(), + "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {tempFitVarpTAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPDG").c_str(), + "; PDG; Entries", kTH1I, {{6001, -3000, 3000}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hOrigin_MC").c_str(), + "; Origin; Entries", kTH1I, {{100, 0, 100}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hNoMCtruthCounter").c_str(), + "; Counter; Entries", kTH1I, {{1, 0, 1}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoMomPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{p}_{truth} - #it{p}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoThetaPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{#theta}_{truth} - #it{#theta}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoPhiPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{#phi}_{truth} - #it{#phi}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTrueRecoMomPart1").c_str(), + "; #it{p}_{reco} (GeV/#it{c}); #it{p}_{truth} - #it{p}_{reco} " + "(GeV/#it{c})", + kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTrueRecoThetaPart1").c_str(), + "; #it{p}_{reco} (GeV/#it{c}); #it{#theta}_{truth} - " + "#it{#theta}_{reco} (GeV/#it{c})", + kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hTrueRecoPhiPart1").c_str(), + "; #it{p}_{reco} (GeV/#it{c}); #it{#phi}_{truth} - #it{#phi}_{reco} " + "(GeV/#it{c})", + kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kTrack || + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0Child || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascadeBachelor || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kMCTruthTrack) { /// Track histograms if (isDebug) { - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Primary").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Daughter").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Material").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_WrongCollision").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Fake").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Else").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_DaughterLambda").c_str(), "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_DaughterSigmaplus").c_str(), "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); - - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Primary").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Material").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Fake").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Else").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hMisidentification").c_str(), "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_Primary").c_str(), + "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_Daughter").c_str(), + "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_Material").c_str(), + "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_WrongCollision") + .c_str(), + "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_Fake").c_str(), + "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_Else").c_str(), + "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_DaughterLambda") + .c_str(), + "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/Debug/hPDGmother_DaughterSigmaplus") + .c_str(), + "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); + + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Primary").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Material").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Fake").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Else").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hMisidentification").c_str(), + "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, + {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); } else { - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Primary").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Material").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Fake").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Else").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hMisidentification").c_str(), "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); - - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Primary").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Material").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Fake").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_Else").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hMisidentification").c_str(), + "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, + {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); + + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add( + (folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {tempFitVarpTAxis, tempFitVarAxis}); } - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0 histograms /// to be implemented - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascade) { /// Cascade histograms /// to be implemented - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kPhi) { // Phi histograms - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kD0) { // D0/D0bar histograms } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " + "object not defined - quitting!"; } } /// Templated function for the initialization of the QA histograms - /// Always calls init_base to initialize the histograms with data/ Monte Carlo reconstructed - /// In case of Monte Carlo, calls init_base again for Monte Carlo truth and the specialized function init_MC for additional Monte Carlo histogramms + /// Always calls init_base to initialize the histograms with data/ Monte Carlo + /// reconstructed In case of Monte Carlo, calls init_base again for Monte + /// Carlo truth and the specialized function init_MC for additional Monte + /// Carlo histogramms /// \tparam T type of the axis binning /// \param registry Histogram registry to be passed /// \param tempFitVarpTBins binning of the pT axis in the pT vs. tempFitVar - /// \param tempFitVarBins binning of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) + /// \param tempFitVarBins binning of the tempFitVar (DCA_xy in case of tracks, + /// CPA in case of V0s, etc.) /// \param isMC add Monte Carlo truth histograms to the output file template - void init(HistogramRegistry* registry, T& tempFitVarpTBins, T& tempFitVarBins, bool isMC, int pdgCode, bool isDebug = false, std::optional flexibleFolder = std::nullopt) + void init(HistogramRegistry* registry, T& tempFitVarpTBins, T& tempFitVarBins, + bool isMC, int pdgCode, bool isDebug = false, + std::optional flexibleFolder = std::nullopt, + bool isFillITSNsigma = false) { mPDG = pdgCode; if (registry) { mHistogramRegistry = registry; - /// The folder names are defined by the type of the object and the suffix (if applicable) + /// The folder names are defined by the type of the object and the suffix + /// (if applicable) std::string tempFitVarAxisTitle; - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor) { + if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kTrack || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kV0Child || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascadeBachelor) { /// Track histograms tempFitVarAxisTitle = "DCA_{xy} (cm)"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kMCTruthTrack) { /// MC Truth Track histograms tempFitVarAxisTitle = "PDG code"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0 histograms tempFitVarAxisTitle = "cos#alpha"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascade) { /// Cascade histograms tempFitVarAxisTitle = "cos#alpha"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kPhi) { // Phi histograms tempFitVarAxisTitle = "#Phi invariant mass"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kD0) { // D0/D0bar histograms tempFitVarAxisTitle = "D^{0}/#bar{D^{0}} invariant mass"; } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " + "object not defined - quitting!"; } - framework::AxisSpec tempFitVarpTAxis = {tempFitVarpTBins, "#it{p}_{T} (GeV/#it{c})"}; // the pT binning may vary - framework::AxisSpec tempFitVarMomAxis = {tempFitVarpTBins, "#it{p} (GeV/#it{c})"}; // the p binning - framework::AxisSpec tempFitVarAxis = {tempFitVarBins, tempFitVarAxisTitle}; + framework::AxisSpec tempFitVarpTAxis = { + tempFitVarpTBins, + "#it{p}_{T} (GeV/#it{c})"}; // the pT binning may vary + framework::AxisSpec tempFitVarMomAxis = { + tempFitVarpTBins, "#it{p} (GeV/#it{c})"}; // the p binning + framework::AxisSpec tempFitVarAxis = {tempFitVarBins, + tempFitVarAxisTitle}; - // std::string folderName = (static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]).c_str() + static_cast(mFolderSuffix[mFolderSuffixType])).c_str(); - std::string folderName = flexibleFolder.value_or((static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + static_cast(mFolderSuffix[mFolderSuffixType]))); + // std::string folderName = + // (static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]).c_str() + // + static_cast(mFolderSuffix[mFolderSuffixType])).c_str(); + std::string folderName = flexibleFolder.value_or(( + static_cast( + o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + + static_cast(mFolderSuffix[mFolderSuffixType]))); // Fill here the actual histogramms by calling init_base and init_MC - init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); + init_base( + folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); if (isDebug) { - init_debug(folderName, tempFitVarMomAxis); + init_debug( + folderName, tempFitVarMomAxis, isFillITSNsigma); } if (isMC) { - init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); - init_MC(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis, isDebug); + init_base( + folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); + init_MC(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, + tempFitVarAxis, isDebug); // init_MC_reso(folderName, tempFitVarAxisTitle, tempFitVarpTAxis); } } } /// Filling of the histograms - /// Called by init both in case of reconstructed data/ Monte Carlo, and for Monte Carlo Truth + /// Called by init both in case of reconstructed data/ Monte Carlo, and for + /// Monte Carlo Truth /// \tparam T Data type of the particle /// \param part Particle - template - void fillQA_base(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable + template + void + fillQA_base(T const& part, + H const& histFolder) // o2-linter: disable=name/function-variable { /// Histograms of the kinematic properties - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPt"), part.pt()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hEta"), part.eta()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPhi"), part.phi()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPhiEta"), part.phi(), part.eta()); + mHistogramRegistry->fill( + histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hPt"), + part.pt()); + mHistogramRegistry->fill( + histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hEta"), + part.eta()); + mHistogramRegistry->fill( + histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hPhi"), + part.phi()); + mHistogramRegistry->fill( + histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hPhiEta"), + part.phi(), part.eta()); - /// particle specific histogramms for the TempFitVar column in FemtoUniverseParticles + /// particle specific histogramms for the TempFitVar column in + /// FemtoUniverseParticles if constexpr (mc == o2::aod::femtouniverse_mc_particle::MCType::kRecon) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType]), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST(o2::aod::femtouniverseparticle::TempFitVarName + [mParticleType]), + part.pt(), part.tempFitVar()); } - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassXi"), part.mLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassOmega"), part.mAntiLambda()); + if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kCascade) { + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassXi"), + part.mLambda()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassOmega"), + part.mAntiLambda()); } } - template - void fillQA_debug(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable + template + void + fillQA_debug(T const& part, + H const& histFolder) // o2-linter: disable=name/function-variable { // Histograms holding further debug information - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hCharge"), part.sign()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindable"), part.tpcNClsFindable()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfound"), part.tpcNClsFound()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedOverFindable"), part.tpcCrossedRowsOverFindableCls()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedRows"), part.tpcNClsCrossedRows()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindableVsCrossed"), part.tpcNClsFindable(), part.tpcNClsCrossedRows()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCshared"), part.tpcNClsShared()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfractionSharedCls"), part.tpcFractionSharedCls()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclusters"), part.itsNCls()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclustersIB"), part.itsNClsInnerBarrel()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCAz"), part.pt(), part.dcaZ()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCA"), part.pt(), std::sqrt(std::pow(part.dcaXY(), 2.) + std::pow(part.dcaZ(), 2.))); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCdEdX"), part.p(), part.tpcSignal()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_el"), part.p(), part.tpcNSigmaEl()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_pi"), part.p(), part.tpcNSigmaPi()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_K"), part.p(), part.tpcNSigmaKa()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_p"), part.p(), part.tpcNSigmaPr()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_d"), part.p(), part.tpcNSigmaDe()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_el"), part.p(), part.tofNSigmaEl()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_pi"), part.p(), part.tofNSigmaPi()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_K"), part.p(), part.tofNSigmaKa()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_p"), part.p(), part.tofNSigmaPr()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_d"), part.p(), part.tofNSigmaDe()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + part.tofNSigmaEl() * part.tofNSigmaEl())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + part.tofNSigmaPi() * part.tofNSigmaPi())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + part.tofNSigmaKa() * part.tofNSigmaKa())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + part.tofNSigmaPr() * part.tofNSigmaPr())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + part.tofNSigmaDe() * part.tofNSigmaDe())); - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambda"), part.mLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambdaVsPt"), part.pt(), part.mLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassAntiLambda"), part.mAntiLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassAntiLambdaVsPt"), part.pt(), part.mAntiLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambdaAntiLambda"), part.mLambda(), part.mAntiLambda()); - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); + if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kTrack || + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0Child || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascadeBachelor || + mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kMCTruthTrack) { + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hCharge"), + part.sign()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCfindable"), + part.tpcNClsFindable()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCfound"), + part.tpcNClsFound()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCcrossedOverFindable"), + part.tpcCrossedRowsOverFindableCls()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCcrossedRows"), + part.tpcNClsCrossedRows()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCfindableVsCrossed"), + part.tpcNClsFindable(), part.tpcNClsCrossedRows()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCshared"), + part.tpcNClsShared()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCfractionSharedCls"), + part.tpcFractionSharedCls()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hITSclusters"), + part.itsNCls()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hITSclustersIB"), + part.itsNClsInnerBarrel()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDCAz"), + part.pt(), part.dcaZ()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDCA"), + part.pt(), + std::sqrt(std::pow(part.dcaXY(), 2.) + std::pow(part.dcaZ(), 2.))); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTPCdEdX"), + part.p(), part.tpcSignal()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTPC_el"), + part.p(), part.tpcNSigmaEl()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTPC_pi"), + part.p(), part.tpcNSigmaPi()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTPC_K"), + part.p(), part.tpcNSigmaKa()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTPC_p"), + part.p(), part.tpcNSigmaPr()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTPC_d"), + part.p(), part.tpcNSigmaDe()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTOF_el"), + part.p(), part.tofNSigmaEl()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTOF_pi"), + part.p(), part.tofNSigmaPi()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTOF_K"), + part.p(), part.tofNSigmaKa()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTOF_p"), + part.p(), part.tofNSigmaPr()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaTOF_d"), + part.p(), part.tofNSigmaDe()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaComb_el"), + part.p(), + std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + + part.tofNSigmaEl() * part.tofNSigmaEl())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaComb_pi"), + part.p(), + std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + + part.tofNSigmaPi() * part.tofNSigmaPi())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaComb_K"), + part.p(), + std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + + part.tofNSigmaKa() * part.tofNSigmaKa())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaComb_p"), + part.p(), + std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + + part.tofNSigmaPr() * part.tofNSigmaPr())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaComb_d"), + part.p(), + std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + + part.tofNSigmaDe() * part.tofNSigmaDe())); + /*if (isFillITSNsigma) { + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaITS_el"), part.p(), part.itsNSigmaEl()); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaITS_pi"), part.p(), part.itsNSigmaPi()); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaITS_K"), part.p(), part.itsSigmaKa()); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaITS_p"), part.p(), part.itsSigmaPr()); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaITS_d"), part.p(), part.itsSigmaDe()); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaCombITSTPC_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * + part.tpcNSigmaEl() + part.itsNSigmaEl() * part.itsNSigmaEl())); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaCombITSTPC_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * + part.tpcNSigmaPi() + part.itsNSigmaPi() * part.itsNSigmaPi())); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaCombITSTPC_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * + part.tpcNSigmaKa() + part.itsNSigmaKa() * part.itsNSigmaKa())); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaCombITSTPC_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * + part.tpcNSigmaPr() + part.itsNSigmaPr() * part.itsNSigmaPr())); + mHistogramRegistry->fill(histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/nSigmaCombITSTPC_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * + part.tpcNSigmaDe() + part.itsNSigmaDe() * part.itsNSigmaDe())); + }*/ + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0) { + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDaughDCA"), + part.daughDCA()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTransRadius"), + part.transRadius()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDecayVtxX"), + part.decayVtxX()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDecayVtxY"), + part.decayVtxY()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDecayVtxZ"), + part.decayVtxZ()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassLambda"), + part.mLambda()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassLambdaVsPt"), + part.pt(), part.mLambda()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassAntiLambda"), + part.mAntiLambda()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassAntiLambdaVsPt"), + part.pt(), part.mAntiLambda()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hInvMassLambdaAntiLambda"), + part.mLambda(), part.mAntiLambda()); + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascade) { + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDaughDCA"), + part.daughDCA()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hTransRadius"), + part.transRadius()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDecayVtxX"), + part.decayVtxX()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDecayVtxY"), + part.decayVtxY()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + + HIST("/hDecayVtxZ"), + part.decayVtxZ()); } } @@ -339,119 +944,196 @@ class FemtoUniverseParticleHisto /// \tparam TMC Data typ of the Monte Carlo Particle /// \param part Particle /// \param mctruthorigin Origin of the associated mc Truth particle - /// \param pdgcode PDG of the associated mc Truth particle associated to the reconstructed particle part + /// \param pdgcode PDG of the associated mc Truth particle associated to the + /// reconstructed particle part template - void fillQA_MC(T const& part, int mctruthorigin, int pdgcode, H const& histFolder) // o2-linter: disable=name/function-variable + void + fillQA_MC(T const& part, int mctruthorigin, int pdgcode, + H const& histFolder) // o2-linter: disable=name/function-variable { if (mHistogramRegistry) { mHistogramRegistry->fill(histFolder + HIST("_MC/hPDG"), pdgcode); - mHistogramRegistry->fill(histFolder + HIST("_MC/hOrigin_MC"), mctruthorigin); + mHistogramRegistry->fill(histFolder + HIST("_MC/hOrigin_MC"), + mctruthorigin); - if (std::abs(pdgcode) == mPDG) { // fill this histogramm only for TRUE protons (independently of their origin) for the track purity estimation - mHistogramRegistry->fill(histFolder + HIST("_MC/hPt_ReconNoFake"), part.pt()); + if (std::abs(pdgcode) == + mPDG) { // fill this histogramm only for TRUE protons (independently + // of their origin) for the track purity estimation + mHistogramRegistry->fill(histFolder + HIST("_MC/hPt_ReconNoFake"), + part.pt()); if (part.has_fdMCParticle()) { float part_p = part.pt() * std::cosh(part.eta()); - float part_MC_p = part.fdMCParticle().pt() * std::cosh(part.fdMCParticle().eta()); + float part_MC_p = + part.fdMCParticle().pt() * std::cosh(part.fdMCParticle().eta()); float part_theta = 2.0 * std::atan(std::exp(-part.eta())); - float part_MC_theta = 2.0 * std::atan(std::exp(-part.fdMCParticle().eta())); + float part_MC_theta = + 2.0 * std::atan(std::exp(-part.fdMCParticle().eta())); - mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoMomPart1"), part_p, (part_MC_p - part_p)); - mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoThetaPart1"), part_p, (part_MC_theta - part_theta)); - mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoPhiPart1"), part_p, part.fdMCParticle().phi() - part.phi()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoMomPart1"), + part_p, (part_MC_p - part_p)); + mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoThetaPart1"), + part_p, (part_MC_theta - part_theta)); + mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoPhiPart1"), + part_p, + part.fdMCParticle().phi() - part.phi()); } } - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + if constexpr ( + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kTrack || + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0Child || + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || + mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { if constexpr (isDebug) { switch (mctruthorigin) { case (o2::aod::femtouniverse_mc_particle::kPrimary): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Primary"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_Primary"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughter): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Daughter"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_Daughter"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kMaterial): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Material"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_Material"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kWrongCollision): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_WrongCollision"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_WrongCollision"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_WrongCollision"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_WrongCollision"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kFake): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Fake"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_Fake"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterLambda): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_DaughterLambda"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterLambda"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_DaughterLambda"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_DaughterLambda"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_DaughterSigmaplus"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterSigmaplus"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_DaughterSigmaplus"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_DaughterSigmaplus"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kElse): - // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Else"), part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + + // HIST("_MC/Debug/hPDGmother_Else"), + // part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), + part.pt(), part.tempFitVar()); break; default: - LOGF(info, "femtodreamparticleMC: not known value for ParticleOriginMCTruth --- %d - please check. Quitting!", mctruthorigin); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_NoMCTruthOrigin"), part.pt(), part.tempFitVar()); + LOGF(info, + "femtodreamparticleMC: not known value for " + "ParticleOriginMCTruth --- %d - please check. Quitting!", + mctruthorigin); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_NoMCTruthOrigin"), + part.pt(), part.tempFitVar()); } } else { switch (mctruthorigin) { case (o2::aod::femtouniverse_mc_particle::kPrimary): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughter): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kMaterial): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kWrongCollision): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_WrongCollision"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_WrongCollision"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kFake): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterLambda): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterLambda"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_DaughterLambda"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterSigmaplus"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_DaughterSigmaplus"), + part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kElse): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), + part.pt(), part.tempFitVar()); break; default: - LOGF(info, "femtodreamparticleMC: not known value for ParticleOriginMCTruth --- %d - please check. Quitting!", mctruthorigin); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_NoMCTruthOrigin"), part.pt(), part.tempFitVar()); + LOGF(info, + "femtodreamparticleMC: not known value for " + "ParticleOriginMCTruth --- %d - please check. Quitting!", + mctruthorigin); + mHistogramRegistry->fill(histFolder + + HIST("_MC/hDCAxy_NoMCTruthOrigin"), + part.pt(), part.tempFitVar()); } } - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0 histograms - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: + ParticleType::kCascade) { /// Cascade histograms - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kPhi) { // Phi histograms - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kD0) { // D0/D0bar histograms } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " + "object not defined - quitting!"; } } } template - void fillQA_MC_MisIden(T const& part, int pdgcode, int confPDG, H const& histFolder) // o2-linter: disable=name/function-variable + void fillQA_MC_MisIden( + T const& part, int pdgcode, int confPDG, + H const& histFolder) // o2-linter: disable=name/function-variable { if (mHistogramRegistry) { - if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { + if constexpr (mParticleType == + o2::aod::femtouniverseparticle::ParticleType::kTrack) { if (confPDG == mConfPDGCodePart[0]) { binPDG = 0; } else if (confPDG == mConfPDGCodePart[1]) { @@ -476,20 +1158,26 @@ class FemtoUniverseParticleHisto } } } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " + "object not defined - quitting!"; } } - /// Templated function to fill particle histograms for data/ Monte Carlo reconstructed and Monte Carlo truth - /// Always calls fillQA_base fill histogramms with data/ Monte Carlo reconstructed - /// In case of Monte Carlo, calls fillQA_base with Monte Carlo truth info and specialized function fillQA_MC for additional histogramms + /// Templated function to fill particle histograms for data/ Monte Carlo + /// reconstructed and Monte Carlo truth Always calls fillQA_base fill + /// histogramms with data/ Monte Carlo reconstructed In case of Monte Carlo, + /// calls fillQA_base with Monte Carlo truth info and specialized function + /// fillQA_MC for additional histogramms /// \tparam T particle type /// \tparam isMC fills the additional histograms for Monte Carlo truth /// \param part particle for which the histograms should be filled template void fillQA(T const& part) { - fillQABase(part, HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType])); + fillQABase( + part, + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + + HIST(mFolderSuffix[mFolderSuffixType])); } template @@ -497,31 +1185,127 @@ class FemtoUniverseParticleHisto { std::string tempFitVarName; if (mHistogramRegistry) { - fillQA_base(part, histFolder); + fillQA_base( + part, histFolder); if constexpr (isDebug) { - fillQA_debug(part, histFolder); + fillQA_debug( + part, histFolder); } if constexpr (isMC) { if (part.has_fdMCParticle()) { - fillQA_base(part.fdMCParticle(), histFolder); - fillQA_MC(part, (part.fdMCParticle()).partOriginMCTruth(), (part.fdMCParticle()).pdgMCTruth(), histFolder); + fillQA_base( + part.fdMCParticle(), histFolder); + fillQA_MC(part, (part.fdMCParticle()).partOriginMCTruth(), + (part.fdMCParticle()).pdgMCTruth(), histFolder); } else { - mHistogramRegistry->fill(histFolder + HIST("_MC/hNoMCtruthCounter"), 0); + mHistogramRegistry->fill(histFolder + HIST("_MC/hNoMCtruthCounter"), + 0); } } } } - /// Templated function to fill particle histograms for data/ Monte Carlo reconstructed and Monte Carlo truth - /// Always calls fillQA_base fill histogramms with data/ Monte Carlo reconstructed - /// In case of Monte Carlo, calls fillQA_base with Monte Carlo truth info and specialized function fillQA_MC for additional histogramms + template + void fillQAITSPID(T const& part) + { + fillQABaseITSPID( + part, + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + + HIST(mFolderSuffix[mFolderSuffixType])); + } + + template + void fillQABaseITSPID(T const& part, H const& histFolder) + { + // std::string tempFitVarName; + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaITS_el"), + part.p(), part.itsNSigmaEl()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaITS_pi"), + part.p(), part.itsNSigmaPi()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaITS_K"), + part.p(), part.itsNSigmaKa()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaITS_p"), + part.p(), part.itsNSigmaPr()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaITS_d"), + part.p(), part.itsNSigmaDe()); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaCombITSTPC_el"), + part.p(), + std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + + part.itsNSigmaEl() * part.itsNSigmaEl())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaCombITSTPC_pi"), + part.p(), + std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + + part.itsNSigmaPi() * part.itsNSigmaPi())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaCombITSTPC_K"), + part.p(), + std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + + part.itsNSigmaKa() * part.itsNSigmaKa())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaCombITSTPC_p"), + part.p(), + std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + + part.itsNSigmaPr() * part.itsNSigmaPr())); + mHistogramRegistry->fill( + histFolder + + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName + [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + + HIST("/nSigmaCombITSTPC_d"), + part.p(), + std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + + part.itsNSigmaDe() * part.itsNSigmaDe())); + } + + /// Templated function to fill particle histograms for data/ Monte Carlo + /// reconstructed and Monte Carlo truth Always calls fillQA_base fill + /// histogramms with data/ Monte Carlo reconstructed In case of Monte Carlo, + /// calls fillQA_base with Monte Carlo truth info and specialized function + /// fillQA_MC for additional histogramms /// \tparam T particle type /// \tparam isMC fills the additional histograms for Monte Carlo truth /// \param part particle for which the histograms should be filled template void fillQAMisIden(T const& part, int confPDG) { - fillQABaseMisiden(part, HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]), confPDG); + fillQABaseMisiden( + part, + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + + HIST(mFolderSuffix[mFolderSuffixType]), + confPDG); } template @@ -531,19 +1315,29 @@ class FemtoUniverseParticleHisto if (mHistogramRegistry) { if constexpr (isMC) { if (part.has_fdMCParticle()) { - fillQA_MC_MisIden(part, (part.fdMCParticle()).pdgMCTruth(), confPDG, histFolder); + fillQA_MC_MisIden(part, (part.fdMCParticle()).pdgMCTruth(), confPDG, + histFolder); } } } } private: - HistogramRegistry* mHistogramRegistry; ///< For QA output - static constexpr o2::aod::femtouniverseparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis // o2-linter: disable=name/constexpr-constant - static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below // o2-linter: disable=name/constexpr-constant - static constexpr std::string_view mFolderSuffix[5] = {"", "_one", "_two", "_pos", "_neg"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) // o2-linter: disable=name/constexpr-constant - int mConfPDGCodePart[4] = {211, 321, 2212, 9999}; ///< PDG code as per analysis - int mPDG = 0; ///< PDG code of the selected particle + HistogramRegistry* mHistogramRegistry; ///< For QA output + static constexpr o2::aod::femtouniverseparticle::ParticleType mParticleType = + particleType; ///< Type of the particle under analysis // o2-linter: + ///< disable=name/constexpr-constant + static constexpr int mFolderSuffixType = + suffixType; ///< Counter for the folder suffix specified below // + ///< o2-linter: disable=name/constexpr-constant + static constexpr std::string_view mFolderSuffix[5] = { + "", "_one", "_two", "_pos", + "_neg"}; ///< Suffix for the folder name in case of analyses of pairs of + ///< the same kind (T-T, V-V, C-C) // o2-linter: + ///< disable=name/constexpr-constant + int mConfPDGCodePart[4] = {211, 321, 2212, + 9999}; ///< PDG code as per analysis + int mPDG = 0; ///< PDG code of the selected particle int binPDG = 0; }; } // namespace o2::analysis::femto_universe diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h index 3aee759b29b..41e5e0de7f2 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -23,6 +23,7 @@ #include "Common/Core/TrackSelection.h" #include "Common/Core/TrackSelectionDefaults.h" +#include "Common/DataModel/PIDResponseITS.h" #include "Common/DataModel/PIDResponseTOF.h" #include "Common/DataModel/PIDResponseTPC.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -41,21 +42,22 @@ namespace o2::analysis::femto_universe namespace femto_universe_track_selection { /// The different selections this task is capable of doing -enum TrackSel { kSign, ///< Sign of the track - kpTMin, ///< Min. p_T (GeV/c) - kpTMax, ///< Max. p_T (GeV/c) - kEtaMax, ///< Max. |eta| - kTPCnClsMin, ///< Min. number of TPC clusters - kTPCfClsMin, ///< Min. fraction of crossed rows/findable TPC clusters - kTPCcRowsMin, ///< Min. number of crossed TPC rows - kTPCsClsMax, ///< Max. number of shared TPC clusters - kTPCfracsClsMax, ///< Max. number of fraction of shared TPC clusters - kITSnClsMin, ///< Min. number of ITS clusters - kITSnClsIbMin, ///< Min. number of ITS clusters in the inner barrel - kDCAxyMax, ///< Max. DCA_xy (cm) - kDCAzMax, ///< Max. DCA_z (cm) - kDCAMin, ///< Min. DCA_xyz (cm) - kPIDnSigmaMax ///< Max. |n_sigma| for PID +enum TrackSel { + kSign, ///< Sign of the track + kpTMin, ///< Min. p_T (GeV/c) + kpTMax, ///< Max. p_T (GeV/c) + kEtaMax, ///< Max. |eta| + kTPCnClsMin, ///< Min. number of TPC clusters + kTPCfClsMin, ///< Min. fraction of crossed rows/findable TPC clusters + kTPCcRowsMin, ///< Min. number of crossed TPC rows + kTPCsClsMax, ///< Max. number of shared TPC clusters + kTPCfracsClsMax, ///< Max. number of fraction of shared TPC clusters + kITSnClsMin, ///< Min. number of ITS clusters + kITSnClsIbMin, ///< Min. number of ITS clusters in the inner barrel + kDCAxyMax, ///< Max. DCA_xy (cm) + kDCAzMax, ///< Max. DCA_z (cm) + kDCAMin, ///< Min. DCA_xyz (cm) + kPIDnSigmaMax ///< Max. |n_sigma| for PID }; enum TrackContainerPosition { @@ -67,44 +69,24 @@ enum TrackContainerPosition { /// \class FemtoUniverseTrackCuts /// \brief Cut class to contain and execute all cuts applied to tracks -class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection +class FemtoUniverseTrackSelection + : public FemtoUniverseObjectSelection< + float, femto_universe_track_selection::TrackSel> { public: - FemtoUniverseTrackSelection() : nRejectNotPropagatedTracks(false), - nPtMinSel(0), - nPtMaxSel(0), - nEtaSel(0), - nTPCnMinSel(0), - nTPCfMinSel(0), - nTPCcMinSel(0), - nTPCsMaxSel(0), - nITScMinSel(0), - nITScIbMinSel(0), - nDCAxyMaxSel(0), - nDCAzMaxSel(0), - nDCAMinSel(0), - nPIDnSigmaSel(0), - pTMin(9999999.), - pTMax(-9999999.), - etaMax(-9999999.), - nClsMin(9999999.), - fClsMin(9999999.), - cTPCMin(9999999.), - sTPCMax(-9999999.), - fracsTPCMax(-9999999.), - dcaXYMax(-9999999.), - dcaZMax(-9999999.), - dcaMin(9999999.), - nSigmaPIDMax(9999999.), - nSigmaPIDOffsetTPC(0.), - nSigmaPIDOffsetTOF(0.) {} + FemtoUniverseTrackSelection() + : nRejectNotPropagatedTracks(false), nPtMinSel(0), nPtMaxSel(0), nEtaSel(0), nTPCnMinSel(0), nTPCfMinSel(0), nTPCcMinSel(0), nTPCsMaxSel(0), nITScMinSel(0), nITScIbMinSel(0), nDCAxyMaxSel(0), nDCAzMaxSel(0), nDCAMinSel(0), nPIDnSigmaSel(0), pTMin(9999999.), pTMax(-9999999.), etaMax(-9999999.), nClsMin(9999999.), fClsMin(9999999.), cTPCMin(9999999.), sTPCMax(-9999999.), fracsTPCMax(-9999999.), dcaXYMax(-9999999.), dcaZMax(-9999999.), dcaMin(9999999.), nSigmaPIDMax(9999999.), nSigmaPIDOffsetTPC(0.), nSigmaPIDOffsetTOF(0.) {} /// Initializes histograms for the task /// \tparam part Type of the particle for proper naming of the folders for QA - /// \tparam tracktype Type of track (track, positive child, negative child) for proper naming of the folders for QA - /// \tparam CutContainerType Data type of the bit-wise container for the selections + /// \tparam tracktype Type of track (track, positive child, negative child) + /// for proper naming of the folders for QA + /// \tparam CutContainerType Data type of the bit-wise container for the + /// selections /// \param registry HistogramRegistry for QA output - template + template void init(HistogramRegistry* registry); /// Passes the species to the task for which PID needs to be stored @@ -113,7 +95,8 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection void setPIDSpecies(T& pids) { - std::vector tmpPids = pids; /// necessary due to some features of the configurable + std::vector tmpPids = + pids; /// necessary due to some features of the configurable for (const o2::track::PID pid : tmpPids) { kPIDspecies.push_back(pid); } @@ -135,35 +118,65 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection auto getNsigmaTOF(T const& track, o2::track::PID pid); - /// Checks whether the most open combination of all selection criteria is fulfilled + /// Computes the n_sigma for a track and a particle-type hypothesis in the TOF + /// \tparam T Data type of the track + /// \param track Track for which PID is evaluated + /// \param pid Particle species for which PID is evaluated + /// \return Value of n_{sigma, TOF} + template + auto getNsigmaITS(T const& track, o2::track::PID pid); + + /// Checks whether the most open combination of all selection criteria is + /// fulfilled /// \tparam T Data type of the track /// \param track Track - /// \return Whether the most open combination of all selection criteria is fulfilled + /// \return Whether the most open combination of all selection criteria is + /// fulfilled template bool isSelectedMinimal(T const& track); /// Obtain the bit-wise container for the selections - /// \todo For the moment, PID is separated from the other selections, hence instead of a single value an std::array of size two is returned - /// \tparam CutContainerType Data type of the bit-wise container for the selections + /// \todo For the moment, PID is separated from the other selections, hence + /// instead of a single value an std::array of size two is returned + /// \tparam CutContainerType Data type of the bit-wise container for the + /// selections /// \tparam T Data type of the track /// \param track Track - /// \return The bit-wise container for the selections, separately with all selection criteria, and the PID + /// \return The bit-wise container for the selections, separately with all + /// selection criteria, and the PID template std::array getCutContainer(T const& track); + /// Obtain the bit-wise container for the selections + /// \todo For the moment, PID is separated from the other selections, hence + /// instead of a single value an std::array of size two is returned + /// \tparam CutContainerType Data type of the bit-wise container for the + /// selections + /// \tparam T Data type of the track + /// \param track Track + /// \return The bit-wise container for the selections, separately with all + /// selection criteria, and the PID + template + std::array getCutContainerWithITS(T const& track); + /// Some basic QA histograms /// \tparam part Type of the particle for proper naming of the folders for QA - /// \tparam tracktype Type of track (track, positive child, negative child) for proper naming of the folders for QA + /// \tparam tracktype Type of track (track, positive child, negative child) + /// for proper naming of the folders for QA /// \tparam T Data type of the track /// \param track Track - template + template void fillQA(T const& track); - /// Helper function to obtain the name of a given selection criterion for consistent naming of the configurables + /// Helper function to obtain the name of a given selection criterion for + /// consistent naming of the configurables /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the name of the configurable /// \param suffix Additional suffix for the name of the configurable - static std::string getSelectionName(femto_universe_track_selection::TrackSel iSel, std::string_view prefix = "", std::string_view suffix = "") + static std::string + getSelectionName(femto_universe_track_selection::TrackSel iSel, + std::string_view prefix = "", std::string_view suffix = "") { std::string outString = static_cast(prefix); outString += static_cast(kSelectionNames[iSel]); @@ -171,13 +184,16 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection(prefix) + static_cast(kSelectionNames[index]); + std::string comp = static_cast(prefix) + + static_cast(kSelectionNames[index]); std::string_view cmp{comp}; if (obs.compare(cmp) == 0) return index; @@ -185,27 +201,29 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection(prefix); outString += static_cast(kSelectionHelper[iSel]); return outString; } - float getSigmaPIDMax() - { - return nSigmaPIDMax; - } + float getSigmaPIDMax() { return nSigmaPIDMax; } void setRejectNotPropagatedTracks(bool reject) { @@ -249,101 +267,184 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection kPIDspecies; ///< All the particle species for which the n_sigma values need to be stored + std::vector + kPIDspecies; ///< All the particle species for which the n_sigma values + ///< need to be stored static constexpr int kNtrackSelection = 15; - static constexpr std::string_view kSelectionNames[kNtrackSelection] = {"Sign", - "PtMin", - "PtMax", - "EtaMax", - "TPCnClsMin", - "TPCfClsMin", - "TPCcRowsMin", - "TPCsClsMax", - "TPCfracsClsMax", - "ITSnClsMin", - "ITSnClsIbMin", - "DCAxyMax", - "DCAzMax", - "DCAMin", - "PIDnSigmaMax"}; ///< Name of the different selections - - static constexpr femto_universe_selection::SelectionType kSelectionTypes[kNtrackSelection]{femto_universe_selection::kEqual, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kUpperLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kUpperLimit, - femto_universe_selection::kUpperLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kAbsUpperLimit}; ///< Map to match a variable with its type - - static constexpr std::string_view kSelectionHelper[kNtrackSelection] = {"Sign of the track", - "Minimal pT (GeV/c)", - "Maximal pT (GeV/c)", - "Maximal eta", - "Minimum number of TPC clusters", - "Minimum fraction of crossed rows/findable clusters", - "Minimum number of crossed TPC rows", - "Maximal number of shared TPC cluster", - "Maximal number of fraction of shared TPC cluster", - "Minimum number of ITS clusters", - "Minimum number of ITS clusters in the inner barrel", - "Maximal DCA_xy (cm)", - "Maximal DCA_z (cm)", - "Minimal DCA (cm)", - "Maximal PID (nSigma)"}; ///< Helper information for the different selections + static constexpr std::string_view kSelectionNames[kNtrackSelection] = { + "Sign", "PtMin", "PtMax", "EtaMax", + "TPCnClsMin", "TPCfClsMin", "TPCcRowsMin", "TPCsClsMax", + "TPCfracsClsMax", "ITSnClsMin", "ITSnClsIbMin", "DCAxyMax", + "DCAzMax", "DCAMin", "PIDnSigmaMax"}; ///< Name of the + ///< different selections + + static constexpr femto_universe_selection::SelectionType + kSelectionTypes[kNtrackSelection]{ + femto_universe_selection::kEqual, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kAbsUpperLimit}; ///< Map to match a + ///< variable with its type + + static constexpr std::string_view kSelectionHelper[kNtrackSelection] = { + "Sign of the track", + "Minimal pT (GeV/c)", + "Maximal pT (GeV/c)", + "Maximal eta", + "Minimum number of TPC clusters", + "Minimum fraction of crossed rows/findable clusters", + "Minimum number of crossed TPC rows", + "Maximal number of shared TPC cluster", + "Maximal number of fraction of shared TPC cluster", + "Minimum number of ITS clusters", + "Minimum number of ITS clusters in the inner barrel", + "Maximal DCA_xy (cm)", + "Maximal DCA_z (cm)", + "Minimal DCA (cm)", + "Maximal PID (nSigma)"}; ///< Helper information for the different + ///< selections }; // namespace femto_universe -template +template void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) { if (registry) { mHistogramRegistry = registry; - std::string folderName = static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + "/" + static_cast(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]); + std::string folderName = + static_cast( + o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + "/" + + static_cast( + o2::aod::femtouniverseparticle::TrackTypeName[tracktype]); /// check whether the number of selection exceeds the bitmap size - unsigned int nSelections = getNSelections() - getNSelections(femto_universe_track_selection::kPIDnSigmaMax); + unsigned int nSelections = + getNSelections() - + getNSelections(femto_universe_track_selection::kPIDnSigmaMax); if (nSelections > 8 * sizeof(CutContainerType)) { - LOG(fatal) << "FemtoUniverseTrackCuts: Number of selections too large for your container - quitting!"; + LOG(fatal) << "FemtoUniverseTrackCuts: Number of selections too large " + "for your container - quitting!"; } - mHistogramRegistry->add((folderName + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {{240, 0, 6}}); - mHistogramRegistry->add((folderName + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); - mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", kTH1F, {{200, 0, o2::constants::math::TwoPI}}); - mHistogramRegistry->add((folderName + "/hTPCfindable").c_str(), "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + "/hTPCfound").c_str(), "; TPC found clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + "/hTPCcrossedOverFindalbe").c_str(), "; TPC ratio findable; Entries", kTH1F, {{100, 0.5, 1.5}}); - mHistogramRegistry->add((folderName + "/hTPCcrossedRows").c_str(), "; TPC crossed rows; Entries", kTH1F, {{163, 0, 163}}); - mHistogramRegistry->add((folderName + "/hTPCfindableVsCrossed").c_str(), ";TPC findable clusters ; TPC crossed rows;", kTH2F, {{163, 0, 163}, {163, 0, 163}}); - mHistogramRegistry->add((folderName + "/hTPCshared").c_str(), "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + "/hTPCfractionSharedCls").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 100.0}}); - mHistogramRegistry->add((folderName + "/hITSclusters").c_str(), "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + "/hITSclustersIB").c_str(), "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + "/hDCAxy").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}}); - mHistogramRegistry->add((folderName + "/hDCAz").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}}); - mHistogramRegistry->add((folderName + "/hDCA").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, {{100, 0, 10}, {301, 0., 1.5}}); - mHistogramRegistry->add((folderName + "/hTPCdEdX").c_str(), "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, {{100, 0, 10}, {1000, 0, 1000}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.0255}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/hPt").c_str(), + "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, + {{240, 0, 6}}); + mHistogramRegistry->add((folderName + "/hEta").c_str(), "; #eta; Entries", + kTH1F, {{200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", + kTH1F, {{200, 0, o2::constants::math::TwoPI}}); + mHistogramRegistry->add((folderName + "/hTPCfindable").c_str(), + "; TPC findable clusters; Entries", kTH1F, + {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + "/hTPCfound").c_str(), + "; TPC found clusters; Entries", kTH1F, + {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + "/hTPCcrossedOverFindalbe").c_str(), + "; TPC ratio findable; Entries", kTH1F, + {{100, 0.5, 1.5}}); + mHistogramRegistry->add((folderName + "/hTPCcrossedRows").c_str(), + "; TPC crossed rows; Entries", kTH1F, + {{163, 0, 163}}); + mHistogramRegistry->add((folderName + "/hTPCfindableVsCrossed").c_str(), + ";TPC findable clusters ; TPC crossed rows;", kTH2F, + {{163, 0, 163}, {163, 0, 163}}); + mHistogramRegistry->add((folderName + "/hTPCshared").c_str(), + "; TPC shared clusters; Entries", kTH1F, + {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + "/hTPCfractionSharedCls").c_str(), + "; TPC fraction of shared clusters; Entries", kTH1F, + {{100, 0.0, 100.0}}); + mHistogramRegistry->add((folderName + "/hITSclusters").c_str(), + "; ITS clusters; Entries", kTH1F, + {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + "/hITSclustersIB").c_str(), + "; ITS clusters in IB; Entries", kTH1F, + {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + "/hDCAxy").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, + {{100, 0, 10}, {500, -5, 5}}); + mHistogramRegistry->add((folderName + "/hDCAz").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, + {{100, 0, 10}, {500, -5, 5}}); + mHistogramRegistry->add((folderName + "/hDCA").c_str(), + "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, + {{100, 0, 10}, {301, 0., 1.5}}); + mHistogramRegistry->add((folderName + "/hTPCdEdX").c_str(), + "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, + {{100, 0, 10}, {1000, 0, 1000}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{e}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{#pi}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{K}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{p}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{d}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_el").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_pi").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", + kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_K").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.0255}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_p").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_d").c_str(), + "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, + {{100, 0, 10}, {200, -4.975, 5.025}}); } /// set cuts nPtMinSel = getNSelections(femto_universe_track_selection::kpTMin); @@ -353,7 +454,8 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) nTPCfMinSel = getNSelections(femto_universe_track_selection::kTPCfClsMin); nTPCcMinSel = getNSelections(femto_universe_track_selection::kTPCcRowsMin); nTPCsMaxSel = getNSelections(femto_universe_track_selection::kTPCsClsMax); - nTPCsFracMaxSel = getNSelections(femto_universe_track_selection::kTPCfracsClsMax); + nTPCsFracMaxSel = + getNSelections(femto_universe_track_selection::kTPCfracsClsMax); nITScMinSel = getNSelections(femto_universe_track_selection::kITSnClsMin); nITScIbMinSel = getNSelections(femto_universe_track_selection::kITSnClsIbMin); nDCAxyMaxSel = getNSelections(femto_universe_track_selection::kDCAxyMax); @@ -361,30 +463,49 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) nDCAMinSel = getNSelections(femto_universe_track_selection::kDCAMin); nPIDnSigmaSel = getNSelections(femto_universe_track_selection::kPIDnSigmaMax); - pTMin = getMinimalSelection(femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); - pTMax = getMinimalSelection(femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); - etaMax = getMinimalSelection(femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - nClsMin = getMinimalSelection(femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - fClsMin = getMinimalSelection(femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); - cTPCMin = getMinimalSelection(femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); - sTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); - fracsTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCfracsClsMax, femto_universe_selection::kUpperLimit); - nITSclsMin = getMinimalSelection(femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); - nITSclsIbMin = getMinimalSelection(femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); - dcaXYMax = getMinimalSelection(femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); - dcaZMax = getMinimalSelection(femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); - dcaMin = getMinimalSelection(femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); - nSigmaPIDMax = getMinimalSelection(femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + pTMin = getMinimalSelection(femto_universe_track_selection::kpTMin, + femto_universe_selection::kLowerLimit); + pTMax = getMinimalSelection(femto_universe_track_selection::kpTMax, + femto_universe_selection::kUpperLimit); + etaMax = getMinimalSelection(femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + nClsMin = getMinimalSelection(femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + fClsMin = getMinimalSelection(femto_universe_track_selection::kTPCfClsMin, + femto_universe_selection::kLowerLimit); + cTPCMin = getMinimalSelection(femto_universe_track_selection::kTPCcRowsMin, + femto_universe_selection::kLowerLimit); + sTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCsClsMax, + femto_universe_selection::kUpperLimit); + fracsTPCMax = + getMinimalSelection(femto_universe_track_selection::kTPCfracsClsMax, + femto_universe_selection::kUpperLimit); + nITSclsMin = getMinimalSelection(femto_universe_track_selection::kITSnClsMin, + femto_universe_selection::kLowerLimit); + nITSclsIbMin = + getMinimalSelection(femto_universe_track_selection::kITSnClsIbMin, + femto_universe_selection::kLowerLimit); + dcaXYMax = getMinimalSelection(femto_universe_track_selection::kDCAxyMax, + femto_universe_selection::kAbsUpperLimit); + dcaZMax = getMinimalSelection(femto_universe_track_selection::kDCAzMax, + femto_universe_selection::kAbsUpperLimit); + dcaMin = getMinimalSelection(femto_universe_track_selection::kDCAMin, + femto_universe_selection::kAbsLowerLimit); + nSigmaPIDMax = + getMinimalSelection(femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); } template -auto FemtoUniverseTrackSelection::getNsigmaTPC(T const& track, o2::track::PID pid) +auto FemtoUniverseTrackSelection::getNsigmaTPC(T const& track, + o2::track::PID pid) { return o2::aod::pidutils::tpcNSigma(pid, track); } template -auto FemtoUniverseTrackSelection::getNsigmaTOF(T const& track, o2::track::PID pid) +auto FemtoUniverseTrackSelection::getNsigmaTOF(T const& track, + o2::track::PID pid) { /// skip tracks without TOF signal // if (!track.hasTOF()) { @@ -394,6 +515,25 @@ auto FemtoUniverseTrackSelection::getNsigmaTOF(T const& track, o2::track::PID pi return o2::aod::pidutils::tofNSigma(pid, track); } +template +auto FemtoUniverseTrackSelection::getNsigmaITS(T const& track, + o2::track::PID pid) +{ + if (pid == o2::track::PID::Electron) { + return track.itsNSigmaEl(); + } else if (pid == o2::track::PID::Pion) { + return track.itsNSigmaPi(); + } else if (pid == o2::track::PID::Kaon) { + return track.itsNSigmaKa(); + } else if (pid == o2::track::PID::Proton) { + return track.itsNSigmaPr(); + } else if (pid == o2::track::PID::Deuteron) { + return track.itsNSigmaDe(); + } + // if nothing matched, return default value + return -999.f; +} + template bool FemtoUniverseTrackSelection::isSelectedMinimal(T const& track) { @@ -408,8 +548,10 @@ bool FemtoUniverseTrackSelection::isSelectedMinimal(T const& track) const auto itsNClsIB = track.itsNClsInnerBarrel(); const auto dcaXY = track.dcaXY(); const auto dcaZ = track.dcaZ(); - const auto dca = track.dcaXY(); // Accordingly to FemtoUniverse in AliPhysics as well as LF analysis, - // only dcaXY should be checked; NOT std::sqrt(pow(dcaXY, 2.) + pow(dcaZ, 2.)) + const auto dca = + track.dcaXY(); // Accordingly to FemtoUniverse in AliPhysics as well as + // LF analysis, only dcaXY should be checked; NOT + // std::sqrt(pow(dcaXY, 2.) + pow(dcaZ, 2.)) std::vector pidTPC, pidTOF; for (const auto it : kPIDspecies) { pidTPC.push_back(getNsigmaTPC(track, it)); @@ -475,7 +617,8 @@ bool FemtoUniverseTrackSelection::isSelectedMinimal(T const& track) } template -std::array FemtoUniverseTrackSelection::getCutContainer(T const& track) +std::array + FemtoUniverseTrackSelection::getCutContainer(T const& track) { CutContainerType output = 0; size_t counter = 0; @@ -504,13 +647,110 @@ std::array FemtoUniverseTrackSelection::getCutContainer(T c for (auto& sel : mSelections) { const auto selVariable = sel.getSelectionVariable(); if (selVariable == femto_universe_track_selection::kPIDnSigmaMax) { - /// PID needs to be handled a bit differently since we may need more than one species + /// PID needs to be handled a bit differently since we may need more than + /// one species + for (size_t i = 0; i < kPIDspecies.size(); ++i) { + auto pidTPCVal = pidTPC.at(i) - nSigmaPIDOffsetTPC; + auto pidTOFVal = pidTOF.at(i) - nSigmaPIDOffsetTOF; + auto pidComb = std::sqrt(pidTPCVal * pidTPCVal + pidTOFVal * pidTOFVal); + sel.checkSelectionSetBitPID(pidTPCVal, outputPID); + sel.checkSelectionSetBitPID(pidComb, outputPID); + } + + } else { + /// for the rest it's all the same + switch (selVariable) { + case (femto_universe_track_selection::kSign): + observable = sign; + break; + case (femto_universe_track_selection::kpTMin): + case (femto_universe_track_selection::kpTMax): + observable = pT; + break; + case (femto_universe_track_selection::kEtaMax): + observable = eta; + break; + case (femto_universe_track_selection::kTPCnClsMin): + observable = tpcNClsF; + break; + case (femto_universe_track_selection::kTPCfClsMin): + observable = tpcRClsC; + break; + case (femto_universe_track_selection::kTPCcRowsMin): + observable = tpcNClsC; + break; + case (femto_universe_track_selection::kTPCsClsMax): + observable = tpcNClsS; + break; + case (femto_universe_track_selection::kTPCfracsClsMax): + observable = tpcNClsFracS; + break; + case (femto_universe_track_selection::kITSnClsMin): + observable = itsNCls; + break; + case (femto_universe_track_selection::kITSnClsIbMin): + observable = itsNClsIB; + break; + case (femto_universe_track_selection::kDCAxyMax): + observable = dcaXY; + break; + case (femto_universe_track_selection::kDCAzMax): + observable = dcaZ; + break; + case (femto_universe_track_selection::kDCAMin): + observable = dca; + break; + case (femto_universe_track_selection::kPIDnSigmaMax): + break; + } + sel.checkSelectionSetBit(observable, output, counter); + } + } + return {output, outputPID}; +} + +template +std::array + FemtoUniverseTrackSelection::getCutContainerWithITS(T const& track) +{ + CutContainerType output = 0; + size_t counter = 0; + CutContainerType outputPID = 0; + const auto sign = track.sign(); + const auto pT = track.pt(); + const auto eta = track.eta(); + const auto tpcNClsF = track.tpcNClsFound(); + const auto tpcRClsC = track.tpcCrossedRowsOverFindableCls(); + const auto tpcNClsC = track.tpcNClsCrossedRows(); + const auto tpcNClsS = track.tpcNClsShared(); + const auto tpcNClsFracS = track.tpcFractionSharedCls(); + const auto itsNCls = track.itsNCls(); + const auto itsNClsIB = track.itsNClsInnerBarrel(); + const auto dcaXY = track.dcaXY(); + const auto dcaZ = track.dcaZ(); + const auto dca = std::sqrt(std::pow(dcaXY, 2.) + std::pow(dcaZ, 2.)); + + std::vector pidTPC, pidTOF, pidITS; + for (auto it : kPIDspecies) { + pidTPC.push_back(getNsigmaTPC(track, it)); + pidTOF.push_back(getNsigmaTOF(track, it)); + pidITS.push_back(getNsigmaITS(track, it)); + } + + float observable = 0.; + for (auto& sel : mSelections) { + const auto selVariable = sel.getSelectionVariable(); + if (selVariable == femto_universe_track_selection::kPIDnSigmaMax) { + /// PID needs to be handled a bit differently since we may need more than + /// one species for (size_t i = 0; i < kPIDspecies.size(); ++i) { + auto pidITSVal = pidITS.at(i); auto pidTPCVal = pidTPC.at(i) - nSigmaPIDOffsetTPC; auto pidTOFVal = pidTOF.at(i) - nSigmaPIDOffsetTOF; auto pidComb = std::sqrt(pidTPCVal * pidTPCVal + pidTOFVal * pidTOFVal); sel.checkSelectionSetBitPID(pidTPCVal, outputPID); sel.checkSelectionSetBitPID(pidComb, outputPID); + sel.checkSelectionSetBitPID(pidITSVal, outputPID); } } else { @@ -565,41 +805,208 @@ std::array FemtoUniverseTrackSelection::getCutContainer(T c return {output, outputPID}; } -template +template void FemtoUniverseTrackSelection::fillQA(T const& track) { if (mHistogramRegistry) { - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hPt"), track.pt()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hEta"), track.eta()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hPhi"), track.phi()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfindable"), track.tpcNClsFindable()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfound"), track.tpcNClsFound()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCcrossedOverFindalbe"), track.tpcCrossedRowsOverFindableCls()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCcrossedRows"), track.tpcNClsCrossedRows()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfindableVsCrossed"), track.tpcNClsFindable(), track.tpcNClsCrossedRows()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCshared"), track.tpcNClsShared()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfractionSharedCls"), track.tpcFractionSharedCls()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hITSclusters"), track.itsNCls()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hITSclustersIB"), track.itsNClsInnerBarrel()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hDCAxy"), track.pt(), track.dcaXY()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hDCAz"), track.pt(), track.dcaZ()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hDCA"), track.pt(), std::sqrt(std::pow(track.dcaXY(), 2.) + std::pow(track.dcaZ(), 2.))); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCdEdX"), track.p(), track.tpcSignal()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_el"), track.p(), track.tpcNSigmaEl()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_pi"), track.p(), track.tpcNSigmaPi()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_K"), track.p(), track.tpcNSigmaKa()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_p"), track.p(), track.tpcNSigmaPr()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_d"), track.p(), track.tpcNSigmaDe()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_el"), track.p(), track.tofNSigmaEl()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_pi"), track.p(), track.tofNSigmaPi()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_K"), track.p(), track.tofNSigmaKa()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_p"), track.p(), track.tofNSigmaPr()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_d"), track.p(), track.tofNSigmaDe()); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_el"), track.p(), std::sqrt(track.tpcNSigmaEl() * track.tpcNSigmaEl() + track.tofNSigmaEl() * track.tofNSigmaEl())); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_pi"), track.p(), std::sqrt(track.tpcNSigmaPi() * track.tpcNSigmaPi() + track.tofNSigmaPi() * track.tofNSigmaPi())); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_K"), track.p(), std::sqrt(track.tpcNSigmaKa() * track.tpcNSigmaKa() + track.tofNSigmaKa() * track.tofNSigmaKa())); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_p"), track.p(), std::sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + track.tofNSigmaPr() * track.tofNSigmaPr())); - mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_d"), track.p(), std::sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + track.tofNSigmaDe() * track.tofNSigmaDe())); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hPt"), + track.pt()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hEta"), + track.eta()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hPhi"), + track.phi()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCfindable"), + track.tpcNClsFindable()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCfound"), + track.tpcNClsFound()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCcrossedOverFindalbe"), + track.tpcCrossedRowsOverFindableCls()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCcrossedRows"), + track.tpcNClsCrossedRows()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCfindableVsCrossed"), + track.tpcNClsFindable(), track.tpcNClsCrossedRows()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCshared"), + track.tpcNClsShared()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCfractionSharedCls"), + track.tpcFractionSharedCls()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hITSclusters"), + track.itsNCls()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hITSclustersIB"), + track.itsNClsInnerBarrel()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hDCAxy"), + track.pt(), track.dcaXY()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hDCAz"), + track.pt(), track.dcaZ()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hDCA"), + track.pt(), + std::sqrt(std::pow(track.dcaXY(), 2.) + std::pow(track.dcaZ(), 2.))); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/hTPCdEdX"), + track.p(), track.tpcSignal()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTPC_el"), + track.p(), track.tpcNSigmaEl()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTPC_pi"), + track.p(), track.tpcNSigmaPi()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTPC_K"), + track.p(), track.tpcNSigmaKa()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTPC_p"), + track.p(), track.tpcNSigmaPr()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTPC_d"), + track.p(), track.tpcNSigmaDe()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTOF_el"), + track.p(), track.tofNSigmaEl()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTOF_pi"), + track.p(), track.tofNSigmaPi()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTOF_K"), + track.p(), track.tofNSigmaKa()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTOF_p"), + track.p(), track.tofNSigmaPr()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaTOF_d"), + track.p(), track.tofNSigmaDe()); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaComb_el"), + track.p(), + std::sqrt(track.tpcNSigmaEl() * track.tpcNSigmaEl() + + track.tofNSigmaEl() * track.tofNSigmaEl())); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaComb_pi"), + track.p(), + std::sqrt(track.tpcNSigmaPi() * track.tpcNSigmaPi() + + track.tofNSigmaPi() * track.tofNSigmaPi())); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaComb_K"), + track.p(), + std::sqrt(track.tpcNSigmaKa() * track.tpcNSigmaKa() + + track.tofNSigmaKa() * track.tofNSigmaKa())); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaComb_p"), + track.p(), + std::sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + + track.tofNSigmaPr() * track.tofNSigmaPr())); + mHistogramRegistry->fill( + HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + + HIST("/") + + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + + HIST("/nSigmaComb_d"), + track.p(), + std::sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + + track.tofNSigmaDe() * track.tofNSigmaDe())); } } diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx index d73fc6794e5..77f388a1e01 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -39,6 +39,7 @@ #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponseITS.h" #include "Common/DataModel/PIDResponseTOF.h" #include "Common/DataModel/PIDResponseTPC.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -75,16 +76,31 @@ using namespace o2::constants::physics; namespace o2::aod { -using FemtoFullCollision = soa::Join::iterator; -using FemtoFullCollisionCentPP = soa::Join::iterator; -using FemtoFullCollisionCentRun2 = soa::Join::iterator; -using FemtoFullCollisionCentRun3 = soa::Join::iterator; -using FemtoFullCollisionMC = soa::Join::iterator; -using FemtoFullCollisionCentRun3MCs = soa::Join; -using FemtoFullCollisionCentRun3MC = soa::Join::iterator; -using FemtoFullTracks = soa::Join; +using FemtoFullCollision = + soa::Join::iterator; +using FemtoFullCollisionCentPP = + soa::Join::iterator; +using FemtoFullCollisionCentRun2 = + soa::Join::iterator; +using FemtoFullCollisionCentRun3 = + soa::Join::iterator; +using FemtoFullCollisionMC = soa::Join::iterator; +using FemtoFullCollisionCentRun3MCs = + soa::Join; +using FemtoFullCollisionCentRun3MC = + soa::Join::iterator; +using FemtoFullTracks = + soa::Join; // using FilteredFullV0s = soa::Filtered; /// predefined Join // table for o2::aod::V0s = soa::Join @@ -117,94 +133,266 @@ struct FemtoUniverseProducerTask { Produces outputParts; Produces outputPartsMC; Produces outputDebugParts; + Produces outputDebugITSParts; Produces outputPartsMCLabels; Produces outputDebugPartsMC; Produces outputCascParts; Configurable confIsDebug{"confIsDebug", true, "Enable Debug tables"}; - Configurable confIsUseCutculator{"confIsUseCutculator", true, "Enable cutculator for track cuts"}; + Configurable confFillITSPid{"confFillITSPid", false, + "Fill ITSPid information"}; + Configurable confIsUseCutculator{"confIsUseCutculator", true, + "Enable cutculator for track cuts"}; // Choose if filtering or skimming version is run - // Configurable confIsTrigger{"confIsTrigger", false, "Store all collisions"}; //Commented: not used configurable - // Choose if running on converted data or Run3 / Pilot + // Configurable confIsTrigger{"confIsTrigger", false, "Store all + // collisions"}; //Commented: not used configurable Choose if running on + // converted data or Run3 / Pilot Configurable confIsRun3{"confIsRun3", true, "Running on Run3 or pilot"}; - // Configurable confIsMC{"confIsMC", false, "Running on MC; implemented only for Run3"}; //Commented: not used configurable - - Configurable confIsForceGRP{"confIsForceGRP", false, "Set true if the magnetic field configuration is not available in the usual CCDB directory (e.g. for Run 2 converted data or unanchorad Monte Carlo)"}; - - Configurable confDoSpher{"confDoSpher", false, "Calculate sphericity. If false sphericity will take value of 2."}; - Configurable confStoreMCmothers{"confStoreMCmothers", false, "MC truth: Fill with not only primary particles and store mothers' PDG in tempFitVar."}; - Configurable confFillCollExt{"confFillCollExt", false, "Option to fill collision extended table"}; - - Configurable confCollMCTruthOnlyReco{"confCollMCTruthOnlyReco", false, "Fill only MC truth collisions that were reconstructed and selected"}; - Configurable confFillMCTruthV0Daugh{"confFillMCTruthV0Daugh", true, "Fill MC truth daughters of V0"}; + // Configurable confIsMC{"confIsMC", false, "Running on MC; implemented + // only for Run3"}; //Commented: not used configurable + + Configurable confIsForceGRP{ + "confIsForceGRP", false, + "Set true if the magnetic field configuration is not available in the " + "usual CCDB directory (e.g. for Run 2 converted data or unanchorad Monte " + "Carlo)"}; + + Configurable confDoSpher{ + "confDoSpher", false, + "Calculate sphericity. If false sphericity will take value of 2."}; + Configurable confStoreMCmothers{ + "confStoreMCmothers", false, + "MC truth: Fill with not only primary particles and store mothers' PDG " + "in tempFitVar."}; + Configurable confFillCollExt{"confFillCollExt", false, + "Option to fill collision extended table"}; + + Configurable confCollMCTruthOnlyReco{ + "confCollMCTruthOnlyReco", false, + "Fill only MC truth collisions that were reconstructed and selected"}; + Configurable confFillMCTruthV0Daugh{"confFillMCTruthV0Daugh", true, + "Fill MC truth daughters of V0"}; /// Event filtering (used for v0-cascade analysis) - Configurable zorroMask{"zorroMask", "", "zorro trigger class to select on (empty: none)"}; + Configurable zorroMask{ + "zorroMask", "", "zorro trigger class to select on (empty: none)"}; /// Event cuts FemtoUniverseCollisionSelection colCuts; struct : o2::framework::ConfigurableGroup { - Configurable confEvtUseTPCmult{"confEvtUseTPCmult", false, "Use multiplicity based on the number of tracks with TPC information"}; - Configurable confEvtZvtx{"confEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"}; - Configurable confEvtTriggerCheck{"confEvtTriggerCheck", true, "Evt sel: check for trigger"}; - Configurable confEvtTriggerSel{"confEvtTriggerSel", kINT7, "Evt sel: trigger"}; - Configurable confEvtOfflineCheck{"confEvtOfflineCheck", false, "Evt sel: check for offline selection"}; - Configurable confIsActivateV0{"confIsActivateV0", false, "Activate filling of V0 into femtouniverse tables"}; - Configurable confActivateSecondaries{"confActivateSecondaries", false, "Fill secondary MC gen particles that were reconstructed"}; - Configurable confIsActivateCascade{"confIsActivateCascade", false, "Activate filling of Cascade into femtouniverse tables"}; - Configurable confIsActivatePhi{"confIsActivatePhi", false, "Activate filling of Phi into femtouniverse tables"}; - Configurable confIsActiveD0{"confIsActiveD0", false, "Activate filling FU tables for D0/D0bar mesons"}; - Configurable confMCTruthAnalysisWithPID{"confMCTruthAnalysisWithPID", true, "1: take only particles with specified PDG, 0: all particles (for MC Truth)"}; - Configurable> confMCTruthPDGCodes{"confMCTruthPDGCodes", std::vector{211, -211, 2212, -2212, 333}, "PDG of particles to be stored"}; - Configurable confCentFT0Min{"confCentFT0Min", 0.f, "Min CentFT0 value for centrality selection"}; - Configurable confCentFT0Max{"confCentFT0Max", 200.f, "Max CentFT0 value for centrality selection"}; - Configurable confEvIsGoodZvtxFT0vsPV{"confEvIsGoodZvtxFT0vsPV", true, "Require kIsGoodZvtxFT0vsPV selection on Events."}; - Configurable confEvNoSameBunchPileup{"confEvNoSameBunchPileup", true, "Require kNoSameBunchPileup selection on Events."}; - Configurable confIsUsePileUp{"confIsUsePileUp", true, "Required for choosing whether to run the pile-up cuts"}; - Configurable confEvIsVertexITSTPC{"confEvIsVertexITSTPC", true, "Require kIsVertexITSTPC selection on Events"}; - Configurable confIsGoodITSLayersAll{"confIsGoodITSLayersAll", true, "Require IsGoodITSLayersAll selection on Events."}; - Configurable confNoITSROFrameBorder{"confNoITSROFrameBorder", true, "Require NoITSROFrameBorder selection on Events."}; - Configurable confNoTimeFrameBorder{"confNoTimeFrameBorder", true, "Require kNoTimeFrameBorder selection on Events."}; - Configurable confNoCollInRofStandard{"confNoCollInRofStandard", true, "Require NoCollInRofStandard selection on Events."}; - Configurable confNoHighMultCollInPrevRof{"confNoHighMultCollInPrevRof", true, "Require NoHighMultCollInPrevRof selection on Events."}; - Configurable confNoCollInTimeRangeStandard{"confNoCollInTimeRangeStandard", true, "Require NoCollInTimeRangeStandard selection on Events."}; - Configurable confTPCOccupancyMin{"confTPCOccupancyMin", 0, "Minimum value for TPC Occupancy selection"}; - Configurable confTPCOccupancyMax{"confTPCOccupancyMax", 500, "Maximum value for TPC Occupancy selection"}; - Configurable confIsCent{"confIsCent", true, "Centrality or multiplicity selection"}; + Configurable confEvtUseTPCmult{ + "confEvtUseTPCmult", false, + "Use multiplicity based on the number of tracks with TPC information"}; + Configurable confEvtZvtx{"confEvtZvtx", 10.f, + "Evt sel: Max. z-Vertex (cm)"}; + Configurable confEvtTriggerCheck{"confEvtTriggerCheck", true, + "Evt sel: check for trigger"}; + Configurable confEvtTriggerSel{"confEvtTriggerSel", kINT7, + "Evt sel: trigger"}; + Configurable confEvtOfflineCheck{ + "confEvtOfflineCheck", false, "Evt sel: check for offline selection"}; + Configurable confIsActivateV0{ + "confIsActivateV0", false, + "Activate filling of V0 into femtouniverse tables"}; + Configurable confActivateSecondaries{ + "confActivateSecondaries", false, + "Fill secondary MC gen particles that were reconstructed"}; + Configurable confIsActivateCascade{ + "confIsActivateCascade", false, + "Activate filling of Cascade into femtouniverse tables"}; + Configurable confIsActivatePhi{ + "confIsActivatePhi", false, + "Activate filling of Phi into femtouniverse tables"}; + Configurable confIsActiveD0{ + "confIsActiveD0", false, + "Activate filling FU tables for D0/D0bar mesons"}; + Configurable confMCTruthAnalysisWithPID{ + "confMCTruthAnalysisWithPID", true, + "1: take only particles with specified PDG, 0: all particles (for MC " + "Truth)"}; + Configurable> confMCTruthPDGCodes{ + "confMCTruthPDGCodes", std::vector{211, -211, 2212, -2212, 333}, + "PDG of particles to be stored"}; + Configurable confCentFT0Min{ + "confCentFT0Min", 0.f, "Min CentFT0 value for centrality selection"}; + Configurable confCentFT0Max{ + "confCentFT0Max", 200.f, "Max CentFT0 value for centrality selection"}; + Configurable confEvIsGoodZvtxFT0vsPV{ + "confEvIsGoodZvtxFT0vsPV", true, + "Require kIsGoodZvtxFT0vsPV selection on Events."}; + Configurable confEvNoSameBunchPileup{ + "confEvNoSameBunchPileup", true, + "Require kNoSameBunchPileup selection on Events."}; + Configurable confIsUsePileUp{ + "confIsUsePileUp", true, + "Required for choosing whether to run the pile-up cuts"}; + Configurable confEvIsVertexITSTPC{ + "confEvIsVertexITSTPC", true, + "Require kIsVertexITSTPC selection on Events"}; + Configurable confIsGoodITSLayersAll{ + "confIsGoodITSLayersAll", true, + "Require IsGoodITSLayersAll selection on Events."}; + Configurable confNoITSROFrameBorder{ + "confNoITSROFrameBorder", true, + "Require NoITSROFrameBorder selection on Events."}; + Configurable confNoTimeFrameBorder{ + "confNoTimeFrameBorder", true, + "Require kNoTimeFrameBorder selection on Events."}; + Configurable confNoCollInRofStandard{ + "confNoCollInRofStandard", true, + "Require NoCollInRofStandard selection on Events."}; + Configurable confNoHighMultCollInPrevRof{ + "confNoHighMultCollInPrevRof", true, + "Require NoHighMultCollInPrevRof selection on Events."}; + Configurable confNoCollInTimeRangeStandard{ + "confNoCollInTimeRangeStandard", true, + "Require NoCollInTimeRangeStandard selection on Events."}; + Configurable confTPCOccupancyMin{ + "confTPCOccupancyMin", 0, "Minimum value for TPC Occupancy selection"}; + Configurable confTPCOccupancyMax{ + "confTPCOccupancyMax", 500, + "Maximum value for TPC Occupancy selection"}; + Configurable confIsCent{"confIsCent", true, + "Centrality or multiplicity selection"}; } ConfGeneral; - Filter customCollCentFilter = (aod::cent::centFT0C > ConfGeneral.confCentFT0Min) && - (aod::cent::centFT0C < ConfGeneral.confCentFT0Max); + Filter customCollCentFilter = + (aod::cent::centFT0C > ConfGeneral.confCentFT0Min) && + (aod::cent::centFT0C < ConfGeneral.confCentFT0Max); // just sanity check to make sure in case there are problems in conversion or // MC production it does not affect results - Configurable confTrkRejectNotPropagated{"confTrkRejectNotPropagated", false, "True: reject not propagated tracks"}; + Configurable confTrkRejectNotPropagated{ + "confTrkRejectNotPropagated", false, + "True: reject not propagated tracks"}; // Configurable ConfRejectITSHitandTOFMissing{ // "ConfRejectITSHitandTOFMissing", false, // "True: reject if neither ITS hit nor TOF timing satisfied"}; FemtoUniverseTrackSelection trackCuts; struct : o2::framework::ConfigurableGroup { - Configurable> confTrkCharge{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kSign, "ConfTrk"), std::vector{-1, 1}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kSign, "Track selection: ")}; - Configurable> confTrkPtmin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMin, "ConfTrk"), std::vector{0.5f, 0.4f, 0.6f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMin, "Track selection: ")}; - Configurable> confTrkPtmax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMax, "ConfTrk"), std::vector{5.4f, 5.6f, 5.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMax, "Track selection: ")}; - Configurable> confTrkEta{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kEtaMax, "ConfTrk"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kEtaMax, "Track selection: ")}; - Configurable> confTrkTPCnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCnClsMin, "ConfTrk"), std::vector{70.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCnClsMin, "Track selection: ")}; - Configurable> confTrkTPCfCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCfClsMin, "ConfTrk"), std::vector{0.83f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCfClsMin, "Track selection: ")}; - Configurable> confTrkTPCcRowsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCcRowsMin, "ConfTrk"), std::vector{70.f, 60.f, 80.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCcRowsMin, "Track selection: ")}; - Configurable> confTrkTPCsCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCsClsMax, "Track selection: ")}; - Configurable> confTrkTPCfracsCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCfracsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCfracsClsMax, "Track selection: ")}; - Configurable> confTrkITSnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsMin, "ConfTrk"), std::vector{-1.f, 2.f, 4.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsMin, "Track selection: ")}; - Configurable> confTrkITSnclsIbMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsIbMin, "ConfTrk"), std::vector{-1.f, 1.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsIbMin, "Track selection: ")}; - Configurable> confTrkDCAxyMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAxyMax, "ConfTrk"), std::vector{0.1f, 3.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAxyMax, "Track selection: ")}; - Configurable> confTrkDCAzMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAzMax, "ConfTrk"), std::vector{0.2f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAzMax, "Track selection: ")}; /// \todo Reintegrate PID to the general selection container - Configurable> confTrkPIDnSigmaMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kPIDnSigmaMax, "ConfTrk"), std::vector{3.5f, 3.f, 2.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kPIDnSigmaMax, "Track selection: ")}; - Configurable> confTrkPIDspecies{"confTrkPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton, o2::track::PID::Deuteron}, "Trk sel: Particles species for PID (Pion=2, Kaon=3, Proton=4, Deuteron=5)"}; - Configurable confIsOnlyMCTrack{"confIsOnlyMCTrack", false, "Enable filling of only MC Tracks"}; - // Numbers from ~/alice/O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h //static constexpr ID Pion = 2; static constexpr ID Kaon = 3; static constexpr ID Proton = 4; static constexpr ID Deuteron = 5; + Configurable> confTrkCharge{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kSign, "ConfTrk"), + std::vector{-1, 1}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kSign, "Track selection: ")}; + Configurable> confTrkPtmin{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kpTMin, "ConfTrk"), + std::vector{0.5f, 0.4f, 0.6f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kpTMin, "Track selection: ")}; + Configurable> confTrkPtmax{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kpTMax, "ConfTrk"), + std::vector{5.4f, 5.6f, 5.5f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kpTMax, "Track selection: ")}; + Configurable> confTrkEta{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kEtaMax, "ConfTrk"), + std::vector{0.8f, 0.7f, 0.9f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kEtaMax, "Track selection: ")}; + Configurable> confTrkTPCnclsMin{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kTPCnClsMin, "ConfTrk"), + std::vector{70.f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kTPCnClsMin, "Track selection: ")}; + Configurable> confTrkTPCfCls{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kTPCfClsMin, "ConfTrk"), + std::vector{0.83f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kTPCfClsMin, "Track selection: ")}; + Configurable> confTrkTPCcRowsMin{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kTPCcRowsMin, "ConfTrk"), + std::vector{70.f, 60.f, 80.f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kTPCcRowsMin, "Track selection: ")}; + Configurable> confTrkTPCsCls{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kTPCsClsMax, "ConfTrk"), + std::vector{0.1f, 160.f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kTPCsClsMax, "Track selection: ")}; + Configurable> confTrkTPCfracsCls{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kTPCfracsClsMax, "ConfTrk"), + std::vector{0.1f, 160.f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kTPCfracsClsMax, + "Track selection: ")}; + Configurable> confTrkITSnclsMin{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kITSnClsMin, "ConfTrk"), + std::vector{-1.f, 2.f, 4.f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kITSnClsMin, "Track selection: ")}; + Configurable> confTrkITSnclsIbMin{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kITSnClsIbMin, "ConfTrk"), + std::vector{-1.f, 1.f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kITSnClsIbMin, + "Track selection: ")}; + Configurable> confTrkDCAxyMax{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kDCAxyMax, "ConfTrk"), + std::vector{0.1f, 3.5f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kDCAxyMax, "Track selection: ")}; + Configurable> confTrkDCAzMax{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kDCAzMax, "ConfTrk"), + std::vector{0.2f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kDCAzMax, + "Track selection: ")}; /// \todo Reintegrate PID to the general + /// selection container + Configurable> confTrkPIDnSigmaMax{ + FemtoUniverseTrackSelection::getSelectionName( + femto_universe_track_selection::kPIDnSigmaMax, "ConfTrk"), + std::vector{3.5f, 3.f, 2.5f}, + FemtoUniverseTrackSelection::getSelectionHelper( + femto_universe_track_selection::kPIDnSigmaMax, + "Track selection: ")}; + Configurable> confTrkPIDspecies{ + "confTrkPIDspecies", + std::vector{o2::track::PID::Pion, o2::track::PID::Kaon, + o2::track::PID::Proton, o2::track::PID::Deuteron}, + "Trk sel: Particles species for PID (Pion=2, Kaon=3, Proton=4, " + "Deuteron=5)"}; + Configurable confIsOnlyMCTrack{"confIsOnlyMCTrack", false, + "Enable filling of only MC Tracks"}; + // Numbers from + // ~/alice/O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h + // //static constexpr ID Pion = 2; static constexpr ID Kaon = 3; static + // constexpr ID Proton = 4; static constexpr ID Deuteron = 5; + + Configurable confTrkMinChi2PerClusterTPC{ + "confTrkMinChi2PerClusterTPC", 0.0, + "Lower limit of the Chi2 per TPC Cluster"}; + Configurable confTrkMaxChi2PerClusterTPC{ + "confTrkMaxChi2PerClusterTPC", 100.0, + "Upper limit of the Chi2 per TPC Cluster"}; + Configurable confTrkMaxChi2PerClusterITS{ + "confTrkMaxChi2PerClusterITS", 100.0, + "Upper limit of the Chi2 per ITS Cluster"}; + Configurable confTrkTPCRefit{"confTrkTPCRefit", false, + "Enable TPC refit"}; + Configurable confTrkITSRefit{"confTrkITSRefit", false, + "Enable ITS refit"}; } ConfTrkSelection; - Configurable confTrkPIDnSigmaOffsetTPC{"confTrkPIDnSigmaOffsetTPC", 0., "Offset for TPC nSigma because of bad calibration"}; - Configurable confTrkPIDnSigmaOffsetTOF{"confTrkPIDnSigmaOffsetTOF", 0., "Offset for TOF nSigma because of bad calibration"}; + Configurable confTrkPIDnSigmaOffsetTPC{ + "confTrkPIDnSigmaOffsetTPC", 0., + "Offset for TPC nSigma because of bad calibration"}; + Configurable confTrkPIDnSigmaOffsetTOF{ + "confTrkPIDnSigmaOffsetTOF", 0., + "Offset for TOF nSigma because of bad calibration"}; Configurable confTOFpTmin{"confTOFpTmin", 500, "TOF pT min"}; // TrackSelection *o2PhysicsTrackSelection; @@ -213,144 +401,438 @@ struct FemtoUniverseProducerTask { // V0 FemtoUniverseV0Selection v0Cuts; struct : o2::framework::ConfigurableGroup { - Configurable> confV0Sign{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0Sign, "ConfV0"), std::vector{-1, 1}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0Sign, "V0 selection: ")}; - Configurable> confV0PtMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMin, "ConfV0"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMin, "V0 selection: ")}; - Configurable> confV0PtMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMax, "ConfV0"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMax, "V0 selection: ")}; - Configurable> confV0EtaMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0etaMax, "ConfV0"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0etaMax, "V0 selection: ")}; - Configurable> confV0DCADaughMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0DCADaughMax, "ConfV0"), std::vector{1.2f, 1.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0DCADaughMax, "V0 selection: ")}; - Configurable> confV0CPAMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0CPAMin, "ConfV0"), std::vector{0.99f, 0.995f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0CPAMin, "V0 selection: ")}; - Configurable> confV0TranRadMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0TranRadMin, "ConfV0"), std::vector{0.2f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0TranRadMin, "V0 selection: ")}; - Configurable> confV0TranRadMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0TranRadMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0TranRadMax, "V0 selection: ")}; - Configurable> confV0DecVtxMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0DecVtxMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0DecVtxMax, "V0 selection: ")}; - - Configurable> confChildCharge{"confChildCharge", std::vector{-1, 1}, "V0 Child sel: Charge"}; - Configurable> confChildEtaMax{"confChildEtaMax", std::vector{0.8f}, "V0 Child sel: max eta"}; - Configurable> confChildTPCnClsMin{"confChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, "V0 Child sel: Min. nCls TPC"}; - Configurable> confChildDCAMin{"confChildDCAMin", std::vector{0.05f, 0.06f}, "V0 Child sel: Max. DCA Daugh to PV (cm)"}; - Configurable> confChildPIDnSigmaMax{"confChildPIDnSigmaMax", std::vector{5.f, 4.f}, "V0 Child sel: Max. PID nSigma TPC"}; - Configurable> confChildPIDspecies{"confChildPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, "V0 Child sel: Particles species for PID"}; - - Configurable confV0InvMassLowLimit{"confV0InvMassLowLimit", 1.05, "Lower limit of the V0 invariant mass"}; - Configurable confV0InvMassUpLimit{"confV0InvMassUpLimit", 1.30, "Upper limit of the V0 invariant mass"}; - - Configurable confV0RejectKaons{"confV0RejectKaons", false, "Switch to reject kaons"}; - Configurable confV0InvKaonMassLowLimit{"confV0InvKaonMassLowLimit", 0.48, "Lower limit of the V0 invariant mass for Kaon rejection"}; - Configurable confV0InvKaonMassUpLimit{"confV0InvKaonMassUpLimit", 0.515, "Upper limit of the V0 invariant mass for Kaon rejection"}; - - Configurable> confV0PDGMCTruth{"confV0PDGMCTruth", std::vector{2212, -211, 3122}, "PDG codes of V0 daughters and mother, the order must be as follows -- positive daughter, negative daughter, mother"}; + Configurable> confV0Sign{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0Sign, "ConfV0"), + std::vector{-1, 1}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0Sign, "V0 selection: ")}; + Configurable> confV0PtMin{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0pTMin, "ConfV0"), + std::vector{0.3f, 0.4f, 0.5f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0pTMin, "V0 selection: ")}; + Configurable> confV0PtMax{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0pTMax, "ConfV0"), + std::vector{3.3f, 3.4f, 3.5f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0pTMax, "V0 selection: ")}; + Configurable> confV0EtaMax{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0etaMax, "ConfV0"), + std::vector{0.8f, 0.7f, 0.9f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0etaMax, "V0 selection: ")}; + Configurable> confV0DCADaughMax{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0DCADaughMax, "ConfV0"), + std::vector{1.2f, 1.5f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0DCADaughMax, "V0 selection: ")}; + Configurable> confV0CPAMin{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0CPAMin, "ConfV0"), + std::vector{0.99f, 0.995f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0CPAMin, "V0 selection: ")}; + Configurable> confV0TranRadMin{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0TranRadMin, "ConfV0"), + std::vector{0.2f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0TranRadMin, "V0 selection: ")}; + Configurable> confV0TranRadMax{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0TranRadMax, "ConfV0"), + std::vector{100.f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0TranRadMax, "V0 selection: ")}; + Configurable> confV0DecVtxMax{ + FemtoUniverseV0Selection::getSelectionName( + femto_universe_v0_selection::kV0DecVtxMax, "ConfV0"), + std::vector{100.f}, + FemtoUniverseV0Selection::getSelectionHelper( + femto_universe_v0_selection::kV0DecVtxMax, "V0 selection: ")}; + + Configurable> confChildCharge{ + "confChildCharge", std::vector{-1, 1}, "V0 Child sel: Charge"}; + Configurable> confChildEtaMax{ + "confChildEtaMax", std::vector{0.8f}, "V0 Child sel: max eta"}; + Configurable> confChildTPCnClsMin{ + "confChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, + "V0 Child sel: Min. nCls TPC"}; + Configurable> confChildDCAMin{ + "confChildDCAMin", std::vector{0.05f, 0.06f}, + "V0 Child sel: Max. DCA Daugh to PV (cm)"}; + Configurable> confChildPIDnSigmaMax{ + "confChildPIDnSigmaMax", std::vector{5.f, 4.f}, + "V0 Child sel: Max. PID nSigma TPC"}; + Configurable> confChildPIDspecies{ + "confChildPIDspecies", + std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, + "V0 Child sel: Particles species for PID"}; + + Configurable confV0InvMassLowLimit{ + "confV0InvMassLowLimit", 1.05, "Lower limit of the V0 invariant mass"}; + Configurable confV0InvMassUpLimit{ + "confV0InvMassUpLimit", 1.30, "Upper limit of the V0 invariant mass"}; + + Configurable confV0RejectKaons{"confV0RejectKaons", false, + "Switch to reject kaons"}; + Configurable confV0InvKaonMassLowLimit{ + "confV0InvKaonMassLowLimit", 0.48, + "Lower limit of the V0 invariant mass for Kaon rejection"}; + Configurable confV0InvKaonMassUpLimit{ + "confV0InvKaonMassUpLimit", 0.515, + "Upper limit of the V0 invariant mass for Kaon rejection"}; + + Configurable> confV0PDGMCTruth{ + "confV0PDGMCTruth", std::vector{2212, -211, 3122}, + "PDG codes of V0 daughters and mother, the order must be as follows -- " + "positive daughter, negative daughter, mother"}; } ConfV0Selection; struct : o2::framework::ConfigurableGroup { - Configurable confPtLowFilterCut{"confPtLowFilterCut", 0.14, "Lower limit for Pt for the global track"}; // pT low - Configurable confPtHighFilterCut{"confPtHighFilterCut", 5.0, "Higher limit for Pt for the global track"}; // pT high - Configurable confEtaFilterCut{"confEtaFilterCut", 0.8, "Eta cut for the global track"}; // eta - Configurable confDcaXYCustom1FilterCut{"confDcaXYCustom1FilterCut", 0.0105, "Value for [1] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; - Configurable confDcaXYCustom2FilterCut{"confDcaXYCustom2FilterCut", 0.035, "Value for [2] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; - Configurable confDcaZCustom1FilterCut{"confDcaZCustom1FilterCut", 0.02, "Value for [1] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; - Configurable confDcaZCustom2FilterCut{"confDcaZCustom2FilterCut", 0.0, "Value for [2] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; - Configurable confIsApplyTrkCutMCTruth{"confIsApplyTrkCutMCTruth", false, "Apply eta, pT selection cut on MCTruth tracks "}; - Configurable confIsOnlyPrimary{"confIsOnlyPrimary", false, "Select only primaries"}; + Configurable confPtLowFilterCut{ + "confPtLowFilterCut", 0.14, + "Lower limit for Pt for the global track"}; // pT low + Configurable confPtHighFilterCut{ + "confPtHighFilterCut", 5.0, + "Higher limit for Pt for the global track"}; // pT high + Configurable confEtaFilterCut{"confEtaFilterCut", 0.8, + "Eta cut for the global track"}; // eta + Configurable confDcaXYCustom1FilterCut{ + "confDcaXYCustom1FilterCut", 0.0105, + "Value for [1] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; + Configurable confDcaXYCustom2FilterCut{ + "confDcaXYCustom2FilterCut", 0.035, + "Value for [2] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; + Configurable confDcaZCustom1FilterCut{ + "confDcaZCustom1FilterCut", 0.02, + "Value for [1] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; + Configurable confDcaZCustom2FilterCut{ + "confDcaZCustom2FilterCut", 0.0, + "Value for [2] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; + Configurable confIsApplyTrkCutMCTruth{ + "confIsApplyTrkCutMCTruth", false, + "Apply eta, pT selection cut on MCTruth tracks "}; + Configurable confIsOnlyPrimary{"confIsOnlyPrimary", false, + "Select only primaries"}; } ConfFilterCuts; Filter globalCutFilter = requireGlobalTrackWoDCAInFilter(); - Filter customTrackFilter = (aod::track::pt > ConfFilterCuts.confPtLowFilterCut) && - (aod::track::pt < ConfFilterCuts.confPtHighFilterCut) && - (nabs(aod::track::eta) < ConfFilterCuts.confEtaFilterCut) && - (nabs(aod::track::dcaZ) < (ConfFilterCuts.confDcaZCustom1FilterCut + ConfFilterCuts.confDcaZCustom2FilterCut / aod::track::pt)) && - (nabs(aod::track::dcaXY) < (ConfFilterCuts.confDcaXYCustom1FilterCut + ConfFilterCuts.confDcaXYCustom2FilterCut / aod::track::pt)); + Filter customTrackFilter = + (aod::track::pt > ConfFilterCuts.confPtLowFilterCut) && + (aod::track::pt < ConfFilterCuts.confPtHighFilterCut) && + (nabs(aod::track::eta) < ConfFilterCuts.confEtaFilterCut) && + (nabs(aod::track::dcaZ) < + (ConfFilterCuts.confDcaZCustom1FilterCut + + ConfFilterCuts.confDcaZCustom2FilterCut / aod::track::pt)) && + (nabs(aod::track::dcaXY) < + (ConfFilterCuts.confDcaXYCustom1FilterCut + + ConfFilterCuts.confDcaXYCustom2FilterCut / aod::track::pt)); // CASCADE FemtoUniverseCascadeSelection cascadeCuts; struct : o2::framework::ConfigurableGroup { - Configurable> confCascSign{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeSign, "ConfCasc"), std::vector{-1, 1}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeSign, "Cascade selection: ")}; - Configurable> confCascPtMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadepTMin, "ConfCasc"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadepTMin, "Cascade selection: ")}; - Configurable> confCascPtMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadepTMax, "ConfCasc"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadepTMax, "Cascade selection: ")}; - Configurable> confCascEtaMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeetaMax, "ConfCasc"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeetaMax, "Cascade selection: ")}; - Configurable> confCascV0DCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0DCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0DCADaughMax, "Cascade selection: ")}; - Configurable> confCascV0CPAMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0CPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0CPAMin, "Cascade selection: ")}; - Configurable> confCascV0TranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0TranRadMin, "ConfCasc"), std::vector{0.2f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0TranRadMin, "Cascade selection: ")}; - Configurable> confCascV0TranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0TranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0TranRadMax, "Cascade selection: ")}; - Configurable> confCascV0DecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0DecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0DecVtxMax, "Cascade selection: ")}; - Configurable> confCascDCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCADaughMax, "Cascade selection: ")}; - Configurable> confCascCPAMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeCPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeCPAMin, "Cascade selection: ")}; - Configurable> confCascTranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeTranRadMin, "ConfCasc"), std::vector{0.2f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeTranRadMin, "Cascade selection: ")}; - Configurable> confCascTranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeTranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeTranRadMax, "Cascade selection: ")}; - Configurable> confCascDecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDecVtxMax, "Cascade selection: ")}; - - Configurable> confCascDCAPosToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCAPosToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCAPosToPV, "Cascade selection: ")}; - Configurable> confCascDCANegToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCANegToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCANegToPV, "Cascade selection: ")}; - Configurable> confCascDCABachToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCABachToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCABachToPV, "Cascade selection: ")}; - Configurable> confCascDCAV0ToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCAV0ToPV, "ConfCasc"), std::vector{0.01f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCAV0ToPV, "Cascade selection: ")}; - Configurable> confCascV0MassLowLimit{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0MassMin, "ConfCasc"), std::vector{1.05f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0MassMin, "Cascade selection: ")}; - Configurable> confCascV0MassUpLimit{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0MassMax, "ConfCasc"), std::vector{1.30f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0MassMax, "Cascade selection: ")}; - - Configurable> confCascChildCharge{"confCascChildCharge", std::vector{-1, 1}, "Cascade Child sel: Charge"}; - Configurable> confCascChildEtaMax{"confCascChildEtaMax", std::vector{0.8f}, "Cascade Child sel: max eta"}; - Configurable> confCascChildTPCnClsMin{"confCascChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, "Cascade Child sel: Min. nCls TPC"}; - // Configurable> confCascChildDCAMin{"confCascChildDCAMin", std::vector{0.05f, 0.06f}, "Cascade Child sel: Max. DCA Daugh to PV (cm)"}; //Commented: not used variable - Configurable> confCascChildPIDnSigmaMax{"confCascChildPIDnSigmaMax", std::vector{3.f, 4.f}, "Cascade Child sel: Max. PID nSigma TPC"}; - Configurable> confCascChildPIDspecies{"confCascChildPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, "Cascade Child sel: particle species for PID"}; - - Configurable confXiInvMassLowLimit{"confXiInvMassLowLimit", 1.25, "Lower limit of the Xi invariant mass"}; - Configurable confXiInvMassUpLimit{"confXiInvMassUpLimit", 1.40, "Upper limit of the Xi invariant mass"}; - Configurable confOmegaInvMassLowLimit{"confOmegaInvMassLowLimit", 1.60, "Lower limit of the Omega invariant mass"}; - Configurable confOmegaInvMassUpLimit{"confOmegaInvMassUpLimit", 1.80, "Upper limit of the Omega invariant mass"}; + Configurable> confCascSign{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeSign, "ConfCasc"), + std::vector{-1, 1}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeSign, + "Cascade selection: ")}; + Configurable> confCascPtMin{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadepTMin, "ConfCasc"), + std::vector{0.3f, 0.4f, 0.5f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadepTMin, + "Cascade selection: ")}; + Configurable> confCascPtMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadepTMax, "ConfCasc"), + std::vector{3.3f, 3.4f, 3.5f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadepTMax, + "Cascade selection: ")}; + Configurable> confCascEtaMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeetaMax, "ConfCasc"), + std::vector{0.8f, 0.7f, 0.9f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeetaMax, + "Cascade selection: ")}; + Configurable> confCascV0DCADaughMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0DCADaughMax, + "ConfCasc"), + std::vector{1.f, 1.2f, 1.5f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0DCADaughMax, + "Cascade selection: ")}; + Configurable> confCascV0CPAMin{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0CPAMin, "ConfCasc"), + std::vector{0.99f, 0.95f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0CPAMin, + "Cascade selection: ")}; + Configurable> confCascV0TranRadMin{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0TranRadMin, "ConfCasc"), + std::vector{0.2f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0TranRadMin, + "Cascade selection: ")}; + Configurable> confCascV0TranRadMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0TranRadMax, "ConfCasc"), + std::vector{100.f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0TranRadMax, + "Cascade selection: ")}; + Configurable> confCascV0DecVtxMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0DecVtxMax, "ConfCasc"), + std::vector{100.f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0DecVtxMax, + "Cascade selection: ")}; + Configurable> confCascDCADaughMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeDCADaughMax, "ConfCasc"), + std::vector{1.f, 1.2f, 1.5f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeDCADaughMax, + "Cascade selection: ")}; + Configurable> confCascCPAMin{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeCPAMin, "ConfCasc"), + std::vector{0.99f, 0.95f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeCPAMin, + "Cascade selection: ")}; + Configurable> confCascTranRadMin{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeTranRadMin, "ConfCasc"), + std::vector{0.2f, 0.5f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeTranRadMin, + "Cascade selection: ")}; + Configurable> confCascTranRadMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeTranRadMax, "ConfCasc"), + std::vector{100.f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeTranRadMax, + "Cascade selection: ")}; + Configurable> confCascDecVtxMax{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeDecVtxMax, "ConfCasc"), + std::vector{100.f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeDecVtxMax, + "Cascade selection: ")}; + + Configurable> confCascDCAPosToPV{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeDCAPosToPV, "ConfCasc"), + std::vector{0.1f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeDCAPosToPV, + "Cascade selection: ")}; + Configurable> confCascDCANegToPV{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeDCANegToPV, "ConfCasc"), + std::vector{0.1f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeDCANegToPV, + "Cascade selection: ")}; + Configurable> confCascDCABachToPV{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeDCABachToPV, "ConfCasc"), + std::vector{0.1f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeDCABachToPV, + "Cascade selection: ")}; + Configurable> confCascDCAV0ToPV{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeDCAV0ToPV, "ConfCasc"), + std::vector{0.01f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeDCAV0ToPV, + "Cascade selection: ")}; + Configurable> confCascV0MassLowLimit{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0MassMin, "ConfCasc"), + std::vector{1.05f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0MassMin, + "Cascade selection: ")}; + Configurable> confCascV0MassUpLimit{ + FemtoUniverseCascadeSelection::getSelectionName( + femto_universe_cascade_selection::kCascadeV0MassMax, "ConfCasc"), + std::vector{1.30f}, + FemtoUniverseCascadeSelection::getSelectionHelper( + femto_universe_cascade_selection::kCascadeV0MassMax, + "Cascade selection: ")}; + + Configurable> confCascChildCharge{ + "confCascChildCharge", std::vector{-1, 1}, + "Cascade Child sel: Charge"}; + Configurable> confCascChildEtaMax{ + "confCascChildEtaMax", std::vector{0.8f}, + "Cascade Child sel: max eta"}; + Configurable> confCascChildTPCnClsMin{ + "confCascChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, + "Cascade Child sel: Min. nCls TPC"}; + // Configurable> + // confCascChildDCAMin{"confCascChildDCAMin", std::vector{0.05f, + // 0.06f}, "Cascade Child sel: Max. DCA Daugh to PV (cm)"}; //Commented: + // not used variable + Configurable> confCascChildPIDnSigmaMax{ + "confCascChildPIDnSigmaMax", std::vector{3.f, 4.f}, + "Cascade Child sel: Max. PID nSigma TPC"}; + Configurable> confCascChildPIDspecies{ + "confCascChildPIDspecies", + std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, + "Cascade Child sel: particle species for PID"}; + + Configurable confXiInvMassLowLimit{ + "confXiInvMassLowLimit", 1.25, "Lower limit of the Xi invariant mass"}; + Configurable confXiInvMassUpLimit{ + "confXiInvMassUpLimit", 1.40, "Upper limit of the Xi invariant mass"}; + Configurable confOmegaInvMassLowLimit{ + "confOmegaInvMassLowLimit", 1.60, + "Lower limit of the Omega invariant mass"}; + Configurable confOmegaInvMassUpLimit{ + "confOmegaInvMassUpLimit", 1.80, + "Upper limit of the Omega invariant mass"}; } ConfCascadeSelection; // PHI FemtoUniversePhiSelection phiCuts; struct : o2::framework::ConfigurableGroup { /// Phi meson - Configurable confPhiPtLowLimit{"confPhiPtLowLimit", 0.8, "Lower limit of the Phi pT."}; - Configurable confPhiPtHighLimit{"confPhiPtHighLimit", 4.0, "Higher limit of the Phi pT."}; - Configurable confPhiEtaHighLimit{"confPhiEtaHighLimit", 0.8, "Maximum eta value of the Phi"}; - Configurable confPhiInvMassLowLimit{"confPhiInvMassLowLimit", 1.011, "Lower limit of the Phi invariant mass"}; - Configurable confPhiInvMassUpLimit{"confPhiInvMassUpLimit", 1.027, "Upper limit of the Phi invariant mass"}; + Configurable confPhiPtLowLimit{"confPhiPtLowLimit", 0.8, + "Lower limit of the Phi pT."}; + Configurable confPhiPtHighLimit{"confPhiPtHighLimit", 4.0, + "Higher limit of the Phi pT."}; + Configurable confPhiEtaHighLimit{"confPhiEtaHighLimit", 0.8, + "Maximum eta value of the Phi"}; + Configurable confPhiInvMassLowLimit{ + "confPhiInvMassLowLimit", 1.011, + "Lower limit of the Phi invariant mass"}; + Configurable confPhiInvMassUpLimit{ + "confPhiInvMassUpLimit", 1.027, + "Upper limit of the Phi invariant mass"}; // Phi meson daughters - Configurable confPhiKaonRejectPionNsigma{"confPhiKaonRejectPionNsigma", 3.0, "Reject if particle could be a Pion combined nsigma value."}; - Configurable confPhiKaonRejectProtonNsigma{"confPhiKaonRejectProtonNsigma", 3.0, "Reject if particle could be a Proton combined nsigma value."}; + Configurable confPhiKaonRejectPionNsigma{ + "confPhiKaonRejectPionNsigma", 3.0, + "Reject if particle could be a Pion combined nsigma value."}; + Configurable confPhiKaonRejectProtonNsigma{ + "confPhiKaonRejectProtonNsigma", 3.0, + "Reject if particle could be a Proton combined nsigma value."}; // Kaons - Configurable confPhiDoLFPID4Kaons{"confPhiDoLFPID4Kaons", true, "Switch on do PID for Kaons as in LF"}; - Configurable confNSigmaTPCKaonLF{"confNSigmaTPCKaonLF", 3.0, "TPC Kaon Sigma as in LF"}; - Configurable confNSigmaCombKaonLF{"confNSigmaCombKaonLF", 3.0, "TPC and TOF Kaon Sigma (combined) as in LF"}; - Configurable confMomKaonLF{"confMomKaonLF", 0.5, "Momentum threshold for kaon identification as in LF"}; - Configurable confMomKaonRejected{"confMomKaonRejected", 0.5, "Momentum threshold for rejected kaon"}; - Configurable confMomKaon03{"confMomKaon03", 0.3, "Momentum threshold for kaon identification pT = 0.3 GeV/c"}; - Configurable confMomKaon045{"confMomKaon045", 0.45, "Momentum threshold for kaon identification pT = 0.45 GeV/c"}; - Configurable confMomKaon055{"confMomKaon055", 0.55, "Momentum threshold for kaon identification pT = 0.55 GeV/c"}; - Configurable confMomKaon15{"confMomKaon15", 1.5, "Momentum threshold for kaon identification pT = 1.5 GeV/c"}; - Configurable confPhiKaonNsigmaTPCfrom00to03{"confPhiKaonNsigmaTPCfrom00to03", 3.0, "Reject if Kaons in 0.0-0.3 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom03to045{"confPhiKaonNsigmaTPCfrom03to045", 2.0, "Reject if Kaons in 0.3-0.45 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom045to055{"confPhiKaonNsigmaTPCfrom045to055", 1.0, "Reject if Kaons in 0.45-0.55 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom055to15{"confPhiKaonNsigmaTPCfrom055to15", 3.0, "Reject if Kaons in 0.55-1.5 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTOFfrom055to15{"confPhiKaonNsigmaTOFfrom055to15", 3.0, "Reject if Kaons in 0.55-1.5 are have TOF n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom15{"confPhiKaonNsigmaTPCfrom15", 3.0, "Reject if Kaons above 1.5 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTOFfrom15{"confPhiKaonNsigmaTOFfrom15", 3.0, "Reject if Kaons above 1.5 are have TOF n sigma above this value."}; + Configurable confPhiDoLFPID4Kaons{ + "confPhiDoLFPID4Kaons", true, "Switch on do PID for Kaons as in LF"}; + Configurable confNSigmaTPCKaonLF{"confNSigmaTPCKaonLF", 3.0, + "TPC Kaon Sigma as in LF"}; + Configurable confNSigmaCombKaonLF{ + "confNSigmaCombKaonLF", 3.0, + "TPC and TOF Kaon Sigma (combined) as in LF"}; + Configurable confMomKaonLF{ + "confMomKaonLF", 0.5, + "Momentum threshold for kaon identification as in LF"}; + Configurable confMomKaonRejected{ + "confMomKaonRejected", 0.5, "Momentum threshold for rejected kaon"}; + Configurable confMomKaon03{ + "confMomKaon03", 0.3, + "Momentum threshold for kaon identification pT = 0.3 GeV/c"}; + Configurable confMomKaon045{ + "confMomKaon045", 0.45, + "Momentum threshold for kaon identification pT = 0.45 GeV/c"}; + Configurable confMomKaon055{ + "confMomKaon055", 0.55, + "Momentum threshold for kaon identification pT = 0.55 GeV/c"}; + Configurable confMomKaon15{ + "confMomKaon15", 1.5, + "Momentum threshold for kaon identification pT = 1.5 GeV/c"}; + Configurable confPhiKaonNsigmaTPCfrom00to03{ + "confPhiKaonNsigmaTPCfrom00to03", 3.0, + "Reject if Kaons in 0.0-0.3 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom03to045{ + "confPhiKaonNsigmaTPCfrom03to045", 2.0, + "Reject if Kaons in 0.3-0.45 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom045to055{ + "confPhiKaonNsigmaTPCfrom045to055", 1.0, + "Reject if Kaons in 0.45-0.55 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom055to15{ + "confPhiKaonNsigmaTPCfrom055to15", 3.0, + "Reject if Kaons in 0.55-1.5 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTOFfrom055to15{ + "confPhiKaonNsigmaTOFfrom055to15", 3.0, + "Reject if Kaons in 0.55-1.5 are have TOF n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom15{ + "confPhiKaonNsigmaTPCfrom15", 3.0, + "Reject if Kaons above 1.5 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTOFfrom15{ + "confPhiKaonNsigmaTOFfrom15", 3.0, + "Reject if Kaons above 1.5 are have TOF n sigma above this value."}; } ConfPhiSelection; // PDG codes for fillMCParticle function - Configurable confPDGCodePartOne{"confPDGCodePartOne", 321, "Particle 1 - PDG code"}; - Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 321, "Particle 2 - PDG code"}; + Configurable confPDGCodePartOne{"confPDGCodePartOne", 321, + "Particle 1 - PDG code"}; + Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 321, + "Particle 2 - PDG code"}; // D0/D0bar mesons struct : o2::framework::ConfigurableGroup { - Configurable trackD0CandEtaMax{"trackD0CandEtaMax", 0.8, "max. track/D0 cand. pseudorapidity"}; - Configurable yD0CandGenMax{"yD0CandGenMax", 0.5, "max. gen. D0 cand. rapidity"}; - Configurable yD0CandMax{"yD0CandMax", 0.8, "max. D0 cand. rapidity"}; - Configurable trackD0pTGenMin{"trackD0pTGenMin", 0.0, "MC Truth, min. pT for tracks and D0/D0bar cand."}; - Configurable trackD0pTGenMax{"trackD0pTGenMax", 24.0, "MC Truth, max. pT for tracks and D0/D0bar cand."}; - Configurable useYCutD0Cand{"useYCutD0Cand", true, "True - apply cut on y of D0 cand./false - apply cut on eta"}; - Configurable storeD0D0barDoubleMassHypo{"storeD0D0barDoubleMassHypo", false, "Store D0/D0bar cand. which pass selection criteria for both, D0 and D0bar"}; - Configurable fillCorrBkgsD0{"fillCorrBkgsD0", false, "Flag to fill derived tables with correlated background candidates"}; + Configurable trackD0CandEtaMax{"trackD0CandEtaMax", 0.8, + "max. track/D0 cand. pseudorapidity"}; + Configurable yD0CandGenMax{"yD0CandGenMax", 0.5, + "max. gen. D0 cand. rapidity"}; + Configurable yD0CandMax{"yD0CandMax", 0.8, + "max. D0 cand. rapidity"}; + Configurable trackD0pTGenMin{ + "trackD0pTGenMin", 0.0, + "MC Truth, min. pT for tracks and D0/D0bar cand."}; + Configurable trackD0pTGenMax{ + "trackD0pTGenMax", 24.0, + "MC Truth, max. pT for tracks and D0/D0bar cand."}; + Configurable useYCutD0Cand{ + "useYCutD0Cand", true, + "True - apply cut on y of D0 cand./false - apply cut on eta"}; + Configurable storeD0D0barDoubleMassHypo{ + "storeD0D0barDoubleMassHypo", false, + "Store D0/D0bar cand. which pass selection criteria for both, D0 and " + "D0bar"}; + Configurable fillCorrBkgsD0{ + "fillCorrBkgsD0", false, + "Flag to fill derived tables with correlated background candidates"}; } ConfD0Selection; // PID bitmask configurables struct : o2::framework::ConfigurableGroup { - Configurable confMinMomTOF{"confMinMomTOF", 0.75, "momentum threshold for particle identification using TOF"}; - Configurable confNsigmaTPCParticleChild{"confNsigmaTPCParticleChild", 3.0, "TPC Sigma for particle (daugh & bach) momentum < Confmom"}; - Configurable confNsigmaTOFParticleChild{"confNsigmaTOFParticleChild", 3.0, "TOF Sigma for particle (daugh & bach) momentum > Confmom"}; - Configurable confNsigmaTPCParticle{"confNsigmaTPCParticle", 3.0, "TPC Sigma for particle (track) momentum < Confmom"}; - Configurable confNsigmaCombinedParticle{"confNsigmaCombinedParticle", 3.0, "TPC and TOF Sigma (combined) for particle (track) momentum > Confmom"}; + Configurable confMinMomTOF{ + "confMinMomTOF", 0.75, + "momentum threshold for particle identification using TOF"}; + Configurable confNsigmaTPCParticleChild{ + "confNsigmaTPCParticleChild", 3.0, + "TPC Sigma for particle (daugh & bach) momentum < Confmom"}; + Configurable confNsigmaTOFParticleChild{ + "confNsigmaTOFParticleChild", 3.0, + "TOF Sigma for particle (daugh & bach) momentum > Confmom"}; + Configurable confNsigmaTPCParticle{ + "confNsigmaTPCParticle", 3.0, + "TPC Sigma for particle (track) momentum < Confmom"}; + Configurable confNsigmaCombinedParticle{ + "confNsigmaCombinedParticle", 3.0, + "TPC and TOF Sigma (combined) for particle (track) momentum > Confmom"}; } ConfPIDBitmask; HfHelper hfHelper; @@ -358,25 +840,32 @@ struct FemtoUniverseProducerTask { { if (mom < ConfPhiSelection.confMomKaon03) { // 0.0-0.3 - if (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom00to03) { + if (std::abs(nsigmaTPCK) < + ConfPhiSelection.confPhiKaonNsigmaTPCfrom00to03) { return true; } else { return false; } } else if (mom < ConfPhiSelection.confMomKaon045) { // 0.30 - 0.45 - if (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom03to045) { + if (std::abs(nsigmaTPCK) < + ConfPhiSelection.confPhiKaonNsigmaTPCfrom03to045) { return true; } else { return false; } } else if (mom < ConfPhiSelection.confMomKaon055) { // 0.45-0.55 - if (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom045to055) { + if (std::abs(nsigmaTPCK) < + ConfPhiSelection.confPhiKaonNsigmaTPCfrom045to055) { return true; } else { return false; } - } else if (mom < ConfPhiSelection.confMomKaon15) { // 0.55-1.5 (now we use TPC and TOF) - if ((std::abs(nsigmaTOFK) < ConfPhiSelection.confPhiKaonNsigmaTOFfrom055to15) && (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom055to15)) { + } else if (mom < ConfPhiSelection + .confMomKaon15) { // 0.55-1.5 (now we use TPC and TOF) + if ((std::abs(nsigmaTOFK) < + ConfPhiSelection.confPhiKaonNsigmaTOFfrom055to15) && + (std::abs(nsigmaTPCK) < + ConfPhiSelection.confPhiKaonNsigmaTPCfrom055to15)) { { return true; } @@ -384,7 +873,10 @@ struct FemtoUniverseProducerTask { return false; } } else if (mom > ConfPhiSelection.confMomKaon15) { // 1.5 - - if ((std::abs(nsigmaTOFK) < ConfPhiSelection.confPhiKaonNsigmaTOFfrom15) && (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom15)) { + if ((std::abs(nsigmaTOFK) < + ConfPhiSelection.confPhiKaonNsigmaTOFfrom15) && + (std::abs(nsigmaTPCK) < + ConfPhiSelection.confPhiKaonNsigmaTPCfrom15)) { return true; } else { return false; @@ -394,7 +886,8 @@ struct FemtoUniverseProducerTask { } } - bool isKaonNSigmaLF(float mom, float nsigmaTPCK, float nsigmaTOFK, bool hasTOF) + bool isKaonNSigmaLF(float mom, float nsigmaTPCK, float nsigmaTOFK, + bool hasTOF) { if (mom < ConfPhiSelection.confMomKaonLF) { if (std::abs(nsigmaTPCK) < ConfPhiSelection.confNSigmaTPCKaonLF) { @@ -402,11 +895,13 @@ struct FemtoUniverseProducerTask { } else { return false; } - } else if (mom >= ConfPhiSelection.confMomKaonLF) { // 0.5-1.5 (now we use TPC and TOF) + } else if (mom >= ConfPhiSelection + .confMomKaonLF) { // 0.5-1.5 (now we use TPC and TOF) if (!hasTOF) { return false; } else { - if (std::sqrt(nsigmaTPCK * nsigmaTPCK + nsigmaTOFK * nsigmaTOFK) < ConfPhiSelection.confNSigmaCombKaonLF) { + if (std::sqrt(nsigmaTPCK * nsigmaTPCK + nsigmaTOFK * nsigmaTOFK) < + ConfPhiSelection.confNSigmaCombKaonLF) { return true; } else { return false; @@ -417,19 +912,24 @@ struct FemtoUniverseProducerTask { } } - bool isKaonRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi) + bool isKaonRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, + float nsigmaTPCPi, float nsigmaTOFPi) { if (mom < ConfPhiSelection.confMomKaonRejected) { - if (std::abs(nsigmaTPCPi) < ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { + if (std::abs(nsigmaTPCPi) < + ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { return true; - } else if (std::abs(nsigmaTPCPr) < ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { + } else if (std::abs(nsigmaTPCPr) < + ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { return true; } } if (mom > ConfPhiSelection.confMomKaonRejected) { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { + if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < + ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { return true; - } else if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { + } else if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < + ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { return true; } else { return false; @@ -441,39 +941,48 @@ struct FemtoUniverseProducerTask { bool isNSigmaTPC(float nsigmaTPCParticle) { - return (std::abs(nsigmaTPCParticle) < ConfPIDBitmask.confNsigmaTPCParticleChild); + return (std::abs(nsigmaTPCParticle) < + ConfPIDBitmask.confNsigmaTPCParticleChild); } bool isNSigmaTOF(float mom, float nsigmaTOFParticle, bool hasTOF) { // Cut only on daughter and bachelor tracks, that have TOF signal if (mom > ConfPIDBitmask.confMinMomTOF && hasTOF) { - return (std::abs(nsigmaTOFParticle) < ConfPIDBitmask.confNsigmaTOFParticleChild); + return (std::abs(nsigmaTOFParticle) < + ConfPIDBitmask.confNsigmaTOFParticleChild); } else { return true; } } - bool isNSigmaCombined(float mom, float nsigmaTPCParticle, float nsigmaTOFParticle) + bool isNSigmaCombined(float mom, float nsigmaTPCParticle, + float nsigmaTOFParticle) { if (mom <= ConfPIDBitmask.confMinMomTOF) { - return (std::abs(nsigmaTPCParticle) < ConfPIDBitmask.confNsigmaTPCParticle); + return (std::abs(nsigmaTPCParticle) < + ConfPIDBitmask.confNsigmaTPCParticle); } else { - return (std::hypot(nsigmaTOFParticle, nsigmaTPCParticle) < ConfPIDBitmask.confNsigmaCombinedParticle); + return (std::hypot(nsigmaTOFParticle, nsigmaTPCParticle) < + ConfPIDBitmask.confNsigmaCombinedParticle); } } template - aod::femtouniverseparticle::CutContainerType PIDBitmask(const TrackType& track) + aod::femtouniverseparticle::CutContainerType + PIDBitmask(const TrackType& track) { - static const o2::track::PID pids[] = {o2::track::PID::Proton, o2::track::PID::Pion, o2::track::PID::Kaon}; + static const o2::track::PID pids[] = { + o2::track::PID::Proton, o2::track::PID::Pion, o2::track::PID::Kaon}; aod::femtouniverseparticle::CutContainerType mask = 0u; for (UInt_t i = 0; i < 3; ++i) { if (isNSigmaTPC(trackCuts.getNsigmaTPC(track, pids[i]))) mask |= (1u << i); - if (isNSigmaTOF(track.p(), trackCuts.getNsigmaTOF(track, pids[i]), track.hasTOF())) + if (isNSigmaTOF(track.p(), trackCuts.getNsigmaTOF(track, pids[i]), + track.hasTOF())) mask |= (8u << i); - if (isNSigmaCombined(track.p(), trackCuts.getNsigmaTPC(track, pids[i]), trackCuts.getNsigmaTOF(track, pids[i]))) + if (isNSigmaCombined(track.p(), trackCuts.getNsigmaTPC(track, pids[i]), + trackCuts.getNsigmaTOF(track, pids[i]))) mask |= (64u << i); } if (track.hasTOF()) @@ -486,10 +995,12 @@ struct FemtoUniverseProducerTask { /// bitmask to save strangeness TOF for V0 analysis template - aod::femtouniverseparticle::CutContainerType PIDStrangeTOFBitmaskV0(const V0Type& v0) + aod::femtouniverseparticle::CutContainerType + PIDStrangeTOFBitmaskV0(const V0Type& v0) { aod::femtouniverseparticle::CutContainerType mask = 0u; - if constexpr (std::experimental::is_detected::value) { + if constexpr (std::experimental::is_detected::value) { if (v0.tofNSigmaLaPr() < ConfPIDBitmask.confNsigmaTOFParticleChild) mask |= (1u); if (v0.tofNSigmaLaPi() < ConfPIDBitmask.confNsigmaTOFParticleChild) @@ -511,10 +1022,12 @@ struct FemtoUniverseProducerTask { /// bitmask to save strangeness TOF for cascade analysis template - aod::femtouniverseparticle::CutContainerType PIDStrangeTOFBitmaskCasc(const CascType& casc) + aod::femtouniverseparticle::CutContainerType + PIDStrangeTOFBitmaskCasc(const CascType& casc) { aod::femtouniverseparticle::CutContainerType mask = 0u; - if constexpr (std::experimental::is_detected::value) { + if constexpr (std::experimental::is_detected::value) { if (casc.tofNSigmaXiLaPi() < ConfPIDBitmask.confNsigmaTOFParticleChild) mask |= (1u); if (casc.tofNSigmaXiLaPr() < ConfPIDBitmask.confNsigmaTOFParticleChild) @@ -535,15 +1048,22 @@ struct FemtoUniverseProducerTask { OutputObj zorroSummary{"zorroSummary"}; int mRunNumberZorro = 0; - HistogramRegistry qaRegistry{"QAHistos", {}, OutputObjHandlingPolicy::QAObject}; - HistogramRegistry cascadeQaRegistry{"CascadeQAHistos", {}, OutputObjHandlingPolicy::QAObject}; + HistogramRegistry qaRegistry{ + "QAHistos", + {}, + OutputObjHandlingPolicy::QAObject}; + HistogramRegistry cascadeQaRegistry{ + "CascadeQAHistos", + {}, + OutputObjHandlingPolicy::QAObject}; void initZorro(aod::BCsWithTimestamps::iterator const& bc) { if (mRunNumberZorro == bc.runNumber()) return; - zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), zorroMask.value); + zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), + zorroMask.value); zorro.populateHistRegistry(qaRegistry, bc.runNumber()); mRunNumberZorro = bc.runNumber(); } @@ -562,10 +1082,36 @@ struct FemtoUniverseProducerTask { void init(InitContext&) { - if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || doprocessTrackV0 || doprocessTrackCascadeData || doprocessTrackV0Cascade || doprocessTrackD0mesonData || doprocessTrackD0DataML || doprocessTrackCentRun2Data || doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || doprocessTrackDataCentPP) == false && (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || doprocessTrackMCGen || doprocessTruthAndFullMCV0 || doprocessTrackD0MC || doprocessTruthAndFullMCCasc || doprocessFullMCCent || doprocessTrackCentRun3DataMC || doprocessTruthAndFullMCCentRun3 || doprocessTruthAndFullMCCentRun3V0) == false) { - LOGF(fatal, "Neither processFullData nor processFullMC enabled. Please choose one."); - } - if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || doprocessTrackV0 || doprocessTrackCascadeData || doprocessTrackV0Cascade || doprocessTrackD0mesonData || doprocessTrackD0DataML || doprocessTrackCentRun2Data || doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || doprocessTrackDataCentPP) == true && (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || doprocessTrackMCGen || doprocessTruthAndFullMCV0 || doprocessTrackD0MC || doprocessTruthAndFullMCCasc || doprocessFullMCCent || doprocessTrackCentRun3DataMC || doprocessTruthAndFullMCCentRun3 || doprocessTruthAndFullMCCentRun3V0) == true) { + if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || + doprocessTrackV0 || doprocessTrackCascadeData || + doprocessTrackV0Cascade || doprocessTrackD0mesonData || + doprocessTrackD0DataML || doprocessTrackCentRun2Data || + doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || + doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || + doprocessTrackDataCentPP) == false && + (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || + doprocessTrackMCGen || doprocessTruthAndFullMCV0 || + doprocessTrackD0MC || doprocessTruthAndFullMCCasc || + doprocessFullMCCent || doprocessTrackCentRun3DataMC || + doprocessTruthAndFullMCCentRun3 || + doprocessTruthAndFullMCCentRun3V0) == false) { + LOGF(fatal, + "Neither processFullData nor processFullMC enabled. Please " + "choose one."); + } + if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || + doprocessTrackV0 || doprocessTrackCascadeData || + doprocessTrackV0Cascade || doprocessTrackD0mesonData || + doprocessTrackD0DataML || doprocessTrackCentRun2Data || + doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || + doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || + doprocessTrackDataCentPP) == true && + (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || + doprocessTrackMCGen || doprocessTruthAndFullMCV0 || + doprocessTrackD0MC || doprocessTruthAndFullMCCasc || + doprocessFullMCCent || doprocessTrackCentRun3DataMC || + doprocessTruthAndFullMCCentRun3 || + doprocessTruthAndFullMCCentRun3V0) == true) { LOGF(fatal, "Cannot enable process Data and process MC at the same time. " "Please choose one."); @@ -573,66 +1119,161 @@ struct FemtoUniverseProducerTask { zorroSummary.setObject(zorro.getZorroSummary()); - colCuts.setCuts(ConfGeneral.confEvtZvtx, ConfGeneral.confEvtTriggerCheck, ConfGeneral.confEvtTriggerSel, ConfGeneral.confEvtOfflineCheck, confIsRun3, ConfGeneral.confCentFT0Min, ConfGeneral.confCentFT0Max); + colCuts.setCuts(ConfGeneral.confEvtZvtx, ConfGeneral.confEvtTriggerCheck, + ConfGeneral.confEvtTriggerSel, + ConfGeneral.confEvtOfflineCheck, confIsRun3, + ConfGeneral.confCentFT0Min, ConfGeneral.confCentFT0Max); colCuts.init(&qaRegistry); - trackCuts.setSelection(ConfTrkSelection.confTrkCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); - trackCuts.setSelection(ConfTrkSelection.confTrkPtmin, femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkPtmax, femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkEta, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCnclsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCfCls, femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCcRowsMin, femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCsCls, femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCfracsCls, femto_universe_track_selection::kTPCfracsClsMax, femto_universe_selection::kUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsMin, femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsIbMin, femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkDCAxyMax, femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkDCAzMax, femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + trackCuts.setSelection(ConfTrkSelection.confTrkPtmin, + femto_universe_track_selection::kpTMin, + femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkPtmax, + femto_universe_track_selection::kpTMax, + femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkEta, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCnclsMin, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCfCls, + femto_universe_track_selection::kTPCfClsMin, + femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCcRowsMin, + femto_universe_track_selection::kTPCcRowsMin, + femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCsCls, + femto_universe_track_selection::kTPCsClsMax, + femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCfracsCls, + femto_universe_track_selection::kTPCfracsClsMax, + femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsMin, + femto_universe_track_selection::kITSnClsMin, + femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsIbMin, + femto_universe_track_selection::kITSnClsIbMin, + femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkDCAxyMax, + femto_universe_track_selection::kDCAxyMax, + femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkDCAzMax, + femto_universe_track_selection::kDCAzMax, + femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkPIDnSigmaMax, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); trackCuts.setPIDSpecies(ConfTrkSelection.confTrkPIDspecies); - trackCuts.setnSigmaPIDOffset(confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); - trackCuts.init(&qaRegistry); + trackCuts.setnSigmaPIDOffset(confTrkPIDnSigmaOffsetTPC, + confTrkPIDnSigmaOffsetTOF); + trackCuts.init(&qaRegistry); /// \todo fix how to pass array to setSelection, getRow() passing a /// different type! // v0Cuts.setSelection(ConfV0Selection->getRow(0), - // femto_universe_v0_selection::kDecVtxMax, femto_universe_selection::kAbsUpperLimit); + // femto_universe_v0_selection::kDecVtxMax, + // femto_universe_selection::kAbsUpperLimit); if (ConfGeneral.confIsActivateV0) { // initializing for V0 - v0Cuts.setSelection(ConfV0Selection.confV0Sign, femto_universe_v0_selection::kV0Sign, femto_universe_selection::kEqual); - v0Cuts.setSelection(ConfV0Selection.confV0PtMin, femto_universe_v0_selection::kV0pTMin, femto_universe_selection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0PtMax, femto_universe_v0_selection::kV0pTMax, femto_universe_selection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0EtaMax, femto_universe_v0_selection::kV0etaMax, femto_universe_selection::kAbsUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0DCADaughMax, femto_universe_v0_selection::kV0DCADaughMax, femto_universe_selection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0CPAMin, femto_universe_v0_selection::kV0CPAMin, femto_universe_selection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0TranRadMin, femto_universe_v0_selection::kV0TranRadMin, femto_universe_selection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0TranRadMax, femto_universe_v0_selection::kV0TranRadMax, femto_universe_selection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0DecVtxMax, femto_universe_v0_selection::kV0DecVtxMax, femto_universe_selection::kUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildDCAMin, femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildDCAMin, femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildPIDspecies); - v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildPIDspecies); - v0Cuts.init(&qaRegistry); - v0Cuts.setInvMassLimits(ConfV0Selection.confV0InvMassLowLimit, ConfV0Selection.confV0InvMassUpLimit); - - v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kPosTrack, confTrkRejectNotPropagated); - v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kNegTrack, confTrkRejectNotPropagated); + v0Cuts.setSelection(ConfV0Selection.confV0Sign, + femto_universe_v0_selection::kV0Sign, + femto_universe_selection::kEqual); + v0Cuts.setSelection(ConfV0Selection.confV0PtMin, + femto_universe_v0_selection::kV0pTMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0PtMax, + femto_universe_v0_selection::kV0pTMax, + femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0EtaMax, + femto_universe_v0_selection::kV0etaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0DCADaughMax, + femto_universe_v0_selection::kV0DCADaughMax, + femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0CPAMin, + femto_universe_v0_selection::kV0CPAMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0TranRadMin, + femto_universe_v0_selection::kV0TranRadMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0TranRadMax, + femto_universe_v0_selection::kV0TranRadMax, + femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0DecVtxMax, + femto_universe_v0_selection::kV0DecVtxMax, + femto_universe_selection::kUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, + ConfV0Selection.confChildCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, + ConfV0Selection.confChildEtaMax, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, + ConfV0Selection.confChildTPCnClsMin, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, + ConfV0Selection.confChildDCAMin, + femto_universe_track_selection::kDCAMin, + femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, + ConfV0Selection.confChildPIDnSigmaMax, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, + ConfV0Selection.confChildCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, + ConfV0Selection.confChildEtaMax, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, + ConfV0Selection.confChildTPCnClsMin, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, + ConfV0Selection.confChildDCAMin, + femto_universe_track_selection::kDCAMin, + femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, + ConfV0Selection.confChildPIDnSigmaMax, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kPosTrack, + ConfV0Selection.confChildPIDspecies); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kNegTrack, + ConfV0Selection.confChildPIDspecies); + v0Cuts.init(&qaRegistry); + v0Cuts.setInvMassLimits(ConfV0Selection.confV0InvMassLowLimit, + ConfV0Selection.confV0InvMassUpLimit); + + v0Cuts.setChildRejectNotPropagatedTracks( + femto_universe_v0_selection::kPosTrack, confTrkRejectNotPropagated); + v0Cuts.setChildRejectNotPropagatedTracks( + femto_universe_v0_selection::kNegTrack, confTrkRejectNotPropagated); v0Cuts.setnSigmaPIDOffsetTPC(confTrkPIDnSigmaOffsetTPC); - v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kPosTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); - v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kNegTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); + v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kPosTrack, + confTrkPIDnSigmaOffsetTPC, + confTrkPIDnSigmaOffsetTOF); + v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kNegTrack, + confTrkPIDnSigmaOffsetTPC, + confTrkPIDnSigmaOffsetTOF); if (ConfV0Selection.confV0RejectKaons) { - v0Cuts.setKaonInvMassLimits(ConfV0Selection.confV0InvKaonMassLowLimit, ConfV0Selection.confV0InvKaonMassUpLimit); + v0Cuts.setKaonInvMassLimits(ConfV0Selection.confV0InvKaonMassLowLimit, + ConfV0Selection.confV0InvKaonMassUpLimit); } // if (ConfRejectITSHitandTOFMissing) { // o2PhysicsTrackSelection = new @@ -643,56 +1284,164 @@ struct FemtoUniverseProducerTask { if (ConfGeneral.confIsActivateCascade) { // initializing for cascades - cascadeCuts.setSelection(ConfCascadeSelection.confCascSign, femto_universe_cascade_selection::kCascadeSign, femto_universe_selection::kEqual); - cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMin, femto_universe_cascade_selection::kCascadepTMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMax, femto_universe_cascade_selection::kCascadepTMax, femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascEtaMax, femto_universe_cascade_selection::kCascadeetaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascSign, + femto_universe_cascade_selection::kCascadeSign, + femto_universe_selection::kEqual); + cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMin, + femto_universe_cascade_selection::kCascadepTMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMax, + femto_universe_cascade_selection::kCascadepTMax, + femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascEtaMax, + femto_universe_cascade_selection::kCascadeetaMax, + femto_universe_selection::kAbsUpperLimit); // v0 child cuts - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DCADaughMax, femto_universe_cascade_selection::kCascadeV0DCADaughMax, femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0CPAMin, femto_universe_cascade_selection::kCascadeV0CPAMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMin, femto_universe_cascade_selection::kCascadeV0TranRadMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMax, femto_universe_cascade_selection::kCascadeV0TranRadMax, femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DecVtxMax, femto_universe_cascade_selection::kCascadeV0DecVtxMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0DCADaughMax, + femto_universe_cascade_selection::kCascadeV0DCADaughMax, + femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0CPAMin, + femto_universe_cascade_selection::kCascadeV0CPAMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0TranRadMin, + femto_universe_cascade_selection::kCascadeV0TranRadMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0TranRadMax, + femto_universe_cascade_selection::kCascadeV0TranRadMax, + femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0DecVtxMax, + femto_universe_cascade_selection::kCascadeV0DecVtxMax, + femto_universe_selection::kUpperLimit); // cascade cuts - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCADaughMax, femto_universe_cascade_selection::kCascadeDCADaughMax, femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascCPAMin, femto_universe_cascade_selection::kCascadeCPAMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMin, femto_universe_cascade_selection::kCascadeTranRadMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMax, femto_universe_cascade_selection::kCascadeTranRadMax, femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDecVtxMax, femto_universe_cascade_selection::kCascadeDecVtxMax, femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAPosToPV, femto_universe_cascade_selection::kCascadeDCAPosToPV, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCANegToPV, femto_universe_cascade_selection::kCascadeDCANegToPV, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCABachToPV, femto_universe_cascade_selection::kCascadeDCABachToPV, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAV0ToPV, femto_universe_cascade_selection::kCascadeDCAV0ToPV, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassLowLimit, femto_universe_cascade_selection::kCascadeV0MassMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassUpLimit, femto_universe_cascade_selection::kCascadeV0MassMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascDCADaughMax, + femto_universe_cascade_selection::kCascadeDCADaughMax, + femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascCPAMin, + femto_universe_cascade_selection::kCascadeCPAMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascTranRadMin, + femto_universe_cascade_selection::kCascadeTranRadMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascTranRadMax, + femto_universe_cascade_selection::kCascadeTranRadMax, + femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascDecVtxMax, + femto_universe_cascade_selection::kCascadeDecVtxMax, + femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascDCAPosToPV, + femto_universe_cascade_selection::kCascadeDCAPosToPV, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascDCANegToPV, + femto_universe_cascade_selection::kCascadeDCANegToPV, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascDCABachToPV, + femto_universe_cascade_selection::kCascadeDCABachToPV, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascDCAV0ToPV, + femto_universe_cascade_selection::kCascadeDCAV0ToPV, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0MassLowLimit, + femto_universe_cascade_selection::kCascadeV0MassMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection( + ConfCascadeSelection.confCascV0MassUpLimit, + femto_universe_cascade_selection::kCascadeV0MassMax, + femto_universe_selection::kUpperLimit); // children cuts - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, + ConfCascadeSelection.confCascChildCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, + ConfCascadeSelection.confCascChildEtaMax, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, + ConfCascadeSelection.confCascChildTPCnClsMin, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, + ConfCascadeSelection.confCascChildPIDnSigmaMax, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, + ConfCascadeSelection.confCascChildCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, + ConfCascadeSelection.confCascChildEtaMax, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, + ConfCascadeSelection.confCascChildTPCnClsMin, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, + ConfCascadeSelection.confCascChildPIDnSigmaMax, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, + ConfCascadeSelection.confCascChildCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, + ConfCascadeSelection.confCascChildEtaMax, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, + ConfCascadeSelection.confCascChildTPCnClsMin, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, + ConfCascadeSelection.confCascChildPIDnSigmaMax, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); // TODO - cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kPosTrack, ConfV0Selection.confChildPIDspecies); - cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kNegTrack, ConfV0Selection.confChildPIDspecies); - cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildPIDspecies); + cascadeCuts.setChildPIDSpecies( + femto_universe_cascade_selection::kPosTrack, + ConfV0Selection.confChildPIDspecies); + cascadeCuts.setChildPIDSpecies( + femto_universe_cascade_selection::kNegTrack, + ConfV0Selection.confChildPIDspecies); + cascadeCuts.setChildPIDSpecies( + femto_universe_cascade_selection::kBachTrack, + ConfCascadeSelection.confCascChildPIDspecies); // check if works correctly for bachelor track - cascadeCuts.init(&cascadeQaRegistry); + cascadeCuts + .init( + &cascadeQaRegistry); // invmass cuts - cascadeCuts.setInvMassLimits(ConfCascadeSelection.confXiInvMassLowLimit, ConfCascadeSelection.confOmegaInvMassLowLimit, ConfCascadeSelection.confXiInvMassUpLimit, ConfCascadeSelection.confOmegaInvMassUpLimit); + cascadeCuts.setInvMassLimits( + ConfCascadeSelection.confXiInvMassLowLimit, + ConfCascadeSelection.confOmegaInvMassLowLimit, + ConfCascadeSelection.confXiInvMassUpLimit, + ConfCascadeSelection.confOmegaInvMassUpLimit); } if (ConfGeneral.confIsActivatePhi) { // initializing for Phi meson - phiCuts.init(&qaRegistry); + phiCuts.init(&qaRegistry); } mRunNumber = 0; @@ -702,15 +1451,18 @@ struct FemtoUniverseProducerTask { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); - int64_t now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + int64_t now = std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()) + .count(); ccdb->setCreatedNotAfter(now); } - /// Function to retrieve the nominal magnetic field in kG (0.1T) and convert it directly to T + /// Function to retrieve the nominal magnetic field in kG (0.1T) and convert + /// it directly to T void getMagneticFieldTesla(aod::BCsWithTimestamps::iterator bc) { - // TODO done only once (and not per run). Will be replaced by CCDBConfigurable - // get magnetic field for run + // TODO done only once (and not per run). Will be replaced by + // CCDBConfigurable get magnetic field for run if (mRunNumber == bc.runNumber()) return; auto timestamp = bc.timestamp(); @@ -718,89 +1470,102 @@ struct FemtoUniverseProducerTask { if (confIsRun3 && !confIsForceGRP) { static o2::parameters::GRPMagField* grpo = nullptr; - grpo = ccdb->getForTimeStamp("GLO/Config/GRPMagField", timestamp); + grpo = ccdb->getForTimeStamp( + "GLO/Config/GRPMagField", timestamp); if (grpo == nullptr) { LOGF(fatal, "GRP object not found for timestamp %llu", timestamp); return; } - LOGF(info, "Retrieved GRP for timestamp %llu with L3 ", timestamp, grpo->getL3Current()); - // taken from GRP onject definition of getnominalL3Field; update later to something smarter (mnominalL3Field = std::lround(5.f * mL3Current / 30000.f);) + LOGF(info, "Retrieved GRP for timestamp %llu with L3 ", timestamp, + grpo->getL3Current()); + // taken from GRP onject definition of getnominalL3Field; update later to + // something smarter (mnominalL3Field = std::lround(5.f * mL3Current / + // 30000.f);) auto nominalL3Field = std::lround(5.f * grpo->getL3Current() / 30000.f); output = 0.1 * (nominalL3Field); } else { static o2::parameters::GRPObject* grpo = nullptr; - grpo = ccdb->getForTimeStamp("GLO/GRP/GRP", timestamp); + grpo = ccdb->getForTimeStamp("GLO/GRP/GRP", + timestamp); if (grpo == nullptr) { LOGF(fatal, "GRP object not found for timestamp %llu", timestamp); return; } - LOGF(info, "Retrieved GRP for timestamp %llu with magnetic field of %d kG", timestamp, grpo->getNominalL3Field()); + LOGF(info, + "Retrieved GRP for timestamp %llu with magnetic field of %d kG", + timestamp, grpo->getNominalL3Field()); output = 0.1 * (grpo->getNominalL3Field()); } mMagField = output; mRunNumber = bc.runNumber(); } - template + template void fillDebugParticle(ParticleType const& particle) { if constexpr (isTrackOrV0) { - if constexpr (std::experimental::is_detected::value) { - outputDebugParts(particle.sign(), (uint8_t)particle.tpcNClsFound(), - particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), - particle.tpcNClsShared(), particle.tpcFractionSharedCls(), particle.tpcInnerParam(), - particle.itsNCls(), particle.itsNClsInnerBarrel(), - particle.dcaXY(), particle.dcaZ(), particle.tpcSignal(), - particle.tpcNSigmaStoreEl(), particle.tpcNSigmaStorePi(), - particle.tpcNSigmaStoreKa(), particle.tpcNSigmaStorePr(), - particle.tpcNSigmaStoreDe(), particle.tofNSigmaStoreEl(), - particle.tofNSigmaStorePi(), particle.tofNSigmaStoreKa(), - particle.tofNSigmaStorePr(), particle.tofNSigmaStoreDe(), - particle.tofNSigmaLaPr(), particle.tofNSigmaLaPi(), particle.tofNSigmaALaPr(), - particle.tofNSigmaALaPi(), particle.tofNSigmaK0PiPlus(), particle.tofNSigmaK0PiMinus()); + if constexpr (std::experimental::is_detected::value) { + outputDebugParts( + particle.sign(), (uint8_t)particle.tpcNClsFound(), + particle.tpcNClsFindable(), (uint8_t)particle.tpcNClsCrossedRows(), + particle.tpcNClsShared(), particle.tpcFractionSharedCls(), + particle.tpcInnerParam(), particle.itsNCls(), + particle.itsNClsInnerBarrel(), particle.dcaXY(), particle.dcaZ(), + particle.tpcSignal(), particle.tpcNSigmaStoreEl(), + particle.tpcNSigmaStorePi(), particle.tpcNSigmaStoreKa(), + particle.tpcNSigmaStorePr(), particle.tpcNSigmaStoreDe(), + particle.tofNSigmaStoreEl(), particle.tofNSigmaStorePi(), + particle.tofNSigmaStoreKa(), particle.tofNSigmaStorePr(), + particle.tofNSigmaStoreDe(), particle.tofNSigmaLaPr(), + particle.tofNSigmaLaPi(), particle.tofNSigmaALaPr(), + particle.tofNSigmaALaPi(), particle.tofNSigmaK0PiPlus(), + particle.tofNSigmaK0PiMinus()); } else { - outputDebugParts(particle.sign(), (uint8_t)particle.tpcNClsFound(), - particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), - particle.tpcNClsShared(), particle.tpcFractionSharedCls(), particle.tpcInnerParam(), - particle.itsNCls(), particle.itsNClsInnerBarrel(), - particle.dcaXY(), particle.dcaZ(), particle.tpcSignal(), - particle.tpcNSigmaStoreEl(), particle.tpcNSigmaStorePi(), - particle.tpcNSigmaStoreKa(), particle.tpcNSigmaStorePr(), - particle.tpcNSigmaStoreDe(), particle.tofNSigmaStoreEl(), - particle.tofNSigmaStorePi(), particle.tofNSigmaStoreKa(), - particle.tofNSigmaStorePr(), particle.tofNSigmaStoreDe(), - -999., -999., -999., -999., -999., -999.); + outputDebugParts( + particle.sign(), (uint8_t)particle.tpcNClsFound(), + particle.tpcNClsFindable(), (uint8_t)particle.tpcNClsCrossedRows(), + particle.tpcNClsShared(), particle.tpcFractionSharedCls(), + particle.tpcInnerParam(), particle.itsNCls(), + particle.itsNClsInnerBarrel(), particle.dcaXY(), particle.dcaZ(), + particle.tpcSignal(), particle.tpcNSigmaStoreEl(), + particle.tpcNSigmaStorePi(), particle.tpcNSigmaStoreKa(), + particle.tpcNSigmaStorePr(), particle.tpcNSigmaStoreDe(), + particle.tofNSigmaStoreEl(), particle.tofNSigmaStorePi(), + particle.tofNSigmaStoreKa(), particle.tofNSigmaStorePr(), + particle.tofNSigmaStoreDe(), -999., -999., -999., -999., -999., + -999.); } } else if constexpr (isPhiOrD0) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999.); // QA for phi or D0/D0bar children } else if constexpr (isCasc) { - if constexpr (std::experimental::is_detected::value) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., particle.tofNSigmaXiLaPi(), - particle.tofNSigmaXiLaPr(), particle.tofNSigmaXiPi(), particle.tofNSigmaOmLaPi(), + if constexpr (std::experimental::is_detected::value) { + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999., -999., -999., + particle.tofNSigmaXiLaPi(), particle.tofNSigmaXiLaPr(), + particle.tofNSigmaXiPi(), particle.tofNSigmaOmLaPi(), particle.tofNSigmaOmLaPr(), particle.tofNSigmaOmKa(), particle.dcacascdaughters(), particle.cascradius(), particle.x(), particle.y(), particle.z(), -999.); } else { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999., particle.dcacascdaughters(), particle.cascradius(), particle.x(), particle.y(), particle.z(), -999.); } } else { // LOGF(info, "isTrack0orV0: %d, isPhi: %d", isTrackOrV0, isPhiOrD0); - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., - particle.dcav0topv(), -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., + -999., particle.dcav0topv(), -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999., -999., -999., particle.dcaV0daughters(), particle.v0radius(), particle.x(), particle.y(), particle.z(), particle.mK0Short()); // QA for v0 @@ -811,30 +1576,28 @@ struct FemtoUniverseProducerTask { void fillDebugD0D0barML(ParticleType const& particle) { if constexpr (isD0ML) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., + -999., -999., -999., -999., -999., -999., -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0()[0], // getter decayVtxX particle.mlProbD0()[1], // getter decayVtxY particle.mlProbD0()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else if constexpr (isD0barML) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., + -999., -999., -999., -999., -999., -999., -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0bar()[0], // getter decayVtxX particle.mlProbD0bar()[1], // getter decayVtxY particle.mlProbD0bar()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999.); + -999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999.); } } @@ -851,30 +1614,29 @@ struct FemtoUniverseProducerTask { } if constexpr (isD0ML) { outputDebugParts(particle.flagMcMatchRec(), // getter sign - originMcReco, -999., -999., -999., -999., -999., -999., -999., + originMcReco, -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., + -999., -999., -999., -999., -999., -999., -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0()[0], // getter decayVtxX particle.mlProbD0()[1], // getter decayVtxY particle.mlProbD0()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else if constexpr (isD0barML) { - outputDebugParts(particle.flagMcMatchRec(), -999., -999., -999., -999., -999., -999., -999., -999., - originMcReco, -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., + outputDebugParts(particle.flagMcMatchRec(), -999., -999., -999., -999., + -999., -999., -999., -999., originMcReco, -999., -999., + -999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0bar()[0], // getter decayVtxX particle.mlProbD0bar()[1], // getter decayVtxY particle.mlProbD0bar()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999.); + -999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999.); } } @@ -884,7 +1646,9 @@ struct FemtoUniverseProducerTask { if (particle.isPhysicalPrimary()) { return 0; } else if (particle.has_mothers()) { - if (particle.getProcess() == 20 || particle.getProcess() == 23) { // treat particles from hadronic scattering (20, 23) as primary + if (particle.getProcess() == 20 || + particle.getProcess() == 23) { // treat particles from hadronic + // scattering (20, 23) as primary return 0; } auto motherparticlesMC = particle.template mothers_as(); @@ -902,31 +1666,39 @@ struct FemtoUniverseProducerTask { } template - void fillMCParticle(ParticleType const& particle, o2::aod::femtouniverseparticle::ParticleType fdparttype) + void fillMCParticle(ParticleType const& particle, + o2::aod::femtouniverseparticle::ParticleType fdparttype) { if (particle.has_mcParticle()) { // get corresponding MC particle and its info auto particleMC = particle.mcParticle(); auto pdgCode = particleMC.pdgCode(); int particleOrigin = 99; - auto motherparticlesMC = particleMC.template mothers_as(); + auto motherparticlesMC = + particleMC.template mothers_as(); - if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { + if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || + std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { if (particleMC.isPhysicalPrimary()) { - particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; + particleOrigin = + aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else if (!motherparticlesMC.empty()) { auto motherparticleMC = motherparticlesMC.front(); if (motherparticleMC.producedByGenerator()) { - particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode()); + particleOrigin = + checkDaughterType(fdparttype, motherparticleMC.pdgCode()); } else { - particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kMaterial; + particleOrigin = aod::femtouniverse_mc_particle:: + ParticleOriginMCTruth::kMaterial; } } } else { - particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + particleOrigin = + aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } - outputPartsMC(particleOrigin, pdgCode, particleMC.pt(), particleMC.eta(), particleMC.phi()); + outputPartsMC(particleOrigin, pdgCode, particleMC.pt(), particleMC.eta(), + particleMC.phi()); fillDebugParticleMC(particleMC); outputPartsMCLabels(outputPartsMC.lastIndex()); } else { @@ -936,15 +1708,19 @@ struct FemtoUniverseProducerTask { } template - void fillMCTruthParticle(MCParticleType const& mcparticle, o2::aod::femtouniverseparticle::ParticleType fdparttype) + void + fillMCTruthParticle(MCParticleType const& mcparticle, + o2::aod::femtouniverseparticle::ParticleType fdparttype) { auto pdgCode = mcparticle.pdgCode(); int particleOrigin = 99; // Determine particle origin - if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { + if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || + std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { if (mcparticle.isPhysicalPrimary()) { - particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; + particleOrigin = + aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else { auto mothers = mcparticle.template mothers_as(); if (!mothers.empty()) { @@ -952,24 +1728,28 @@ struct FemtoUniverseProducerTask { if (mother.producedByGenerator()) { particleOrigin = checkDaughterType(fdparttype, mother.pdgCode()); } else { - particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kMaterial; + particleOrigin = aod::femtouniverse_mc_particle:: + ParticleOriginMCTruth::kMaterial; } } } } else { - particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + particleOrigin = + aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } // Fill MC companion tables - outputPartsMC(particleOrigin, pdgCode, mcparticle.pt(), mcparticle.eta(), mcparticle.phi()); + outputPartsMC(particleOrigin, pdgCode, mcparticle.pt(), mcparticle.eta(), + mcparticle.phi()); fillDebugParticleMC(mcparticle); outputPartsMCLabels(outputPartsMC.lastIndex()); - // Artificial fill of a debug table -- solves conflicts between FDParticles and FDExtParticles tables - outputDebugParts(-111., -111., -111., -111., -111., -111., -111., -111., -111., + // Artificial fill of a debug table -- solves conflicts between FDParticles + // and FDExtParticles tables + outputDebugParts(-111., -111., -111., -111., -111., -111., -111., -111., + -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., - -111., -111., -111., -111., -111., - -111., -111., -111., -111., -111., -111.); + -111., -111., -111., -111.); } template @@ -986,32 +1766,45 @@ struct FemtoUniverseProducerTask { auto motherskaon1MC = kaon1MC.template mothers_as(); auto motherskaon2MC = kaon2MC.template mothers_as(); - if (std::abs(pdgCode1) == std::abs(321) || std::abs(pdgCode2) == std::abs(-321)) { - if ((kaon1MC.isPhysicalPrimary() && kaon2MC.isPhysicalPrimary()) && (!motherskaon1MC.empty() && !motherskaon2MC.empty())) { + if (std::abs(pdgCode1) == std::abs(321) || + std::abs(pdgCode2) == std::abs(-321)) { + if ((kaon1MC.isPhysicalPrimary() && kaon2MC.isPhysicalPrimary()) && + (!motherskaon1MC.empty() && !motherskaon2MC.empty())) { for (const auto& particleMotherOfNeg : motherskaon1MC) { for (const auto& particleMotherOfPos : motherskaon2MC) { - if (particleMotherOfNeg == particleMotherOfPos && particleMotherOfNeg.pdgCode() == Pdg::kPhi) { - phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; + if (particleMotherOfNeg == particleMotherOfPos && + particleMotherOfNeg.pdgCode() == Pdg::kPhi) { + phiOrigin = aod::femtouniverse_mc_particle:: + ParticleOriginMCTruth::kPrimary; } else { - phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle:: + ParticleOriginMCTruth::kFake; } } } } else { - phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + phiOrigin = + aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } } else { - phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + phiOrigin = + aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } TLorentzVector part1Vec; TLorentzVector part2Vec; - const auto mMassOne = o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service of the common header - const auto mMassTwo = o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service of the common header + const auto mMassOne = + o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service + // of the common header + const auto mMassTwo = + o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service + // of the common header - part1Vec.SetPtEtaPhiM(kaon1MC.pt(), kaon1MC.eta(), kaon1MC.phi(), mMassOne); - part2Vec.SetPtEtaPhiM(kaon2MC.pt(), kaon2MC.eta(), kaon2MC.phi(), mMassTwo); + part1Vec.SetPtEtaPhiM(kaon1MC.pt(), kaon1MC.eta(), kaon1MC.phi(), + mMassOne); + part2Vec.SetPtEtaPhiM(kaon2MC.pt(), kaon2MC.eta(), kaon2MC.phi(), + mMassTwo); TLorentzVector sumVec(part1Vec); sumVec += part2Vec; @@ -1057,16 +1850,26 @@ struct FemtoUniverseProducerTask { if (zorroMask.value != "") { auto bc = col.template bc_as(); initZorro(bc); - if (!zorro.isSelected(col.template bc_as().globalBC())) + if (!zorro.isSelected( + col.template bc_as().globalBC())) return false; } if (!ConfGeneral.confIsUsePileUp) { - outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); + outputCollision(vtxZ, mult, multNtr, + confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, + mMagField); colCuts.fillQA(col); return true; - } else if ((!ConfGeneral.confEvNoSameBunchPileup || col.selection_bit(aod::evsel::kNoSameBunchPileup)) && (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && (!ConfGeneral.confEvIsVertexITSTPC || col.selection_bit(aod::evsel::kIsVertexITSTPC))) { - outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); + } else if ((!ConfGeneral.confEvNoSameBunchPileup || + col.selection_bit(aod::evsel::kNoSameBunchPileup)) && + (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || + col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && + (!ConfGeneral.confEvIsVertexITSTPC || + col.selection_bit(aod::evsel::kIsVertexITSTPC))) { + outputCollision(vtxZ, mult, multNtr, + confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, + mMagField); colCuts.fillQA(col); return true; } else { @@ -1101,11 +1904,20 @@ struct FemtoUniverseProducerTask { return false; } if (!ConfGeneral.confIsUsePileUp) { - outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); + outputCollision(vtxZ, mult, multNtr, + confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, + mMagField); colCuts.fillQA(col); return true; - } else if ((!ConfGeneral.confEvNoSameBunchPileup || col.selection_bit(aod::evsel::kNoSameBunchPileup)) && (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && (!ConfGeneral.confEvIsVertexITSTPC || col.selection_bit(aod::evsel::kIsVertexITSTPC))) { - outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); + } else if ((!ConfGeneral.confEvNoSameBunchPileup || + col.selection_bit(aod::evsel::kNoSameBunchPileup)) && + (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || + col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && + (!ConfGeneral.confEvIsVertexITSTPC || + col.selection_bit(aod::evsel::kIsVertexITSTPC))) { + outputCollision(vtxZ, mult, multNtr, + confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, + mMagField); colCuts.fillQA(col); return true; } else { @@ -1114,7 +1926,8 @@ struct FemtoUniverseProducerTask { } template - void fillMCTruthCollisions(CollisionType const& col, TrackType const& tracks) + void fillMCTruthCollisions(CollisionType const& col, + TrackType const& tracks) { for (const auto& c : col) { const auto vtxZ = c.posZ(); @@ -1126,7 +1939,8 @@ struct FemtoUniverseProducerTask { } if (confDoSpher) { - outputCollision(vtxZ, mult, multNtr, colCuts.computeSphericity(col, tracks), mMagField); + outputCollision(vtxZ, mult, multNtr, + colCuts.computeSphericity(col, tracks), mMagField); } else { outputCollision(vtxZ, mult, multNtr, 2, mMagField); } @@ -1167,18 +1981,29 @@ struct FemtoUniverseProducerTask { // in case of trigger run - store such collisions but don't store any // particle candidates for such collisions - if (!colCuts.isSelectedRun3(col) || (occupancy < ConfGeneral.confTPCOccupancyMin || occupancy > ConfGeneral.confTPCOccupancyMax)) { + if (!colCuts.isSelectedRun3(col) || + (occupancy < ConfGeneral.confTPCOccupancyMin || + occupancy > ConfGeneral.confTPCOccupancyMax)) { return false; } else { - if ((!ConfGeneral.confEvNoSameBunchPileup || col.selection_bit(aod::evsel::kNoSameBunchPileup)) && - (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && - (!ConfGeneral.confIsGoodITSLayersAll || col.selection_bit(aod::evsel::kIsGoodITSLayersAll)) && - (!ConfGeneral.confNoCollInRofStandard || col.selection_bit(aod::evsel::kNoCollInRofStandard)) && - (!ConfGeneral.confNoHighMultCollInPrevRof || col.selection_bit(aod::evsel::kNoHighMultCollInPrevRof)) && - (!ConfGeneral.confEvIsVertexITSTPC || col.selection_bit(aod::evsel::kIsVertexITSTPC)) && - (!ConfGeneral.confNoCollInTimeRangeStandard || col.selection_bit(aod::evsel::kNoCollInTimeRangeStandard)) && - (!ConfGeneral.confNoITSROFrameBorder || col.selection_bit(aod::evsel::kNoITSROFrameBorder)) && - (!ConfGeneral.confNoTimeFrameBorder || col.selection_bit(aod::evsel::kNoTimeFrameBorder))) { + if ((!ConfGeneral.confEvNoSameBunchPileup || + col.selection_bit(aod::evsel::kNoSameBunchPileup)) && + (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || + col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && + (!ConfGeneral.confIsGoodITSLayersAll || + col.selection_bit(aod::evsel::kIsGoodITSLayersAll)) && + (!ConfGeneral.confNoCollInRofStandard || + col.selection_bit(aod::evsel::kNoCollInRofStandard)) && + (!ConfGeneral.confNoHighMultCollInPrevRof || + col.selection_bit(aod::evsel::kNoHighMultCollInPrevRof)) && + (!ConfGeneral.confEvIsVertexITSTPC || + col.selection_bit(aod::evsel::kIsVertexITSTPC)) && + (!ConfGeneral.confNoCollInTimeRangeStandard || + col.selection_bit(aod::evsel::kNoCollInTimeRangeStandard)) && + (!ConfGeneral.confNoITSROFrameBorder || + col.selection_bit(aod::evsel::kNoITSROFrameBorder)) && + (!ConfGeneral.confNoTimeFrameBorder || + col.selection_bit(aod::evsel::kNoTimeFrameBorder))) { outputCollision(vtxZ, cent, multNtr, 2, mMagField); return true; } else { @@ -1207,11 +2032,78 @@ struct FemtoUniverseProducerTask { outputCollExtra(irrate, occupancy); } + template + void fillTracksITSTPCTOF(TrackType const& tracks) + { + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index + + for (const auto& track : tracks) { + /// if the most open selection criteria are not fulfilled there is no + /// point looking further at the track + + if (!trackCuts.isSelectedMinimal(track)) { + continue; + } + + if (track.tpcChi2NCl() < ConfTrkSelection.confTrkMinChi2PerClusterTPC || + track.tpcChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterTPC) { + continue; + } + if (track.itsChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterITS) { + continue; + } + if ((ConfTrkSelection.confTrkTPCRefit && !track.hasTPC()) || + (ConfTrkSelection.confTrkITSRefit && !track.hasITS())) { + continue; + } + + if (track.pt() > confTOFpTmin) { + if (!track.hasTOF()) { + continue; + } + } + + trackCuts.fillQA(track); + // the bit-wise container of the systematic variations is obtained + auto cutContainerITS = trackCuts.getCutContainerWithITS< + aod::femtouniverseparticle::CutContainerType>(track); + + // now the table is filled + outputParts( + outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), + aod::femtouniverseparticle::ParticleType::kTrack, + cutContainerITS.at( + femto_universe_track_selection::TrackContainerPosition::kCuts), + cutContainerITS.at( + femto_universe_track_selection::TrackContainerPosition::kPID), + track.dcaXY(), childIDs, 0, + track.sign()); // sign getter is mAntiLambda() + + tmpIDtrack.push_back(track.globalIndex()); + fillDebugParticle(track); + outputDebugITSParts(track.itsNSigmaEl(), track.itsNSigmaPi(), + track.itsNSigmaKa(), track.itsNSigmaPr(), + track.itsNSigmaDe()); + if constexpr (isMC) { + fillMCParticle(track, + o2::aod::femtouniverseparticle::ParticleType::kTrack); + } + } + } + template void fillTracks(TrackType const& tracks) { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index for (const auto& track : tracks) { /// if the most open selection criteria are not fulfilled there is no @@ -1220,6 +2112,14 @@ struct FemtoUniverseProducerTask { continue; } + if (track.tpcChi2NCl() < ConfTrkSelection.confTrkMinChi2PerClusterTPC || + track.tpcChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterTPC) { + continue; + } + if (ConfTrkSelection.confTrkTPCRefit && !track.hasTPC()) { + continue; + } + if (track.pt() > confTOFpTmin) { if (!track.hasTOF()) { continue; @@ -1229,36 +2129,46 @@ struct FemtoUniverseProducerTask { trackCuts.fillQA(track); // the bit-wise container of the systematic variations is obtained - auto cutContainer = trackCuts.getCutContainer(track); + auto cutContainer = + trackCuts + .getCutContainer( + track); // now the table is filled - outputParts(outputCollision.lastIndex(), track.pt(), track.eta(), - track.phi(), aod::femtouniverseparticle::ParticleType::kTrack, - cutContainer.at( - femto_universe_track_selection::TrackContainerPosition::kCuts), - confIsUseCutculator ? cutContainer.at( - femto_universe_track_selection::TrackContainerPosition::kPID) - : PIDBitmask(track), - track.dcaXY(), childIDs, - track.hasTOF(), // hasTOF getter is mLambda() - track.sign()); // sign getter is mAntiLambda() + outputParts( + outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), + aod::femtouniverseparticle::ParticleType::kTrack, + cutContainer.at( + femto_universe_track_selection::TrackContainerPosition::kCuts), + confIsUseCutculator + ? cutContainer.at(femto_universe_track_selection:: + TrackContainerPosition::kPID) + : PIDBitmask(track), + track.dcaXY(), childIDs, + track.hasTOF(), // hasTOF getter is mLambda() + track.sign()); // sign getter is mAntiLambda() tmpIDtrack.push_back(track.globalIndex()); if (confIsDebug) { fillDebugParticle(track); } - if constexpr (isMC) { - fillMCParticle(track, o2::aod::femtouniverseparticle::ParticleType::kTrack); + fillMCParticle(track, + o2::aod::femtouniverseparticle::ParticleType::kTrack); } } } - template - void fillV0(CollisionType const& col, V0Type const& fullV0s, TrackType const&) + template + void fillV0(CollisionType const& col, V0Type const& fullV0s, + TrackType const&) { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index for (const auto& v0 : fullV0s) { auto postrack = v0.template posTrack_as(); auto negtrack = v0.template negTrack_as(); @@ -1281,63 +2191,66 @@ struct FemtoUniverseProducerTask { // TrackSelection::TrackCuts::kITSHits); // } - v0Cuts.fillQA(col, v0, postrack, negtrack); ///\todo fill QA also for daughters - auto cutContainerV0 = v0Cuts.getCutContainer(col, v0, postrack, negtrack); + v0Cuts.fillQA( + col, v0, postrack, negtrack); ///\todo fill QA also for daughters + auto cutContainerV0 = + v0Cuts.getCutContainer( + col, v0, postrack, negtrack); int postrackID = v0.posTrackId(); int rowInPrimaryTrackTablePos = -1; rowInPrimaryTrackTablePos = getRowDaughters(postrackID, tmpIDtrack); childIDs[0] = rowInPrimaryTrackTablePos; childIDs[1] = 0; - outputParts(outputCollision.lastIndex(), v0.positivept(), - v0.positiveeta(), v0.positivephi(), - aod::femtouniverseparticle::ParticleType::kV0Child, - cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - confIsUseCutculator ? cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID) : PIDBitmask(postrack), - 0., - childIDs, - 0, - postrack.sign()); + outputParts( + outputCollision.lastIndex(), v0.positivept(), v0.positiveeta(), + v0.positivephi(), aod::femtouniverseparticle::ParticleType::kV0Child, + cutContainerV0.at( + femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + confIsUseCutculator + ? cutContainerV0.at( + femto_universe_v0_selection::V0ContainerPosition::kPosPID) + : PIDBitmask(postrack), + 0., childIDs, 0, postrack.sign()); const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(postrack, + o2::aod::femtouniverseparticle::ParticleType::kV0Child); } int negtrackID = v0.negTrackId(); int rowInPrimaryTrackTableNeg = -1; rowInPrimaryTrackTableNeg = getRowDaughters(negtrackID, tmpIDtrack); childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts(outputCollision.lastIndex(), - v0.negativept(), - v0.negativeeta(), - v0.negativephi(), - aod::femtouniverseparticle::ParticleType::kV0Child, - cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - confIsUseCutculator ? cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID) : PIDBitmask(negtrack), - 0., - childIDs, - 0, - negtrack.sign()); + outputParts( + outputCollision.lastIndex(), v0.negativept(), v0.negativeeta(), + v0.negativephi(), aod::femtouniverseparticle::ParticleType::kV0Child, + cutContainerV0.at( + femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + confIsUseCutculator + ? cutContainerV0.at( + femto_universe_v0_selection::V0ContainerPosition::kNegPID) + : PIDBitmask(negtrack), + 0., childIDs, 0, negtrack.sign()); const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(negtrack, + o2::aod::femtouniverseparticle::ParticleType::kV0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), - v0.pt(), - v0.eta(), - v0.phi(), + outputParts(outputCollision.lastIndex(), v0.pt(), v0.eta(), v0.phi(), aod::femtouniverseparticle::ParticleType::kV0, - cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kV0), - PIDStrangeTOFBitmaskV0(v0), - v0.v0cosPA(), - indexChildID, - v0.mLambda(), - v0.mAntiLambda()); + cutContainerV0.at( + femto_universe_v0_selection::V0ContainerPosition::kV0), + PIDStrangeTOFBitmaskV0(v0), v0.v0cosPA(), indexChildID, + v0.mLambda(), v0.mAntiLambda()); if (confIsDebug) { - fillDebugParticle(postrack); // QA for positive daughter - fillDebugParticle(negtrack); // QA for negative daughter - fillDebugParticle(v0); // QA for v0 + fillDebugParticle( + postrack); // QA for positive daughter + fillDebugParticle( + negtrack); // QA for negative daughter + fillDebugParticle(v0); // QA for v0 } if constexpr (isMC) { fillMCParticle(v0, o2::aod::femtouniverseparticle::ParticleType::kV0); @@ -1352,7 +2265,9 @@ struct FemtoUniverseProducerTask { if (mc.pdgCode() != ConfV0Selection.confV0PDGMCTruth.value[2]) continue; // Artificially single out V0s - auto daughters = mc.template daughters_as(); // Access daughters (no differentiation of signs, it needs to be checked separately) + auto daughters = mc.template daughters_as< + aod::McParticles>(); // Access daughters (no differentiation of signs, + // it needs to be checked separately) bool foundPos = false, foundNeg = false; @@ -1360,39 +2275,31 @@ struct FemtoUniverseProducerTask { int rowPos = 0; int rowNeg = 0; - for (auto const& d : daughters) { // Loop over daughters - if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth.value[0]) { // Check for a positive child + for (auto const& d : daughters) { // Loop over daughters + if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth + .value[0]) { // Check for a positive child foundPos = true; - outputParts(outputCollision.lastIndex(), - d.pt(), - d.eta(), - d.phi(), + outputParts(outputCollision.lastIndex(), d.pt(), d.eta(), d.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - 0, - 0, - d.pdgCode(), + 0, 0, d.pdgCode(), childIDs, // {0, 0} - 0, - 0); + 0, 0); rowPos = outputParts.lastIndex(); - fillMCTruthParticle(d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); - } else if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth.value[1]) { // Check for a negative child + fillMCTruthParticle( + d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + } else if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth + .value[1]) { // Check for a negative child foundNeg = true; - outputParts(outputCollision.lastIndex(), - d.pt(), - d.eta(), - d.phi(), + outputParts(outputCollision.lastIndex(), d.pt(), d.eta(), d.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - 0, - 0, - d.pdgCode(), + 0, 0, d.pdgCode(), childIDs, // {0, 0} - 0, - 0); + 0, 0); rowNeg = outputParts.lastIndex(); - fillMCTruthParticle(d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + fillMCTruthParticle( + d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); } } @@ -1401,18 +2308,11 @@ struct FemtoUniverseProducerTask { childIDs[0] = rowPos; childIDs[1] = rowNeg; - outputParts(outputCollision.lastIndex(), - mc.pt(), - mc.eta(), - mc.phi(), - aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - 0, - 0, - mc.pdgCode(), - childIDs, - 0, - 0); - fillMCTruthParticle(mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + outputParts(outputCollision.lastIndex(), mc.pt(), mc.eta(), mc.phi(), + aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 0, 0, + mc.pdgCode(), childIDs, 0, 0); + fillMCTruthParticle( + mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); } } @@ -1421,7 +2321,9 @@ struct FemtoUniverseProducerTask { { for (const auto& mc : mcParticles) { // Loop over all MC Truth particles if (ConfFilterCuts.confIsApplyTrkCutMCTruth) { - if (std::abs(mc.eta()) > ConfFilterCuts.confEtaFilterCut || mc.pt() < ConfFilterCuts.confPtLowFilterCut || mc.pt() > ConfFilterCuts.confPtHighFilterCut) { + if (std::abs(mc.eta()) > ConfFilterCuts.confEtaFilterCut || + mc.pt() < ConfFilterCuts.confPtLowFilterCut || + mc.pt() > ConfFilterCuts.confPtHighFilterCut) { continue; } } @@ -1433,38 +2335,39 @@ struct FemtoUniverseProducerTask { } std::vector childIDs = {0, 0}; - outputParts(outputCollision.lastIndex(), - mc.pt(), - mc.eta(), - mc.phi(), - aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - 0, - 0, - mc.pdgCode(), - childIDs, - 0, - 0); - fillMCTruthParticle(mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + outputParts(outputCollision.lastIndex(), mc.pt(), mc.eta(), mc.phi(), + aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 0, 0, + mc.pdgCode(), childIDs, 0, 0); + fillMCTruthParticle( + mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); } } - template - void fillCascade(CollisionType const& col, CascadeType const& fullCascades, TrackType const&) + template + void fillCascade(CollisionType const& col, CascadeType const& fullCascades, + TrackType const&) { - std::vector childIDs = {0, 0, 0}; // child1, child2, bachelor; these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + std::vector childIDs = {0, 0, + 0}; // child1, child2, bachelor; these IDs are + // necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index for (const auto& casc : fullCascades) { const auto& posTrackCasc = casc.template posTrack_as(); const auto& negTrackCasc = casc.template negTrack_as(); const auto& bachTrackCasc = casc.template bachelor_as(); - if (!cascadeCuts.isSelectedMinimal(col, casc, posTrackCasc, negTrackCasc, bachTrackCasc)) { + if (!cascadeCuts.isSelectedMinimal(col, casc, posTrackCasc, negTrackCasc, + bachTrackCasc)) { continue; } cascadeCuts.fillCascadeQA(col, casc, posTrackCasc, negTrackCasc); - cascadeCuts.fillQA(col, casc, posTrackCasc, negTrackCasc, bachTrackCasc); // fill QA for daughters + cascadeCuts.fillQA(col, casc, posTrackCasc, negTrackCasc, + bachTrackCasc); // fill QA for daughters int postrackID = casc.posTrackId(); int rowInPrimaryTrackTablePos = -1; @@ -1473,20 +2376,15 @@ struct FemtoUniverseProducerTask { childIDs[1] = 0; // neg childIDs[2] = 0; // bachelor float hasTOF = posTrackCasc.hasTOF() ? 1 : 0; - outputParts(outputCollision.lastIndex(), - casc.positivept(), - casc.positiveeta(), - casc.positivephi(), - aod::femtouniverseparticle::ParticleType::kV0Child, - 0, - PIDBitmask(posTrackCasc), - hasTOF, - childIDs, - 0, + outputParts(outputCollision.lastIndex(), casc.positivept(), + casc.positiveeta(), casc.positivephi(), + aod::femtouniverseparticle::ParticleType::kV0Child, 0, + PIDBitmask(posTrackCasc), hasTOF, childIDs, 0, posTrackCasc.sign()); const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(posTrackCasc, o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(posTrackCasc, + o2::aod::femtouniverseparticle::ParticleType::kV0Child); } int negtrackID = casc.negTrackId(); int rowInPrimaryTrackTableNeg = -1; @@ -1495,20 +2393,15 @@ struct FemtoUniverseProducerTask { childIDs[1] = rowInPrimaryTrackTableNeg; // neg childIDs[2] = 0; // bachelor hasTOF = negTrackCasc.hasTOF() ? 1 : 0; - outputParts(outputCollision.lastIndex(), - casc.negativept(), - casc.negativeeta(), - casc.negativephi(), - aod::femtouniverseparticle::ParticleType::kV0Child, - 0, - PIDBitmask(negTrackCasc), - hasTOF, - childIDs, - 0, + outputParts(outputCollision.lastIndex(), casc.negativept(), + casc.negativeeta(), casc.negativephi(), + aod::femtouniverseparticle::ParticleType::kV0Child, 0, + PIDBitmask(negTrackCasc), hasTOF, childIDs, 0, negTrackCasc.sign()); const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negTrackCasc, o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(negTrackCasc, + o2::aod::femtouniverseparticle::ParticleType::kV0Child); } // bachelor int bachtrackID = casc.bachelorId(); @@ -1518,67 +2411,64 @@ struct FemtoUniverseProducerTask { childIDs[1] = 0; // neg childIDs[2] = rowInPrimaryTrackTableBach; // bachelor hasTOF = bachTrackCasc.hasTOF() ? 1 : 0; - outputParts(outputCollision.lastIndex(), - casc.bachelorpt(), - casc.bacheloreta(), - casc.bachelorphi(), - aod::femtouniverseparticle::ParticleType::kCascadeBachelor, - 0, - PIDBitmask(bachTrackCasc), - hasTOF, - childIDs, - 0, + outputParts(outputCollision.lastIndex(), casc.bachelorpt(), + casc.bacheloreta(), casc.bachelorphi(), + aod::femtouniverseparticle::ParticleType::kCascadeBachelor, 0, + PIDBitmask(bachTrackCasc), hasTOF, childIDs, 0, bachTrackCasc.sign()); const int rowOfBachTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(bachTrackCasc, o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor); + fillMCParticle( + bachTrackCasc, + o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor); } // cascade - std::vector indexCascChildID = {rowOfPosTrack, rowOfNegTrack, rowOfBachTrack}; - outputParts(outputCollision.lastIndex(), - casc.pt(), - casc.eta(), + std::vector indexCascChildID = {rowOfPosTrack, rowOfNegTrack, + rowOfBachTrack}; + outputParts(outputCollision.lastIndex(), casc.pt(), casc.eta(), casc.phi(), - aod::femtouniverseparticle::ParticleType::kCascade, - 0, - PIDStrangeTOFBitmaskCasc(casc), - 0, - indexCascChildID, - casc.mXi(), - casc.mOmega()); - outputCascParts(outputCollision.lastIndex(), - outputParts.lastIndex(), + aod::femtouniverseparticle::ParticleType::kCascade, 0, + PIDStrangeTOFBitmaskCasc(casc), 0, indexCascChildID, + casc.mXi(), casc.mOmega()); + outputCascParts(outputCollision.lastIndex(), outputParts.lastIndex(), casc.dcaV0daughters(), casc.v0cosPA(col.posX(), col.posY(), col.posZ()), casc.v0radius(), casc.casccosPA(col.posX(), col.posY(), col.posZ()), - casc.dcacascdaughters(), - casc.cascradius(), - casc.dcapostopv(), - casc.dcanegtopv(), - casc.dcabachtopv(), + casc.dcacascdaughters(), casc.cascradius(), + casc.dcapostopv(), casc.dcanegtopv(), casc.dcabachtopv(), casc.dcav0topv(col.posX(), col.posY(), col.posZ())); if (confIsDebug) { - fillDebugParticle(posTrackCasc); // QA for positive daughter - fillDebugParticle(negTrackCasc); // QA for negative daughter - fillDebugParticle(bachTrackCasc); // QA for negative daughter - fillDebugParticle(casc); // QA for cascade + fillDebugParticle( + posTrackCasc); // QA for positive daughter + fillDebugParticle( + negTrackCasc); // QA for negative daughter + fillDebugParticle( + bachTrackCasc); // QA for negative daughter + fillDebugParticle(casc); // QA for cascade } if constexpr (isMC) { - fillMCParticle(casc, o2::aod::femtouniverseparticle::ParticleType::kCascade); + fillMCParticle(casc, + o2::aod::femtouniverseparticle::ParticleType::kCascade); } } } - template - void fillD0D0barData(CollisionType const&, TrackType const&, HfCandidate const& hfCands) - { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + template + void fillD0D0barData(CollisionType const&, TrackType const&, + HfCandidate const& hfCands) + { + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index double invMassD0 = 0.0; double invMassD0bar = 0.0; bool isD0D0bar = false; - uint8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 (daugh of D0bar) + uint8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), + // -1 (daugh of D0bar) for (const auto& hfCand : hfCands) { @@ -1586,11 +2476,13 @@ struct FemtoUniverseProducerTask { continue; } - if (ConfD0Selection.useYCutD0Cand && std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { + if (ConfD0Selection.useYCutD0Cand && + std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { continue; } - if (!(ConfD0Selection.useYCutD0Cand) && std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { + if (!(ConfD0Selection.useYCutD0Cand) && + std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { continue; } @@ -1630,20 +2522,22 @@ struct FemtoUniverseProducerTask { } if (isD0D0bar) { - outputParts(outputCollision.lastIndex(), - hfCand.ptProng0(), - RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta - RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), - -999, - childIDs, - postrack.sign(), // D0 mass -> positive daughter of D0/D0bar - daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 decay + outputParts( + outputCollision.lastIndex(), hfCand.ptProng0(), + RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), + hfCand.pzProng0()}), // eta + RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), + -999, childIDs, + postrack.sign(), // D0 mass -> positive daughter of D0/D0bar + daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 + // decay const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle( + postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } // int negtrackID = hfCand.prong1().globalIndex(); int negtrackID = hfCand.prong1Id(); @@ -1652,56 +2546,62 @@ struct FemtoUniverseProducerTask { childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts(outputCollision.lastIndex(), - hfCand.ptProng1(), - RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta - RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), - -999, - childIDs, - negtrack.sign(), // negative daughter of D0/D0bar - daughFlag); // sign that the daugh is from D0 or D0 decay + outputParts( + outputCollision.lastIndex(), hfCand.ptProng1(), + RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), + hfCand.pzProng1()}), // eta + RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), + -999, childIDs, + negtrack.sign(), // negative daughter of D0/D0bar + daughFlag); // sign that the daugh is from D0 or D0 decay const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle( + negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), - hfCand.pt(), - hfCand.eta(), - hfCand.phi(), - aod::femtouniverseparticle::ParticleType::kD0, + outputParts(outputCollision.lastIndex(), hfCand.pt(), hfCand.eta(), + hfCand.phi(), aod::femtouniverseparticle::ParticleType::kD0, -999, // cut, CutContainerType -999, // PID, CutContainerType - -999., - indexChildID, + -999., indexChildID, invMassD0, // D0 mass (mLambda) invMassD0bar); // D0bar mass (mAntiLambda) if (confIsDebug) { - fillDebugParticle(postrack); // QA for positive daughter - fillDebugParticle(negtrack); // QA for negative daughter - fillDebugParticle(hfCand); // QA for D0/D0bar + fillDebugParticle( + postrack); // QA for positive daughter + fillDebugParticle( + negtrack); // QA for negative daughter + fillDebugParticle(hfCand); // QA for D0/D0bar } if constexpr (isMC) { - fillMCParticle(hfCand, o2::aod::femtouniverseparticle::ParticleType::kD0); + fillMCParticle(hfCand, + o2::aod::femtouniverseparticle::ParticleType::kD0); } } } } - template - void fillD0D0barDataMl(CollisionType const&, TrackType const&, HfCandidate const& hfCands) - { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + template + void fillD0D0barDataMl(CollisionType const&, TrackType const&, + HfCandidate const& hfCands) + { + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index double invMassD0 = 0.0; double invMassD0bar = 0.0; bool isD0D0bar = false; - int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 (daugh of D0bar) + int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 + // (daugh of D0bar) for (const auto& hfCand : hfCands) { @@ -1709,11 +2609,13 @@ struct FemtoUniverseProducerTask { continue; } - if (ConfD0Selection.useYCutD0Cand && std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { + if (ConfD0Selection.useYCutD0Cand && + std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { continue; } - if (!(ConfD0Selection.useYCutD0Cand) && std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { + if (!(ConfD0Selection.useYCutD0Cand) && + std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { continue; } @@ -1752,20 +2654,22 @@ struct FemtoUniverseProducerTask { } if (isD0D0bar) { - outputParts(outputCollision.lastIndex(), - hfCand.ptProng0(), - RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta - RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), - -999, - childIDs, - postrack.sign(), // D0 mass -> positive daughter of D0/D0bar - daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 decay + outputParts( + outputCollision.lastIndex(), hfCand.ptProng0(), + RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), + hfCand.pzProng0()}), // eta + RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), + -999, childIDs, + postrack.sign(), // D0 mass -> positive daughter of D0/D0bar + daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 + // decay const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle( + postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } // int negtrackID = hfCand.prong1().globalIndex(); int negtrackID = hfCand.prong1Id(); @@ -1774,28 +2678,26 @@ struct FemtoUniverseProducerTask { childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts(outputCollision.lastIndex(), - hfCand.ptProng1(), - RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta - RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), - -999, - childIDs, - negtrack.sign(), // negative daughter of D0/D0bar - daughFlag); // sign that the daugh is from D0 or D0 decay + outputParts( + outputCollision.lastIndex(), hfCand.ptProng1(), + RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), + hfCand.pzProng1()}), // eta + RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), + -999, childIDs, + negtrack.sign(), // negative daughter of D0/D0bar + daughFlag); // sign that the daugh is from D0 or D0 decay const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle( + negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), - hfCand.pt(), - hfCand.eta(), - hfCand.phi(), - aod::femtouniverseparticle::ParticleType::kD0, + outputParts(outputCollision.lastIndex(), hfCand.pt(), hfCand.eta(), + hfCand.phi(), aod::femtouniverseparticle::ParticleType::kD0, -999, // cut, CutContainerType -999, // PID, CutContainerType -999., // tempFitVar @@ -1804,8 +2706,10 @@ struct FemtoUniverseProducerTask { invMassD0bar); // D0bar mass (mAntiLambda) if (confIsDebug) { - fillDebugParticle(postrack); // QA for positive daughter - fillDebugParticle(negtrack); // QA for negative daughter + fillDebugParticle( + postrack); // QA for positive daughter + fillDebugParticle( + negtrack); // QA for negative daughter if (hfCand.isSelD0() == 1) { fillDebugD0D0barML(hfCand); // QA for D0/D0bar } else if (hfCand.isSelD0bar() == 1) { @@ -1821,17 +2725,23 @@ struct FemtoUniverseProducerTask { } } - template - void fillD0D0barMcMl(CollisionType const&, TrackType const&, HfCandidate const& hfCands, McPart const& mcParticles) + template + void fillD0D0barMcMl(CollisionType const&, TrackType const&, + HfCandidate const& hfCands, McPart const& mcParticles) { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index double invMassD0 = 0.0; double invMassD0bar = 0.0; bool isD0D0bar = false; int indexMcRec = -1; int8_t sign = 0; - int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 (daugh of D0bar) + int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 + // (daugh of D0bar) for (const auto& hfCand : hfCands) { @@ -1841,11 +2751,13 @@ struct FemtoUniverseProducerTask { } } - if (ConfD0Selection.useYCutD0Cand && std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { + if (ConfD0Selection.useYCutD0Cand && + std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { continue; } - if (!(ConfD0Selection.useYCutD0Cand) && std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { + if (!(ConfD0Selection.useYCutD0Cand) && + std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { continue; } @@ -1853,13 +2765,17 @@ struct FemtoUniverseProducerTask { auto postrack = hfCand.template prong0_as(); auto negtrack = hfCand.template prong1_as(); auto arrayDaughters = std::array{postrack, negtrack}; - indexMcRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kD0, std::array{+kPiPlus, -kKPlus}, true, &sign); + indexMcRec = RecoDecay::getMatchedMCRec( + mcParticles, arrayDaughters, Pdg::kD0, std::array{+kPiPlus, -kKPlus}, + true, &sign); if (!ConfD0Selection.fillCorrBkgsD0 && !(indexMcRec > -1)) { continue; } - if ((std::abs(hfCand.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) || (ConfD0Selection.fillCorrBkgsD0 && hfCand.flagMcMatchRec() != 0)) { + if ((std::abs(hfCand.flagMcMatchRec()) == + o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) || + (ConfD0Selection.fillCorrBkgsD0 && hfCand.flagMcMatchRec() != 0)) { int postrackID = hfCand.prong0Id(); // Index to first prong int rowInPrimaryTrackTablePos = -1; rowInPrimaryTrackTablePos = getRowDaughters(postrackID, tmpIDtrack); @@ -1893,20 +2809,23 @@ struct FemtoUniverseProducerTask { } if (isD0D0bar) { - outputParts(outputCollision.lastIndex(), - hfCand.ptProng0(), - RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta - RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), - -999, - childIDs, - postrack.sign(), // D0 mass -> positive daughter of D0/D0bar - daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 decay + outputParts( + outputCollision.lastIndex(), hfCand.ptProng0(), + RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), + hfCand.pzProng0()}), // eta + RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), + -999, childIDs, + postrack.sign(), // D0 mass -> positive daughter of D0/D0bar + daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 + // decay const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle( + postrack, + o2::aod::femtouniverseparticle::ParticleType::kD0Child); } // int negtrackID = hfCand.prong1().globalIndex(); int negtrackID = hfCand.prong1Id(); @@ -1915,26 +2834,26 @@ struct FemtoUniverseProducerTask { childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts(outputCollision.lastIndex(), - hfCand.ptProng1(), - RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta - RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), - -999, - childIDs, - negtrack.sign(), // negative daughter of D0/D0bar - daughFlag); // sign that the daugh is from D0 or D0 decay + outputParts( + outputCollision.lastIndex(), hfCand.ptProng1(), + RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), + hfCand.pzProng1()}), // eta + RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), + -999, childIDs, + negtrack.sign(), // negative daughter of D0/D0bar + daughFlag); // sign that the daugh is from D0 or D0 decay const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle( + negtrack, + o2::aod::femtouniverseparticle::ParticleType::kD0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), - hfCand.pt(), - hfCand.eta(), + outputParts(outputCollision.lastIndex(), hfCand.pt(), hfCand.eta(), hfCand.phi(), aod::femtouniverseparticle::ParticleType::kD0, -999, // cut, CutContainerType @@ -1945,8 +2864,10 @@ struct FemtoUniverseProducerTask { invMassD0bar); // D0bar mass (mAntiLambda) if (confIsDebug) { - fillDebugParticle(postrack); // QA for positive daughter - fillDebugParticle(negtrack); // QA for negative daughter + fillDebugParticle( + postrack); // QA for positive daughter + fillDebugParticle( + negtrack); // QA for negative daughter if (hfCand.isSelD0() == 1) { fillDebugD0D0barMcMl(hfCand); // QA for D0/D0bar } else if (hfCand.isSelD0bar() == 1) { @@ -1956,9 +2877,13 @@ struct FemtoUniverseProducerTask { } } if constexpr (isMC) { - auto particleMother = mcParticles.rawIteratorAt(indexMcRec); // gen. level pT - auto yGen = RecoDecay::y(particleMother.pVector(), o2::constants::physics::MassD0); // gen. level y - outputPartsMC(0, particleMother.pdgCode(), particleMother.pt(), yGen, particleMother.phi()); + auto particleMother = + mcParticles.rawIteratorAt(indexMcRec); // gen. level pT + auto yGen = + RecoDecay::y(particleMother.pVector(), + o2::constants::physics::MassD0); // gen. level y + outputPartsMC(0, particleMother.pdgCode(), particleMother.pt(), + yGen, particleMother.phi()); outputPartsMCLabels(outputPartsMC.lastIndex()); } } @@ -1969,11 +2894,16 @@ struct FemtoUniverseProducerTask { template void fillPhi(CollisionType const& col, TrackType const& tracks) { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children - std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children + std::vector + tmpIDtrack; // this vector keeps track of the matching of the primary + // track table row <-> aod::track table global index // lorentz vectors and filling the tables - for (const auto& [p1, p2] : combinations(soa::CombinationsFullIndexPolicy(tracks, tracks))) { - if (!trackCuts.isSelectedMinimal(p1) || !trackCuts.isSelectedMinimal(p1)) { + for (const auto& [p1, p2] : + combinations(soa::CombinationsFullIndexPolicy(tracks, tracks))) { + if (!trackCuts.isSelectedMinimal(p1) || + !trackCuts.isSelectedMinimal(p1)) { continue; } if ((!(p1.sign() == 1)) || (!(p2.sign() == -1))) { @@ -1981,35 +2911,60 @@ struct FemtoUniverseProducerTask { } // implementing PID cuts for phi children if (ConfPhiSelection.confPhiDoLFPID4Kaons) { - if ((p1.isGlobalTrackWoDCA() == false) || (p2.isGlobalTrackWoDCA() == false) || (p1.isPVContributor() == false) || (p2.isPVContributor() == false)) { + if ((p1.isGlobalTrackWoDCA() == false) || + (p2.isGlobalTrackWoDCA() == false) || + (p1.isPVContributor() == false) || + (p2.isPVContributor() == false)) { continue; } - if (!(isKaonNSigmaLF(p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), p1.hasTOF()))) { + if (!(isKaonNSigmaLF(p1.pt(), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), + p1.hasTOF()))) { continue; } - if (!(isKaonNSigmaLF(p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), p2.hasTOF()))) { + if (!(isKaonNSigmaLF(p2.pt(), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), + p2.hasTOF()))) { continue; } } else { - if (!(isKaonNSigma(p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon)))) { + if (!(isKaonNSigma(p1.pt(), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon)))) { continue; } - if (!(isKaonNSigma(p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon)))) { + if (!(isKaonNSigma(p2.pt(), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon)))) { continue; } } - if (isKaonRejected(p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion))) { + if (isKaonRejected(p1.p(), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion))) { continue; } - if (isKaonRejected(p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion))) { + if (isKaonRejected(p2.p(), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion))) { continue; } TLorentzVector part1Vec; TLorentzVector part2Vec; - const auto mMassOne = o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service of the common header - const auto mMassTwo = o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service of the common header + const auto mMassOne = + o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service + // of the common header + const auto mMassTwo = + o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service + // of the common header part1Vec.SetPtEtaPhiM(p1.pt(), p1.eta(), p1.phi(), mMassOne); part2Vec.SetPtEtaPhiM(p2.pt(), p2.eta(), p2.phi(), mMassTwo); @@ -2023,17 +2978,21 @@ struct FemtoUniverseProducerTask { } float phiPt = sumVec.Pt(); - if ((phiPt < ConfPhiSelection.confPhiPtLowLimit.value) || (phiPt > ConfPhiSelection.confPhiPtHighLimit.value)) { + if ((phiPt < ConfPhiSelection.confPhiPtLowLimit.value) || + (phiPt > ConfPhiSelection.confPhiPtHighLimit.value)) { continue; } float phiPhi = RecoDecay::constrainAngle(sumVec.Phi(), 0); float phiM = sumVec.M(); - if ((phiM < ConfPhiSelection.confPhiInvMassLowLimit) || (phiM > ConfPhiSelection.confPhiInvMassUpLimit)) + if ((phiM < ConfPhiSelection.confPhiInvMassLowLimit) || + (phiM > ConfPhiSelection.confPhiInvMassUpLimit)) continue; - phiCuts.fillQA(col, p1, p1, p2, 321, -321); ///\todo fill QA also for daughters + phiCuts.fillQA( + col, p1, p1, p2, 321, -321); ///\todo fill QA also for daughters int postrackID = p1.globalIndex(); int rowInPrimaryTrackTablePos = -1; // does it do anything? @@ -2041,52 +3000,46 @@ struct FemtoUniverseProducerTask { childIDs[0] = rowInPrimaryTrackTablePos; childIDs[1] = 0; - outputParts(outputCollision.lastIndex(), p1.pt(), - p1.eta(), p1.phi(), + outputParts(outputCollision.lastIndex(), p1.pt(), p1.eta(), p1.phi(), aod::femtouniverseparticle::ParticleType::kPhiChild, -999, // cutContainer -999, // cutContainer p1.dcaXY(), // tempFitVar - childIDs, - 0, - p1.sign()); + childIDs, 0, p1.sign()); const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(p1, o2::aod::femtouniverseparticle::ParticleType::kPhiChild); + fillMCParticle(p1, + o2::aod::femtouniverseparticle::ParticleType::kPhiChild); } int negtrackID = p2.globalIndex(); int rowInPrimaryTrackTableNeg = -1; rowInPrimaryTrackTableNeg = getRowDaughters(negtrackID, tmpIDtrack); childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts(outputCollision.lastIndex(), - p2.pt(), - p2.eta(), - p2.phi(), + outputParts(outputCollision.lastIndex(), p2.pt(), p2.eta(), p2.phi(), aod::femtouniverseparticle::ParticleType::kPhiChild, -999, // cutContainer -999, // cutContainer p2.dcaXY(), // tempFitVar - childIDs, - 0, + childIDs, 0, p2.sign()); // sign, workaround for now const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(p2, o2::aod::femtouniverseparticle::ParticleType::kPhiChild); + fillMCParticle(p2, + o2::aod::femtouniverseparticle::ParticleType::kPhiChild); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), - phiPt, - phiEta, - phiPhi, - aod::femtouniverseparticle::ParticleType::kPhi, - -999, // cutContainer - 0, - phiM, // tempFitVar - indexChildID, - phiM, // phi.mLambda(), //for now it will have a mLambda getter, maybe we will change it in the future so it's more logical - 0); // phi.mAntiLambda() <- sign + outputParts( + outputCollision.lastIndex(), phiPt, phiEta, phiPhi, + aod::femtouniverseparticle::ParticleType::kPhi, + -999, // cutContainer + 0, + phiM, // tempFitVar + indexChildID, + phiM, // phi.mLambda(), //for now it will have a mLambda getter, maybe + // we will change it in the future so it's more logical + 0); // phi.mAntiLambda() <- sign if (confIsDebug) { fillDebugParticle(p1); // QA for positive daughter @@ -2099,34 +3052,47 @@ struct FemtoUniverseProducerTask { } } - template - void fillParticles(TrackType const& tracks, std::optional>> recoMcIds = std::nullopt) + template + void fillParticles(TrackType const& tracks, + std::optional>> + recoMcIds = std::nullopt) { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children std::vector tmpIDtrack; for (const auto& particle : tracks) { /// if the most open selection criteria are not fulfilled there is no /// point looking further at the track - if (particle.eta() < -ConfFilterCuts.confEtaFilterCut || particle.eta() > ConfFilterCuts.confEtaFilterCut) + if (particle.eta() < -ConfFilterCuts.confEtaFilterCut || + particle.eta() > ConfFilterCuts.confEtaFilterCut) continue; - if (particle.pt() < ConfFilterCuts.confPtLowFilterCut || particle.pt() > ConfFilterCuts.confPtHighFilterCut) + if (particle.pt() < ConfFilterCuts.confPtLowFilterCut || + particle.pt() > ConfFilterCuts.confPtHighFilterCut) continue; uint32_t pdgCode = static_cast(particle.pdgCode()); if (ConfGeneral.confMCTruthAnalysisWithPID) { bool pass = false; - std::vector tmpPDGCodes = ConfGeneral.confMCTruthPDGCodes; // necessary due to some features of the Configurable + std::vector tmpPDGCodes = + ConfGeneral.confMCTruthPDGCodes; // necessary due to some features + // of the Configurable for (auto const& pdg : tmpPDGCodes) { if (static_cast(pdg) == static_cast(pdgCode)) { - if (pdgCode == Pdg::kPhi) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles + if (pdgCode == Pdg::kPhi) { // && (recoMcIds && + // recoMcIds->get().contains(particle.globalIndex()))) + // { // ATTENTION: all Phi mesons are + // NOT primary particles pass = true; } else if (pdgCode == Pdg::kD0) { pass = true; } else { - if (confStoreMCmothers || particle.isPhysicalPrimary() || (ConfGeneral.confActivateSecondaries && recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) + if (confStoreMCmothers || particle.isPhysicalPrimary() || + (ConfGeneral.confActivateSecondaries && recoMcIds && + recoMcIds->get().contains(particle.globalIndex()))) pass = true; } } @@ -2143,10 +3109,12 @@ struct FemtoUniverseProducerTask { // trackCuts.fillQA(track); // the bit-wise container of the systematic variations is obtained - // auto cutContainer = trackCuts.getCutContainer(track); + // auto cutContainer = + // trackCuts.getCutContainer(track); // instead of the bitmask, the PDG of the particle is stored as uint32_t - int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); + int32_t variablePDG = + confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0; // now the table is filled @@ -2157,17 +3125,10 @@ struct FemtoUniverseProducerTask { if (ConfGeneral.confIsActivateCascade) childIDs.push_back(0); - outputParts(outputCollision.lastIndex(), - particle.pt(), - particle.eta(), + outputParts(outputCollision.lastIndex(), particle.pt(), particle.eta(), particle.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - variableCut, - pdgCode, - variablePDG, - childIDs, - 0, - 0); + variableCut, pdgCode, variablePDG, childIDs, 0, 0); if (confIsDebug) { fillDebugParticle(particle); @@ -2189,8 +3150,11 @@ struct FemtoUniverseProducerTask { minDaughs = 3ul; } for (std::size_t i = 0; i < tmpIDtrack.size(); i++) { - const auto& particle = tracks.iteratorAt(tmpIDtrack[i] - tracks.begin().globalIndex()); - for (int daughIndex = 0, n = std::min(minDaughs, particle.daughtersIds().size()); daughIndex < n; daughIndex++) { + const auto& particle = + tracks.iteratorAt(tmpIDtrack[i] - tracks.begin().globalIndex()); + for (int daughIndex = 0, + n = std::min(minDaughs, particle.daughtersIds().size()); + daughIndex < n; daughIndex++) { // loop to find the corresponding index of the daughters for (std::size_t j = 0; j < tmpIDtrack.size(); j++) { if (tmpIDtrack[j] == particle.daughtersIds()[daughIndex]) { @@ -2200,20 +3164,15 @@ struct FemtoUniverseProducerTask { } } - int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); + int32_t variablePDG = + confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0; - outputParts(outputCollision.lastIndex(), - particle.pt(), - particle.eta(), + outputParts(outputCollision.lastIndex(), particle.pt(), particle.eta(), particle.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - variableCut, - static_cast(particle.pdgCode()), - variablePDG, - childIDs, - 0, - 0); + variableCut, static_cast(particle.pdgCode()), + variablePDG, childIDs, 0, 0); if (confIsDebug) { fillDebugParticle(particle); @@ -2232,19 +3191,23 @@ struct FemtoUniverseProducerTask { template void fillMCTruthParticlesD0(TrackType const& mcParts) { - std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector childIDs = { + 0, 0}; // these IDs are necessary to keep track of the children std::vector tmpIDtrack; for (const auto& particle : mcParts) { - if (particle.pt() < ConfD0Selection.trackD0pTGenMin || particle.pt() > ConfD0Selection.trackD0pTGenMax) + if (particle.pt() < ConfD0Selection.trackD0pTGenMin || + particle.pt() > ConfD0Selection.trackD0pTGenMax) continue; int pdgCode = particle.pdgCode(); if (ConfGeneral.confMCTruthAnalysisWithPID) { bool pass = false; - std::vector tmpPDGCodes = ConfGeneral.confMCTruthPDGCodes; // necessary due to some features of the Configurable + std::vector tmpPDGCodes = + ConfGeneral.confMCTruthPDGCodes; // necessary due to some features + // of the Configurable for (auto const& pdg : tmpPDGCodes) { if (static_cast(pdg) == static_cast(pdgCode)) { if (pdgCode == Pdg::kPhi) { @@ -2265,7 +3228,10 @@ struct FemtoUniverseProducerTask { int8_t sign = 0; int8_t origin = -99; int8_t mcGenFlag = -99; - if (std::abs(particle.pdgCode()) == Pdg::kD0 && !RecoDecay::isMatchedMCGen(mcParts, particle, Pdg::kD0, std::array{+kPiPlus, -kKPlus}, true, &sign)) { + if (std::abs(particle.pdgCode()) == Pdg::kD0 && + !RecoDecay::isMatchedMCGen(mcParts, particle, Pdg::kD0, + std::array{+kPiPlus, -kKPlus}, true, + &sign)) { /// check if we have D0(bar) → π± K∓ continue; } @@ -2283,16 +3249,12 @@ struct FemtoUniverseProducerTask { } } - outputParts(outputCollision.lastIndex(), - particle.pt(), - particle.eta(), + outputParts(outputCollision.lastIndex(), particle.pt(), particle.eta(), particle.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - -999., - pdgCode, + -999., pdgCode, pdgCode, // getter tempFitVar - childIDs, - mcGenFlag, + childIDs, mcGenFlag, origin); // D0(bar) origin if (confIsDebug) { @@ -2310,7 +3272,9 @@ struct FemtoUniverseProducerTask { template - bool fillCollisionsAndTracksAndV0AndPhi(CollisionType const& col, TrackType const& tracks, V0Type const& fullV0s) + bool fillCollisionsAndTracksAndV0AndPhi(CollisionType const& col, + TrackType const& tracks, + V0Type const& fullV0s) { const auto colcheck = fillCollisions(col, tracks); if (colcheck) { @@ -2335,7 +3299,8 @@ struct FemtoUniverseProducerTask { // fill the tables fillCollisionsAndTracksAndV0AndPhi(col, tracks, fullV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processFullData, "Provide experimental data", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processFullData, + "Provide experimental data", false); void processTrackV0(aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, @@ -2347,12 +3312,14 @@ struct FemtoUniverseProducerTask { // fill the tables fillCollisionsAndTracksAndV0AndPhi(col, tracks, fullV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0, "Provide experimental data for track v0", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0, + "Provide experimental data for track v0", false); - void processTrackCascadeData(aod::FemtoFullCollision const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - o2::aod::CascDatas const& fullCascades) + void + processTrackCascadeData(aod::FemtoFullCollision const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + o2::aod::CascDatas const& fullCascades) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -2363,13 +3330,14 @@ struct FemtoUniverseProducerTask { fillCascade(col, fullCascades, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCascadeData, "Provide experimental data for track cascades", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCascadeData, + "Provide experimental data for track cascades", false); - void processTrackV0Cascade(aod::FemtoFullCollision const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - soa::Join const& fullV0s, - soa::Join const& fullCascades) + void processTrackV0Cascade( + aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + soa::Join const& fullV0s, + soa::Join const& fullCascades) { getMagneticFieldTesla(col.bc_as()); const auto colcheck = fillCollisions(col, tracks); @@ -2383,7 +3351,8 @@ struct FemtoUniverseProducerTask { } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0Cascade, "Provide experimental data for track, v0 and cascades", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0Cascade, + "Provide experimental data for track, v0 and cascades", false); /*void processTrackV0CentRun3(aod::FemtoFullCollisionCentRun3 const& col, aod::BCsWithTimestamps const&, @@ -2397,27 +3366,27 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); fillV0(col, fullV0s, tracks); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0CentRun3, "Provide experimental data for track v0", false);*/ + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0CentRun3, "Provide + experimental data for track v0", false);*/ - void processFullMC(aod::FemtoFullCollisionMC const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, - aod::McParticles const&, - soa::Join const& fullV0s) + void processFullMC( + aod::FemtoFullCollisionMC const& col, aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, aod::McParticles const&, + soa::Join const& fullV0s) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); // fill the tables fillCollisionsAndTracksAndV0AndPhi(col, tracks, fullV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMC, "Provide MC data (tracks, V0, Phi)", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMC, + "Provide MC data (tracks, V0, Phi)", false); - void processTrackMC(aod::FemtoFullCollisionMC const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, - aod::McParticles const&) + void processTrackMC( + aod::FemtoFullCollisionMC const& col, aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, aod::McParticles const&) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -2427,13 +3396,13 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMC, "Provide MC data for track analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMC, + "Provide MC data for track analysis", false); - void processTrackPhiMC(aod::FemtoFullCollisionMC const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, - aod::McParticles const&) + void processTrackPhiMC( + aod::FemtoFullCollisionMC const& col, aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, aod::McParticles const&) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -2444,7 +3413,8 @@ struct FemtoUniverseProducerTask { fillPhi(col, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackPhiMC, "Provide MC data for track Phi analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackPhiMC, + "Provide MC data for track Phi analysis", false); void processTrackData(aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, @@ -2501,10 +3471,10 @@ struct FemtoUniverseProducerTask { PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackPhiData, "Provide experimental data for track phi", false); - void processTrackD0mesonData(aod::FemtoFullCollision const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - soa::Join const& candidates) + void processTrackD0mesonData( + aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + soa::Join const& candidates) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -2521,7 +3491,8 @@ struct FemtoUniverseProducerTask { void processTrackD0DataML(aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, soa::Filtered const& tracks, - soa::Join const& candidates) + soa::Join const& candidates) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -2532,20 +3503,24 @@ struct FemtoUniverseProducerTask { fillD0D0barDataMl(col, tracks, candidates); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackD0DataML, - "Provide experimental data for track D0 meson using ML selection for D0s", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processTrackD0DataML, + "Provide experimental data for track D0 meson using ML selection for D0s", + false); - void processTrackMCTruth(aod::McCollision const&, - soa::SmallGroups> const& collisions, - aod::McParticles const& mcParticles, - aod::BCsWithTimestamps const&) + void processTrackMCTruth( + aod::McCollision const&, + soa::SmallGroups> const& collisions, + aod::McParticles const& mcParticles, aod::BCsWithTimestamps const&) { // magnetic field for run not needed for mc truth // fill the tables fillMCTruthCollisions(collisions, mcParticles); fillParticles(mcParticles); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCTruth, "Provide MC data for MC truth track analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCTruth, + "Provide MC data for MC truth track analysis", false); void processTrackMCGen(aod::McCollision const& col, aod::McParticles const& mcParticles) @@ -2553,25 +3528,30 @@ struct FemtoUniverseProducerTask { outputCollision(col.posZ(), 0, 0, 2, 0); fillParticles(mcParticles); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCGen, "Provide MC Generated for model comparisons", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCGen, + "Provide MC Generated for model comparisons", false); template using HasBachelor = decltype(std::declval().bachelorphi()); Preslice perMCCollision = aod::mcparticle::mcCollisionId; - PresliceUnsorted> recoCollsPerMCColl = aod::mcparticle::mcCollisionId; - PresliceUnsorted> recoCollsPerMCCollCentPbPb = aod::mcparticle::mcCollisionId; - Preslice> perCollisionTracks = aod::track::collisionId; + PresliceUnsorted> + recoCollsPerMCColl = aod::mcparticle::mcCollisionId; + PresliceUnsorted> + recoCollsPerMCCollCentPbPb = aod::mcparticle::mcCollisionId; + Preslice> + perCollisionTracks = aod::track::collisionId; template void processTruthAndFullMC( - aod::McCollisions const& mccols, - aod::McParticles const& mcParticles, - soa::Join const& collisions, + aod::McCollisions const& mccols, aod::McParticles const& mcParticles, + soa::Join const& collisions, soa::Filtered> const& tracks, - StrangePartType const& strangeParts, - aod::BCsWithTimestamps const&, + StrangePartType const& strangeParts, aod::BCsWithTimestamps const&, Preslice& ps) { // recos @@ -2581,10 +3561,13 @@ struct FemtoUniverseProducerTask { mcColIds.clear(); for (const auto& col : collisions) { - auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedTracks = + tracks.sliceBy(perCollisionTracks, col.globalIndex()); auto groupedStrageParts = strangeParts.sliceBy(ps, col.globalIndex()); getMagneticFieldTesla(col.bc_as()); - if constexpr (std::experimental::is_detected::value) { + if constexpr (std::experimental::is_detected< + HasBachelor, + typename StrangePartType::iterator>::value) { const auto colcheck = fillCollisions(col, groupedTracks); if (colcheck) { mcColIds.insert(col.mcCollisionId()); @@ -2592,7 +3575,8 @@ struct FemtoUniverseProducerTask { fillCascade(col, groupedStrageParts, groupedTracks); } } else { - const auto colcheck = fillCollisionsAndTracksAndV0AndPhi(col, groupedTracks, groupedStrageParts); + const auto colcheck = fillCollisionsAndTracksAndV0AndPhi( + col, groupedTracks, groupedStrageParts); if (colcheck) { mcColIds.insert(col.mcCollisionId()); } @@ -2605,30 +3589,38 @@ struct FemtoUniverseProducerTask { // truth for (const auto& mccol : mccols) { - auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); + auto groupedMCParticles = + mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); if (confCollMCTruthOnlyReco && !mcColIds.contains(mccol.globalIndex())) { continue; } - auto groupedCollisions = collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); - fillMCTruthCollisions(groupedCollisions, groupedMCParticles); // fills the reco collisions for mc collision - fillParticles(groupedMCParticles, recoMcIds); // fills mc particles + auto groupedCollisions = + collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); + fillMCTruthCollisions( + groupedCollisions, + groupedMCParticles); // fills the reco collisions for mc collision + fillParticles( + groupedMCParticles, recoMcIds); // fills mc particles } } - void processTruthAndFullMCCentRun3(aod::McCollisions const& mccols, - aod::McParticles const& mcParticles, - aod::FemtoFullCollisionCentRun3MCs const& collisions, - soa::Filtered> const& tracks, - aod::BCsWithTimestamps const&) + void processTruthAndFullMCCentRun3( + aod::McCollisions const& mccols, aod::McParticles const& mcParticles, + aod::FemtoFullCollisionCentRun3MCs const& collisions, + soa::Filtered> const& tracks, + aod::BCsWithTimestamps const&) { // recos std::set recoMcIds; std::set mcCollisions; for (const auto& col : collisions) { - auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedTracks = + tracks.sliceBy(perCollisionTracks, col.globalIndex()); auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), + mRunNumber, "ZNC hadronic") * + 1.e-3; // fetch IR bool colcheck = false; // fill the tables @@ -2651,17 +3643,22 @@ struct FemtoUniverseProducerTask { // truth for (const auto& mccol : mccols) { - if (confCollMCTruthOnlyReco && !mcCollisions.contains(mccol.globalIndex())) { + if (confCollMCTruthOnlyReco && + !mcCollisions.contains(mccol.globalIndex())) { continue; } - auto groupedCollisions = collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); + auto groupedCollisions = + collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); for (const auto& col : groupedCollisions) { - const auto colcheck = fillMCTruthCollisionsCentRun3(col); // fills the reco collisions for mc collision + const auto colcheck = fillMCTruthCollisionsCentRun3( + col); // fills the reco collisions for mc collision if (colcheck) { - auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); + auto groupedMCParticles = + mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); outputCollExtra(1.0, 1.0); if (!ConfTrkSelection.confIsOnlyMCTrack) { - fillParticles(groupedMCParticles, recoMcIds); // fills mc particles + fillParticles( + groupedMCParticles, recoMcIds); // fills mc particles } else { fillTracksMCTruth(groupedMCParticles); } @@ -2669,37 +3666,46 @@ struct FemtoUniverseProducerTask { } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3, "Provide both MC truth and reco for tracks in Pb-Pb", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3, + "Provide both MC truth and reco for tracks in Pb-Pb", false); - Preslice> perCollisionV0s = aod::track::collisionId; + Preslice> + perCollisionV0s = aod::track::collisionId; void processTruthAndFullMCV0( - aod::McCollisions const& mccols, - aod::McParticles const& mcParticles, - soa::Join const& collisions, + aod::McCollisions const& mccols, aod::McParticles const& mcParticles, + soa::Join const& collisions, soa::Filtered> const& tracks, soa::Join const& fullV0s, aod::BCsWithTimestamps const& bcs) { - processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullV0s, bcs, perCollisionV0s); + processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullV0s, bcs, + perCollisionV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCV0, "Provide both MC truth and reco for tracks and V0s", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCV0, + "Provide both MC truth and reco for tracks and V0s", false); - Preslice> perCollisionCascs = aod::track::collisionId; + Preslice< + soa::Join> + perCollisionCascs = aod::track::collisionId; void processTruthAndFullMCCasc( - aod::McCollisions const& mccols, - aod::McParticles const& mcParticles, - soa::Join const& collisions, + aod::McCollisions const& mccols, aod::McParticles const& mcParticles, + soa::Join const& collisions, soa::Filtered> const& tracks, - soa::Join const& fullCascades, + soa::Join const& fullCascades, aod::BCsWithTimestamps const& bcs) { - processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullCascades, bcs, perCollisionCascs); + processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullCascades, + bcs, perCollisionCascs); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCasc, "Provide both MC truth and reco for tracks and Cascades", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCasc, + "Provide both MC truth and reco for tracks and Cascades", + false); void processTruthAndFullMCCentRun3Casc( - aod::McCollisions const& mccols, - aod::McParticles const& mcParticles, + aod::McCollisions const& mccols, aod::McParticles const& mcParticles, aod::FemtoFullCollisionCentRun3MCs const& collisions, soa::Filtered> const& tracks, soa::Join const& fullCascades, @@ -2709,8 +3715,10 @@ struct FemtoUniverseProducerTask { // recos std::set recoMcIds; for (const auto& col : collisions) { - auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); - auto groupedCascParts = fullCascades.sliceBy(perCollisionCascs, col.globalIndex()); + auto groupedTracks = + tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedCascParts = + fullCascades.sliceBy(perCollisionCascs, col.globalIndex()); getMagneticFieldTesla(col.bc_as()); const auto colcheck = fillCollisionsCentRun3(col); if (colcheck) { @@ -2725,33 +3733,47 @@ struct FemtoUniverseProducerTask { // truth for (const auto& mccol : mccols) { - auto groupedCollisions = collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); + auto groupedCollisions = + collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); for (const auto& col : groupedCollisions) { - const auto colcheck = fillMCTruthCollisionsCentRun3(col); // fills the reco collisions for mc collision + const auto colcheck = fillMCTruthCollisionsCentRun3( + col); // fills the reco collisions for mc collision if (colcheck) { - auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); + auto groupedMCParticles = + mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); outputCollExtra(1.0, 1.0); - fillParticles(groupedMCParticles, recoMcIds); // fills mc particles + fillParticles( + groupedMCParticles, recoMcIds); // fills mc particles } } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3Casc, "Provide both MC truth and reco for tracks and cascades with centrality", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processTruthAndFullMCCentRun3Casc, + "Provide both MC truth and reco for tracks and cascades with centrality", + false); - Preslice> mcPartPerMcColl = aod::mcparticle::mcCollisionId; - Preslice> perCollisionD0s = aod::track::collisionId; - void processTrackD0MC(aod::McCollisions const& mccols, - soa::Join const& collisions, - soa::Filtered> const& tracks, - soa::Join const& hfMcGenCands, - soa::Join const& hfMcRecoCands, - aod::BCsWithTimestamps const&, - aod::McParticles const& mcParts) + Preslice> + mcPartPerMcColl = aod::mcparticle::mcCollisionId; + Preslice> + perCollisionD0s = aod::track::collisionId; + void processTrackD0MC( + aod::McCollisions const& mccols, + soa::Join const& collisions, + soa::Filtered> const& tracks, + soa::Join const& hfMcGenCands, + soa::Join const& hfMcRecoCands, + aod::BCsWithTimestamps const&, aod::McParticles const& mcParts) { // MC Reco for (const auto& col : collisions) { - auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); - auto groupedD0s = hfMcRecoCands.sliceBy(perCollisionD0s, col.globalIndex()); + auto groupedTracks = + tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedD0s = + hfMcRecoCands.sliceBy(perCollisionD0s, col.globalIndex()); // get magnetic field for run getMagneticFieldTesla(col.bc_as()); // fill the tables @@ -2763,24 +3785,32 @@ struct FemtoUniverseProducerTask { } // MC Truth for (const auto& mccol : mccols) { - auto groupedMCParticles = hfMcGenCands.sliceBy(mcPartPerMcColl, mccol.globalIndex()); - auto groupedCollisions = collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); - fillMCTruthCollisions(groupedCollisions, groupedMCParticles); // fills the reco collisions for mc collision - fillMCTruthParticlesD0(groupedMCParticles); // fills mc particles - } - } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackD0MC, "Provide MC data for track D0 analysis", false); - - void processFullMCCent(aod::FemtoFullCollisionCentRun3 const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, - aod::McParticles const&) + auto groupedMCParticles = + hfMcGenCands.sliceBy(mcPartPerMcColl, mccol.globalIndex()); + auto groupedCollisions = + collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); + fillMCTruthCollisions( + groupedCollisions, + groupedMCParticles); // fills the reco collisions for mc collision + fillMCTruthParticlesD0( + groupedMCParticles); // fills mc particles + } + } + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackD0MC, + "Provide MC data for track D0 analysis", false); + + void processFullMCCent( + aod::FemtoFullCollisionCentRun3 const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, aod::McParticles const&) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const double ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR + const double ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), + mRunNumber, "ZNC hadronic") * + 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -2789,11 +3819,13 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMCCent, "Provide MC data with centrality bins", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMCCent, + "Provide MC data with centrality bins", false); - void processTrackCentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks) + void + processTrackCentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks) { // get magnetic field for run auto bc = col.bc_as(); @@ -2807,12 +3839,16 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun2Data, "Provide experimental data for Run 2 with centrality for track track", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processTrackCentRun2Data, + "Provide experimental data for Run 2 with centrality for track track", + false); - void processTrackV0CentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - aod::V0Datas const& fullV0s) + void + processTrackV0CentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + aod::V0Datas const& fullV0s) { // get magnetic field for run auto bc = col.bc_as(); @@ -2827,36 +3863,58 @@ struct FemtoUniverseProducerTask { fillV0(col, fullV0s, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0CentRun2Data, "Provide experimental data for Run 2 with centrality for track V0", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processTrackV0CentRun2Data, + "Provide experimental data for Run 2 with centrality for track V0", + false); - void processTrackCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks) + void + processTrackCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, + "ZNC hadronic") * + 1.e-3; // fetch IR + + auto tracksWithItsPid = + soa::Attach, + aod::pidits::ITSNSigmaEl, aod::pidits::ITSNSigmaPi, + aod::pidits::ITSNSigmaKa, aod::pidits::ITSNSigmaPr, + aod::pidits::ITSNSigmaDe, aod::pidits::ITSNSigmaTr, + aod::pidits::ITSNSigmaHe>(tracks); // fill the tables const auto colcheck = fillCollisionsCentRun3(col); if (colcheck) { fillCollisionsCentRun3ColExtra(col, ir); - fillTracks(tracks); + if (!confFillITSPid) { + fillTracks(tracks); + } else { + fillTracksITSTPCTOF(tracksWithItsPid); + } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun3Data, "Provide experimental data for Run 3 with centrality for track track", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processTrackCentRun3Data, + "Provide experimental data for Run 3 with centrality for track track", + false); - void processTrackCentRun3DataMC(aod::FemtoFullCollisionCentRun3MC const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, - aod::McParticles const&) + void processTrackCentRun3DataMC( + aod::FemtoFullCollisionCentRun3MC const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, aod::McParticles const&) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, + "ZNC hadronic") * + 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -2865,7 +3923,8 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun3DataMC, "Provide MC data for track analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun3DataMC, + "Provide MC data for track analysis", false); void processV0CentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, aod::BCsWithTimestamps const&, @@ -2875,7 +3934,9 @@ struct FemtoUniverseProducerTask { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, + "ZNC hadronic") * + 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -2885,11 +3946,13 @@ struct FemtoUniverseProducerTask { fillV0(col, fullV0s, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processV0CentRun3Data, "Provide experimental data for Run 3 with centrality for track track", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processV0CentRun3Data, + "Provide experimental data for Run 3 with centrality for track track", + false); void processTruthAndFullMCCentRun3V0( - aod::McCollisions const& mccols, - aod::McParticles const& mcParticles, + aod::McCollisions const& mccols, aod::McParticles const& mcParticles, aod::FemtoFullCollisionCentRun3MCs const& collisions, soa::Filtered> const& tracks, soa::Join const& fullV0s, @@ -2899,9 +3962,11 @@ struct FemtoUniverseProducerTask { // MCReco std::set recoMcIds; std::set mcCollisions; - for (const auto& col : collisions) { // loop over collisions - auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); // slicing for tracks - auto groupedV0Parts = fullV0s.sliceBy(perCollisionV0s, col.globalIndex()); // slicing for V0 + for (const auto& col : collisions) { // loop over collisions + auto groupedTracks = tracks.sliceBy( + perCollisionTracks, col.globalIndex()); // slicing for tracks + auto groupedV0Parts = + fullV0s.sliceBy(perCollisionV0s, col.globalIndex()); // slicing for V0 getMagneticFieldTesla(col.bc_as()); const auto colcheck = fillCollisionsCentRun3(col); if (colcheck) { @@ -2917,11 +3982,15 @@ struct FemtoUniverseProducerTask { // MCTruth for (const auto& mccol : mccols) { - if (confCollMCTruthOnlyReco && !mcCollisions.contains(mccol.globalIndex())) { + if (confCollMCTruthOnlyReco && + !mcCollisions.contains(mccol.globalIndex())) { continue; } - auto groupedCollisions = collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); // slicing for MC collisions - auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); // slicing for MC particles + auto groupedCollisions = + collisions.sliceBy(recoCollsPerMCCollCentPbPb, + mccol.globalIndex()); // slicing for MC collisions + auto groupedMCParticles = mcParticles.sliceBy( + perMCCollision, mccol.globalIndex()); // slicing for MC particles for (const auto& col : groupedCollisions) { const auto colcheck = fillMCTruthCollisionsCentRun3(col); if (colcheck) { @@ -2929,23 +3998,30 @@ struct FemtoUniverseProducerTask { if (confFillMCTruthV0Daugh) { fillV0MCTruth(groupedMCParticles); // fills MC V0s and its daughters } else { - fillParticles(groupedMCParticles, recoMcIds); // fills mc particles + fillParticles( + groupedMCParticles, recoMcIds); // fills mc particles } } } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3V0, "Provide both MC truth and reco for tracks and V0s with centrality", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processTruthAndFullMCCentRun3V0, + "Provide both MC truth and reco for tracks and V0s with centrality", + false); - void processCascadeCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - aod::CascDatas const& fullCascades) + void + processCascadeCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + aod::CascDatas const& fullCascades) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, + "ZNC hadronic") * + 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -2955,7 +4031,10 @@ struct FemtoUniverseProducerTask { fillCascade(col, fullCascades, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processCascadeCentRun3Data, "Provide experimental data for Run 3 with centrality for track track", false); + PROCESS_SWITCH( + FemtoUniverseProducerTask, processCascadeCentRun3Data, + "Provide experimental data for Run 3 with centrality for track track", + false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From b46fc10b180d10b2aea1c260eff7f5e3cad774bb Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 14 Apr 2026 23:20:36 +0200 Subject: [PATCH 3/5] Add ITS PIDNsigma for pions --- ...irTaskTrackTrackSpherHarMultKtExtended.cxx | 1817 ++++++++++++----- 1 file changed, 1362 insertions(+), 455 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx index a1891f20ecf..b5ba332f961 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -10,8 +10,11 @@ // or submit itself to any jurisdiction. /// \file femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx -/// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks and compute relative pair-momentum in three dimesnions -/// \remark This file is inherited from ~/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx on 17/06/2024 +/// \brief Tasks that reads the track tables used for the pairing and builds +/// pairs of two tracks and compute relative pair-momentum in three dimesnions +/// \remark This file is inherited from +/// ~/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx on +/// 17/06/2024 /// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@pw.edu.pl #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" @@ -50,17 +53,15 @@ namespace static constexpr int nPart = 2; static constexpr int nCuts = 5; static const std::vector partNames{"PartOne", "PartTwo"}; -static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; -static const float cutsTable[nPart][nCuts]{ - {4.05f, 1.f, 3.f, 3.f, 100.f}, - {4.05f, 1.f, 3.f, 3.f, 100.f}}; +static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", + "nSigmaTPCTOF", "MaxP"}; +static const float cutsTable[nPart][nCuts]{{4.05f, 1.f, 3.f, 3.f, 100.f}, + {4.05f, 1.f, 3.f, 3.f, 100.f}}; } // namespace -enum PairType { - PlusMinus, - PlusPlus, - MinusMinus -}; +enum PairType { PlusMinus, + PlusPlus, + MinusMinus }; struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { @@ -70,127 +71,295 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { /// Table for both particles struct : o2::framework::ConfigurableGroup { - Configurable confNsigmaCombined{"confNsigmaCombined", 3.0f, "TPC and TOF Pion Sigma (combined) for momentum > confTOFPtMin"}; - Configurable confNsigmaTPC{"confNsigmaTPC", 3.0f, "TPC Pion Sigma for momentum < confTOFPtMin"}; - Configurable confIsElReject{"confIsElReject", false, "Is electron rejection activated"}; - Configurable confNsigmaTPCElRejectMin{"confNsigmaTPCElRejectMin", 2.0f, "TPC Electron SigmaMin for momentum < confTOFPtMin"}; - Configurable confNsigmaTPCElRejectMax{"confNsigmaTPCElRejectMax", 2.0f, "TPC Electron SigmaMax for momentum < confTOFPtMin"}; - Configurable confTOFPtMin{"confTOFPtMin", 0.5f, "Min. Pt for which TOF is required for PID."}; - Configurable confEtaMax{"confEtaMax", 0.8f, "Higher limit for |Eta| (the same for both particles)"}; - - Configurable> confCutTable{"confCutTable", {cutsTable[0], nPart, nCuts, partNames, cutNames}, "Particle selections"}; - Configurable confNspecies{"confNspecies", 2, "Number of particle spieces with PID info"}; - Configurable confIsMC{"confIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; - Configurable> confTrkPIDnSigmaMax{"confTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, "This Configurable needs to be the same as the one used in the producer task"}; - Configurable confUse3D{"confUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; - Configurable confPhiBins{"confPhiBins", 29, "Number of phi bins in deta dphi"}; - Configurable confEtaBins{"confEtaBins", 29, "Number of eta bins in deta dphi"}; + Configurable confNsigmaCombined{ + "confNsigmaCombined", 3.0f, + "TPC and TOF Pion Sigma (combined) for momentum > confTOFPtMin"}; + Configurable confNsigmaTPC{ + "confNsigmaTPC", 3.0f, "TPC Pion Sigma for momentum < confTOFPtMin"}; + Configurable confNsigmaITSTPCCombined{ + "confNsigmaITSTPCCombined", 3.0f, + "ITS and TPC Pion Sigma (combined) for momentum < confTOFPtMin"}; + Configurable confIsElReject{"confIsElReject", false, + "Is electron rejection activated"}; + Configurable confIsAddITSNsigma{"confIsAddITSNsigma", false, + "Is ITS Pions nsigma added"}; + Configurable confNsigmaTPCElRejectMin{ + "confNsigmaTPCElRejectMin", 2.0f, + "TPC Electron SigmaMin for momentum < confTOFPtMin"}; + Configurable confNsigmaTPCElRejectMax{ + "confNsigmaTPCElRejectMax", 2.0f, + "TPC Electron SigmaMax for momentum < confTOFPtMin"}; + Configurable confTOFPtMin{ + "confTOFPtMin", 0.5f, "Min. Pt for which TOF is required for PID."}; + Configurable confEtaMax{ + "confEtaMax", 0.8f, + "Higher limit for |Eta| (the same for both particles)"}; + + Configurable> confCutTable{ + "confCutTable", + {cutsTable[0], nPart, nCuts, partNames, cutNames}, + "Particle selections"}; + Configurable confNspecies{"confNspecies", 2, + "Number of particle spieces with PID info"}; + Configurable confIsMC{ + "confIsMC", false, + "Enable additional Histogramms in the case of a MonteCarlo Run"}; + Configurable> confTrkPIDnSigmaMax{ + "confTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, + "This Configurable needs to be the same as the one used in the " + "producer task"}; + Configurable confUse3D{ + "confUse3D", false, + "Enable three dimensional histogramms (to be used only for analysis " + "with high statistics): k* vs mT vs multiplicity"}; + Configurable confPhiBins{"confPhiBins", 29, + "Number of phi bins in deta dphi"}; + Configurable confEtaBins{"confEtaBins", 29, + "Number of eta bins in deta dphi"}; Configurable confIsCPR{"confIsCPR", true, "Close Pair Rejection"}; - Configurable confIsCPRatITS{"confIsCPRatITS", false, "Close Pair check at ITS"}; - Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, "Plot CPR per radii"}; - Configurable confCPRdeltaPhiCutMax{"confCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; - Configurable confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; - Configurable confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; - Configurable confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; - Configurable confIsCPRkT{"confIsCPRkT", true, "kT dependent deltaEta-deltaPhi cut for Close Pair Rejection"}; - Configurable confIsCPRFraction{"confIsCPRFraction", true, "Close Pair Rejection with fraction of merged points"}; - Configurable confTrkDCAxyMax{"confTrkDCAxyMax", 0.2, "Max DCA in xy "}; + Configurable confIsCPRatITS{"confIsCPRatITS", false, + "Close Pair check at ITS"}; + Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, + "Plot CPR per radii"}; + Configurable confCPRdeltaPhiCutMax{ + "confCPRdeltaPhiCutMax", 0.0, + "Delta Phi max cut for Close Pair Rejection"}; + Configurable confCPRdeltaPhiCutMin{ + "confCPRdeltaPhiCutMin", 0.0, + "Delta Phi min cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMax{ + "confCPRdeltaEtaCutMax", 0.0, + "Delta Eta max cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMin{ + "confCPRdeltaEtaCutMin", 0.0, + "Delta Eta min cut for Close Pair Rejection"}; + Configurable confIsCPRkT{ + "confIsCPRkT", true, + "kT dependent deltaEta-deltaPhi cut for Close Pair Rejection"}; + Configurable confIsCPRFraction{ + "confIsCPRFraction", true, + "Close Pair Rejection with fraction of merged points"}; + Configurable confTrkDCAxyMax{"confTrkDCAxyMax", 0.2, + "Max DCA in xy "}; Configurable confTrkDCAzMax{"confTrkDCAzMax", 0.2, "Max DCA in z "}; - Configurable confTrkTPCcRowsMin{"confTrkTPCcRowsMin", 80, "Min of TPC crossed rows"}; - Configurable confTrkTPCfClsMin{"confTrkTPCfClsMin", 0.83, "Min. fraction of crossed rows/findable TPC clusters"}; - Configurable confTrkTPCfracsClsMax{"confTrkTPCfracsClsMax", 1.0, "Max of fraction of TPC shared cluster "}; - Configurable confTrkTPCnClsMin{"confTrkTPCnClsMin", 80, "Min number of TPC clusters"}; - Configurable confTrkTPCsClsMax{"confTrkTPCsClsMax", 160, "Max number of TPC shared clusters"}; - Configurable confPairFracSharedTPCclsMin{"confPairFracSharedTPCclsMin", 0.0, "Min. fraction of TPC shared clusters between two closed tracks"}; - Configurable confPairFracSharedTPCclsMax{"confPairFracSharedTPCclsMax", 1.0, "Miax. fraction of TPC shared clusters between two closed tracks"}; - Configurable confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; - Configurable confUseCCImCut{"confUseCCImCut", false, "Fill SH within specific quadrants of qout-qside"}; - Configurable confMinqTcut{"confMinqTcut", 0.005, "Min. qT cut on filling SH"}; - Configurable confUse1stand3rd{"confUse1stand3rd", false, "Use first and third quadrants of qout-qside"}; - Configurable confUse2ndand4th{"confUse2ndand4th", false, "Use second and fourth quadrants of qout-qside"}; - Configurable confIsFillAngqLCMS{"confIsFillAngqLCMS", true, "Fill qLCMS vs dEta vs dPhi"}; - Configurable confCPRDistMax{"confCPRDistMax", 0.0, "Max. radial seperation between two closed-pairs"}; - Configurable confCPRFracMax{"confCPRFracMax", 0.0, "Max. allowed fraction bad to all TPC points of radial seperation between two closed-pairs"}; - Configurable confCPRDphiAvgOrDist{"confCPRDphiAvgOrDist", true, "Close Pair Rejection by radial or angular seperation"}; - Configurable confIsCircularCut{"confIsCircularCut", true, "Close Pair Rejection within circular area"}; - Configurable confIs1D{"confIs1D", true, "Filling 1D 2k* dist. in MC truth"}; - Configurable confisIdenLCMS{"confisIdenLCMS", true, "Choosing identical or non-identical pairs in LCMS"}; - Configurable confIsWeight{"confIsWeight", true, "Fill quantum weight"}; - Configurable confisIdenPRF{"confisIdenPRF", false, "Choosing identical or non-identical pairs in PRF"}; - Configurable confIsfilldEtadPhiTPCcls{"confIsfilldEtadPhiTPCcls", false, "Filling of 3D histogram PairFracSharedTPCcls vs. dEta vs. dPhiStar"}; - - Configurable> confCPRdeltaEtaCutMaxVec{"confCPRdeltaEtaCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta eta cut in CPR"}; - Configurable> confCPRdeltaEtaCutMinVec{"confCPRdeltaEtaCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta eta cut in CPR"}; - Configurable> confCPRdeltaPhiCutMaxVec{"confCPRdeltaPhiCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta phi cut in CPR"}; - Configurable> confCPRdeltaPhiCutMinVec{"confCPRdeltaPhiCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta phi cut in CPR"}; - - Configurable> confCPRdeltaEtaCutFractionMaxVec{"confCPRdeltaEtaCutFractionMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta eta cut in CPR Fraction"}; - Configurable> confCPRdeltaEtaCutFractionMinVec{"confCPRdeltaEtaCutFractionMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta eta cut in CPR Fraction"}; - Configurable> confCPRdeltaPhiCutFractionMaxVec{"confCPRdeltaPhiCutFractionMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta phi cut in CPR Fraction"}; - Configurable> confCPRdeltaPhiCutFractionMinVec{"confCPRdeltaPhiCutFractionMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta phi cut in CPR Fraction"}; - - ConfigurableAxis confDeltaEtaAxis{"confDeltaEtaAxis", {100, -0.15, 0.15}, "DeltaEta"}; - ConfigurableAxis confDeltaPhiStarAxis{"confDeltaPhiStarAxis", {100, -0.15, 0.15}, "DeltaPhiStar"}; + Configurable confTrkTPCcRowsMin{"confTrkTPCcRowsMin", 80, + "Min of TPC crossed rows"}; + Configurable confTrkTPCfClsMin{ + "confTrkTPCfClsMin", 0.83, + "Min. fraction of crossed rows/findable TPC clusters"}; + Configurable confTrkTPCfracsClsMax{ + "confTrkTPCfracsClsMax", 1.0, "Max of fraction of TPC shared cluster "}; + Configurable confTrkTPCnClsMin{"confTrkTPCnClsMin", 80, + "Min number of TPC clusters"}; + Configurable confTrkTPCsClsMax{"confTrkTPCsClsMax", 160, + "Max number of TPC shared clusters"}; + Configurable confPairFracSharedTPCclsMin{ + "confPairFracSharedTPCclsMin", 0.0, + "Min. fraction of TPC shared clusters between two closed tracks"}; + Configurable confPairFracSharedTPCclsMax{ + "confPairFracSharedTPCclsMax", 1.0, + "Miax. fraction of TPC shared clusters between two closed tracks"}; + Configurable confCPRChosenRadii{ + "confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; + Configurable confUseCCImCut{ + "confUseCCImCut", false, + "Fill SH within specific quadrants of qout-qside"}; + Configurable confMinqTcut{"confMinqTcut", 0.005, + "Min. qT cut on filling SH"}; + Configurable confUse1stand3rd{ + "confUse1stand3rd", false, + "Use first and third quadrants of qout-qside"}; + Configurable confUse2ndand4th{ + "confUse2ndand4th", false, + "Use second and fourth quadrants of qout-qside"}; + Configurable confIsFillAngqLCMS{"confIsFillAngqLCMS", true, + "Fill qLCMS vs dEta vs dPhi"}; + Configurable confCPRDistMax{ + "confCPRDistMax", 0.0, + "Max. radial seperation between two closed-pairs"}; + Configurable confCPRFracMax{ + "confCPRFracMax", 0.0, + "Max. allowed fraction bad to all TPC points of radial seperation " + "between two closed-pairs"}; + Configurable confCPRDphiAvgOrDist{ + "confCPRDphiAvgOrDist", true, + "Close Pair Rejection by radial or angular seperation"}; + Configurable confIsCircularCut{ + "confIsCircularCut", true, "Close Pair Rejection within circular area"}; + Configurable confIs1D{"confIs1D", true, + "Filling 1D 2k* dist. in MC truth"}; + Configurable confisIdenLCMS{ + "confisIdenLCMS", true, + "Choosing identical or non-identical pairs in LCMS"}; + Configurable confIsWeight{"confIsWeight", true, + "Fill quantum weight"}; + Configurable confisIdenPRF{ + "confisIdenPRF", false, + "Choosing identical or non-identical pairs in PRF"}; + Configurable confIsfilldEtadPhiTPCcls{ + "confIsfilldEtadPhiTPCcls", false, + "Filling of 3D histogram PairFracSharedTPCcls vs. dEta vs. dPhiStar"}; + + Configurable> confCPRdeltaEtaCutMaxVec{ + "confCPRdeltaEtaCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for max delta eta cut in CPR"}; + Configurable> confCPRdeltaEtaCutMinVec{ + "confCPRdeltaEtaCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for min delta eta cut in CPR"}; + Configurable> confCPRdeltaPhiCutMaxVec{ + "confCPRdeltaPhiCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for max delta phi cut in CPR"}; + Configurable> confCPRdeltaPhiCutMinVec{ + "confCPRdeltaPhiCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for min delta phi cut in CPR"}; + + Configurable> confCPRdeltaEtaCutFractionMaxVec{ + "confCPRdeltaEtaCutFractionMaxVec", + std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for max delta eta cut in CPR Fraction"}; + Configurable> confCPRdeltaEtaCutFractionMinVec{ + "confCPRdeltaEtaCutFractionMinVec", + std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for min delta eta cut in CPR Fraction"}; + Configurable> confCPRdeltaPhiCutFractionMaxVec{ + "confCPRdeltaPhiCutFractionMaxVec", + std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for max delta phi cut in CPR Fraction"}; + Configurable> confCPRdeltaPhiCutFractionMinVec{ + "confCPRdeltaPhiCutFractionMinVec", + std::vector{0.0f, 0.0f, 0.0f, 0.0f}, + "Bins for min delta phi cut in CPR Fraction"}; + + ConfigurableAxis confDeltaEtaAxis{ + "confDeltaEtaAxis", + {100, -0.15, 0.15}, + "DeltaEta"}; + ConfigurableAxis confDeltaPhiStarAxis{ + "confDeltaPhiStarAxis", + {100, -0.15, 0.15}, + "DeltaPhiStar"}; } twotracksconfigs; - using FemtoFullParticles = soa::Join; + using FemtoFullParticles = + soa::Join; // Filters for selecting particles (both p1 and p2) - Filter trackAdditionalfilter = ((nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax) && - (aod::track::dcaXY <= twotracksconfigs.confTrkDCAxyMax) && - (aod::track::dcaZ <= twotracksconfigs.confTrkDCAzMax) && - (aod::femtouniverseparticle::tpcNClsCrossedRows >= static_cast(twotracksconfigs.confTrkTPCcRowsMin)) && - (aod::femtouniverseparticle::tpcFractionSharedCls <= twotracksconfigs.confTrkTPCfracsClsMax) && - (aod::femtouniverseparticle::tpcNClsFound >= static_cast(twotracksconfigs.confTrkTPCnClsMin)) && - (aod::track::tpcNClsShared <= static_cast(twotracksconfigs.confTrkTPCsClsMax))); + Filter trackAdditionalfilter = + ((nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax) && + (aod::track::dcaXY <= twotracksconfigs.confTrkDCAxyMax) && + (aod::track::dcaZ <= twotracksconfigs.confTrkDCAzMax) && + (aod::femtouniverseparticle::tpcNClsCrossedRows >= + static_cast(twotracksconfigs.confTrkTPCcRowsMin)) && + (aod::femtouniverseparticle::tpcFractionSharedCls <= + twotracksconfigs.confTrkTPCfracsClsMax) && + (aod::femtouniverseparticle::tpcNClsFound >= + static_cast(twotracksconfigs.confTrkTPCnClsMin)) && + (aod::track::tpcNClsShared <= + static_cast(twotracksconfigs.confTrkTPCsClsMax))); using FilteredFemtoFullParticles = soa::Filtered; - // using FilteredFemtoFullParticles = FemtoFullParticles; //if no filtering is applied uncomment this optionconfIsCPRkT - using FemtoRecoParticles = soa::Join; + // using FilteredFemtoFullParticles = FemtoFullParticles; //if no filtering is + // applied uncomment this optionconfIsCPRkT + using FemtoRecoParticles = soa::Join; using FilteredFemtoRecoParticles = soa::Filtered; SliceCache cache; - Preslice perCol = aod::femtouniverseparticle::fdCollisionId; + Preslice perCol = + aod::femtouniverseparticle::fdCollisionId; - using FemtoTruthParticles = soa::Join; - Preslice perColMCTruth = aod::femtouniverseparticle::fdCollisionId; + using FemtoTruthParticles = soa::Join; + Preslice perColMCTruth = + aod::femtouniverseparticle::fdCollisionId; /// Particle 1 struct : o2::framework::ConfigurableGroup { - Configurable confPDGCodePartOne{"confPDGCodePartOne", 211, "Particle 1 - PDG code"}; - Configurable confPIDPartOne{"confPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> - Configurable confPtLowPart1{"confPtLowPart1", 0.14, "Lower limit for Pt for the first particle"}; - Configurable confPtHighPart1{"confPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; + Configurable confPDGCodePartOne{"confPDGCodePartOne", 211, + "Particle 1 - PDG code"}; + Configurable confPIDPartOne{ + "confPIDPartOne", 2, + "Particle 1 - Read from cutCulator"}; // we also need the possibility to + // specify whether the bit is + // true/false + // ->std>>vector>int>> + Configurable confPtLowPart1{ + "confPtLowPart1", 0.14, "Lower limit for Pt for the first particle"}; + Configurable confPtHighPart1{ + "confPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; Configurable confChargePart1{"confChargePart1", 1, "Particle 1 sign"}; } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + Partition partsOne = + (aod::femtouniverseparticle::partType == + uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + aod::femtouniverseparticle::sign == + as(trackonefilter.confChargePart1) && + aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && + aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMC = + (aod::femtouniverseparticle::partType == + uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + aod::femtouniverseparticle::sign == + as(trackonefilter.confChargePart1) && + aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && + aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMCTruth = + aod::femtouniverseparticle::partType == + uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); // /// Histogramming for particle 1 - FemtoUniverseParticleHisto trackHistoPartOne; + FemtoUniverseParticleHisto + trackHistoPartOne; /// Particle 2 struct : o2::framework::ConfigurableGroup { - Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 211, "Particle 2 - PDG code"}; - // Configurable confCutPartTwo{"confCutPartTwo", 5542474, "Particle 2 - Selection bit"}; - Configurable confPIDPartTwo{"confPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> - - Configurable confPtLowPart2{"confPtLowPart2", 0.14, "Lower limit for Pt for the second particle"}; - Configurable confPtHighPart2{"confPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; + Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 211, + "Particle 2 - PDG code"}; + // Configurable confCutPartTwo{"confCutPartTwo", 5542474, + // "Particle 2 - Selection bit"}; + Configurable confPIDPartTwo{ + "confPIDPartTwo", 2, + "Particle 2 - Read from cutCulator"}; // we also need the possibility to + // specify whether the bit is + // true/false + // ->std>>vector> + + Configurable confPtLowPart2{ + "confPtLowPart2", 0.14, "Lower limit for Pt for the second particle"}; + Configurable confPtHighPart2{ + "confPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; Configurable confChargePart2{"confChargePart2", -1, "Particle 2 sign"}; } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + Partition partsTwo = + (aod::femtouniverseparticle::partType == + uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + (aod::femtouniverseparticle::sign == + as(tracktwofilter.confChargePart2)) && + aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && + aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMC = + aod::femtouniverseparticle::partType == + uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && + (aod::femtouniverseparticle::sign == + as(tracktwofilter.confChargePart2)) && + aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && + aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMCTruth = + aod::femtouniverseparticle::partType == + uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); /// Histogramming for particle 2 - FemtoUniverseParticleHisto trackHistoPartTwo; + FemtoUniverseParticleHisto + trackHistoPartTwo; /// Histogramming for Event FemtoUniverseEventHisto eventHisto; @@ -200,110 +369,268 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { std::vector kNsigma; /// Event part - Configurable confV0MLow{"confV0MLow", 0.0, "Lower limit for V0M multiplicity"}; - Configurable confV0MHigh{"confV0MHigh", 25000.0, "Upper limit for V0M multiplicity"}; - Configurable confTPCOccupancyLow{"confTPCOccupancyLow", 0, "Lower limit for TPC occupancy"}; - Configurable confTPCOccupancyHigh{"confTPCOccupancyHigh", 500, "Higher limit for TPC occupancy"}; - Configurable confIntRateLow{"confIntRateLow", 0.0, "Lower limit for interaction rate"}; - Configurable confIntRateHigh{"confIntRateHigh", 10000.0, "Higher limit for interaction rate"}; - Configurable confIsCent{"confIsCent", true, "Condition to choose centrality of multiplicity for mixing"}; - - Filter collfilterFDtable = (o2::aod::femtouniversecollision::multV0M > confV0MLow) && (o2::aod::femtouniversecollision::multV0M < confV0MHigh); - Filter collfilterFDExttable = (o2::aod::femtouniversecollision::interactionRate > confIntRateLow) && (o2::aod::femtouniversecollision::interactionRate < confIntRateHigh) && - (o2::aod::femtouniversecollision::occupancy >= confTPCOccupancyLow) && (o2::aod::femtouniversecollision::occupancy < confTPCOccupancyHigh); - using FilteredFDCollisions = soa::Filtered>; + Configurable confV0MLow{"confV0MLow", 0.0, + "Lower limit for V0M multiplicity"}; + Configurable confV0MHigh{"confV0MHigh", 25000.0, + "Upper limit for V0M multiplicity"}; + Configurable confTPCOccupancyLow{"confTPCOccupancyLow", 0, + "Lower limit for TPC occupancy"}; + Configurable confTPCOccupancyHigh{"confTPCOccupancyHigh", 500, + "Higher limit for TPC occupancy"}; + Configurable confIntRateLow{"confIntRateLow", 0.0, + "Lower limit for interaction rate"}; + Configurable confIntRateHigh{"confIntRateHigh", 10000.0, + "Higher limit for interaction rate"}; + Configurable confIsCent{ + "confIsCent", true, + "Condition to choose centrality of multiplicity for mixing"}; + + Filter collfilterFDtable = + (o2::aod::femtouniversecollision::multV0M > confV0MLow) && + (o2::aod::femtouniversecollision::multV0M < confV0MHigh); + Filter collfilterFDExttable = + (o2::aod::femtouniversecollision::interactionRate > confIntRateLow) && + (o2::aod::femtouniversecollision::interactionRate < confIntRateHigh) && + (o2::aod::femtouniversecollision::occupancy >= confTPCOccupancyLow) && + (o2::aod::femtouniversecollision::occupancy < confTPCOccupancyHigh); + using FilteredFDCollisions = + soa::Filtered>; using FilteredFDCollision = FilteredFDCollisions::iterator; - // Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax); // example filtering on Configurable + // Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < + // twotracksconfigs.confEtaMax); // example filtering on Configurable /// Particle part - ConfigurableAxis confTempFitVarBins{"confDTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; - ConfigurableAxis confTempFitVarpTBins{"confTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarBins{ + "confDTempFitVarBins", + {300, -0.15, 0.15}, + "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarpTBins{ + "confTempFitVarpTBins", + {20, 0.5, 4.05}, + "pT binning of the pT vs. TempFitVar plot"}; /// Correlation part - ConfigurableAxis confMultBinsCent{"confMultBinsCent", {VARIABLE_WIDTH, 0.0f, 2.5f, 5.0f, 7.5f, 10.0f, 12.5f, 15.0f, 17.5f, 20.0f, 22.5f, 25.0f, 27.5f, 30.0f, 32.5f, 35.0f, 37.5f, 40.0f, 42.5f, 45.0f, 47.5f, 50.0f, 52.5f, 55.0f, 57.5f, 60.0f, 62.5f, 65.0f, 67.5f, 70.5f, 75.0f, 80.0f, 90.0f, 100.0f, 99999.f}, "Mixing bins - centrality"}; - ConfigurableAxis confMultBinsMult{"confMultBinsMult", {VARIABLE_WIDTH, 0.0f, 400.0f, 800.0f, 1200.0f, 1600.0f, 2000.0f, 2500.0f, 3000.0f, 3500.0f, 4000.0f, 4500.0f, 5000.0f, 6000.0f, 7000.0f, 8000.0f, 9000.0f, 10000.0f, 11000.0f, 12000.0f, 13000.0f, 14000.0f, 15000.0f, 16000.0f, 17000.0f, 18000.0f, 99999.f}, "Mixing bins - centrality"}; - ConfigurableAxis confMultKstarBins{"confMultKstarBins", {VARIABLE_WIDTH, 0.0f, 200.0f}, "Bins for kstar analysis in multiplicity or centrality bins (10 is maximum)"}; - ConfigurableAxis confKtKstarBins{"confKtKstarBins", {VARIABLE_WIDTH, 0.1f, 0.2f, 0.3f, 0.4f}, "Bins for kstar analysis in kT bins"}; - ConfigurableAxis confVtxBins{"confVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; - - ConfigurableAxis confmTBins3D{"confmTBins3D", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - ConfigurableAxis confmultBins3D{"confmultBins3D", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - - ColumnBinningPolicy colBinningCent{{confVtxBins, confMultBinsCent}, true}; - ColumnBinningPolicy colBinningNtr{{confVtxBins, confMultBinsMult}, true}; - - ConfigurableAxis confkstarBins{"confkstarBins", {60, 0.0, 0.3}, "binning kstar"}; + ConfigurableAxis confMultBinsCent{ + "confMultBinsCent", + {VARIABLE_WIDTH, 0.0f, 2.5f, 5.0f, 7.5f, 10.0f, 12.5f, 15.0f, 17.5f, + 20.0f, 22.5f, 25.0f, 27.5f, 30.0f, 32.5f, 35.0f, 37.5f, 40.0f, + 42.5f, 45.0f, 47.5f, 50.0f, 52.5f, 55.0f, 57.5f, 60.0f, 62.5f, + 65.0f, 67.5f, 70.5f, 75.0f, 80.0f, 90.0f, 100.0f, 99999.f}, + "Mixing bins - centrality"}; + ConfigurableAxis confMultBinsMult{ + "confMultBinsMult", + {VARIABLE_WIDTH, 0.0f, 400.0f, 800.0f, 1200.0f, 1600.0f, + 2000.0f, 2500.0f, 3000.0f, 3500.0f, 4000.0f, 4500.0f, + 5000.0f, 6000.0f, 7000.0f, 8000.0f, 9000.0f, 10000.0f, + 11000.0f, 12000.0f, 13000.0f, 14000.0f, 15000.0f, 16000.0f, + 17000.0f, 18000.0f, 99999.f}, + "Mixing bins - centrality"}; + ConfigurableAxis confMultKstarBins{"confMultKstarBins", + {VARIABLE_WIDTH, 0.0f, 200.0f}, + "Bins for kstar analysis in multiplicity " + "or centrality bins (10 is maximum)"}; + ConfigurableAxis confKtKstarBins{"confKtKstarBins", + {VARIABLE_WIDTH, 0.1f, 0.2f, 0.3f, 0.4f}, + "Bins for kstar analysis in kT bins"}; + ConfigurableAxis confVtxBins{"confVtxBins", + {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, + 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, + "Mixing bins - z-vertex"}; + + ConfigurableAxis confmTBins3D{ + "confmTBins3D", + {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, + "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set " + "<> to true in order to use)"}; + ConfigurableAxis confmultBins3D{ + "confmultBins3D", + {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, + "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs " + "mT (set <> to true in order to use)"}; + + ColumnBinningPolicy + colBinningCent{{confVtxBins, confMultBinsCent}, true}; + ColumnBinningPolicy + colBinningNtr{{confVtxBins, confMultBinsMult}, true}; + + ConfigurableAxis confkstarBins{ + "confkstarBins", + {60, 0.0, 0.3}, + "binning kstar"}; ConfigurableAxis confkTBins{"confkTBins", {150, 0., 9.}, "binning kT"}; ConfigurableAxis confmTBins{"confmTBins", {225, 0., 7.5}, "binning mT"}; Configurable confIsLCMS{"confIsLCMS", true, "Choosing LCMS or PRF"}; - Configurable confNEventsMix{"confNEventsMix", 5, "Number of events for mixing"}; + Configurable confNEventsMix{"confNEventsMix", 5, + "Number of events for mixing"}; Configurable confLMax{"confLMax", 2, "Maximum value of l"}; - Configurable cfgProcessPM{"cfgProcessPM", false, "Process particles of the opposite charge"}; - Configurable cfgProcessPP{"cfgProcessPP", true, "Process particles of the same, positice charge"}; - Configurable cfgProcessMM{"cfgProcessMM", true, "Process particles of the same, positice charge"}; - Configurable cfgProcessMultBins{"cfgProcessMultBins", true, "Process kstar histograms in multiplicity bins (in multiplicity bins)"}; - Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"}; - Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; - - FemtoUniverseSHContainer sameEventCont; - FemtoUniverseSHContainer mixedEventCont; - - FemtoUniverseSHContainer sameEventContPP; - FemtoUniverseSHContainer mixedEventContPP; - - FemtoUniverseSHContainer sameEventContMM; - FemtoUniverseSHContainer mixedEventContMM; - - FemtoUniverseContainer sameEventCont1D_PP; - FemtoUniverseContainer mixedEventCont1D_PP; - FemtoUniverseContainer sameEventCont1D_MM; - FemtoUniverseContainer mixedEventCont1D_MM; - - FemtoUniversePairCleaner pairCleaner; - FemtoUniverseDetaDphiStar pairCloseRejection; + Configurable cfgProcessPM{"cfgProcessPM", false, + "Process particles of the opposite charge"}; + Configurable cfgProcessPP{ + "cfgProcessPP", true, "Process particles of the same, positice charge"}; + Configurable cfgProcessMM{ + "cfgProcessMM", true, "Process particles of the same, positice charge"}; + Configurable cfgProcessMultBins{ + "cfgProcessMultBins", true, + "Process kstar histograms in multiplicity bins (in multiplicity bins)"}; + Configurable cfgProcessKtBins{ + "cfgProcessKtBins", true, + "Process kstar histograms in kT bins (if cfgProcessMultBins is set " + "false, this will not be processed regardless this Configurable state)"}; + Configurable cfgProcessKtMt3DCF{ + "cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; + + FemtoUniverseSHContainer + sameEventCont; + FemtoUniverseSHContainer + mixedEventCont; + + FemtoUniverseSHContainer + sameEventContPP; + FemtoUniverseSHContainer + mixedEventContPP; + + FemtoUniverseSHContainer + sameEventContMM; + FemtoUniverseSHContainer + mixedEventContMM; + + FemtoUniverseContainer + sameEventCont1D_PP; + FemtoUniverseContainer + mixedEventCont1D_PP; + FemtoUniverseContainer + sameEventCont1D_MM; + FemtoUniverseContainer + mixedEventCont1D_MM; + + FemtoUniversePairCleaner + pairCleaner; + FemtoUniverseDetaDphiStar + pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairSHCentMultKt sameEventMultCont; - PairSHCentMultKt mixedEventMultCont; - - PairSHCentMultKt sameEventMultContPP; - PairSHCentMultKt mixedEventMultContPP; - - PairSHCentMultKt sameEventMultContMM; - PairSHCentMultKt mixedEventMultContMM; + PairSHCentMultKt + sameEventMultCont; + PairSHCentMultKt + mixedEventMultCont; + + PairSHCentMultKt + sameEventMultContPP; + PairSHCentMultKt + mixedEventMultContPP; + + PairSHCentMultKt + sameEventMultContMM; + PairSHCentMultKt + mixedEventMultContMM; float mass1 = -1; float mass2 = -1; /// Histogram output - HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; - HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry resultRegistry1D{"Correlations1D", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry resultRegistryPM{"CorrelationsPM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry resultRegistryPP{"CorrelationsPP", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry resultRegistryMM{"CorrelationsMM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry MixQaRegistry{"MixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; - - HistogramRegistry SameMultRegistryPM{"SameMultRegistryPM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry MixedMultRegistryPM{"MixedMultRegistryPM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - - HistogramRegistry SameMultRegistryPP{"SameMultRegistryPP", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry MixedMultRegistryPP{"MixedMultRegistryPP", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - - HistogramRegistry SameMultRegistryMM{"SameMultRegistryMM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry MixedMultRegistryMM{"MixedMultRegistryMM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry qaRegistry{ + "TrackQA", + {}, + OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry resultRegistry{ + "Correlations", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry resultRegistry1D{"Correlations1D", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry resultRegistryPM{"CorrelationsPM", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry resultRegistryPP{"CorrelationsPP", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry resultRegistryMM{"CorrelationsMM", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry MixQaRegistry{ + "MixQaRegistry", + {}, + OutputObjHandlingPolicy::AnalysisObject}; + + HistogramRegistry SameMultRegistryPM{"SameMultRegistryPM", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry MixedMultRegistryPM{"MixedMultRegistryPM", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + + HistogramRegistry SameMultRegistryPP{"SameMultRegistryPP", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry MixedMultRegistryPP{"MixedMultRegistryPP", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + + HistogramRegistry SameMultRegistryMM{"SameMultRegistryMM", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; + HistogramRegistry MixedMultRegistryMM{"MixedMultRegistryMM", + {}, + OutputObjHandlingPolicy::AnalysisObject, + true, + true}; TRandom2* randgen; // PID for protons - bool IsProtonNSigma(float mom, float nsigmaTPCPr, float nsigmaTOFPr) // previous version from: https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx + bool IsProtonNSigma( + float mom, float nsigmaTPCPr, + float + nsigmaTOFPr) // previous version from: + // https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using Configurables: - // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed - // confNsigmaTPC -> TPC Sigma for momentum < 0.5 + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF + // not needed confNsigmaTPC -> TPC Sigma for momentum < 0.5 // confNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > 0.5 if (mom < twotracksconfigs.confTOFPtMin) { @@ -313,7 +640,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { return false; } } else { - if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < twotracksconfigs.confNsigmaCombined) { + if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < + twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -361,19 +689,30 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } } - bool IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCElReject) + bool IsPionNSigma(float mom, float nsigmaITSPi, float nsigmaTPCPi, + float nsigmaTOFPi, float nsigmaTPCElReject) { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using Configurables: - // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed - // confNsigmaTPC -> TPC Sigma for momentum < 0.5 - // confNsigmaCombined -> TPC and TOF Pion Sigma (combined) for momentum > 0.5 + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF + // not needed confNsigmaTPC -> TPC Sigma for momentum < 0.5 + // confNsigmaCombined -> TPC and TOF Pion Sigma (combined) for momentum > + // 0.5 if (true) { if (mom < twotracksconfigs.confTOFPtMin) { if (twotracksconfigs.confIsElReject) { - if ((std::abs(nsigmaTPCPi) < twotracksconfigs.confNsigmaTPC) && (nsigmaTPCElReject < twotracksconfigs.confNsigmaTPCElRejectMin || nsigmaTPCElReject > twotracksconfigs.confNsigmaTPCElRejectMax)) { + if ((std::abs(nsigmaTPCPi) < twotracksconfigs.confNsigmaTPC) && + (nsigmaTPCElReject < twotracksconfigs.confNsigmaTPCElRejectMin || + nsigmaTPCElReject > twotracksconfigs.confNsigmaTPCElRejectMax)) { + return true; + } else { + return false; + } + } else if (twotracksconfigs.confIsAddITSNsigma) { + if (std::hypot(nsigmaITSPi, nsigmaTPCPi) < + twotracksconfigs.confNsigmaITSTPCCombined) { return true; } else { return false; @@ -386,7 +725,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } } } else { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < twotracksconfigs.confNsigmaCombined) { + if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < + twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -396,7 +736,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { return false; } - bool IsParticleNSigma(int8_t particle_number, float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK, float nsigmaTPCElReject) + bool IsParticleNSigma(int8_t particle_number, float mom, float nsigmaITSPi, + float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, + float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK, + float nsigmaTPCElReject) { if (particle_number == 1) { switch (trackonefilter.confPDGCodePartOne) { @@ -406,7 +749,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { break; case 211: // Pion+ case -211: // Pion- - return IsPionNSigma(mom, nsigmaTPCPi, nsigmaTOFPi, nsigmaTPCElReject); + return IsPionNSigma(mom, nsigmaITSPi, nsigmaTPCPi, nsigmaTOFPi, + nsigmaTPCElReject); break; case 321: // Kaon+ case -321: // Kaon- @@ -424,7 +768,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { break; case 211: // Pion+ case -211: // Pion- - return IsPionNSigma(mom, nsigmaTPCPi, nsigmaTOFPi, nsigmaTPCElReject); + return IsPionNSigma(mom, nsigmaITSPi, nsigmaTPCPi, nsigmaTOFPi, + nsigmaTPCElReject); break; case 321: // Kaon+ case -321: // Kaon- @@ -435,7 +780,9 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } return false; } else { - LOGF(fatal, "Wrong number of particle chosen! It should be 1 or 2. It is -> %d", particle_number); + LOGF(fatal, + "Wrong number of particle chosen! It should be 1 or 2. It is -> %d", + particle_number); } return false; } @@ -443,12 +790,20 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { void init(InitContext&) { eventHisto.init(&qaRegistry); - trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, trackonefilter.confPDGCodePartOne, true); + trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, + confTempFitVarBins, twotracksconfigs.confIsMC, + trackonefilter.confPDGCodePartOne, true, + std::nullopt, twotracksconfigs.confIsAddITSNsigma); - trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, tracktwofilter.confPDGCodePartTwo, true); + trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, + confTempFitVarBins, twotracksconfigs.confIsMC, + tracktwofilter.confPDGCodePartTwo, true, + std::nullopt, twotracksconfigs.confIsAddITSNsigma); - MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, + {{120, -0.5, 119.5}}); + MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, + {{120, -0.5, 119.5}}); mass1 = pdg->Mass(trackonefilter.confPDGCodePartOne); mass2 = pdg->Mass(tracktwofilter.confPDGCodePartTwo); @@ -457,11 +812,17 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!cfgProcessKtMt3DCF) { sameEventCont.init(&resultRegistryPM, confkstarBins, confLMax); mixedEventCont.init(&resultRegistryPM, confkstarBins, confLMax); - sameEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); - mixedEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + sameEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); + mixedEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); } else { - sameEventMultCont.init(&SameMultRegistryPM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); - mixedEventMultCont.init(&MixedMultRegistryPM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); + sameEventMultCont.init(&SameMultRegistryPM, confkstarBins, + confMultKstarBins, confKtKstarBins, confLMax, + twotracksconfigs.confIs1D); + mixedEventMultCont.init(&MixedMultRegistryPM, confkstarBins, + confMultKstarBins, confKtKstarBins, confLMax, + twotracksconfigs.confIs1D); } } @@ -469,38 +830,89 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!cfgProcessKtMt3DCF) { sameEventContPP.init(&resultRegistryPP, confkstarBins, confLMax); mixedEventContPP.init(&resultRegistryPP, confkstarBins, confLMax); - sameEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); - mixedEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + sameEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); + mixedEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); } else { - sameEventMultContPP.init(&SameMultRegistryPP, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); - mixedEventMultContPP.init(&MixedMultRegistryPP, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); - } - sameEventCont1D_PP.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - sameEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); - mixedEventCont1D_PP.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - mixedEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + sameEventMultContPP.init(&SameMultRegistryPP, confkstarBins, + confMultKstarBins, confKtKstarBins, confLMax, + twotracksconfigs.confIs1D); + mixedEventMultContPP.init(&MixedMultRegistryPP, confkstarBins, + confMultKstarBins, confKtKstarBins, confLMax, + twotracksconfigs.confIs1D); + } + sameEventCont1D_PP.init( + &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, + confmTBins, confmultBins3D, confmTBins3D, + twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, + twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + sameEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); + mixedEventCont1D_PP.init( + &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, + confmTBins, confmultBins3D, confmTBins3D, + twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, + twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + mixedEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); } if (cfgProcessMM) { if (!cfgProcessKtMt3DCF) { sameEventContMM.init(&resultRegistryMM, confkstarBins, confLMax); mixedEventContMM.init(&resultRegistryMM, confkstarBins, confLMax); - sameEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); - mixedEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + sameEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); + mixedEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); } else { - sameEventMultContMM.init(&SameMultRegistryMM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); - mixedEventMultContMM.init(&MixedMultRegistryMM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); - } - sameEventCont1D_MM.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - sameEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); - mixedEventCont1D_MM.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - mixedEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + sameEventMultContMM.init(&SameMultRegistryMM, confkstarBins, + confMultKstarBins, confKtKstarBins, confLMax, + twotracksconfigs.confIs1D); + mixedEventMultContMM.init(&MixedMultRegistryMM, confkstarBins, + confMultKstarBins, confKtKstarBins, confLMax, + twotracksconfigs.confIs1D); + } + sameEventCont1D_MM.init( + &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, + confmTBins, confmultBins3D, confmTBins3D, + twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, + twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + sameEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); + mixedEventCont1D_MM.init( + &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, + confmTBins, confmultBins3D, confmTBins3D, + twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, + twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + mixedEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, + tracktwofilter.confPDGCodePartTwo); } pairCleaner.init(&qaRegistry); if (twotracksconfigs.confIsCPR.value) { - pairCloseRejection.init(&resultRegistry, &qaRegistry, twotracksconfigs.confDeltaEtaAxis, twotracksconfigs.confDeltaPhiStarAxis, twotracksconfigs.confCPRdeltaPhiCutMin.value, twotracksconfigs.confCPRdeltaPhiCutMax.value, twotracksconfigs.confCPRdeltaEtaCutMin.value, twotracksconfigs.confCPRdeltaEtaCutMax.value, twotracksconfigs.confCPRChosenRadii.value, twotracksconfigs.confCPRPlotPerRadii.value); - pairCloseRejection.init_kT(&resultRegistry, confKtKstarBins, twotracksconfigs.confDeltaEtaAxis, twotracksconfigs.confDeltaPhiStarAxis, twotracksconfigs.confCPRdeltaPhiCutMinVec.value, twotracksconfigs.confCPRdeltaPhiCutMaxVec.value, twotracksconfigs.confCPRdeltaEtaCutMinVec.value, twotracksconfigs.confCPRdeltaEtaCutMaxVec.value, twotracksconfigs.confCPRdeltaPhiCutFractionMinVec.value, twotracksconfigs.confCPRdeltaPhiCutFractionMaxVec.value, twotracksconfigs.confCPRdeltaEtaCutFractionMinVec.value, twotracksconfigs.confCPRdeltaEtaCutFractionMaxVec.value, twotracksconfigs.confIsfilldEtadPhiTPCcls); + pairCloseRejection.init(&resultRegistry, &qaRegistry, + twotracksconfigs.confDeltaEtaAxis, + twotracksconfigs.confDeltaPhiStarAxis, + twotracksconfigs.confCPRdeltaPhiCutMin.value, + twotracksconfigs.confCPRdeltaPhiCutMax.value, + twotracksconfigs.confCPRdeltaEtaCutMin.value, + twotracksconfigs.confCPRdeltaEtaCutMax.value, + twotracksconfigs.confCPRChosenRadii.value, + twotracksconfigs.confCPRPlotPerRadii.value); + pairCloseRejection.init_kT( + &resultRegistry, confKtKstarBins, twotracksconfigs.confDeltaEtaAxis, + twotracksconfigs.confDeltaPhiStarAxis, + twotracksconfigs.confCPRdeltaPhiCutMinVec.value, + twotracksconfigs.confCPRdeltaPhiCutMaxVec.value, + twotracksconfigs.confCPRdeltaEtaCutMinVec.value, + twotracksconfigs.confCPRdeltaEtaCutMaxVec.value, + twotracksconfigs.confCPRdeltaPhiCutFractionMinVec.value, + twotracksconfigs.confCPRdeltaPhiCutFractionMaxVec.value, + twotracksconfigs.confCPRdeltaEtaCutFractionMinVec.value, + twotracksconfigs.confCPRdeltaEtaCutFractionMaxVec.value, + twotracksconfigs.confIsfilldEtadPhiTPCcls); } vPIDPartOne = trackonefilter.confPIDPartOne.value; @@ -512,56 +924,111 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { void fillCollision(CollisionType col, bool IsCent) { if (IsCent) { - MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinningCent.getBin({col.posZ(), col.multV0M()})); + MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), + colBinningCent.getBin({col.posZ(), col.multV0M()})); } else { - MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinningNtr.getBin({col.posZ(), col.multNtr()})); + MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), + colBinningNtr.getBin({col.posZ(), col.multNtr()})); } eventHisto.fillQA(col); } - /// This function processes the same event and takes care of all the histogramming - /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + /// This function processes the same event and takes care of all the + /// histogramming + /// \todo the trivial loops over the tracks should be factored out since they + /// will be common to all combinations of T-T, T-V0, V0-V0, ... /// @tparam PartitionType /// @tparam PartType /// @tparam isMC: enables Monte Carlo truth specific histograms - /// @param groupPartsOne partition for the first particle passed by the process function - /// @param groupPartsTwo partition for the second particle passed by the process function - /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) + /// @param groupPartsOne partition for the first particle passed by the + /// process function + /// @param groupPartsTwo partition for the second particle passed by the + /// process function + /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined + /// with FemtoUniverseMCLabels) /// @param magFieldTesla magnetic field of the collision /// @param multCol multiplicity of the collision template - void doSameEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, PartType parts, float magFieldTesla, int multCol, PairType contType, bool fillQA) + void doSameEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, + PartType parts, float magFieldTesla, int multCol, + PairType contType, bool fillQA) { /// Histogramming same event - if ((contType == PairType::PlusMinus || contType == PairType::PlusPlus) && fillQA) { + if ((contType == PairType::PlusMinus || contType == PairType::PlusPlus) && + fillQA) { for (const auto& part : groupPartsOne) { - if (!IsParticleNSigma((int8_t)1, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { + if (!IsParticleNSigma( + (int8_t)1, part.p(), + trackCuts.getNsigmaITS(part, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { continue; } trackHistoPartOne.fillQA(part); - trackHistoPartOne.fillQAMisIden(part, trackonefilter.confPDGCodePartOne); + if (twotracksconfigs.confIsAddITSNsigma) { + trackHistoPartOne.fillQAITSPID<>(part); + } + trackHistoPartOne.fillQAMisIden( + part, trackonefilter.confPDGCodePartOne); } } - if ((contType == PairType::PlusMinus || contType == PairType::MinusMinus) && fillQA) { + if ((contType == PairType::PlusMinus || contType == PairType::MinusMinus) && + fillQA) { for (const auto& part : groupPartsTwo) { - if (!IsParticleNSigma((int8_t)2, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { + if (!IsParticleNSigma( + (int8_t)2, part.p(), + trackCuts.getNsigmaITS(part, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { continue; } trackHistoPartTwo.fillQA(part); + if (twotracksconfigs.confIsAddITSNsigma) { + trackHistoPartTwo.fillQAITSPID<>(part); + } } } if (contType == PairType::PlusMinus) { /// Now build the combinations for non-identical particle pairs - for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - - if (!IsParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { + for (const auto& [p1, p2] : combinations( + CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if (!IsParticleNSigma( + (int8_t)1, p1.p(), + trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { + if (!IsParticleNSigma( + (int8_t)2, p2.p(), + trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { continue; } @@ -571,23 +1038,44 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (kT < firstRealElement || kT > lastElement) continue; - float pairFractionTPCsCls = static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); - if (pairFractionTPCsCls < twotracksconfigs.confPairFracSharedTPCclsMin.value || pairFractionTPCsCls >= twotracksconfigs.confPairFracSharedTPCclsMax.value) { + float pairFractionTPCsCls = + static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / + static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); + if (pairFractionTPCsCls < + twotracksconfigs.confPairFracSharedTPCclsMin.value || + pairFractionTPCsCls >= + twotracksconfigs.confPairFracSharedTPCclsMax.value) { continue; } if (twotracksconfigs.confIsCPR.value) { - if (twotracksconfigs.confIsCPRatITS && twotracksconfigs.confCPRFracMax.value) { - if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::same)) { + if (twotracksconfigs.confIsCPRatITS && + twotracksconfigs.confCPRFracMax.value) { + if (pairCloseRejection.isClosePairAtITS( + p1, p2, magFieldTesla, + femto_universe_container::EventType::same)) { continue; } } else { if (twotracksconfigs.confIsCPRkT) { - if (pairCloseRejection.isClosePairkT(p1, p2, femto_universe_container::EventType::same, kT, twotracksconfigs.confIsCircularCut, twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsfilldEtadPhiTPCcls, pairFractionTPCsCls)) { + if (pairCloseRejection.isClosePairkT( + p1, p2, femto_universe_container::EventType::same, kT, + twotracksconfigs.confIsCircularCut, + twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, + twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax, + twotracksconfigs.confIsfilldEtadPhiTPCcls, + pairFractionTPCsCls)) { continue; } } else { - if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, twotracksconfigs.confCPRDphiAvgOrDist, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsCircularCut)) { + if (pairCloseRejection.isClosePairFrac( + p1, p2, magFieldTesla, + femto_universe_container::EventType::same, + twotracksconfigs.confCPRDphiAvgOrDist, + twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax, + twotracksconfigs.confIsCircularCut)) { continue; } } @@ -598,16 +1086,39 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!pairCleaner.isCleanPair(p1, p2, parts)) { continue; } - sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultCont.fillMultNumDen( + p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, + kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, + twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else { - for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { - - if (!IsParticleNSigma((int8_t)2, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { + for (const auto& [p1, p2] : + combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, + groupPartsOne))) { + + if (!IsParticleNSigma( + (int8_t)2, p1.p(), + trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { + if (!IsParticleNSigma( + (int8_t)2, p2.p(), + trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { continue; } @@ -618,8 +1129,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (kT < firstRealElement || kT > lastElement) continue; - float pairFractionTPCsCls = static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); - if (pairFractionTPCsCls < twotracksconfigs.confPairFracSharedTPCclsMin.value || pairFractionTPCsCls >= twotracksconfigs.confPairFracSharedTPCclsMax.value) { + float pairFractionTPCsCls = + static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / + static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); + if (pairFractionTPCsCls < + twotracksconfigs.confPairFracSharedTPCclsMin.value || + pairFractionTPCsCls >= + twotracksconfigs.confPairFracSharedTPCclsMax.value) { continue; } @@ -635,22 +1151,41 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (twotracksconfigs.confIsCPR.value) { - if (twotracksconfigs.confIsCPRatITS && twotracksconfigs.confCPRFracMax.value) { - if (pairCloseRejection.isClosePairAtITS(part1, part2, magFieldTesla, femto_universe_container::EventType::same)) { + if (twotracksconfigs.confIsCPRatITS && + twotracksconfigs.confCPRFracMax.value) { + if (pairCloseRejection.isClosePairAtITS( + part1, part2, magFieldTesla, + femto_universe_container::EventType::same)) { continue; } } else { if (twotracksconfigs.confIsCPRkT) { - if (pairCloseRejection.isClosePairkT(part1, part2, femto_universe_container::EventType::same, kT, twotracksconfigs.confIsCircularCut, twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsfilldEtadPhiTPCcls, pairFractionTPCsCls)) { + if (pairCloseRejection.isClosePairkT( + p1, p2, femto_universe_container::EventType::same, kT, + twotracksconfigs.confIsCircularCut, + twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, + twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax, + twotracksconfigs.confIsfilldEtadPhiTPCcls, + pairFractionTPCsCls)) { continue; } if (twotracksconfigs.confIsCPRFraction) { - if (pairCloseRejection.isClosePairFractionkT(part1, part2, femto_universe_container::EventType::same, kT, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax)) { + if (pairCloseRejection.isClosePairFractionkT( + p1, p2, femto_universe_container::EventType::same, kT, + magFieldTesla, twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax)) { continue; } } } else { - if (pairCloseRejection.isClosePairFrac(part1, part2, magFieldTesla, femto_universe_container::EventType::same, twotracksconfigs.confCPRDphiAvgOrDist, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsCircularCut)) { + if (pairCloseRejection.isClosePairFrac( + part1, part2, magFieldTesla, + femto_universe_container::EventType::same, + twotracksconfigs.confCPRDphiAvgOrDist, + twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax, + twotracksconfigs.confIsCircularCut)) { continue; } } @@ -667,53 +1202,93 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { float outsideref = 0.0; switch (contType) { case PairType::PlusPlus: { - f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc( + part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { - sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || + (f3d[1] < outsideref && f3d[2] < outsideref)) { + sameEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { - sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || + (f3d[1] >= outsideref && f3d[2] < outsideref)) { + sameEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - sameEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + sameEventCont1D_PP.setPair(part1, part2, multCol, + twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::same, kv); + pairCloseRejection.ClosePairqLCMS( + part1, part2, magFieldTesla, + femto_universe_container::EventType::same, kv); } break; } case PairType::MinusMinus: { - f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc( + part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { - sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || + (f3d[1] < outsideref && f3d[2] < outsideref)) { + sameEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { - sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || + (f3d[1] >= outsideref && f3d[2] < outsideref)) { + sameEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - sameEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + sameEventCont1D_MM.setPair(part1, part2, multCol, + twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::same, kv); + pairCloseRejection.ClosePairqLCMS( + part1, part2, magFieldTesla, + femto_universe_container::EventType::same, kv); } break; } @@ -732,40 +1307,57 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { { fillCollision(col, confIsCent); - auto thegroupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); - auto thegroupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsOne = partsOne->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsTwo = partsTwo->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); bool fillQA = true; randgen = new TRandom2(0); if (confIsCent) { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::PlusMinus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, + col.magField(), col.multV0M(), PairType::PlusMinus, + fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multV0M(), PairType::PlusPlus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, + col.magField(), col.multV0M(), PairType::PlusPlus, + fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::MinusMinus, fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, + col.magField(), col.multV0M(), PairType::MinusMinus, + fillQA); } } else { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::PlusMinus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, + col.magField(), col.multNtr(), PairType::PlusMinus, + fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multNtr(), PairType::PlusPlus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, + col.magField(), col.multNtr(), PairType::PlusPlus, + fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::MinusMinus, fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, + col.magField(), col.multNtr(), PairType::MinusMinus, + fillQA); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processSameEvent, "Enable processing same event", true); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processSameEvent, "Enable processing same event", true); /// process function for to call doSameEvent with Monte Carlo - /// \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed) - /// \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth + /// \param col subscribe to the collision table (Monte Carlo Reconstructed + /// reconstructed) + /// \param parts subscribe to joined table FemtoUniverseParticles and + /// FemtoUniverseMCLables to access Monte Carlo truth /// \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table void processSameEventMC(o2::aod::FdCollision const& col, FilteredFemtoRecoParticles const& parts, @@ -773,55 +1365,79 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { { fillCollision(col, confIsCent); - auto thegroupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); - auto thegroupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsOne = partsOneMC->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsTwo = partsTwoMC->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); bool fillQA = true; randgen = new TRandom2(0); if (confIsCent) { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::PlusMinus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, + col.magField(), col.multV0M(), PairType::PlusMinus, + fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multV0M(), PairType::PlusPlus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, + col.magField(), col.multV0M(), PairType::PlusPlus, + fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::MinusMinus, fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, + col.magField(), col.multV0M(), PairType::MinusMinus, + fillQA); } } else { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::PlusMinus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, + col.magField(), col.multNtr(), PairType::PlusMinus, + fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multNtr(), PairType::PlusPlus, fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, + col.magField(), col.multNtr(), PairType::PlusPlus, + fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::MinusMinus, fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, + col.magField(), col.multNtr(), PairType::MinusMinus, + fillQA); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processSameEventMC, "Enable processing same event for Monte Carlo", false); - - /// This function processes the same event and takes care of all the histogramming - /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processSameEventMC, + "Enable processing same event for Monte Carlo", false); + + /// This function processes the same event and takes care of all the + /// histogramming + /// \todo the trivial loops over the tracks should be factored out since they + /// will be common to all combinations of T-T, T-V0, V0-V0, ... /// @tparam PartitionType /// @tparam PartType /// @tparam isMC: enables Monte Carlo truth specific histograms - /// @param groupPartsOne partition for the first particle passed by the process function - /// @param groupPartsTwo partition for the second particle passed by the process function - /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) + /// @param groupPartsOne partition for the first particle passed by the + /// process function + /// @param groupPartsTwo partition for the second particle passed by the + /// process function + /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined + /// with FemtoUniverseMCLabels) /// @param magFieldTesla magnetic field of the collision /// @param multCol multiplicity of the collision template - void doSameEventMCTruth(PartitionType groupPartsOne, PartitionType groupPartsTwo, int multCol, PairType contType, bool fillQA) + void doSameEventMCTruth(PartitionType groupPartsOne, + PartitionType groupPartsTwo, int multCol, + PairType contType, bool fillQA) { randgen = new TRandom2(0); /// Histogramming same event if ((cfgProcessPM || cfgProcessPP) && fillQA) { for (const auto& part : groupPartsOne) { - if (part.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() == + uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { int pdgCode = static_cast(part.tempFitVar()); const auto& pdgParticle = pdg->GetParticle(pdgCode); if (pdgParticle) { @@ -833,7 +1449,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if ((cfgProcessPM || cfgProcessMM) && fillQA) { for (const auto& part : groupPartsTwo) { - if (part.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() == + uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { int pdgCode = static_cast(part.tempFitVar()); const auto& pdgParticle = pdg->GetParticle(pdgCode); if (pdgParticle) { @@ -846,19 +1463,27 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (cfgProcessPM) { /// Now build the combinations for non-identical particle pairs - for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + for (const auto& [p1, p2] : combinations( + CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { int pdgCodePartOne = static_cast(p1.tempFitVar()); const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); int pdgCodePartTwo = static_cast(p2.tempFitVar()); const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo); - if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { + if (pdgParticleOne && pdgParticleTwo && + (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && + (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); - sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultCont.fillMultNumDen( + p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, + kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, + twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } } else { - for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { + for (const auto& [p1, p2] : + combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, + groupPartsOne))) { int pdgCodePartOne = static_cast(p1.tempFitVar()); const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); @@ -869,7 +1494,9 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { double rand; rand = randgen->Rndm(); std::vector f3d; - if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { + if (pdgParticleOne && pdgParticleTwo && + (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && + (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { auto part1 = p1; auto part2 = p2; @@ -882,22 +1509,40 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { switch (contType) { case PairType::PlusPlus: { if (twotracksconfigs.confIs1D) { - f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc( + part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); float weight = f3d[5]; - sameEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + sameEventCont1D_PP.setPair( + part1, part2, multCol, twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } else { - sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } break; } case PairType::MinusMinus: { if (twotracksconfigs.confIs1D) { - f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc( + part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); float weight = f3d[5]; - sameEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + sameEventCont1D_MM.setPair( + part1, part2, multCol, twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } else { - sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::same, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } break; } @@ -911,16 +1556,20 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } /// process function for to call doSameEvent with Monte Carlo - /// \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed) - /// \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth + /// \param col subscribe to the collision table (Monte Carlo Reconstructed + /// reconstructed) + /// \param parts subscribe to joined table FemtoUniverseParticles and + /// FemtoUniverseMCLables to access Monte Carlo truth /// \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table void processSameEventMCTruth(o2::aod::FdCollision const& col, FemtoTruthParticles const&) { fillCollision(col, confIsCent); - auto thegroupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); - auto thegroupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsOne = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsTwo = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); bool fillQA = true; PairType pairType = PairType::PlusMinus; @@ -934,49 +1583,81 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (confIsCent) { if (cfgProcessPM) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, col.multV0M(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, + col.multV0M(), pairType, fillQA); } if (cfgProcessPP) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, col.multV0M(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, + col.multV0M(), pairType, fillQA); } if (cfgProcessMM) { - doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, col.multV0M(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, + col.multV0M(), pairType, fillQA); } } else { if (cfgProcessPM) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, col.multNtr(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, + col.multNtr(), pairType, fillQA); } if (cfgProcessPP) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, col.multNtr(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, + col.multNtr(), pairType, fillQA); } if (cfgProcessMM) { - doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, col.multNtr(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, + col.multNtr(), pairType, fillQA); } } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processSameEventMCTruth, "Enable processing same event for MC truth", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processSameEventMCTruth, + "Enable processing same event for MC truth", false); /// This function processes the mixed event - /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + /// \todo the trivial loops over the collisions and tracks should be factored + /// out since they will be common to all combinations of T-T, T-V0, V0-V0, ... /// \tparam PartitionType /// \tparam PartType /// \tparam isMC: enables Monte Carlo truth specific histograms - /// \param groupPartsOne partition for the first particle passed by the process function - /// \param groupPartsTwo partition for the second particle passed by the process function - /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) + /// \param groupPartsOne partition for the first particle passed by the + /// process function + /// \param groupPartsTwo partition for the second particle passed by the + /// process function + /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined + /// with FemtoUniverseMCLabels) /// \param magFieldTesla magnetic field of the collision /// \param multCol multiplicity of the collision template - void doMixedEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, float magFieldTesla, int multCol, PairType contType) + void doMixedEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, + float magFieldTesla, int multCol, PairType contType) { - for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - - if (!IsParticleNSigma((int8_t)2, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { + for (const auto& [p1, p2] : combinations( + CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if (!IsParticleNSigma( + (int8_t)2, p1.p(), + trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { + if (!IsParticleNSigma( + (int8_t)2, p2.p(), + trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), + trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { continue; } @@ -987,8 +1668,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (kT < firstRealElement || kT > lastElement) continue; - float pairFractionTPCsCls = static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); - if (pairFractionTPCsCls < twotracksconfigs.confPairFracSharedTPCclsMin.value || pairFractionTPCsCls >= twotracksconfigs.confPairFracSharedTPCclsMax.value) { + float pairFractionTPCsCls = + static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / + static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); + if (pairFractionTPCsCls < + twotracksconfigs.confPairFracSharedTPCclsMin.value || + pairFractionTPCsCls >= + twotracksconfigs.confPairFracSharedTPCclsMax.value) { continue; } @@ -1003,22 +1689,41 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (twotracksconfigs.confIsCPR.value) { - if (twotracksconfigs.confIsCPRatITS && twotracksconfigs.confCPRFracMax.value) { - if (pairCloseRejection.isClosePairAtITS(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed)) { + if (twotracksconfigs.confIsCPRatITS && + twotracksconfigs.confCPRFracMax.value) { + if (pairCloseRejection.isClosePairAtITS( + part1, part2, magFieldTesla, + femto_universe_container::EventType::mixed)) { continue; } } else { if (twotracksconfigs.confIsCPRkT) { - if (pairCloseRejection.isClosePairkT(part1, part2, femto_universe_container::EventType::mixed, kT, twotracksconfigs.confIsCircularCut, twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsfilldEtadPhiTPCcls, pairFractionTPCsCls)) { + if (pairCloseRejection.isClosePairkT( + p1, p2, femto_universe_container::EventType::mixed, kT, + twotracksconfigs.confIsCircularCut, + twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, + twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax, + twotracksconfigs.confIsfilldEtadPhiTPCcls, + pairFractionTPCsCls)) { continue; } if (twotracksconfigs.confIsCPRFraction) { - if (pairCloseRejection.isClosePairFractionkT(part1, part2, femto_universe_container::EventType::mixed, kT, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax)) { + if (pairCloseRejection.isClosePairFractionkT( + p1, p2, femto_universe_container::EventType::mixed, kT, + magFieldTesla, twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax)) { continue; } } } else { - if (pairCloseRejection.isClosePairFrac(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed, twotracksconfigs.confCPRDphiAvgOrDist, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsCircularCut)) { + if (pairCloseRejection.isClosePairFrac( + part1, part2, magFieldTesla, + femto_universe_container::EventType::mixed, + twotracksconfigs.confCPRDphiAvgOrDist, + twotracksconfigs.confCPRDistMax, + twotracksconfigs.confCPRFracMax, + twotracksconfigs.confIsCircularCut)) { continue; } } @@ -1031,59 +1736,103 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { switch (contType) { case PairType::PlusMinus: { - mixedEventMultCont.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + mixedEventMultCont.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); break; } case PairType::PlusPlus: { - f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc( + part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + mixedEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { - mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || + (f3d[1] < outsideref && f3d[2] < outsideref)) { + mixedEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { - mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || + (f3d[1] >= outsideref && f3d[2] < outsideref)) { + mixedEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - mixedEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_PP.setPair(part1, part2, multCol, + twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed, kv); + pairCloseRejection.ClosePairqLCMS( + part1, part2, magFieldTesla, + femto_universe_container::EventType::mixed, kv); } break; } case PairType::MinusMinus: { - f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc( + part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + mixedEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { - mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || + (f3d[1] < outsideref && f3d[2] < outsideref)) { + mixedEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { - mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || + (f3d[1] >= outsideref && f3d[2] < outsideref)) { + mixedEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, + 2, multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - mixedEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_MM.setPair(part1, part2, multCol, + twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed, kv); + pairCloseRejection.ClosePairqLCMS( + part1, part2, magFieldTesla, + femto_universe_container::EventType::mixed, kv); } break; } @@ -1110,10 +1859,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningCent, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations( + colBinningCent, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningCent.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill( + HIST("MixingQA/hMECollisionBins"), + colBinningCent.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -1123,24 +1875,41 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (cfgProcessPM) { - auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventCent, "Enable processing mixed events for centrality", true); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processMixedEventCent, + "Enable processing mixed events for centrality", true); /// process function for to call doMixedEvent with Data /// @param cols subscribe to the collisions table (Data) @@ -1158,10 +1927,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : + soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill( + HIST("MixingQA/hMECollisionBins"), + colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -1171,32 +1943,52 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (cfgProcessPM) { - auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventNtr, "Enable processing mixed events for centrality", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processMixedEventNtr, + "Enable processing mixed events for centrality", false); /// brief process function for to call doMixedEvent with Monte Carlo - /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed) - /// @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth + /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed + /// reconstructed) + /// @param parts subscribe to joined table FemtoUniverseParticles and + /// FemtoUniverseMCLables to access Monte Carlo truth /// @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processMixedEventMCCent(o2::aod::FdCollisions const& cols, - soa::Join const&, - o2::aod::FdMCParticles const&) + void processMixedEventMCCent( + o2::aod::FdCollisions const& cols, + soa::Join const&, + o2::aod::FdMCParticles const&) { randgen = new TRandom2(0); PairType pairType = PairType::PlusMinus; @@ -1208,10 +2000,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningCent, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations( + colBinningCent, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningCent.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill( + HIST("MixingQA/hMECollisionBins"), + colBinningCent.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -1219,36 +2014,58 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (magFieldTesla1 != magFieldTesla2) { continue; } - /// \todo before mixing we should check whether both collisions contain a pair of particles! - // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; + /// \todo before mixing we should check whether both collisions contain a + /// pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || + // partsTwo.size() == 0 ) continue; if (cfgProcessPM) { - auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventMCCent, "Enable processing mixed events MC", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processMixedEventMCCent, "Enable processing mixed events MC", + false); /// brief process function for to call doMixedEvent with Monte Carlo - /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed) - /// @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth + /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed + /// reconstructed) + /// @param parts subscribe to joined table FemtoUniverseParticles and + /// FemtoUniverseMCLables to access Monte Carlo truth /// @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processMixedEventMCNtr(o2::aod::FdCollisions const& cols, - soa::Join const&, - o2::aod::FdMCParticles const&) + void processMixedEventMCNtr( + o2::aod::FdCollisions const& cols, + soa::Join const&, + o2::aod::FdMCParticles const&) { randgen = new TRandom2(0); PairType pairType = PairType::PlusMinus; @@ -1260,10 +2077,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : + soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill( + HIST("MixingQA/hMECollisionBins"), + colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -1271,44 +2091,70 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (magFieldTesla1 != magFieldTesla2) { continue; } - /// \todo before mixing we should check whether both collisions contain a pair of particles! - // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; + /// \todo before mixing we should check whether both collisions contain a + /// pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || + // partsTwo.size() == 0 ) continue; if (cfgProcessPM) { - auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); + auto groupPartsOne = + partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision1.globalIndex(), cache); + auto groupPartsTwo = + partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, + collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, + multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventMCNtr, "Enable processing mixed events MC", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processMixedEventMCNtr, "Enable processing mixed events MC", + false); /// This function processes the mixed event - /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + /// \todo the trivial loops over the collisions and tracks should be factored + /// out since they will be common to all combinations of T-T, T-V0, V0-V0, ... /// \tparam PartitionType /// \tparam PartType /// \tparam isMC: enables Monte Carlo truth specific histograms - /// \param groupPartsOne partition for the first particle passed by the process function - /// \param groupPartsTwo partition for the second particle passed by the process function - /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) + /// \param groupPartsOne partition for the first particle passed by the + /// process function + /// \param groupPartsTwo partition for the second particle passed by the + /// process function + /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined + /// with FemtoUniverseMCLabels) /// \param magFieldTesla magnetic field of the collision /// \param multCol multiplicity of the collision template - void doMixedEventMCTruth(PartitionType groupPartsOne, PartitionType groupPartsTwo, int multCol, PairType contType) + void doMixedEventMCTruth(PartitionType groupPartsOne, + PartitionType groupPartsTwo, int multCol, + PairType contType) { randgen = new TRandom2(0); - for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + for (const auto& [p1, p2] : combinations( + CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { int pdgCodePartOne = static_cast(p1.tempFitVar()); const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); @@ -1320,7 +2166,9 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { rand = randgen->Rndm(); std::vector f3d; - if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { + if (pdgParticleOne && pdgParticleTwo && + (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && + (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { auto part1 = p1; auto part2 = p2; @@ -1331,16 +2179,26 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } switch (contType) { case PairType::PlusMinus: { - mixedEventMultCont.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + mixedEventMultCont.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); break; } case PairType::PlusPlus: { if (twotracksconfigs.confIs1D) { float weight = 1.0; - mixedEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_PP.setPair( + part1, part2, multCol, twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } else { - mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + mixedEventMultContPP.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } break; } @@ -1348,9 +2206,15 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { case PairType::MinusMinus: { if (twotracksconfigs.confIs1D) { float weight = 1.0; - mixedEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_MM.setPair( + part1, part2, multCol, twotracksconfigs.confUse3D, weight, + twotracksconfigs.confisIdenLCMS); } else { - mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + mixedEventMultContMM.fillMultNumDen( + part1, part2, femto_universe_sh_container::EventType::mixed, 2, + multCol, kT, twotracksconfigs.confisIdenLCMS, + twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, + twotracksconfigs.confisIdenPRF); } break; } @@ -1377,29 +2241,50 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : + soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill( + HIST("MixingQA/hMECollisionBins"), + colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); if (cfgProcessPM) { - auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), + cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), + cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, + multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), + cache); + auto groupPartsTwo = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), + cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, + multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); + auto groupPartsOne = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), + cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), + cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, + multiplicityCol, pairType); } } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventNtrMCTruth, "Enable processing MC Truth mixed events for multiplicity", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processMixedEventNtrMCTruth, + "Enable processing MC Truth mixed events for multiplicity", + false); /// process function for to call doMixedEvent with Data /// @param cols subscribe to the collisions table (Data) @@ -1416,35 +2301,57 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningCent, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations( + colBinningCent, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill( + HIST("MixingQA/hMECollisionBins"), + colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); if (cfgProcessPM) { - auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), + cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), + cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, + multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), + cache); + auto groupPartsTwo = partsOneMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), + cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, + multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); + auto groupPartsOne = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), + cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached( + aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), + cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, + multiplicityCol, pairType); } } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventCentMCTruth, "Enable processing MC Truth mixed events for multiplicity", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, + processMixedEventCentMCTruth, + "Enable processing MC Truth mixed events for multiplicity", + false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask( + cfgc), }; return workflow; } From 5bba06e52e916b0574405ccbd44a906169709e77 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 14 Apr 2026 23:21:12 +0200 Subject: [PATCH 4/5] Fix clang-format issues --- PWGCF/FemtoUniverse/DataModel/FemtoDerived.h | 191 ++++++++++--------- 1 file changed, 99 insertions(+), 92 deletions(-) diff --git a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h index 0a3119d0286..9763fa94854 100644 --- a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h +++ b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h @@ -29,15 +29,17 @@ #include -namespace o2::aod { +namespace o2::aod +{ /// FemtoUniverseCollision -namespace femtouniversecollision { +namespace femtouniversecollision +{ DECLARE_SOA_COLUMN(MultV0M, multV0M, float); //! V0M multiplicity DECLARE_SOA_COLUMN( - MultNtr, multNtr, - int); //! multiplicity of charged tracks as defined in the producer + MultNtr, multNtr, + int); //! multiplicity of charged tracks as defined in the producer DECLARE_SOA_COLUMN(Sphericity, sphericity, float); //! Sphericity of the event -DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the event +DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the event DECLARE_SOA_COLUMN(InteractionRate, interactionRate, float); //! Interaction rate DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! TPC occupancy @@ -57,7 +59,8 @@ DECLARE_SOA_TABLE(FDExtCollisions, "AOD", "FDEXTCOLLISION", using FDExtCollision = FDExtCollisions::iterator; /// FemtoUniverseTrack -namespace femtouniverseparticle { +namespace femtouniverseparticle +{ /// Distinuishes the different particle types enum ParticleType { kTrack, //! Track @@ -75,16 +78,16 @@ enum ParticleType { }; static constexpr std::string_view ParticleTypeName[kNParticleTypes] = { - "Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", - "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", - "D0Child"}; //! Naming of the different particle types + "Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", + "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", + "D0Child"}; //! Naming of the different particle types static constexpr std::string_view TempFitVarName[kNParticleTypes] = { - "/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", - "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"}; + "/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", + "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"}; using CutContainerType = - uint32_t; //! Definition of the data type for the bit-wise container for the - //! different selection criteria + uint32_t; //! Definition of the data type for the bit-wise container for the + //! different selection criteria enum TrackType { kNoChild, //! Not a V0 child @@ -95,34 +98,34 @@ enum TrackType { }; static constexpr std::string_view TrackTypeName[kNTrackTypes] = { - "Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types + "Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types DECLARE_SOA_INDEX_COLUMN(FdCollision, fdCollision); DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c) DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi DECLARE_SOA_COLUMN(PartType, partType, - uint8_t); //! Type of the particle, according to - //! femtouniverseparticle::ParticleType + uint8_t); //! Type of the particle, according to + //! femtouniverseparticle::ParticleType DECLARE_SOA_COLUMN(Cut, cut, CutContainerType); //! Bit-wise container for the //! different selection criteria DECLARE_SOA_COLUMN( - PidCut, pidCut, - CutContainerType); //! Bit-wise container for the different PID selection - //! criteria \todo since bit-masking cannot be done yet - //! with filters we use a second field for the PID + PidCut, pidCut, + CutContainerType); //! Bit-wise container for the different PID selection + //! criteria \todo since bit-masking cannot be done yet + //! with filters we use a second field for the PID DECLARE_SOA_COLUMN( - TempFitVar, tempFitVar, - float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) + TempFitVar, tempFitVar, + float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN( - Children, - children); //! Field for the track indices to remove auto-correlations + Children, + children); //! Field for the track indices to remove auto-correlations DECLARE_SOA_COLUMN( - MLambda, mLambda, - float); //! The invariant mass of V0 candidate, assuming lambda + MLambda, mLambda, + float); //! The invariant mass of V0 candidate, assuming lambda DECLARE_SOA_COLUMN( - MAntiLambda, mAntiLambda, - float); //! The invariant mass of V0 candidate, assuming antilambda + MAntiLambda, mAntiLambda, + float); //! The invariant mass of V0 candidate, assuming antilambda DECLARE_SOA_DYNAMIC_COLUMN(Theta, theta, //! Compute the theta of the track [](float eta) -> float { @@ -147,24 +150,24 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Compute the overall momentum in GeV/c DECLARE_SOA_COLUMN(ITSSignal, itsSignal, float); DECLARE_SOA_COLUMN( - ITSNSigmaEl, itsNSigmaEl, - float); //! Nsigma separation with the Its detector for electron + ITSNSigmaEl, itsNSigmaEl, + float); //! Nsigma separation with the Its detector for electron DECLARE_SOA_COLUMN(ITSNSigmaPi, itsNSigmaPi, float); //! Nsigma separation with the Its detector for pion DECLARE_SOA_COLUMN(ITSNSigmaKa, itsNSigmaKa, float); //! Nsigma separation with the Its detector for kaon DECLARE_SOA_COLUMN( - ITSNSigmaPr, itsNSigmaPr, - float); //! Nsigma separation with the Its detector for proton + ITSNSigmaPr, itsNSigmaPr, + float); //! Nsigma separation with the Its detector for proton DECLARE_SOA_COLUMN( - ITSNSigmaDe, itsNSigmaDe, - float); //! Nsigma separation with the Its detector for deuteron + ITSNSigmaDe, itsNSigmaDe, + float); //! Nsigma separation with the Its detector for deuteron DECLARE_SOA_COLUMN( - ITSNSigmaTr, itsNSigmaTr, - float); //! Nsigma separation with the Its detector for triton + ITSNSigmaTr, itsNSigmaTr, + float); //! Nsigma separation with the Its detector for triton DECLARE_SOA_COLUMN( - ITSNSigmaHe, itsNSigmaHe, - float); //! Nsigma separation with the Its detector for helium3 + ITSNSigmaHe, itsNSigmaHe, + float); //! Nsigma separation with the Its detector for helium3 // debug variables DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge @@ -176,15 +179,15 @@ DECLARE_SOA_COLUMN(TpcFractionSharedCls, tpcFractionSharedCls, float); //! Number of TPC crossed rows DECLARE_SOA_COLUMN(ItsNCls, itsNCls, uint8_t); //! Number of ITS clusters DECLARE_SOA_COLUMN( - ItsNClsInnerBarrel, itsNClsInnerBarrel, - uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal + ItsNClsInnerBarrel, itsNClsInnerBarrel, + uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal DECLARE_SOA_DYNAMIC_COLUMN( - TpcCrossedRowsOverFindableCls, - tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over - //! findable TPC clusters - [](uint8_t tpcNClsFindable, uint8_t tpcNClsCrossedRows) -> float { - return (float)tpcNClsCrossedRows / (float)tpcNClsFindable; - }); + TpcCrossedRowsOverFindableCls, + tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over + //! findable TPC clusters + [](uint8_t tpcNClsFindable, uint8_t tpcNClsCrossedRows) -> float { + return (float)tpcNClsCrossedRows / (float)tpcNClsFindable; + }); DECLARE_SOA_COLUMN(DaughDCA, daughDCA, float); //! DCA between daughters DECLARE_SOA_COLUMN(TransRadius, transRadius, float); //! Transverse radius of the decay vertex @@ -220,7 +223,8 @@ DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE", o2::soa::Index<>, using FDParticle = FDParticles::iterator; /// FemtoUniverseCascadeTrack -namespace femtouniversecascparticle { +namespace femtouniversecascparticle +{ DECLARE_SOA_INDEX_COLUMN(FDParticle, fdParticle); DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, float); //! DCA between V0 daughters @@ -229,7 +233,7 @@ DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, float); //! cascade cosinus of pointing angle DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, - float); //! DCA between cascade daughters + float); //! DCA between cascade daughters DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, float); //! DCA of positive daughter to PV @@ -242,32 +246,32 @@ DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV } // namespace femtouniversecascparticle DECLARE_SOA_TABLE( - FDExtParticles, "AOD", "FDEXTPARTICLE", femtouniverseparticle::Sign, - femtouniverseparticle::TpcNClsFound, track::TPCNClsFindable, - femtouniverseparticle::TpcNClsCrossedRows, track::TPCNClsShared, - femtouniverseparticle::TpcFractionSharedCls, track::TPCInnerParam, - femtouniverseparticle::ItsNCls, femtouniverseparticle::ItsNClsInnerBarrel, - track::DcaXY, track::DcaZ, track::TPCSignal, pidtpc_tiny::TPCNSigmaStoreEl, - pidtpc_tiny::TPCNSigmaStorePi, pidtpc_tiny::TPCNSigmaStoreKa, - pidtpc_tiny::TPCNSigmaStorePr, pidtpc_tiny::TPCNSigmaStoreDe, - pidtof_tiny::TOFNSigmaStoreEl, pidtof_tiny::TOFNSigmaStorePi, - pidtof_tiny::TOFNSigmaStoreKa, pidtof_tiny::TOFNSigmaStorePr, - pidtof_tiny::TOFNSigmaStoreDe, femtouniverseparticle::DaughDCA, - femtouniverseparticle::TransRadius, femtouniverseparticle::DecayVtxX, - femtouniverseparticle::DecayVtxY, femtouniverseparticle::DecayVtxZ, - femtouniverseparticle::MKaon, - femtouniverseparticle::TpcCrossedRowsOverFindableCls< - track::TPCNClsFindable, femtouniverseparticle::TpcNClsCrossedRows>, - pidtpc_tiny::TPCNSigmaEl, - pidtpc_tiny::TPCNSigmaPi, - pidtpc_tiny::TPCNSigmaKa, - pidtpc_tiny::TPCNSigmaPr, - pidtpc_tiny::TPCNSigmaDe, - pidtof_tiny::TOFNSigmaEl, - pidtof_tiny::TOFNSigmaPi, - pidtof_tiny::TOFNSigmaKa, - pidtof_tiny::TOFNSigmaPr, - pidtof_tiny::TOFNSigmaDe); + FDExtParticles, "AOD", "FDEXTPARTICLE", femtouniverseparticle::Sign, + femtouniverseparticle::TpcNClsFound, track::TPCNClsFindable, + femtouniverseparticle::TpcNClsCrossedRows, track::TPCNClsShared, + femtouniverseparticle::TpcFractionSharedCls, track::TPCInnerParam, + femtouniverseparticle::ItsNCls, femtouniverseparticle::ItsNClsInnerBarrel, + track::DcaXY, track::DcaZ, track::TPCSignal, pidtpc_tiny::TPCNSigmaStoreEl, + pidtpc_tiny::TPCNSigmaStorePi, pidtpc_tiny::TPCNSigmaStoreKa, + pidtpc_tiny::TPCNSigmaStorePr, pidtpc_tiny::TPCNSigmaStoreDe, + pidtof_tiny::TOFNSigmaStoreEl, pidtof_tiny::TOFNSigmaStorePi, + pidtof_tiny::TOFNSigmaStoreKa, pidtof_tiny::TOFNSigmaStorePr, + pidtof_tiny::TOFNSigmaStoreDe, femtouniverseparticle::DaughDCA, + femtouniverseparticle::TransRadius, femtouniverseparticle::DecayVtxX, + femtouniverseparticle::DecayVtxY, femtouniverseparticle::DecayVtxZ, + femtouniverseparticle::MKaon, + femtouniverseparticle::TpcCrossedRowsOverFindableCls< + track::TPCNClsFindable, femtouniverseparticle::TpcNClsCrossedRows>, + pidtpc_tiny::TPCNSigmaEl, + pidtpc_tiny::TPCNSigmaPi, + pidtpc_tiny::TPCNSigmaKa, + pidtpc_tiny::TPCNSigmaPr, + pidtpc_tiny::TPCNSigmaDe, + pidtof_tiny::TOFNSigmaEl, + pidtof_tiny::TOFNSigmaPi, + pidtof_tiny::TOFNSigmaKa, + pidtof_tiny::TOFNSigmaPr, + pidtof_tiny::TOFNSigmaDe); using FDFullParticle = FDExtParticles::iterator; DECLARE_SOA_TABLE(FDItsParticles, "AOD", "FDITSPARTICLE", @@ -303,17 +307,18 @@ DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", o2::soa::Index<>, using FDCascParticle = FDCascParticles::iterator; /// FemtoUniverseTrackMC -namespace femtouniverse_mc_particle { +namespace femtouniverse_mc_particle +{ /// Distinuishes the different particle origins enum ParticleOriginMCTruth { - kPrimary, //! Primary track or V0 - kDaughter, //! Particle from a decay - kMaterial, //! Particle from a material - kNotPrimary, //! Not primary particles (kept for compatibility reasons with - //! the FullProducer task. will be removed, since we look at "non - //! primaries" more differentially now) - kFake, //! Particle, that has NOT the PDG code of the current analysed - //! particle + kPrimary, //! Primary track or V0 + kDaughter, //! Particle from a decay + kMaterial, //! Particle from a material + kNotPrimary, //! Not primary particles (kept for compatibility reasons with + //! the FullProducer task. will be removed, since we look at "non + //! primaries" more differentially now) + kFake, //! Particle, that has NOT the PDG code of the current analysed + //! particle kDaughterLambda, //! Daughter from a Lambda decay kDaughterSigmaplus, //! Daughter from a Sigma^plus decay kPrompt, //! Origin for D0/D0bar mesons @@ -325,10 +330,10 @@ enum ParticleOriginMCTruth { //! Naming of the different OriginMCTruth types static constexpr std::string_view - ParticleOriginMCTruthName[kNOriginMCTruthTypes] = { - "_Primary", "_Daughter", "_Material", - "_NotPrimary", "_Fake", "_DaughterLambda", - "DaughterSigmaPlus", "_Prompt", "_NonPrompt"}; + ParticleOriginMCTruthName[kNOriginMCTruthTypes] = { + "_Primary", "_Daughter", "_Material", + "_NotPrimary", "_Fake", "_DaughterLambda", + "DaughterSigmaPlus", "_Prompt", "_NonPrompt"}; /// Distinguished between reconstructed and truth enum MCType { @@ -340,8 +345,8 @@ enum MCType { static constexpr std::string_view MCTypeName[kNMCTypes] = {"", "_MC"}; DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, - uint8_t); //! Origin of the particle, according to - //! femtouniverseparticle::ParticleOriginMCTruth + uint8_t); //! Origin of the particle, according to + //! femtouniverseparticle::ParticleOriginMCTruth DECLARE_SOA_COLUMN(PdgMCTruth, pdgMCTruth, int); //! Particle PDG // debug variables @@ -361,9 +366,10 @@ DECLARE_SOA_TABLE(FDExtMCParticles, "AOD", "FDEXTMCPARTICLE", femtouniverse_mc_particle::MotherPDG); using FDExtMCParticle = FDExtMCParticles::iterator; -namespace mcfdlabel { +namespace mcfdlabel +{ DECLARE_SOA_INDEX_COLUMN( - FdMCParticle, fdMCParticle); //! MC particle for femtouniverseparticle + FdMCParticle, fdMCParticle); //! MC particle for femtouniverseparticle } // namespace mcfdlabel DECLARE_SOA_TABLE(FDMCLabels, "AOD", "FDMCLabel", //! Table joinable to FemtoUniverseParticle @@ -371,7 +377,8 @@ DECLARE_SOA_TABLE(FDMCLabels, "AOD", mcfdlabel::FdMCParticleId); /// Hash -namespace hash { +namespace hash +{ DECLARE_SOA_COLUMN(Bin, bin, int); //! Hash for the event mixing } // namespace hash DECLARE_SOA_TABLE(MixingHashes, "AOD", "HASH", hash::Bin); From 1156ee4e382cfbe6e07449db57186bc0f7debb5c Mon Sep 17 00:00:00 2001 From: Pritam Chakraborty Date: Wed, 15 Apr 2026 01:27:34 +0200 Subject: [PATCH 5/5] Fix broken lines --- .../Core/FemtoUniverseParticleHisto.h | 1330 ++------ .../Core/FemtoUniverseTrackSelection.h | 692 ++-- PWGCF/FemtoUniverse/DataModel/FemtoDerived.h | 325 +- .../femtoUniverseProducerTask.cxx | 2986 ++++++----------- ...irTaskTrackTrackSpherHarMultKtExtended.cxx | 1809 +++------- 5 files changed, 2085 insertions(+), 5057 deletions(-) diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h index ec7fec9e361..4b860faae66 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -10,8 +10,7 @@ // or submit itself to any jurisdiction. /// \file FemtoUniverseParticleHisto.h -/// \brief FemtoUniverseParticleHisto - Histogram class for tracks, V0s and -/// cascades +/// \brief FemtoUniverseParticleHisto - Histogram class for tracks, V0s and cascades /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Georgios Mantzaridis, TU München, georgios.mantzaridis@tum.de /// \author Anton Riedel, TU München, anton.riedel@tum.de @@ -37,10 +36,8 @@ namespace o2::analysis::femto_universe // o2-linter: disable=name/namespace /// \class FemtoUniverseParticleHisto /// \brief Class for histogramming particle properties /// \tparam particleType Type of the particle (Track/V0/Cascade/Phi/...) -/// \tparam suffixType (optional) Takes care of the suffix for the folder name -/// in case of analyses of pairs of the same kind (T-T, V-V, C-C) -template +/// \tparam suffixType (optional) Takes care of the suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) +template class FemtoUniverseParticleHisto { public: @@ -48,893 +45,303 @@ class FemtoUniverseParticleHisto virtual ~FemtoUniverseParticleHisto() = default; /// Initializes particle histograms - /// Called by init both in case of reconstructed data/ Monte Carlo, and for - /// Monte Carlo Truth + /// Called by init both in case of reconstructed data/ Monte Carlo, and for Monte Carlo Truth /// \tparam T type of the axis Object - /// \tparam mc enum object to get the suffix ("" for data/ Monte Cartlo - /// reconstructed, "_MC" for Monte Carlo truth) for the folder in the output - /// file - /// \param folderName base path of the directory in the output file, in which - /// to store the histograms - /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in - /// case of tracks, CPA in case of V0s, etc.) - /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. - /// tempFitVar plots + /// \tparam mc enum object to get the suffix ("" for data/ Monte Cartlo reconstructed, "_MC" for Monte Carlo truth) for the folder in the output file + /// \param folderName base path of the directory in the output file, in which to store the histograms + /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) + /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots /// \param tempFitVarAxis axis object for the tempFitVar axis template - void init_base(std::string folderName, std::string tempFitVarAxisTitle, - T& tempFitVarpTAxis, - T& tempFitVarAxis) // o2-linter: disable=name/function-variable + void init_base(std::string folderName, std::string tempFitVarAxisTitle, T& tempFitVarpTAxis, T& tempFitVarAxis) // o2-linter: disable=name/function-variable { - std::string folderSuffix = - static_cast( - o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) - .c_str(); + std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]).c_str(); /// Histograms of the kinematic properties - mHistogramRegistry->add((folderName + folderSuffix + "/hPt").c_str(), - "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, - {tempFitVarpTAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hEta").c_str(), - "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hPhi").c_str(), - "; #phi; Entries", kTH1F, - {{200, 0, o2::constants::math::TwoPI}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hPhiEta").c_str(), "; #phi; #eta", kTH2F, - {{200, 0, o2::constants::math::TwoPI}, {200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {tempFitVarpTAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPhi").c_str(), "; #phi; Entries", kTH1F, {{200, 0, o2::constants::math::TwoPI}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPhiEta").c_str(), "; #phi; #eta", kTH2F, {{200, 0, o2::constants::math::TwoPI}, {200, -1.5, 1.5}}); - /// particle specific histogramms for the TempFitVar column in - /// FemtoUniverseParticles + /// particle specific histogramms for the TempFitVar column in FemtoUniverseParticles if constexpr (o2::aod::femtouniverse_mc_particle::MCType::kRecon == mc) { - mHistogramRegistry->add( - (folderName + folderSuffix + - static_cast( - o2::aod::femtouniverseparticle::TempFitVarName[mParticleType])) - .c_str(), - ("; #it{p}_{T} (GeV/#it{c}); " + tempFitVarAxisTitle).c_str(), kTH2F, - {{tempFitVarpTAxis}, {tempFitVarAxis}}); + mHistogramRegistry->add((folderName + folderSuffix + static_cast(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType])).c_str(), ("; #it{p}_{T} (GeV/#it{c}); " + tempFitVarAxisTitle).c_str(), kTH2F, {{tempFitVarpTAxis}, {tempFitVarAxis}}); } } // comment template - void - init_debug(std::string folderName, T& tempFitVarMomAxis, - bool isFillITSNsigma) // o2-linter: disable=name/function-variable + void init_debug(std::string folderName, T& tempFitVarMomAxis, bool isFillITSNsigma) // o2-linter: disable=name/function-variable { - std::string folderSuffix = - static_cast( - o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) - .c_str(); - if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kTrack || - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0Child || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascadeBachelor || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kMCTruthTrack) { - mHistogramRegistry->add((folderName + folderSuffix + "/hCharge").c_str(), - "; Charge; Entries", kTH1F, {{5, -2.5, 2.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCfindable").c_str(), - "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCfound").c_str(), - "; TPC found clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCcrossedOverFindable").c_str(), - "; TPC ratio findable; Entries", kTH1F, {{100, 0.5, 1.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCcrossedRows").c_str(), - "; TPC crossed rows; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCfindableVsCrossed").c_str(), - ";TPC findable clusters ; TPC crossed rows;", kTH2F, - {{163, -0.5, 162.5}, {163, -0.5, 162.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCshared").c_str(), - "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTPCfractionSharedCls").c_str(), - "; TPC fraction of shared clusters; Entries", kTH1F, - {{100, 0.0, 1.0}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hITSclusters").c_str(), - "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hITSclustersIB").c_str(), - "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCAz").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, - {{100, 0, 10}, {500, -5, 5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hDCA").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, - {{100, 0, 10}, {301, 0., 1.5}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hTPCdEdX").c_str(), - "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, - {{tempFitVarMomAxis}, {1000, 0, 1000}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTPC_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTPC_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTPC_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTPC_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTPC_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTOF_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTOF_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTOF_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTOF_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaTOF_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, - {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaComb_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaComb_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaComb_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaComb_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaComb_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); + std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]).c_str(); + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + mHistogramRegistry->add((folderName + folderSuffix + "/hCharge").c_str(), "; Charge; Entries", kTH1F, {{5, -2.5, 2.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfindable").c_str(), "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfound").c_str(), "; TPC found clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCcrossedOverFindable").c_str(), "; TPC ratio findable; Entries", kTH1F, {{100, 0.5, 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCcrossedRows").c_str(), "; TPC crossed rows; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfindableVsCrossed").c_str(), ";TPC findable clusters ; TPC crossed rows;", kTH2F, {{163, -0.5, 162.5}, {163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCshared").c_str(), "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfractionSharedCls").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 1.0}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hITSclusters").c_str(), "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hITSclustersIB").c_str(), "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAz").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCA").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, {{100, 0, 10}, {301, 0., 1.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTPCdEdX").c_str(), "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, {{tempFitVarMomAxis}, {1000, 0, 1000}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTPC_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaTOF_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, {{tempFitVarMomAxis}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaComb_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); if (isFillITSNsigma) { - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaITS_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{e}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaITS_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{#pi}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaITS_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{K}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaITS_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{p}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaITS_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{d}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaCombITSTPC_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{e}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaCombITSTPC_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{#pi}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaCombITSTPC_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{K}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaCombITSTPC_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{p}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/nSigmaCombITSTPC_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{d}", kTH2F, - {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaITS_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{e}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaITS_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaITS_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{K}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaITS_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{p}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaITS_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{d}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaCombITSTPC_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{e}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaCombITSTPC_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{#pi}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaCombITSTPC_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{K}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaCombITSTPC_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{p}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/nSigmaCombITSTPC_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITSTPC}^{d}", kTH2F, {{tempFitVarMomAxis}, {100, 0, 5}}); } - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0) { - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDaughDCA").c_str(), - "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTransRadius").c_str(), - "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDecayVtxX").c_str(), - "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDecayVtxY").c_str(), - "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDecayVtxZ").c_str(), - "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassLambda").c_str(), - "; M_{#Lambda}; Entries", kTH1F, {{2000, 1.f, 3.f}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassLambdaVsPt").c_str(), - "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, - {{240, 0, 6}, {2000, 1.f, 3.f}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassAntiLambda").c_str(), - "; M_{#bar{#Lambda}}; Entries", kTH1F, {{2000, 1.f, 3.f}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassAntiLambdaVsPt").c_str(), - "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, - {{240, 0, 6}, {2000, 1.f, 3.f}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassLambdaAntiLambda").c_str(), - "; M_{#Lambda}; M_{#bar{#Lambda}}", kTH2F, - {{2000, 1.f, 3.f}, {2000, 1.f, 3.f}}); - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascade) { - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDaughDCA").c_str(), - "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTransRadius").c_str(), - "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDecayVtxX").c_str(), - "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDecayVtxY").c_str(), - "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDecayVtxZ").c_str(), - "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassXi").c_str(), - "; M_{Xi}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hInvMassOmega").c_str(), - "; M_{Omega}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + mHistogramRegistry->add((folderName + folderSuffix + "/hDaughDCA").c_str(), "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTransRadius").c_str(), "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxX").c_str(), "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxY").c_str(), "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxZ").c_str(), "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassLambda").c_str(), "; M_{#Lambda}; Entries", kTH1F, {{2000, 1.f, 3.f}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassLambdaVsPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, {{240, 0, 6}, {2000, 1.f, 3.f}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassAntiLambda").c_str(), "; M_{#bar{#Lambda}}; Entries", kTH1F, {{2000, 1.f, 3.f}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassAntiLambdaVsPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); M_{#Lambda}; Entries", kTH2F, {{240, 0, 6}, {2000, 1.f, 3.f}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassLambdaAntiLambda").c_str(), "; M_{#Lambda}; M_{#bar{#Lambda}}", kTH2F, {{2000, 1.f, 3.f}, {2000, 1.f, 3.f}}); + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + mHistogramRegistry->add((folderName + folderSuffix + "/hDaughDCA").c_str(), "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTransRadius").c_str(), "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxX").c_str(), "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxY").c_str(), "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxZ").c_str(), "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassXi").c_str(), "; M_{Xi}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hInvMassOmega").c_str(), "; M_{Omega}; Entries", kTH1F, {{2000, 1.f, 1.8f}}); } } /// Initializes specialized Monte Carlo particle histograms /// internal function called by init only in case of Monte Carlo truth /// \tparam T type of the axis Object - /// \param folderName base path of the directory in the output file, in which - /// to store the histograms - /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in - /// case of tracks, CPA in case of V0s, etc.) - /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. - /// tempFitVar plots + /// \param folderName base path of the directory in the output file, in which to store the histograms + /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) + /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots /// \param tempFitVarAxis axis object for the tempFitVar axis template - void init_MC(std::string folderName, std::string /*tempFitVarAxisTitle*/, - T& tempFitVarpTAxis, T& tempFitVarAxis, - bool isDebug) // o2-linter: disable=name/function-variable + void init_MC(std::string folderName, std::string /*tempFitVarAxisTitle*/, T& tempFitVarpTAxis, T& tempFitVarAxis, bool isDebug) // o2-linter: disable=name/function-variable { /// Particle-type specific histograms - std::string folderSuffix = - static_cast( - o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kTruth]) - .c_str(); + std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]).c_str(); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hPt_ReconNoFake").c_str(), - "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {tempFitVarpTAxis}); - mHistogramRegistry->add((folderName + folderSuffix + "/hPDG").c_str(), - "; PDG; Entries", kTH1I, {{6001, -3000, 3000}}); - mHistogramRegistry->add((folderName + folderSuffix + "/hOrigin_MC").c_str(), - "; Origin; Entries", kTH1I, {{100, 0, 100}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hNoMCtruthCounter").c_str(), - "; Counter; Entries", kTH1I, {{1, 0, 1}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPt_ReconNoFake").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {tempFitVarpTAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hPDG").c_str(), "; PDG; Entries", kTH1I, {{6001, -3000, 3000}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hOrigin_MC").c_str(), "; Origin; Entries", kTH1I, {{100, 0, 100}}); + mHistogramRegistry->add((folderName + folderSuffix + "/hNoMCtruthCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTrueRecoMomPart1").c_str(), - "; #it{p}_{reco} (GeV/#it{c}); #it{p}_{truth} - #it{p}_{reco} " - "(GeV/#it{c})", - kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTrueRecoThetaPart1").c_str(), - "; #it{p}_{reco} (GeV/#it{c}); #it{#theta}_{truth} - " - "#it{#theta}_{reco} (GeV/#it{c})", - kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hTrueRecoPhiPart1").c_str(), - "; #it{p}_{reco} (GeV/#it{c}); #it{#phi}_{truth} - #it{#phi}_{reco} " - "(GeV/#it{c})", - kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoMomPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{p}_{truth} - #it{p}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoThetaPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{#theta}_{truth} - #it{#theta}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoPhiPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{#phi}_{truth} - #it{#phi}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); - if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kTrack || - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0Child || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascadeBachelor || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kMCTruthTrack) { + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { /// Track histograms if (isDebug) { - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_Primary").c_str(), - "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_Daughter").c_str(), - "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_Material").c_str(), - "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_WrongCollision") - .c_str(), - "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_Fake").c_str(), - "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_Else").c_str(), - "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_DaughterLambda") - .c_str(), - "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/Debug/hPDGmother_DaughterSigmaplus") - .c_str(), - "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); - - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Primary").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Material").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Fake").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Else").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hMisidentification").c_str(), - "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, - {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Primary").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Daughter").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Material").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_WrongCollision").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Fake").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_Else").c_str(), "; PDG mother; Entries", kTH1I, {{6001, -3000.5, 3000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_DaughterLambda").c_str(), "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); + mHistogramRegistry->add((folderName + folderSuffix + "/Debug/hPDGmother_DaughterSigmaplus").c_str(), "; PDG mother; Entries", kTH1I, {{12001, -6000.5, 6000.5}}); + + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Primary").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Material").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Fake").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Else").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hMisidentification").c_str(), "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); } else { - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Primary").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Material").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Fake").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_Else").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hMisidentification").c_str(), - "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, - {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); - - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); - mHistogramRegistry->add( - (folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Primary").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Daughter").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Material").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_WrongCollision").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Fake").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_Else").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_NoMCTruthOrigin").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hMisidentification").c_str(), "; #it{p}_{T} (GeV/#it{c}); Particle; Particle", kTH3F, {{4, 0, 4}, {4, 0, 4}, tempFitVarpTAxis}); + + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterLambda").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); + mHistogramRegistry->add((folderName + folderSuffix + "/hDCAxy_DaughterSigmaplus").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {tempFitVarpTAxis, tempFitVarAxis}); } - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0 histograms /// to be implemented - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascade) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { /// Cascade histograms /// to be implemented - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { // Phi histograms - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0) { // D0/D0bar histograms } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " - "object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; } } /// Templated function for the initialization of the QA histograms - /// Always calls init_base to initialize the histograms with data/ Monte Carlo - /// reconstructed In case of Monte Carlo, calls init_base again for Monte - /// Carlo truth and the specialized function init_MC for additional Monte - /// Carlo histogramms + /// Always calls init_base to initialize the histograms with data/ Monte Carlo reconstructed + /// In case of Monte Carlo, calls init_base again for Monte Carlo truth and the specialized function init_MC for additional Monte Carlo histogramms /// \tparam T type of the axis binning /// \param registry Histogram registry to be passed /// \param tempFitVarpTBins binning of the pT axis in the pT vs. tempFitVar - /// \param tempFitVarBins binning of the tempFitVar (DCA_xy in case of tracks, - /// CPA in case of V0s, etc.) + /// \param tempFitVarBins binning of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) /// \param isMC add Monte Carlo truth histograms to the output file template - void init(HistogramRegistry* registry, T& tempFitVarpTBins, T& tempFitVarBins, - bool isMC, int pdgCode, bool isDebug = false, - std::optional flexibleFolder = std::nullopt, - bool isFillITSNsigma = false) + void init(HistogramRegistry* registry, T& tempFitVarpTBins, T& tempFitVarBins, bool isMC, int pdgCode, bool isDebug = false, std::optional flexibleFolder = std::nullopt, bool isFillITSNsigma = false) { mPDG = pdgCode; if (registry) { mHistogramRegistry = registry; - /// The folder names are defined by the type of the object and the suffix - /// (if applicable) + /// The folder names are defined by the type of the object and the suffix (if applicable) std::string tempFitVarAxisTitle; - if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kTrack || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kV0Child || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascadeBachelor) { + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor) { /// Track histograms tempFitVarAxisTitle = "DCA_{xy} (cm)"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kMCTruthTrack) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { /// MC Truth Track histograms tempFitVarAxisTitle = "PDG code"; - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0 histograms tempFitVarAxisTitle = "cos#alpha"; - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascade) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { /// Cascade histograms tempFitVarAxisTitle = "cos#alpha"; - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { // Phi histograms tempFitVarAxisTitle = "#Phi invariant mass"; - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0) { // D0/D0bar histograms tempFitVarAxisTitle = "D^{0}/#bar{D^{0}} invariant mass"; } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " - "object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; } - framework::AxisSpec tempFitVarpTAxis = { - tempFitVarpTBins, - "#it{p}_{T} (GeV/#it{c})"}; // the pT binning may vary - framework::AxisSpec tempFitVarMomAxis = { - tempFitVarpTBins, "#it{p} (GeV/#it{c})"}; // the p binning - framework::AxisSpec tempFitVarAxis = {tempFitVarBins, - tempFitVarAxisTitle}; + framework::AxisSpec tempFitVarpTAxis = {tempFitVarpTBins, "#it{p}_{T} (GeV/#it{c})"}; // the pT binning may vary + framework::AxisSpec tempFitVarMomAxis = {tempFitVarpTBins, "#it{p} (GeV/#it{c})"}; // the p binning + framework::AxisSpec tempFitVarAxis = {tempFitVarBins, tempFitVarAxisTitle}; - // std::string folderName = - // (static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]).c_str() - // + static_cast(mFolderSuffix[mFolderSuffixType])).c_str(); - std::string folderName = flexibleFolder.value_or(( - static_cast( - o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + - static_cast(mFolderSuffix[mFolderSuffixType]))); + // std::string folderName = (static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]).c_str() + static_cast(mFolderSuffix[mFolderSuffixType])).c_str(); + std::string folderName = flexibleFolder.value_or((static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + static_cast(mFolderSuffix[mFolderSuffixType]))); // Fill here the actual histogramms by calling init_base and init_MC - init_base( - folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); + init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); if (isDebug) { - init_debug( - folderName, tempFitVarMomAxis, isFillITSNsigma); + init_debug(folderName, tempFitVarMomAxis, isFillITSNsigma); } if (isMC) { - init_base( - folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); - init_MC(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, - tempFitVarAxis, isDebug); + init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); + init_MC(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis, isDebug); // init_MC_reso(folderName, tempFitVarAxisTitle, tempFitVarpTAxis); } } } /// Filling of the histograms - /// Called by init both in case of reconstructed data/ Monte Carlo, and for - /// Monte Carlo Truth + /// Called by init both in case of reconstructed data/ Monte Carlo, and for Monte Carlo Truth /// \tparam T Data type of the particle /// \param part Particle - template - void - fillQA_base(T const& part, - H const& histFolder) // o2-linter: disable=name/function-variable + template + void fillQA_base(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable { /// Histograms of the kinematic properties - mHistogramRegistry->fill( - histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hPt"), - part.pt()); - mHistogramRegistry->fill( - histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hEta"), - part.eta()); - mHistogramRegistry->fill( - histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hPhi"), - part.phi()); - mHistogramRegistry->fill( - histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hPhiEta"), - part.phi(), part.eta()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPt"), part.pt()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hEta"), part.eta()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPhi"), part.phi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPhiEta"), part.phi(), part.eta()); - /// particle specific histogramms for the TempFitVar column in - /// FemtoUniverseParticles + /// particle specific histogramms for the TempFitVar column in FemtoUniverseParticles if constexpr (mc == o2::aod::femtouniverse_mc_particle::MCType::kRecon) { - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST(o2::aod::femtouniverseparticle::TempFitVarName - [mParticleType]), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType]), part.pt(), part.tempFitVar()); } - if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kCascade) { - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassXi"), - part.mLambda()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassOmega"), - part.mAntiLambda()); + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassXi"), part.mLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassOmega"), part.mAntiLambda()); } } - template - void - fillQA_debug(T const& part, - H const& histFolder) // o2-linter: disable=name/function-variable + template + void fillQA_debug(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable { // Histograms holding further debug information - if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kTrack || - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0Child || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascadeBachelor || - mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kMCTruthTrack) { - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hCharge"), - part.sign()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCfindable"), - part.tpcNClsFindable()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCfound"), - part.tpcNClsFound()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCcrossedOverFindable"), - part.tpcCrossedRowsOverFindableCls()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCcrossedRows"), - part.tpcNClsCrossedRows()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCfindableVsCrossed"), - part.tpcNClsFindable(), part.tpcNClsCrossedRows()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCshared"), - part.tpcNClsShared()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCfractionSharedCls"), - part.tpcFractionSharedCls()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hITSclusters"), - part.itsNCls()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hITSclustersIB"), - part.itsNClsInnerBarrel()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDCAz"), - part.pt(), part.dcaZ()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDCA"), - part.pt(), - std::sqrt(std::pow(part.dcaXY(), 2.) + std::pow(part.dcaZ(), 2.))); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTPCdEdX"), - part.p(), part.tpcSignal()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTPC_el"), - part.p(), part.tpcNSigmaEl()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTPC_pi"), - part.p(), part.tpcNSigmaPi()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTPC_K"), - part.p(), part.tpcNSigmaKa()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTPC_p"), - part.p(), part.tpcNSigmaPr()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTPC_d"), - part.p(), part.tpcNSigmaDe()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTOF_el"), - part.p(), part.tofNSigmaEl()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTOF_pi"), - part.p(), part.tofNSigmaPi()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTOF_K"), - part.p(), part.tofNSigmaKa()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTOF_p"), - part.p(), part.tofNSigmaPr()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaTOF_d"), - part.p(), part.tofNSigmaDe()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaComb_el"), - part.p(), - std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + - part.tofNSigmaEl() * part.tofNSigmaEl())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaComb_pi"), - part.p(), - std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + - part.tofNSigmaPi() * part.tofNSigmaPi())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaComb_K"), - part.p(), - std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + - part.tofNSigmaKa() * part.tofNSigmaKa())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaComb_p"), - part.p(), - std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + - part.tofNSigmaPr() * part.tofNSigmaPr())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaComb_d"), - part.p(), - std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + - part.tofNSigmaDe() * part.tofNSigmaDe())); - /*if (isFillITSNsigma) { - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaITS_el"), part.p(), part.itsNSigmaEl()); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaITS_pi"), part.p(), part.itsNSigmaPi()); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaITS_K"), part.p(), part.itsSigmaKa()); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaITS_p"), part.p(), part.itsSigmaPr()); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaITS_d"), part.p(), part.itsSigmaDe()); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaCombITSTPC_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * - part.tpcNSigmaEl() + part.itsNSigmaEl() * part.itsNSigmaEl())); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaCombITSTPC_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * - part.tpcNSigmaPi() + part.itsNSigmaPi() * part.itsNSigmaPi())); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaCombITSTPC_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * - part.tpcNSigmaKa() + part.itsNSigmaKa() * part.itsNSigmaKa())); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaCombITSTPC_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * - part.tpcNSigmaPr() + part.itsNSigmaPr() * part.itsNSigmaPr())); - mHistogramRegistry->fill(histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/nSigmaCombITSTPC_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * - part.tpcNSigmaDe() + part.itsNSigmaDe() * part.itsNSigmaDe())); - }*/ - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0) { - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDaughDCA"), - part.daughDCA()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTransRadius"), - part.transRadius()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDecayVtxX"), - part.decayVtxX()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDecayVtxY"), - part.decayVtxY()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDecayVtxZ"), - part.decayVtxZ()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassLambda"), - part.mLambda()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassLambdaVsPt"), - part.pt(), part.mLambda()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassAntiLambda"), - part.mAntiLambda()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassAntiLambdaVsPt"), - part.pt(), part.mAntiLambda()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hInvMassLambdaAntiLambda"), - part.mLambda(), part.mAntiLambda()); - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascade) { - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDaughDCA"), - part.daughDCA()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hTransRadius"), - part.transRadius()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDecayVtxX"), - part.decayVtxX()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDecayVtxY"), - part.decayVtxY()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + - HIST("/hDecayVtxZ"), - part.decayVtxZ()); + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hCharge"), part.sign()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindable"), part.tpcNClsFindable()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfound"), part.tpcNClsFound()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedOverFindable"), part.tpcCrossedRowsOverFindableCls()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedRows"), part.tpcNClsCrossedRows()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindableVsCrossed"), part.tpcNClsFindable(), part.tpcNClsCrossedRows()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCshared"), part.tpcNClsShared()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfractionSharedCls"), part.tpcFractionSharedCls()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclusters"), part.itsNCls()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclustersIB"), part.itsNClsInnerBarrel()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCAz"), part.pt(), part.dcaZ()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCA"), part.pt(), std::sqrt(std::pow(part.dcaXY(), 2.) + std::pow(part.dcaZ(), 2.))); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCdEdX"), part.p(), part.tpcSignal()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_el"), part.p(), part.tpcNSigmaEl()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_pi"), part.p(), part.tpcNSigmaPi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_K"), part.p(), part.tpcNSigmaKa()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_p"), part.p(), part.tpcNSigmaPr()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_d"), part.p(), part.tpcNSigmaDe()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_el"), part.p(), part.tofNSigmaEl()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_pi"), part.p(), part.tofNSigmaPi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_K"), part.p(), part.tofNSigmaKa()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_p"), part.p(), part.tofNSigmaPr()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_d"), part.p(), part.tofNSigmaDe()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + part.tofNSigmaEl() * part.tofNSigmaEl())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + part.tofNSigmaPi() * part.tofNSigmaPi())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + part.tofNSigmaKa() * part.tofNSigmaKa())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + part.tofNSigmaPr() * part.tofNSigmaPr())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + part.tofNSigmaDe() * part.tofNSigmaDe())); + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambda"), part.mLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambdaVsPt"), part.pt(), part.mLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassAntiLambda"), part.mAntiLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassAntiLambdaVsPt"), part.pt(), part.mAntiLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambdaAntiLambda"), part.mLambda(), part.mAntiLambda()); + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); } } @@ -944,196 +351,119 @@ class FemtoUniverseParticleHisto /// \tparam TMC Data typ of the Monte Carlo Particle /// \param part Particle /// \param mctruthorigin Origin of the associated mc Truth particle - /// \param pdgcode PDG of the associated mc Truth particle associated to the - /// reconstructed particle part + /// \param pdgcode PDG of the associated mc Truth particle associated to the reconstructed particle part template - void - fillQA_MC(T const& part, int mctruthorigin, int pdgcode, - H const& histFolder) // o2-linter: disable=name/function-variable + void fillQA_MC(T const& part, int mctruthorigin, int pdgcode, H const& histFolder) // o2-linter: disable=name/function-variable { if (mHistogramRegistry) { mHistogramRegistry->fill(histFolder + HIST("_MC/hPDG"), pdgcode); - mHistogramRegistry->fill(histFolder + HIST("_MC/hOrigin_MC"), - mctruthorigin); + mHistogramRegistry->fill(histFolder + HIST("_MC/hOrigin_MC"), mctruthorigin); - if (std::abs(pdgcode) == - mPDG) { // fill this histogramm only for TRUE protons (independently - // of their origin) for the track purity estimation - mHistogramRegistry->fill(histFolder + HIST("_MC/hPt_ReconNoFake"), - part.pt()); + if (std::abs(pdgcode) == mPDG) { // fill this histogramm only for TRUE protons (independently of their origin) for the track purity estimation + mHistogramRegistry->fill(histFolder + HIST("_MC/hPt_ReconNoFake"), part.pt()); if (part.has_fdMCParticle()) { float part_p = part.pt() * std::cosh(part.eta()); - float part_MC_p = - part.fdMCParticle().pt() * std::cosh(part.fdMCParticle().eta()); + float part_MC_p = part.fdMCParticle().pt() * std::cosh(part.fdMCParticle().eta()); float part_theta = 2.0 * std::atan(std::exp(-part.eta())); - float part_MC_theta = - 2.0 * std::atan(std::exp(-part.fdMCParticle().eta())); + float part_MC_theta = 2.0 * std::atan(std::exp(-part.fdMCParticle().eta())); - mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoMomPart1"), - part_p, (part_MC_p - part_p)); - mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoThetaPart1"), - part_p, (part_MC_theta - part_theta)); - mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoPhiPart1"), - part_p, - part.fdMCParticle().phi() - part.phi()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoMomPart1"), part_p, (part_MC_p - part_p)); + mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoThetaPart1"), part_p, (part_MC_theta - part_theta)); + mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoPhiPart1"), part_p, part.fdMCParticle().phi() - part.phi()); } } - if constexpr ( - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kTrack || - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0Child || - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || - mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { if constexpr (isDebug) { switch (mctruthorigin) { case (o2::aod::femtouniverse_mc_particle::kPrimary): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_Primary"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Primary"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughter): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_Daughter"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Daughter"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kMaterial): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_Material"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Material"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kWrongCollision): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_WrongCollision"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_WrongCollision"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_WrongCollision"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_WrongCollision"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kFake): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_Fake"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Fake"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterLambda): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_DaughterLambda"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_DaughterLambda"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_DaughterLambda"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterLambda"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_DaughterSigmaplus"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_DaughterSigmaplus"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_DaughterSigmaplus"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterSigmaplus"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kElse): - // mHistogramRegistry->fill(histFolder + - // HIST("_MC/Debug/hPDGmother_Else"), - // part.fdMCParticle().motherPDG()); - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), - part.pt(), part.tempFitVar()); + // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Else"), part.fdMCParticle().motherPDG()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), part.pt(), part.tempFitVar()); break; default: - LOGF(info, - "femtodreamparticleMC: not known value for " - "ParticleOriginMCTruth --- %d - please check. Quitting!", - mctruthorigin); - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_NoMCTruthOrigin"), - part.pt(), part.tempFitVar()); + LOGF(info, "femtodreamparticleMC: not known value for ParticleOriginMCTruth --- %d - please check. Quitting!", mctruthorigin); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_NoMCTruthOrigin"), part.pt(), part.tempFitVar()); } } else { switch (mctruthorigin) { case (o2::aod::femtouniverse_mc_particle::kPrimary): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughter): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kMaterial): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kWrongCollision): - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_WrongCollision"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_WrongCollision"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kFake): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterLambda): - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_DaughterLambda"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterLambda"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus): - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_DaughterSigmaplus"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterSigmaplus"), part.pt(), part.tempFitVar()); break; case (o2::aod::femtouniverse_mc_particle::kElse): - mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), - part.pt(), part.tempFitVar()); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Else"), part.pt(), part.tempFitVar()); break; default: - LOGF(info, - "femtodreamparticleMC: not known value for " - "ParticleOriginMCTruth --- %d - please check. Quitting!", - mctruthorigin); - mHistogramRegistry->fill(histFolder + - HIST("_MC/hDCAxy_NoMCTruthOrigin"), - part.pt(), part.tempFitVar()); + LOGF(info, "femtodreamparticleMC: not known value for ParticleOriginMCTruth --- %d - please check. Quitting!", mctruthorigin); + mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_NoMCTruthOrigin"), part.pt(), part.tempFitVar()); } } - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0 histograms - } else if constexpr (mParticleType == o2::aod::femtouniverseparticle:: - ParticleType::kCascade) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { /// Cascade histograms - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { // Phi histograms - } else if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0) { // D0/D0bar histograms } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " - "object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; } } } template - void fillQA_MC_MisIden( - T const& part, int pdgcode, int confPDG, - H const& histFolder) // o2-linter: disable=name/function-variable + void fillQA_MC_MisIden(T const& part, int pdgcode, int confPDG, H const& histFolder) // o2-linter: disable=name/function-variable { if (mHistogramRegistry) { - if constexpr (mParticleType == - o2::aod::femtouniverseparticle::ParticleType::kTrack) { + if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { if (confPDG == mConfPDGCodePart[0]) { binPDG = 0; } else if (confPDG == mConfPDGCodePart[1]) { @@ -1158,26 +488,20 @@ class FemtoUniverseParticleHisto } } } else { - LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested " - "object not defined - quitting!"; + LOG(fatal) << "FemtoUniverseParticleHisto: Histogramming for requested object not defined - quitting!"; } } - /// Templated function to fill particle histograms for data/ Monte Carlo - /// reconstructed and Monte Carlo truth Always calls fillQA_base fill - /// histogramms with data/ Monte Carlo reconstructed In case of Monte Carlo, - /// calls fillQA_base with Monte Carlo truth info and specialized function - /// fillQA_MC for additional histogramms + /// Templated function to fill particle histograms for data/ Monte Carlo reconstructed and Monte Carlo truth + /// Always calls fillQA_base fill histogramms with data/ Monte Carlo reconstructed + /// In case of Monte Carlo, calls fillQA_base with Monte Carlo truth info and specialized function fillQA_MC for additional histogramms /// \tparam T particle type /// \tparam isMC fills the additional histograms for Monte Carlo truth /// \param part particle for which the histograms should be filled template void fillQA(T const& part) { - fillQABase( - part, - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + - HIST(mFolderSuffix[mFolderSuffixType])); + fillQABase(part, HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType])); } template @@ -1185,21 +509,16 @@ class FemtoUniverseParticleHisto { std::string tempFitVarName; if (mHistogramRegistry) { - fillQA_base( - part, histFolder); + fillQA_base(part, histFolder); if constexpr (isDebug) { - fillQA_debug( - part, histFolder); + fillQA_debug(part, histFolder); } if constexpr (isMC) { if (part.has_fdMCParticle()) { - fillQA_base( - part.fdMCParticle(), histFolder); - fillQA_MC(part, (part.fdMCParticle()).partOriginMCTruth(), - (part.fdMCParticle()).pdgMCTruth(), histFolder); + fillQA_base(part.fdMCParticle(), histFolder); + fillQA_MC(part, (part.fdMCParticle()).partOriginMCTruth(), (part.fdMCParticle()).pdgMCTruth(), histFolder); } else { - mHistogramRegistry->fill(histFolder + HIST("_MC/hNoMCtruthCounter"), - 0); + mHistogramRegistry->fill(histFolder + HIST("_MC/hNoMCtruthCounter"), 0); } } } @@ -1208,104 +527,35 @@ class FemtoUniverseParticleHisto template void fillQAITSPID(T const& part) { - fillQABaseITSPID( - part, - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + - HIST(mFolderSuffix[mFolderSuffixType])); + fillQABaseITSPID(part, HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType])); } template void fillQABaseITSPID(T const& part, H const& histFolder) { // std::string tempFitVarName; - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaITS_el"), - part.p(), part.itsNSigmaEl()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaITS_pi"), - part.p(), part.itsNSigmaPi()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaITS_K"), - part.p(), part.itsNSigmaKa()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaITS_p"), - part.p(), part.itsNSigmaPr()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaITS_d"), - part.p(), part.itsNSigmaDe()); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaCombITSTPC_el"), - part.p(), - std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + - part.itsNSigmaEl() * part.itsNSigmaEl())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaCombITSTPC_pi"), - part.p(), - std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + - part.itsNSigmaPi() * part.itsNSigmaPi())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaCombITSTPC_K"), - part.p(), - std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + - part.itsNSigmaKa() * part.itsNSigmaKa())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaCombITSTPC_p"), - part.p(), - std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + - part.itsNSigmaPr() * part.itsNSigmaPr())); - mHistogramRegistry->fill( - histFolder + - HIST(o2::aod::femtouniverse_mc_particle::MCTypeName - [o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + - HIST("/nSigmaCombITSTPC_d"), - part.p(), - std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + - part.itsNSigmaDe() * part.itsNSigmaDe())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaITS_el"), part.p(), part.itsNSigmaEl()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaITS_pi"), part.p(), part.itsNSigmaPi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaITS_K"), part.p(), part.itsNSigmaKa()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaITS_p"), part.p(), part.itsNSigmaPr()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaITS_d"), part.p(), part.itsNSigmaDe()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaCombITSTPC_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + part.itsNSigmaEl() * part.itsNSigmaEl())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaCombITSTPC_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + part.itsNSigmaPi() * part.itsNSigmaPi())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaCombITSTPC_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + part.itsNSigmaKa() * part.itsNSigmaKa())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaCombITSTPC_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + part.itsNSigmaPr() * part.itsNSigmaPr())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/nSigmaCombITSTPC_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + part.itsNSigmaDe() * part.itsNSigmaDe())); } - /// Templated function to fill particle histograms for data/ Monte Carlo - /// reconstructed and Monte Carlo truth Always calls fillQA_base fill - /// histogramms with data/ Monte Carlo reconstructed In case of Monte Carlo, - /// calls fillQA_base with Monte Carlo truth info and specialized function - /// fillQA_MC for additional histogramms + /// Templated function to fill particle histograms for data/ Monte Carlo reconstructed and Monte Carlo truth + /// Always calls fillQA_base fill histogramms with data/ Monte Carlo reconstructed + /// In case of Monte Carlo, calls fillQA_base with Monte Carlo truth info and specialized function fillQA_MC for additional histogramms /// \tparam T particle type /// \tparam isMC fills the additional histograms for Monte Carlo truth /// \param part particle for which the histograms should be filled template void fillQAMisIden(T const& part, int confPDG) { - fillQABaseMisiden( - part, - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + - HIST(mFolderSuffix[mFolderSuffixType]), - confPDG); + fillQABaseMisiden(part, HIST(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]), confPDG); } template @@ -1315,29 +565,19 @@ class FemtoUniverseParticleHisto if (mHistogramRegistry) { if constexpr (isMC) { if (part.has_fdMCParticle()) { - fillQA_MC_MisIden(part, (part.fdMCParticle()).pdgMCTruth(), confPDG, - histFolder); + fillQA_MC_MisIden(part, (part.fdMCParticle()).pdgMCTruth(), confPDG, histFolder); } } } } private: - HistogramRegistry* mHistogramRegistry; ///< For QA output - static constexpr o2::aod::femtouniverseparticle::ParticleType mParticleType = - particleType; ///< Type of the particle under analysis // o2-linter: - ///< disable=name/constexpr-constant - static constexpr int mFolderSuffixType = - suffixType; ///< Counter for the folder suffix specified below // - ///< o2-linter: disable=name/constexpr-constant - static constexpr std::string_view mFolderSuffix[5] = { - "", "_one", "_two", "_pos", - "_neg"}; ///< Suffix for the folder name in case of analyses of pairs of - ///< the same kind (T-T, V-V, C-C) // o2-linter: - ///< disable=name/constexpr-constant - int mConfPDGCodePart[4] = {211, 321, 2212, - 9999}; ///< PDG code as per analysis - int mPDG = 0; ///< PDG code of the selected particle + HistogramRegistry* mHistogramRegistry; ///< For QA output + static constexpr o2::aod::femtouniverseparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis // o2-linter: disable=name/constexpr-constant + static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below // o2-linter: disable=name/constexpr-constant + static constexpr std::string_view mFolderSuffix[5] = {"", "_one", "_two", "_pos", "_neg"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) // o2-linter: disable=name/constexpr-constant + int mConfPDGCodePart[4] = {211, 321, 2212, 9999}; ///< PDG code as per analysis + int mPDG = 0; ///< PDG code of the selected particle int binPDG = 0; }; } // namespace o2::analysis::femto_universe diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h index 41e5e0de7f2..a7145af2c71 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -42,22 +42,21 @@ namespace o2::analysis::femto_universe namespace femto_universe_track_selection { /// The different selections this task is capable of doing -enum TrackSel { - kSign, ///< Sign of the track - kpTMin, ///< Min. p_T (GeV/c) - kpTMax, ///< Max. p_T (GeV/c) - kEtaMax, ///< Max. |eta| - kTPCnClsMin, ///< Min. number of TPC clusters - kTPCfClsMin, ///< Min. fraction of crossed rows/findable TPC clusters - kTPCcRowsMin, ///< Min. number of crossed TPC rows - kTPCsClsMax, ///< Max. number of shared TPC clusters - kTPCfracsClsMax, ///< Max. number of fraction of shared TPC clusters - kITSnClsMin, ///< Min. number of ITS clusters - kITSnClsIbMin, ///< Min. number of ITS clusters in the inner barrel - kDCAxyMax, ///< Max. DCA_xy (cm) - kDCAzMax, ///< Max. DCA_z (cm) - kDCAMin, ///< Min. DCA_xyz (cm) - kPIDnSigmaMax ///< Max. |n_sigma| for PID +enum TrackSel { kSign, ///< Sign of the track + kpTMin, ///< Min. p_T (GeV/c) + kpTMax, ///< Max. p_T (GeV/c) + kEtaMax, ///< Max. |eta| + kTPCnClsMin, ///< Min. number of TPC clusters + kTPCfClsMin, ///< Min. fraction of crossed rows/findable TPC clusters + kTPCcRowsMin, ///< Min. number of crossed TPC rows + kTPCsClsMax, ///< Max. number of shared TPC clusters + kTPCfracsClsMax, ///< Max. number of fraction of shared TPC clusters + kITSnClsMin, ///< Min. number of ITS clusters + kITSnClsIbMin, ///< Min. number of ITS clusters in the inner barrel + kDCAxyMax, ///< Max. DCA_xy (cm) + kDCAzMax, ///< Max. DCA_z (cm) + kDCAMin, ///< Min. DCA_xyz (cm) + kPIDnSigmaMax ///< Max. |n_sigma| for PID }; enum TrackContainerPosition { @@ -69,24 +68,44 @@ enum TrackContainerPosition { /// \class FemtoUniverseTrackCuts /// \brief Cut class to contain and execute all cuts applied to tracks -class FemtoUniverseTrackSelection - : public FemtoUniverseObjectSelection< - float, femto_universe_track_selection::TrackSel> +class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection { public: - FemtoUniverseTrackSelection() - : nRejectNotPropagatedTracks(false), nPtMinSel(0), nPtMaxSel(0), nEtaSel(0), nTPCnMinSel(0), nTPCfMinSel(0), nTPCcMinSel(0), nTPCsMaxSel(0), nITScMinSel(0), nITScIbMinSel(0), nDCAxyMaxSel(0), nDCAzMaxSel(0), nDCAMinSel(0), nPIDnSigmaSel(0), pTMin(9999999.), pTMax(-9999999.), etaMax(-9999999.), nClsMin(9999999.), fClsMin(9999999.), cTPCMin(9999999.), sTPCMax(-9999999.), fracsTPCMax(-9999999.), dcaXYMax(-9999999.), dcaZMax(-9999999.), dcaMin(9999999.), nSigmaPIDMax(9999999.), nSigmaPIDOffsetTPC(0.), nSigmaPIDOffsetTOF(0.) {} + FemtoUniverseTrackSelection() : nRejectNotPropagatedTracks(false), + nPtMinSel(0), + nPtMaxSel(0), + nEtaSel(0), + nTPCnMinSel(0), + nTPCfMinSel(0), + nTPCcMinSel(0), + nTPCsMaxSel(0), + nITScMinSel(0), + nITScIbMinSel(0), + nDCAxyMaxSel(0), + nDCAzMaxSel(0), + nDCAMinSel(0), + nPIDnSigmaSel(0), + pTMin(9999999.), + pTMax(-9999999.), + etaMax(-9999999.), + nClsMin(9999999.), + fClsMin(9999999.), + cTPCMin(9999999.), + sTPCMax(-9999999.), + fracsTPCMax(-9999999.), + dcaXYMax(-9999999.), + dcaZMax(-9999999.), + dcaMin(9999999.), + nSigmaPIDMax(9999999.), + nSigmaPIDOffsetTPC(0.), + nSigmaPIDOffsetTOF(0.) {} /// Initializes histograms for the task /// \tparam part Type of the particle for proper naming of the folders for QA - /// \tparam tracktype Type of track (track, positive child, negative child) - /// for proper naming of the folders for QA - /// \tparam CutContainerType Data type of the bit-wise container for the - /// selections + /// \tparam tracktype Type of track (track, positive child, negative child) for proper naming of the folders for QA + /// \tparam CutContainerType Data type of the bit-wise container for the selections /// \param registry HistogramRegistry for QA output - template + template void init(HistogramRegistry* registry); /// Passes the species to the task for which PID needs to be stored @@ -95,8 +114,7 @@ class FemtoUniverseTrackSelection template void setPIDSpecies(T& pids) { - std::vector tmpPids = - pids; /// necessary due to some features of the configurable + std::vector tmpPids = pids; /// necessary due to some features of the configurable for (const o2::track::PID pid : tmpPids) { kPIDspecies.push_back(pid); } @@ -126,24 +144,19 @@ class FemtoUniverseTrackSelection template auto getNsigmaITS(T const& track, o2::track::PID pid); - /// Checks whether the most open combination of all selection criteria is - /// fulfilled + /// Checks whether the most open combination of all selection criteria is fulfilled /// \tparam T Data type of the track /// \param track Track - /// \return Whether the most open combination of all selection criteria is - /// fulfilled + /// \return Whether the most open combination of all selection criteria is fulfilled template bool isSelectedMinimal(T const& track); /// Obtain the bit-wise container for the selections - /// \todo For the moment, PID is separated from the other selections, hence - /// instead of a single value an std::array of size two is returned - /// \tparam CutContainerType Data type of the bit-wise container for the - /// selections + /// \todo For the moment, PID is separated from the other selections, hence instead of a single value an std::array of size two is returned + /// \tparam CutContainerType Data type of the bit-wise container for the selections /// \tparam T Data type of the track /// \param track Track - /// \return The bit-wise container for the selections, separately with all - /// selection criteria, and the PID + /// \return The bit-wise container for the selections, separately with all selection criteria, and the PID template std::array getCutContainer(T const& track); @@ -161,22 +174,17 @@ class FemtoUniverseTrackSelection /// Some basic QA histograms /// \tparam part Type of the particle for proper naming of the folders for QA - /// \tparam tracktype Type of track (track, positive child, negative child) - /// for proper naming of the folders for QA + /// \tparam tracktype Type of track (track, positive child, negative child) for proper naming of the folders for QA /// \tparam T Data type of the track /// \param track Track - template + template void fillQA(T const& track); - /// Helper function to obtain the name of a given selection criterion for - /// consistent naming of the configurables + /// Helper function to obtain the name of a given selection criterion for consistent naming of the configurables /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the name of the configurable /// \param suffix Additional suffix for the name of the configurable - static std::string - getSelectionName(femto_universe_track_selection::TrackSel iSel, - std::string_view prefix = "", std::string_view suffix = "") + static std::string getSelectionName(femto_universe_track_selection::TrackSel iSel, std::string_view prefix = "", std::string_view suffix = "") { std::string outString = static_cast(prefix); outString += static_cast(kSelectionNames[iSel]); @@ -184,16 +192,13 @@ class FemtoUniverseTrackSelection return outString; } - /// Helper function to obtain the index of a given selection variable for - /// consistent naming of the configurables + /// Helper function to obtain the index of a given selection variable for consistent naming of the configurables /// \param obs Track selection variable (together with prefix) got from file /// \param prefix Additional prefix for the output of the configurable - static int findSelectionIndex(const std::string_view& obs, - std::string_view prefix = "") + static int findSelectionIndex(const std::string_view& obs, std::string_view prefix = "") { for (int index = 0; index < kNtrackSelection; index++) { - std::string comp = static_cast(prefix) + - static_cast(kSelectionNames[index]); + std::string comp = static_cast(prefix) + static_cast(kSelectionNames[index]); std::string_view cmp{comp}; if (obs.compare(cmp) == 0) return index; @@ -201,29 +206,27 @@ class FemtoUniverseTrackSelection return -1; } - /// Helper function to obtain the type of a given selection variable for - /// consistent naming of the configurables + /// Helper function to obtain the type of a given selection variable for consistent naming of the configurables /// \param iSel Track selection variable whose type is returned - static femto_universe_selection::SelectionType - getSelectionType(femto_universe_track_selection::TrackSel iSel) + static femto_universe_selection::SelectionType getSelectionType(femto_universe_track_selection::TrackSel iSel) { return kSelectionTypes[iSel]; } - /// Helper function to obtain the helper string of a given selection criterion - /// for consistent description of the configurables + /// Helper function to obtain the helper string of a given selection criterion for consistent description of the configurables /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the output of the configurable - static std::string - getSelectionHelper(femto_universe_track_selection::TrackSel iSel, - std::string_view prefix = "") + static std::string getSelectionHelper(femto_universe_track_selection::TrackSel iSel, std::string_view prefix = "") { std::string outString = static_cast(prefix); outString += static_cast(kSelectionHelper[iSel]); return outString; } - float getSigmaPIDMax() { return nSigmaPIDMax; } + float getSigmaPIDMax() + { + return nSigmaPIDMax; + } void setRejectNotPropagatedTracks(bool reject) { @@ -267,184 +270,106 @@ class FemtoUniverseTrackSelection float nSigmaPIDMax; float nSigmaPIDOffsetTPC; float nSigmaPIDOffsetTOF; - std::vector - kPIDspecies; ///< All the particle species for which the n_sigma values - ///< need to be stored + std::vector kPIDspecies; ///< All the particle species for which the n_sigma values need to be stored static constexpr int kNtrackSelection = 15; - static constexpr std::string_view kSelectionNames[kNtrackSelection] = { - "Sign", "PtMin", "PtMax", "EtaMax", - "TPCnClsMin", "TPCfClsMin", "TPCcRowsMin", "TPCsClsMax", - "TPCfracsClsMax", "ITSnClsMin", "ITSnClsIbMin", "DCAxyMax", - "DCAzMax", "DCAMin", "PIDnSigmaMax"}; ///< Name of the - ///< different selections - - static constexpr femto_universe_selection::SelectionType - kSelectionTypes[kNtrackSelection]{ - femto_universe_selection::kEqual, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kUpperLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kUpperLimit, - femto_universe_selection::kUpperLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kLowerLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kAbsUpperLimit, - femto_universe_selection::kAbsUpperLimit}; ///< Map to match a - ///< variable with its type - - static constexpr std::string_view kSelectionHelper[kNtrackSelection] = { - "Sign of the track", - "Minimal pT (GeV/c)", - "Maximal pT (GeV/c)", - "Maximal eta", - "Minimum number of TPC clusters", - "Minimum fraction of crossed rows/findable clusters", - "Minimum number of crossed TPC rows", - "Maximal number of shared TPC cluster", - "Maximal number of fraction of shared TPC cluster", - "Minimum number of ITS clusters", - "Minimum number of ITS clusters in the inner barrel", - "Maximal DCA_xy (cm)", - "Maximal DCA_z (cm)", - "Minimal DCA (cm)", - "Maximal PID (nSigma)"}; ///< Helper information for the different - ///< selections + static constexpr std::string_view kSelectionNames[kNtrackSelection] = {"Sign", + "PtMin", + "PtMax", + "EtaMax", + "TPCnClsMin", + "TPCfClsMin", + "TPCcRowsMin", + "TPCsClsMax", + "TPCfracsClsMax", + "ITSnClsMin", + "ITSnClsIbMin", + "DCAxyMax", + "DCAzMax", + "DCAMin", + "PIDnSigmaMax"}; ///< Name of the different selections + + static constexpr femto_universe_selection::SelectionType kSelectionTypes[kNtrackSelection]{femto_universe_selection::kEqual, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kAbsUpperLimit, + femto_universe_selection::kAbsUpperLimit}; ///< Map to match a variable with its type + + static constexpr std::string_view kSelectionHelper[kNtrackSelection] = {"Sign of the track", + "Minimal pT (GeV/c)", + "Maximal pT (GeV/c)", + "Maximal eta", + "Minimum number of TPC clusters", + "Minimum fraction of crossed rows/findable clusters", + "Minimum number of crossed TPC rows", + "Maximal number of shared TPC cluster", + "Maximal number of fraction of shared TPC cluster", + "Minimum number of ITS clusters", + "Minimum number of ITS clusters in the inner barrel", + "Maximal DCA_xy (cm)", + "Maximal DCA_z (cm)", + "Minimal DCA (cm)", + "Maximal PID (nSigma)"}; ///< Helper information for the different selections }; // namespace femto_universe -template +template void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) { if (registry) { mHistogramRegistry = registry; - std::string folderName = - static_cast( - o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - "/" + - static_cast( - o2::aod::femtouniverseparticle::TrackTypeName[tracktype]); + std::string folderName = static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + "/" + static_cast(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]); /// check whether the number of selection exceeds the bitmap size - unsigned int nSelections = - getNSelections() - - getNSelections(femto_universe_track_selection::kPIDnSigmaMax); + unsigned int nSelections = getNSelections() - getNSelections(femto_universe_track_selection::kPIDnSigmaMax); if (nSelections > 8 * sizeof(CutContainerType)) { - LOG(fatal) << "FemtoUniverseTrackCuts: Number of selections too large " - "for your container - quitting!"; + LOG(fatal) << "FemtoUniverseTrackCuts: Number of selections too large for your container - quitting!"; } - mHistogramRegistry->add((folderName + "/hPt").c_str(), - "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, - {{240, 0, 6}}); - mHistogramRegistry->add((folderName + "/hEta").c_str(), "; #eta; Entries", - kTH1F, {{200, -1.5, 1.5}}); - mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", - kTH1F, {{200, 0, o2::constants::math::TwoPI}}); - mHistogramRegistry->add((folderName + "/hTPCfindable").c_str(), - "; TPC findable clusters; Entries", kTH1F, - {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + "/hTPCfound").c_str(), - "; TPC found clusters; Entries", kTH1F, - {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + "/hTPCcrossedOverFindalbe").c_str(), - "; TPC ratio findable; Entries", kTH1F, - {{100, 0.5, 1.5}}); - mHistogramRegistry->add((folderName + "/hTPCcrossedRows").c_str(), - "; TPC crossed rows; Entries", kTH1F, - {{163, 0, 163}}); - mHistogramRegistry->add((folderName + "/hTPCfindableVsCrossed").c_str(), - ";TPC findable clusters ; TPC crossed rows;", kTH2F, - {{163, 0, 163}, {163, 0, 163}}); - mHistogramRegistry->add((folderName + "/hTPCshared").c_str(), - "; TPC shared clusters; Entries", kTH1F, - {{163, -0.5, 162.5}}); - mHistogramRegistry->add((folderName + "/hTPCfractionSharedCls").c_str(), - "; TPC fraction of shared clusters; Entries", kTH1F, - {{100, 0.0, 100.0}}); - mHistogramRegistry->add((folderName + "/hITSclusters").c_str(), - "; ITS clusters; Entries", kTH1F, - {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + "/hITSclustersIB").c_str(), - "; ITS clusters in IB; Entries", kTH1F, - {{10, -0.5, 9.5}}); - mHistogramRegistry->add((folderName + "/hDCAxy").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, - {{100, 0, 10}, {500, -5, 5}}); - mHistogramRegistry->add((folderName + "/hDCAz").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, - {{100, 0, 10}, {500, -5, 5}}); - mHistogramRegistry->add((folderName + "/hDCA").c_str(), - "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, - {{100, 0, 10}, {301, 0., 1.5}}); - mHistogramRegistry->add((folderName + "/hTPCdEdX").c_str(), - "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, - {{100, 0, 10}, {1000, 0, 1000}}); - mHistogramRegistry->add((folderName + "/nSigmaITS_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{e}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaITS_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{#pi}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaITS_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{K}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaITS_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{p}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaITS_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{d}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTPC_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaTOF_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_el").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_pi").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", - kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_K").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.0255}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_p").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); - mHistogramRegistry->add((folderName + "/nSigmaComb_d").c_str(), - "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, - {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {{240, 0, 6}}); + mHistogramRegistry->add((folderName + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", kTH1F, {{200, 0, o2::constants::math::TwoPI}}); + mHistogramRegistry->add((folderName + "/hTPCfindable").c_str(), "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + "/hTPCfound").c_str(), "; TPC found clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + "/hTPCcrossedOverFindalbe").c_str(), "; TPC ratio findable; Entries", kTH1F, {{100, 0.5, 1.5}}); + mHistogramRegistry->add((folderName + "/hTPCcrossedRows").c_str(), "; TPC crossed rows; Entries", kTH1F, {{163, 0, 163}}); + mHistogramRegistry->add((folderName + "/hTPCfindableVsCrossed").c_str(), ";TPC findable clusters ; TPC crossed rows;", kTH2F, {{163, 0, 163}, {163, 0, 163}}); + mHistogramRegistry->add((folderName + "/hTPCshared").c_str(), "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); + mHistogramRegistry->add((folderName + "/hTPCfractionSharedCls").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 100.0}}); + mHistogramRegistry->add((folderName + "/hITSclusters").c_str(), "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + "/hITSclustersIB").c_str(), "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}}); + mHistogramRegistry->add((folderName + "/hDCAxy").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}}); + mHistogramRegistry->add((folderName + "/hDCAz").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}}); + mHistogramRegistry->add((folderName + "/hDCA").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA (cm)", kTH2F, {{100, 0, 10}, {301, 0., 1.5}}); + mHistogramRegistry->add((folderName + "/hTPCdEdX").c_str(), "; #it{p} (GeV/#it{c}); TPC Signal", kTH2F, {{100, 0, 10}, {1000, 0, 1000}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaITS_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{ITS}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTPC_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TPC}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaTOF_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{TOF}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_el").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{e}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_pi").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{#pi}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_K").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{K}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.0255}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_p").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{p}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); + mHistogramRegistry->add((folderName + "/nSigmaComb_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); } /// set cuts nPtMinSel = getNSelections(femto_universe_track_selection::kpTMin); @@ -454,8 +379,7 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) nTPCfMinSel = getNSelections(femto_universe_track_selection::kTPCfClsMin); nTPCcMinSel = getNSelections(femto_universe_track_selection::kTPCcRowsMin); nTPCsMaxSel = getNSelections(femto_universe_track_selection::kTPCsClsMax); - nTPCsFracMaxSel = - getNSelections(femto_universe_track_selection::kTPCfracsClsMax); + nTPCsFracMaxSel = getNSelections(femto_universe_track_selection::kTPCfracsClsMax); nITScMinSel = getNSelections(femto_universe_track_selection::kITSnClsMin); nITScIbMinSel = getNSelections(femto_universe_track_selection::kITSnClsIbMin); nDCAxyMaxSel = getNSelections(femto_universe_track_selection::kDCAxyMax); @@ -463,49 +387,30 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) nDCAMinSel = getNSelections(femto_universe_track_selection::kDCAMin); nPIDnSigmaSel = getNSelections(femto_universe_track_selection::kPIDnSigmaMax); - pTMin = getMinimalSelection(femto_universe_track_selection::kpTMin, - femto_universe_selection::kLowerLimit); - pTMax = getMinimalSelection(femto_universe_track_selection::kpTMax, - femto_universe_selection::kUpperLimit); - etaMax = getMinimalSelection(femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - nClsMin = getMinimalSelection(femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - fClsMin = getMinimalSelection(femto_universe_track_selection::kTPCfClsMin, - femto_universe_selection::kLowerLimit); - cTPCMin = getMinimalSelection(femto_universe_track_selection::kTPCcRowsMin, - femto_universe_selection::kLowerLimit); - sTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCsClsMax, - femto_universe_selection::kUpperLimit); - fracsTPCMax = - getMinimalSelection(femto_universe_track_selection::kTPCfracsClsMax, - femto_universe_selection::kUpperLimit); - nITSclsMin = getMinimalSelection(femto_universe_track_selection::kITSnClsMin, - femto_universe_selection::kLowerLimit); - nITSclsIbMin = - getMinimalSelection(femto_universe_track_selection::kITSnClsIbMin, - femto_universe_selection::kLowerLimit); - dcaXYMax = getMinimalSelection(femto_universe_track_selection::kDCAxyMax, - femto_universe_selection::kAbsUpperLimit); - dcaZMax = getMinimalSelection(femto_universe_track_selection::kDCAzMax, - femto_universe_selection::kAbsUpperLimit); - dcaMin = getMinimalSelection(femto_universe_track_selection::kDCAMin, - femto_universe_selection::kAbsLowerLimit); - nSigmaPIDMax = - getMinimalSelection(femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); + pTMin = getMinimalSelection(femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); + pTMax = getMinimalSelection(femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); + etaMax = getMinimalSelection(femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + nClsMin = getMinimalSelection(femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + fClsMin = getMinimalSelection(femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); + cTPCMin = getMinimalSelection(femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); + sTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); + fracsTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCfracsClsMax, femto_universe_selection::kUpperLimit); + nITSclsMin = getMinimalSelection(femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); + nITSclsIbMin = getMinimalSelection(femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); + dcaXYMax = getMinimalSelection(femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); + dcaZMax = getMinimalSelection(femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); + dcaMin = getMinimalSelection(femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); + nSigmaPIDMax = getMinimalSelection(femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); } template -auto FemtoUniverseTrackSelection::getNsigmaTPC(T const& track, - o2::track::PID pid) +auto FemtoUniverseTrackSelection::getNsigmaTPC(T const& track, o2::track::PID pid) { return o2::aod::pidutils::tpcNSigma(pid, track); } template -auto FemtoUniverseTrackSelection::getNsigmaTOF(T const& track, - o2::track::PID pid) +auto FemtoUniverseTrackSelection::getNsigmaTOF(T const& track, o2::track::PID pid) { /// skip tracks without TOF signal // if (!track.hasTOF()) { @@ -516,8 +421,7 @@ auto FemtoUniverseTrackSelection::getNsigmaTOF(T const& track, } template -auto FemtoUniverseTrackSelection::getNsigmaITS(T const& track, - o2::track::PID pid) +auto FemtoUniverseTrackSelection::getNsigmaITS(T const& track, o2::track::PID pid) { if (pid == o2::track::PID::Electron) { return track.itsNSigmaEl(); @@ -548,10 +452,8 @@ bool FemtoUniverseTrackSelection::isSelectedMinimal(T const& track) const auto itsNClsIB = track.itsNClsInnerBarrel(); const auto dcaXY = track.dcaXY(); const auto dcaZ = track.dcaZ(); - const auto dca = - track.dcaXY(); // Accordingly to FemtoUniverse in AliPhysics as well as - // LF analysis, only dcaXY should be checked; NOT - // std::sqrt(pow(dcaXY, 2.) + pow(dcaZ, 2.)) + const auto dca = track.dcaXY(); // Accordingly to FemtoUniverse in AliPhysics as well as LF analysis, + // only dcaXY should be checked; NOT std::sqrt(pow(dcaXY, 2.) + pow(dcaZ, 2.)) std::vector pidTPC, pidTOF; for (const auto it : kPIDspecies) { pidTPC.push_back(getNsigmaTPC(track, it)); @@ -617,8 +519,7 @@ bool FemtoUniverseTrackSelection::isSelectedMinimal(T const& track) } template -std::array - FemtoUniverseTrackSelection::getCutContainer(T const& track) +std::array FemtoUniverseTrackSelection::getCutContainer(T const& track) { CutContainerType output = 0; size_t counter = 0; @@ -647,8 +548,7 @@ std::array for (auto& sel : mSelections) { const auto selVariable = sel.getSelectionVariable(); if (selVariable == femto_universe_track_selection::kPIDnSigmaMax) { - /// PID needs to be handled a bit differently since we may need more than - /// one species + /// PID needs to be handled a bit differently since we may need more than one species for (size_t i = 0; i < kPIDspecies.size(); ++i) { auto pidTPCVal = pidTPC.at(i) - nSigmaPIDOffsetTPC; auto pidTOFVal = pidTOF.at(i) - nSigmaPIDOffsetTOF; @@ -752,7 +652,6 @@ std::array sel.checkSelectionSetBitPID(pidComb, outputPID); sel.checkSelectionSetBitPID(pidITSVal, outputPID); } - } else { /// for the rest it's all the same switch (selVariable) { @@ -805,208 +704,41 @@ std::array return {output, outputPID}; } -template +template void FemtoUniverseTrackSelection::fillQA(T const& track) { if (mHistogramRegistry) { - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hPt"), - track.pt()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hEta"), - track.eta()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hPhi"), - track.phi()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCfindable"), - track.tpcNClsFindable()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCfound"), - track.tpcNClsFound()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCcrossedOverFindalbe"), - track.tpcCrossedRowsOverFindableCls()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCcrossedRows"), - track.tpcNClsCrossedRows()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCfindableVsCrossed"), - track.tpcNClsFindable(), track.tpcNClsCrossedRows()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCshared"), - track.tpcNClsShared()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCfractionSharedCls"), - track.tpcFractionSharedCls()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hITSclusters"), - track.itsNCls()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hITSclustersIB"), - track.itsNClsInnerBarrel()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hDCAxy"), - track.pt(), track.dcaXY()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hDCAz"), - track.pt(), track.dcaZ()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hDCA"), - track.pt(), - std::sqrt(std::pow(track.dcaXY(), 2.) + std::pow(track.dcaZ(), 2.))); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/hTPCdEdX"), - track.p(), track.tpcSignal()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTPC_el"), - track.p(), track.tpcNSigmaEl()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTPC_pi"), - track.p(), track.tpcNSigmaPi()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTPC_K"), - track.p(), track.tpcNSigmaKa()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTPC_p"), - track.p(), track.tpcNSigmaPr()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTPC_d"), - track.p(), track.tpcNSigmaDe()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTOF_el"), - track.p(), track.tofNSigmaEl()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTOF_pi"), - track.p(), track.tofNSigmaPi()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTOF_K"), - track.p(), track.tofNSigmaKa()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTOF_p"), - track.p(), track.tofNSigmaPr()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaTOF_d"), - track.p(), track.tofNSigmaDe()); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaComb_el"), - track.p(), - std::sqrt(track.tpcNSigmaEl() * track.tpcNSigmaEl() + - track.tofNSigmaEl() * track.tofNSigmaEl())); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaComb_pi"), - track.p(), - std::sqrt(track.tpcNSigmaPi() * track.tpcNSigmaPi() + - track.tofNSigmaPi() * track.tofNSigmaPi())); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaComb_K"), - track.p(), - std::sqrt(track.tpcNSigmaKa() * track.tpcNSigmaKa() + - track.tofNSigmaKa() * track.tofNSigmaKa())); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaComb_p"), - track.p(), - std::sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + - track.tofNSigmaPr() * track.tofNSigmaPr())); - mHistogramRegistry->fill( - HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + - HIST("/") + - HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + - HIST("/nSigmaComb_d"), - track.p(), - std::sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + - track.tofNSigmaDe() * track.tofNSigmaDe())); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hPt"), track.pt()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hEta"), track.eta()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hPhi"), track.phi()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfindable"), track.tpcNClsFindable()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfound"), track.tpcNClsFound()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCcrossedOverFindalbe"), track.tpcCrossedRowsOverFindableCls()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCcrossedRows"), track.tpcNClsCrossedRows()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfindableVsCrossed"), track.tpcNClsFindable(), track.tpcNClsCrossedRows()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCshared"), track.tpcNClsShared()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCfractionSharedCls"), track.tpcFractionSharedCls()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hITSclusters"), track.itsNCls()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hITSclustersIB"), track.itsNClsInnerBarrel()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hDCAxy"), track.pt(), track.dcaXY()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hDCAz"), track.pt(), track.dcaZ()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hDCA"), track.pt(), std::sqrt(std::pow(track.dcaXY(), 2.) + std::pow(track.dcaZ(), 2.))); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/hTPCdEdX"), track.p(), track.tpcSignal()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_el"), track.p(), track.tpcNSigmaEl()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_pi"), track.p(), track.tpcNSigmaPi()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_K"), track.p(), track.tpcNSigmaKa()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_p"), track.p(), track.tpcNSigmaPr()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTPC_d"), track.p(), track.tpcNSigmaDe()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_el"), track.p(), track.tofNSigmaEl()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_pi"), track.p(), track.tofNSigmaPi()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_K"), track.p(), track.tofNSigmaKa()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_p"), track.p(), track.tofNSigmaPr()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaTOF_d"), track.p(), track.tofNSigmaDe()); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_el"), track.p(), std::sqrt(track.tpcNSigmaEl() * track.tpcNSigmaEl() + track.tofNSigmaEl() * track.tofNSigmaEl())); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_pi"), track.p(), std::sqrt(track.tpcNSigmaPi() * track.tpcNSigmaPi() + track.tofNSigmaPi() * track.tofNSigmaPi())); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_K"), track.p(), std::sqrt(track.tpcNSigmaKa() * track.tpcNSigmaKa() + track.tofNSigmaKa() * track.tofNSigmaKa())); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_p"), track.p(), std::sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + track.tofNSigmaPr() * track.tofNSigmaPr())); + mHistogramRegistry->fill(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/") + HIST(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]) + HIST("/nSigmaComb_d"), track.p(), std::sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + track.tofNSigmaDe() * track.tofNSigmaDe())); } } diff --git a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h index 9763fa94854..8c5614b12ad 100644 --- a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h +++ b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -34,20 +34,19 @@ namespace o2::aod /// FemtoUniverseCollision namespace femtouniversecollision { -DECLARE_SOA_COLUMN(MultV0M, multV0M, float); //! V0M multiplicity -DECLARE_SOA_COLUMN( - MultNtr, multNtr, - int); //! multiplicity of charged tracks as defined in the producer -DECLARE_SOA_COLUMN(Sphericity, sphericity, float); //! Sphericity of the event -DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the event -DECLARE_SOA_COLUMN(InteractionRate, interactionRate, - float); //! Interaction rate -DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! TPC occupancy +DECLARE_SOA_COLUMN(MultV0M, multV0M, float); //! V0M multiplicity +DECLARE_SOA_COLUMN(MultNtr, multNtr, int); //! multiplicity of charged tracks as defined in the producer +DECLARE_SOA_COLUMN(Sphericity, sphericity, float); //! Sphericity of the event +DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the event +DECLARE_SOA_COLUMN(InteractionRate, interactionRate, float); //! Interaction rate +DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! TPC occupancy } // namespace femtouniversecollision -DECLARE_SOA_TABLE(FdCollisions, "AOD", "FDCOLLISION", o2::soa::Index<>, - o2::aod::collision::PosZ, femtouniversecollision::MultV0M, +DECLARE_SOA_TABLE(FdCollisions, "AOD", "FDCOLLISION", + o2::soa::Index<>, + o2::aod::collision::PosZ, + femtouniversecollision::MultV0M, femtouniversecollision::MultNtr, femtouniversecollision::Sphericity, femtouniversecollision::MagField); @@ -77,17 +76,10 @@ enum ParticleType { kNParticleTypes //! Number of particle types }; -static constexpr std::string_view ParticleTypeName[kNParticleTypes] = { - "Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", - "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", - "D0Child"}; //! Naming of the different particle types -static constexpr std::string_view TempFitVarName[kNParticleTypes] = { - "/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", - "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"}; +static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", "D0Child"}; //! Naming of the different particle types +static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"}; -using CutContainerType = - uint32_t; //! Definition of the data type for the bit-wise container for the - //! different selection criteria +using CutContainerType = uint32_t; //! Definition of the data type for the bit-wise container for the different selection criteria enum TrackType { kNoChild, //! Not a V0 child @@ -97,35 +89,19 @@ enum TrackType { kNTrackTypes //! Number of child types }; -static constexpr std::string_view TrackTypeName[kNTrackTypes] = { - "Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types +static constexpr std::string_view TrackTypeName[kNTrackTypes] = {"Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types DECLARE_SOA_INDEX_COLUMN(FdCollision, fdCollision); -DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c) -DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta -DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi -DECLARE_SOA_COLUMN(PartType, partType, - uint8_t); //! Type of the particle, according to - //! femtouniverseparticle::ParticleType -DECLARE_SOA_COLUMN(Cut, cut, CutContainerType); //! Bit-wise container for the - //! different selection criteria -DECLARE_SOA_COLUMN( - PidCut, pidCut, - CutContainerType); //! Bit-wise container for the different PID selection - //! criteria \todo since bit-masking cannot be done yet - //! with filters we use a second field for the PID -DECLARE_SOA_COLUMN( - TempFitVar, tempFitVar, - float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) -DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN( - Children, - children); //! Field for the track indices to remove auto-correlations -DECLARE_SOA_COLUMN( - MLambda, mLambda, - float); //! The invariant mass of V0 candidate, assuming lambda -DECLARE_SOA_COLUMN( - MAntiLambda, mAntiLambda, - float); //! The invariant mass of V0 candidate, assuming antilambda +DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c) +DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta +DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi +DECLARE_SOA_COLUMN(PartType, partType, uint8_t); //! Type of the particle, according to femtouniverseparticle::ParticleType +DECLARE_SOA_COLUMN(Cut, cut, CutContainerType); //! Bit-wise container for the different selection criteria +DECLARE_SOA_COLUMN(PidCut, pidCut, CutContainerType); //! Bit-wise container for the different PID selection criteria \todo since bit-masking cannot be done yet with filters we use a second field for the PID +DECLARE_SOA_COLUMN(TempFitVar, tempFitVar, float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) +DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Children, children); //! Field for the track indices to remove auto-correlations +DECLARE_SOA_COLUMN(MLambda, mLambda, float); //! The invariant mass of V0 candidate, assuming lambda +DECLARE_SOA_COLUMN(MAntiLambda, mAntiLambda, float); //! The invariant mass of V0 candidate, assuming antilambda DECLARE_SOA_DYNAMIC_COLUMN(Theta, theta, //! Compute the theta of the track [](float eta) -> float { @@ -148,130 +124,111 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Compute the overall momentum in GeV/c return pt * std::cosh(eta); }); -DECLARE_SOA_COLUMN(ITSSignal, itsSignal, float); -DECLARE_SOA_COLUMN( - ITSNSigmaEl, itsNSigmaEl, - float); //! Nsigma separation with the Its detector for electron -DECLARE_SOA_COLUMN(ITSNSigmaPi, itsNSigmaPi, - float); //! Nsigma separation with the Its detector for pion -DECLARE_SOA_COLUMN(ITSNSigmaKa, itsNSigmaKa, - float); //! Nsigma separation with the Its detector for kaon -DECLARE_SOA_COLUMN( - ITSNSigmaPr, itsNSigmaPr, - float); //! Nsigma separation with the Its detector for proton -DECLARE_SOA_COLUMN( - ITSNSigmaDe, itsNSigmaDe, - float); //! Nsigma separation with the Its detector for deuteron -DECLARE_SOA_COLUMN( - ITSNSigmaTr, itsNSigmaTr, - float); //! Nsigma separation with the Its detector for triton -DECLARE_SOA_COLUMN( - ITSNSigmaHe, itsNSigmaHe, - float); //! Nsigma separation with the Its detector for helium3 +DECLARE_SOA_COLUMN(ITSNSigmaEl, itsNSigmaEl, float); //! Nsigma separation with the Its detector for electron +DECLARE_SOA_COLUMN(ITSNSigmaPi, itsNSigmaPi, float); //! Nsigma separation with the Its detector for pion +DECLARE_SOA_COLUMN(ITSNSigmaKa, itsNSigmaKa, float); //! Nsigma separation with the Its detector for kaon +DECLARE_SOA_COLUMN(ITSNSigmaPr, itsNSigmaPr, float); //! Nsigma separation with the Its detector for proton +DECLARE_SOA_COLUMN(ITSNSigmaDe, itsNSigmaDe, float); //! Nsigma separation with the Its detector for deuteron +DECLARE_SOA_COLUMN(ITSNSigmaTr, itsNSigmaTr, float); //! Nsigma separation with the Its detector for triton +DECLARE_SOA_COLUMN(ITSNSigmaHe, itsNSigmaHe, float); //! Nsigma separation with the Its detector for helium3 // debug variables -DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge -DECLARE_SOA_COLUMN(TpcNClsFound, tpcNClsFound, - uint8_t); //! Number of TPC clusters -DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, - uint8_t); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(TpcFractionSharedCls, tpcFractionSharedCls, - float); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(ItsNCls, itsNCls, uint8_t); //! Number of ITS clusters -DECLARE_SOA_COLUMN( - ItsNClsInnerBarrel, itsNClsInnerBarrel, - uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal -DECLARE_SOA_DYNAMIC_COLUMN( - TpcCrossedRowsOverFindableCls, - tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over - //! findable TPC clusters - [](uint8_t tpcNClsFindable, uint8_t tpcNClsCrossedRows) -> float { - return (float)tpcNClsCrossedRows / (float)tpcNClsFindable; - }); -DECLARE_SOA_COLUMN(DaughDCA, daughDCA, float); //! DCA between daughters -DECLARE_SOA_COLUMN(TransRadius, transRadius, - float); //! Transverse radius of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, - float); //! X position of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, - float); //! Y position of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, - float); //! Z position of the decay vertex -DECLARE_SOA_COLUMN(MKaon, mKaon, - float); //! The invariant mass of V0 candidate, assuming kaon +DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge +DECLARE_SOA_COLUMN(TpcNClsFound, tpcNClsFound, uint8_t); //! Number of TPC clusters +DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(TpcFractionSharedCls, tpcFractionSharedCls, float); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(ItsNCls, itsNCls, uint8_t); //! Number of ITS clusters +DECLARE_SOA_COLUMN(ItsNClsInnerBarrel, itsNClsInnerBarrel, uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal +DECLARE_SOA_DYNAMIC_COLUMN(TpcCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over findable TPC clusters + [](uint8_t tpcNClsFindable, uint8_t tpcNClsCrossedRows) -> float { + return (float)tpcNClsCrossedRows / (float)tpcNClsFindable; + }); +DECLARE_SOA_COLUMN(DaughDCA, daughDCA, float); //! DCA between daughters +DECLARE_SOA_COLUMN(TransRadius, transRadius, float); //! Transverse radius of the decay vertex +DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay vertex +DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex +DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex +DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon } // namespace femtouniverseparticle -DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE", o2::soa::Index<>, +DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE", + o2::soa::Index<>, femtouniverseparticle::FdCollisionId, - femtouniverseparticle::Pt, femtouniverseparticle::Eta, - femtouniverseparticle::Phi, femtouniverseparticle::PartType, - femtouniverseparticle::Cut, femtouniverseparticle::PidCut, + femtouniverseparticle::Pt, + femtouniverseparticle::Eta, + femtouniverseparticle::Phi, + femtouniverseparticle::PartType, + femtouniverseparticle::Cut, + femtouniverseparticle::PidCut, femtouniverseparticle::TempFitVar, femtouniverseparticle::ChildrenIds, femtouniverseparticle::MLambda, femtouniverseparticle::MAntiLambda, femtouniverseparticle::Theta, - femtouniverseparticle::Px, - femtouniverseparticle::Py, - femtouniverseparticle::Pz, - femtouniverseparticle::P); + femtouniverseparticle::Px, + femtouniverseparticle::Py, + femtouniverseparticle::Pz, + femtouniverseparticle::P); using FDParticle = FDParticles::iterator; /// FemtoUniverseCascadeTrack namespace femtouniversecascparticle { DECLARE_SOA_INDEX_COLUMN(FDParticle, fdParticle); -DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, - float); //! DCA between V0 daughters -DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle -DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius -DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, - float); //! cascade cosinus of pointing angle -DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, - float); //! DCA between cascade daughters -DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius -DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, - float); //! DCA of positive daughter to PV -DECLARE_SOA_COLUMN(Dcanegtopv, dcanegtopv, - float); //! DCA of negative daughter to PV -DECLARE_SOA_COLUMN(Dcabachtopv, dcabachtopv, - float); //! DCA of bachelor track to PV -DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV +DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, float); //! DCA between V0 daughters +DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle +DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius +DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, float); //! cascade cosinus of pointing angle +DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, float); //! DCA between cascade daughters +DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius +DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, float); //! DCA of positive daughter to PV +DECLARE_SOA_COLUMN(Dcanegtopv, dcanegtopv, float); //! DCA of negative daughter to PV +DECLARE_SOA_COLUMN(Dcabachtopv, dcabachtopv, float); //! DCA of bachelor track to PV +DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV } // namespace femtouniversecascparticle -DECLARE_SOA_TABLE( - FDExtParticles, "AOD", "FDEXTPARTICLE", femtouniverseparticle::Sign, - femtouniverseparticle::TpcNClsFound, track::TPCNClsFindable, - femtouniverseparticle::TpcNClsCrossedRows, track::TPCNClsShared, - femtouniverseparticle::TpcFractionSharedCls, track::TPCInnerParam, - femtouniverseparticle::ItsNCls, femtouniverseparticle::ItsNClsInnerBarrel, - track::DcaXY, track::DcaZ, track::TPCSignal, pidtpc_tiny::TPCNSigmaStoreEl, - pidtpc_tiny::TPCNSigmaStorePi, pidtpc_tiny::TPCNSigmaStoreKa, - pidtpc_tiny::TPCNSigmaStorePr, pidtpc_tiny::TPCNSigmaStoreDe, - pidtof_tiny::TOFNSigmaStoreEl, pidtof_tiny::TOFNSigmaStorePi, - pidtof_tiny::TOFNSigmaStoreKa, pidtof_tiny::TOFNSigmaStorePr, - pidtof_tiny::TOFNSigmaStoreDe, femtouniverseparticle::DaughDCA, - femtouniverseparticle::TransRadius, femtouniverseparticle::DecayVtxX, - femtouniverseparticle::DecayVtxY, femtouniverseparticle::DecayVtxZ, - femtouniverseparticle::MKaon, - femtouniverseparticle::TpcCrossedRowsOverFindableCls< - track::TPCNClsFindable, femtouniverseparticle::TpcNClsCrossedRows>, - pidtpc_tiny::TPCNSigmaEl, - pidtpc_tiny::TPCNSigmaPi, - pidtpc_tiny::TPCNSigmaKa, - pidtpc_tiny::TPCNSigmaPr, - pidtpc_tiny::TPCNSigmaDe, - pidtof_tiny::TOFNSigmaEl, - pidtof_tiny::TOFNSigmaPi, - pidtof_tiny::TOFNSigmaKa, - pidtof_tiny::TOFNSigmaPr, - pidtof_tiny::TOFNSigmaDe); +DECLARE_SOA_TABLE(FDExtParticles, "AOD", "FDEXTPARTICLE", + femtouniverseparticle::Sign, + femtouniverseparticle::TpcNClsFound, + track::TPCNClsFindable, + femtouniverseparticle::TpcNClsCrossedRows, + track::TPCNClsShared, + femtouniverseparticle::TpcFractionSharedCls, + track::TPCInnerParam, + femtouniverseparticle::ItsNCls, + femtouniverseparticle::ItsNClsInnerBarrel, + track::DcaXY, + track::DcaZ, + track::TPCSignal, + pidtpc_tiny::TPCNSigmaStoreEl, + pidtpc_tiny::TPCNSigmaStorePi, + pidtpc_tiny::TPCNSigmaStoreKa, + pidtpc_tiny::TPCNSigmaStorePr, + pidtpc_tiny::TPCNSigmaStoreDe, + pidtof_tiny::TOFNSigmaStoreEl, + pidtof_tiny::TOFNSigmaStorePi, + pidtof_tiny::TOFNSigmaStoreKa, + pidtof_tiny::TOFNSigmaStorePr, + pidtof_tiny::TOFNSigmaStoreDe, + femtouniverseparticle::DaughDCA, + femtouniverseparticle::TransRadius, + femtouniverseparticle::DecayVtxX, + femtouniverseparticle::DecayVtxY, + femtouniverseparticle::DecayVtxZ, + femtouniverseparticle::MKaon, + femtouniverseparticle::TpcCrossedRowsOverFindableCls, + pidtpc_tiny::TPCNSigmaEl, + pidtpc_tiny::TPCNSigmaPi, + pidtpc_tiny::TPCNSigmaKa, + pidtpc_tiny::TPCNSigmaPr, + pidtpc_tiny::TPCNSigmaDe, + pidtof_tiny::TOFNSigmaEl, + pidtof_tiny::TOFNSigmaPi, + pidtof_tiny::TOFNSigmaKa, + pidtof_tiny::TOFNSigmaPr, + pidtof_tiny::TOFNSigmaDe); using FDFullParticle = FDExtParticles::iterator; DECLARE_SOA_TABLE(FDItsParticles, "AOD", "FDITSPARTICLE", @@ -282,18 +239,15 @@ DECLARE_SOA_TABLE(FDItsParticles, "AOD", "FDITSPARTICLE", femtouniverseparticle::ITSNSigmaDe); using FDItsParticle = FDItsParticles::iterator; -DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", o2::soa::Index<>, +DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", + o2::soa::Index<>, femtouniverseparticle::FdCollisionId, femtouniversecascparticle::FDParticleId, femtouniverseparticle::Theta, - femtouniverseparticle::Px, - femtouniverseparticle::Py, - femtouniverseparticle::Pz, - femtouniverseparticle::P, + femtouniverseparticle::Px, + femtouniverseparticle::Py, + femtouniverseparticle::Pz, + femtouniverseparticle::P, femtouniversecascparticle::DcaV0daughters, femtouniversecascparticle::Cpav0, femtouniversecascparticle::V0radius, @@ -314,11 +268,8 @@ enum ParticleOriginMCTruth { kPrimary, //! Primary track or V0 kDaughter, //! Particle from a decay kMaterial, //! Particle from a material - kNotPrimary, //! Not primary particles (kept for compatibility reasons with - //! the FullProducer task. will be removed, since we look at "non - //! primaries" more differentially now) - kFake, //! Particle, that has NOT the PDG code of the current analysed - //! particle + kNotPrimary, //! Not primary particles (kept for compatibility reasons with the FullProducer task. will be removed, since we look at "non primaries" more differentially now) + kFake, //! Particle, that has NOT the PDG code of the current analysed particle kDaughterLambda, //! Daughter from a Lambda decay kDaughterSigmaplus, //! Daughter from a Sigma^plus decay kPrompt, //! Origin for D0/D0bar mesons @@ -329,11 +280,16 @@ enum ParticleOriginMCTruth { }; //! Naming of the different OriginMCTruth types -static constexpr std::string_view - ParticleOriginMCTruthName[kNOriginMCTruthTypes] = { - "_Primary", "_Daughter", "_Material", - "_NotPrimary", "_Fake", "_DaughterLambda", - "DaughterSigmaPlus", "_Prompt", "_NonPrompt"}; +static constexpr std::string_view ParticleOriginMCTruthName[kNOriginMCTruthTypes] = { + "_Primary", + "_Daughter", + "_Material", + "_NotPrimary", + "_Fake", + "_DaughterLambda", + "DaughterSigmaPlus", + "_Prompt", + "_NonPrompt"}; /// Distinguished between reconstructed and truth enum MCType { @@ -344,21 +300,19 @@ enum MCType { static constexpr std::string_view MCTypeName[kNMCTypes] = {"", "_MC"}; -DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, - uint8_t); //! Origin of the particle, according to - //! femtouniverseparticle::ParticleOriginMCTruth -DECLARE_SOA_COLUMN(PdgMCTruth, pdgMCTruth, int); //! Particle PDG +DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, uint8_t); //! Origin of the particle, according to femtouniverseparticle::ParticleOriginMCTruth +DECLARE_SOA_COLUMN(PdgMCTruth, pdgMCTruth, int); //! Particle PDG // debug variables -DECLARE_SOA_COLUMN(MotherPDG, motherPDG, - int); //! Checks mother PDG, where mother is the primary - //! particle for that decay chain +DECLARE_SOA_COLUMN(MotherPDG, motherPDG, int); //! Checks mother PDG, where mother is the primary particle for that decay chain } // namespace femtouniverse_mc_particle -DECLARE_SOA_TABLE(FdMCParticles, "AOD", "FDMCPARTICLE", o2::soa::Index<>, +DECLARE_SOA_TABLE(FdMCParticles, "AOD", "FDMCPARTICLE", + o2::soa::Index<>, femtouniverse_mc_particle::PartOriginMCTruth, femtouniverse_mc_particle::PdgMCTruth, - femtouniverseparticle::Pt, femtouniverseparticle::Eta, + femtouniverseparticle::Pt, + femtouniverseparticle::Eta, femtouniverseparticle::Phi); using FdMCParticle = FdMCParticles::iterator; @@ -368,12 +322,9 @@ using FDExtMCParticle = FDExtMCParticles::iterator; namespace mcfdlabel { -DECLARE_SOA_INDEX_COLUMN( - FdMCParticle, fdMCParticle); //! MC particle for femtouniverseparticle +DECLARE_SOA_INDEX_COLUMN(FdMCParticle, fdMCParticle); //! MC particle for femtouniverseparticle } // namespace mcfdlabel -DECLARE_SOA_TABLE(FDMCLabels, "AOD", - "FDMCLabel", //! Table joinable to FemtoUniverseParticle - //! containing the MC labels +DECLARE_SOA_TABLE(FDMCLabels, "AOD", "FDMCLabel", //! Table joinable to FemtoUniverseParticle containing the MC labels mcfdlabel::FdMCParticleId); /// Hash diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx index 77f388a1e01..a49e9c0cdf7 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -76,31 +76,16 @@ using namespace o2::constants::physics; namespace o2::aod { -using FemtoFullCollision = - soa::Join::iterator; -using FemtoFullCollisionCentPP = - soa::Join::iterator; -using FemtoFullCollisionCentRun2 = - soa::Join::iterator; -using FemtoFullCollisionCentRun3 = - soa::Join::iterator; -using FemtoFullCollisionMC = soa::Join::iterator; -using FemtoFullCollisionCentRun3MCs = - soa::Join; -using FemtoFullCollisionCentRun3MC = - soa::Join::iterator; -using FemtoFullTracks = - soa::Join; +using FemtoFullCollision = soa::Join::iterator; +using FemtoFullCollisionCentPP = soa::Join::iterator; +using FemtoFullCollisionCentRun2 = soa::Join::iterator; +using FemtoFullCollisionCentRun3 = soa::Join::iterator; +using FemtoFullCollisionMC = soa::Join::iterator; +using FemtoFullCollisionCentRun3MCs = soa::Join; +using FemtoFullCollisionCentRun3MC = soa::Join::iterator; +using FemtoFullTracks = soa::Join; // using FilteredFullV0s = soa::Filtered; /// predefined Join // table for o2::aod::V0s = soa::Join @@ -139,260 +124,96 @@ struct FemtoUniverseProducerTask { Produces outputCascParts; Configurable confIsDebug{"confIsDebug", true, "Enable Debug tables"}; - Configurable confFillITSPid{"confFillITSPid", false, - "Fill ITSPid information"}; - Configurable confIsUseCutculator{"confIsUseCutculator", true, - "Enable cutculator for track cuts"}; + Configurable confFillITSPid{"confFillITSPid", false, "Fill ITSPid information"}; + Configurable confIsUseCutculator{"confIsUseCutculator", true, "Enable cutculator for track cuts"}; // Choose if filtering or skimming version is run - // Configurable confIsTrigger{"confIsTrigger", false, "Store all - // collisions"}; //Commented: not used configurable Choose if running on - // converted data or Run3 / Pilot + // Configurable confIsTrigger{"confIsTrigger", false, "Store all collisions"}; //Commented: not used configurable + // Choose if running on converted data or Run3 / Pilot Configurable confIsRun3{"confIsRun3", true, "Running on Run3 or pilot"}; - // Configurable confIsMC{"confIsMC", false, "Running on MC; implemented - // only for Run3"}; //Commented: not used configurable - - Configurable confIsForceGRP{ - "confIsForceGRP", false, - "Set true if the magnetic field configuration is not available in the " - "usual CCDB directory (e.g. for Run 2 converted data or unanchorad Monte " - "Carlo)"}; - - Configurable confDoSpher{ - "confDoSpher", false, - "Calculate sphericity. If false sphericity will take value of 2."}; - Configurable confStoreMCmothers{ - "confStoreMCmothers", false, - "MC truth: Fill with not only primary particles and store mothers' PDG " - "in tempFitVar."}; - Configurable confFillCollExt{"confFillCollExt", false, - "Option to fill collision extended table"}; - - Configurable confCollMCTruthOnlyReco{ - "confCollMCTruthOnlyReco", false, - "Fill only MC truth collisions that were reconstructed and selected"}; - Configurable confFillMCTruthV0Daugh{"confFillMCTruthV0Daugh", true, - "Fill MC truth daughters of V0"}; + // Configurable confIsMC{"confIsMC", false, "Running on MC; implemented only for Run3"}; //Commented: not used configurable + + Configurable confIsForceGRP{"confIsForceGRP", false, "Set true if the magnetic field configuration is not available in the usual CCDB directory (e.g. for Run 2 converted data or unanchorad Monte Carlo)"}; + + Configurable confDoSpher{"confDoSpher", false, "Calculate sphericity. If false sphericity will take value of 2."}; + Configurable confStoreMCmothers{"confStoreMCmothers", false, "MC truth: Fill with not only primary particles and store mothers' PDG in tempFitVar."}; + Configurable confFillCollExt{"confFillCollExt", false, "Option to fill collision extended table"}; + + Configurable confCollMCTruthOnlyReco{"confCollMCTruthOnlyReco", false, "Fill only MC truth collisions that were reconstructed and selected"}; + Configurable confFillMCTruthV0Daugh{"confFillMCTruthV0Daugh", true, "Fill MC truth daughters of V0"}; /// Event filtering (used for v0-cascade analysis) - Configurable zorroMask{ - "zorroMask", "", "zorro trigger class to select on (empty: none)"}; + Configurable zorroMask{"zorroMask", "", "zorro trigger class to select on (empty: none)"}; /// Event cuts FemtoUniverseCollisionSelection colCuts; struct : o2::framework::ConfigurableGroup { - Configurable confEvtUseTPCmult{ - "confEvtUseTPCmult", false, - "Use multiplicity based on the number of tracks with TPC information"}; - Configurable confEvtZvtx{"confEvtZvtx", 10.f, - "Evt sel: Max. z-Vertex (cm)"}; - Configurable confEvtTriggerCheck{"confEvtTriggerCheck", true, - "Evt sel: check for trigger"}; - Configurable confEvtTriggerSel{"confEvtTriggerSel", kINT7, - "Evt sel: trigger"}; - Configurable confEvtOfflineCheck{ - "confEvtOfflineCheck", false, "Evt sel: check for offline selection"}; - Configurable confIsActivateV0{ - "confIsActivateV0", false, - "Activate filling of V0 into femtouniverse tables"}; - Configurable confActivateSecondaries{ - "confActivateSecondaries", false, - "Fill secondary MC gen particles that were reconstructed"}; - Configurable confIsActivateCascade{ - "confIsActivateCascade", false, - "Activate filling of Cascade into femtouniverse tables"}; - Configurable confIsActivatePhi{ - "confIsActivatePhi", false, - "Activate filling of Phi into femtouniverse tables"}; - Configurable confIsActiveD0{ - "confIsActiveD0", false, - "Activate filling FU tables for D0/D0bar mesons"}; - Configurable confMCTruthAnalysisWithPID{ - "confMCTruthAnalysisWithPID", true, - "1: take only particles with specified PDG, 0: all particles (for MC " - "Truth)"}; - Configurable> confMCTruthPDGCodes{ - "confMCTruthPDGCodes", std::vector{211, -211, 2212, -2212, 333}, - "PDG of particles to be stored"}; - Configurable confCentFT0Min{ - "confCentFT0Min", 0.f, "Min CentFT0 value for centrality selection"}; - Configurable confCentFT0Max{ - "confCentFT0Max", 200.f, "Max CentFT0 value for centrality selection"}; - Configurable confEvIsGoodZvtxFT0vsPV{ - "confEvIsGoodZvtxFT0vsPV", true, - "Require kIsGoodZvtxFT0vsPV selection on Events."}; - Configurable confEvNoSameBunchPileup{ - "confEvNoSameBunchPileup", true, - "Require kNoSameBunchPileup selection on Events."}; - Configurable confIsUsePileUp{ - "confIsUsePileUp", true, - "Required for choosing whether to run the pile-up cuts"}; - Configurable confEvIsVertexITSTPC{ - "confEvIsVertexITSTPC", true, - "Require kIsVertexITSTPC selection on Events"}; - Configurable confIsGoodITSLayersAll{ - "confIsGoodITSLayersAll", true, - "Require IsGoodITSLayersAll selection on Events."}; - Configurable confNoITSROFrameBorder{ - "confNoITSROFrameBorder", true, - "Require NoITSROFrameBorder selection on Events."}; - Configurable confNoTimeFrameBorder{ - "confNoTimeFrameBorder", true, - "Require kNoTimeFrameBorder selection on Events."}; - Configurable confNoCollInRofStandard{ - "confNoCollInRofStandard", true, - "Require NoCollInRofStandard selection on Events."}; - Configurable confNoHighMultCollInPrevRof{ - "confNoHighMultCollInPrevRof", true, - "Require NoHighMultCollInPrevRof selection on Events."}; - Configurable confNoCollInTimeRangeStandard{ - "confNoCollInTimeRangeStandard", true, - "Require NoCollInTimeRangeStandard selection on Events."}; - Configurable confTPCOccupancyMin{ - "confTPCOccupancyMin", 0, "Minimum value for TPC Occupancy selection"}; - Configurable confTPCOccupancyMax{ - "confTPCOccupancyMax", 500, - "Maximum value for TPC Occupancy selection"}; - Configurable confIsCent{"confIsCent", true, - "Centrality or multiplicity selection"}; + Configurable confEvtUseTPCmult{"confEvtUseTPCmult", false, "Use multiplicity based on the number of tracks with TPC information"}; + Configurable confEvtZvtx{"confEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"}; + Configurable confEvtTriggerCheck{"confEvtTriggerCheck", true, "Evt sel: check for trigger"}; + Configurable confEvtTriggerSel{"confEvtTriggerSel", kINT7, "Evt sel: trigger"}; + Configurable confEvtOfflineCheck{"confEvtOfflineCheck", false, "Evt sel: check for offline selection"}; + Configurable confIsActivateV0{"confIsActivateV0", false, "Activate filling of V0 into femtouniverse tables"}; + Configurable confActivateSecondaries{"confActivateSecondaries", false, "Fill secondary MC gen particles that were reconstructed"}; + Configurable confIsActivateCascade{"confIsActivateCascade", false, "Activate filling of Cascade into femtouniverse tables"}; + Configurable confIsActivatePhi{"confIsActivatePhi", false, "Activate filling of Phi into femtouniverse tables"}; + Configurable confIsActiveD0{"confIsActiveD0", false, "Activate filling FU tables for D0/D0bar mesons"}; + Configurable confMCTruthAnalysisWithPID{"confMCTruthAnalysisWithPID", true, "1: take only particles with specified PDG, 0: all particles (for MC Truth)"}; + Configurable> confMCTruthPDGCodes{"confMCTruthPDGCodes", std::vector{211, -211, 2212, -2212, 333}, "PDG of particles to be stored"}; + Configurable confCentFT0Min{"confCentFT0Min", 0.f, "Min CentFT0 value for centrality selection"}; + Configurable confCentFT0Max{"confCentFT0Max", 200.f, "Max CentFT0 value for centrality selection"}; + Configurable confEvIsGoodZvtxFT0vsPV{"confEvIsGoodZvtxFT0vsPV", true, "Require kIsGoodZvtxFT0vsPV selection on Events."}; + Configurable confEvNoSameBunchPileup{"confEvNoSameBunchPileup", true, "Require kNoSameBunchPileup selection on Events."}; + Configurable confIsUsePileUp{"confIsUsePileUp", true, "Required for choosing whether to run the pile-up cuts"}; + Configurable confEvIsVertexITSTPC{"confEvIsVertexITSTPC", true, "Require kIsVertexITSTPC selection on Events"}; + Configurable confIsGoodITSLayersAll{"confIsGoodITSLayersAll", true, "Require IsGoodITSLayersAll selection on Events."}; + Configurable confNoITSROFrameBorder{"confNoITSROFrameBorder", true, "Require NoITSROFrameBorder selection on Events."}; + Configurable confNoTimeFrameBorder{"confNoTimeFrameBorder", true, "Require kNoTimeFrameBorder selection on Events."}; + Configurable confNoCollInRofStandard{"confNoCollInRofStandard", true, "Require NoCollInRofStandard selection on Events."}; + Configurable confNoHighMultCollInPrevRof{"confNoHighMultCollInPrevRof", true, "Require NoHighMultCollInPrevRof selection on Events."}; + Configurable confNoCollInTimeRangeStandard{"confNoCollInTimeRangeStandard", true, "Require NoCollInTimeRangeStandard selection on Events."}; + Configurable confTPCOccupancyMin{"confTPCOccupancyMin", 0, "Minimum value for TPC Occupancy selection"}; + Configurable confTPCOccupancyMax{"confTPCOccupancyMax", 500, "Maximum value for TPC Occupancy selection"}; + Configurable confIsCent{"confIsCent", true, "Centrality or multiplicity selection"}; } ConfGeneral; - Filter customCollCentFilter = - (aod::cent::centFT0C > ConfGeneral.confCentFT0Min) && - (aod::cent::centFT0C < ConfGeneral.confCentFT0Max); + Filter customCollCentFilter = (aod::cent::centFT0C > ConfGeneral.confCentFT0Min) && + (aod::cent::centFT0C < ConfGeneral.confCentFT0Max); // just sanity check to make sure in case there are problems in conversion or // MC production it does not affect results - Configurable confTrkRejectNotPropagated{ - "confTrkRejectNotPropagated", false, - "True: reject not propagated tracks"}; + Configurable confTrkRejectNotPropagated{"confTrkRejectNotPropagated", false, "True: reject not propagated tracks"}; // Configurable ConfRejectITSHitandTOFMissing{ // "ConfRejectITSHitandTOFMissing", false, // "True: reject if neither ITS hit nor TOF timing satisfied"}; FemtoUniverseTrackSelection trackCuts; struct : o2::framework::ConfigurableGroup { - Configurable> confTrkCharge{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kSign, "ConfTrk"), - std::vector{-1, 1}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kSign, "Track selection: ")}; - Configurable> confTrkPtmin{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kpTMin, "ConfTrk"), - std::vector{0.5f, 0.4f, 0.6f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kpTMin, "Track selection: ")}; - Configurable> confTrkPtmax{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kpTMax, "ConfTrk"), - std::vector{5.4f, 5.6f, 5.5f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kpTMax, "Track selection: ")}; - Configurable> confTrkEta{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kEtaMax, "ConfTrk"), - std::vector{0.8f, 0.7f, 0.9f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kEtaMax, "Track selection: ")}; - Configurable> confTrkTPCnclsMin{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kTPCnClsMin, "ConfTrk"), - std::vector{70.f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kTPCnClsMin, "Track selection: ")}; - Configurable> confTrkTPCfCls{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kTPCfClsMin, "ConfTrk"), - std::vector{0.83f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kTPCfClsMin, "Track selection: ")}; - Configurable> confTrkTPCcRowsMin{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kTPCcRowsMin, "ConfTrk"), - std::vector{70.f, 60.f, 80.f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kTPCcRowsMin, "Track selection: ")}; - Configurable> confTrkTPCsCls{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kTPCsClsMax, "ConfTrk"), - std::vector{0.1f, 160.f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kTPCsClsMax, "Track selection: ")}; - Configurable> confTrkTPCfracsCls{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kTPCfracsClsMax, "ConfTrk"), - std::vector{0.1f, 160.f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kTPCfracsClsMax, - "Track selection: ")}; - Configurable> confTrkITSnclsMin{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kITSnClsMin, "ConfTrk"), - std::vector{-1.f, 2.f, 4.f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kITSnClsMin, "Track selection: ")}; - Configurable> confTrkITSnclsIbMin{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kITSnClsIbMin, "ConfTrk"), - std::vector{-1.f, 1.f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kITSnClsIbMin, - "Track selection: ")}; - Configurable> confTrkDCAxyMax{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kDCAxyMax, "ConfTrk"), - std::vector{0.1f, 3.5f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kDCAxyMax, "Track selection: ")}; - Configurable> confTrkDCAzMax{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kDCAzMax, "ConfTrk"), - std::vector{0.2f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kDCAzMax, - "Track selection: ")}; /// \todo Reintegrate PID to the general - /// selection container - Configurable> confTrkPIDnSigmaMax{ - FemtoUniverseTrackSelection::getSelectionName( - femto_universe_track_selection::kPIDnSigmaMax, "ConfTrk"), - std::vector{3.5f, 3.f, 2.5f}, - FemtoUniverseTrackSelection::getSelectionHelper( - femto_universe_track_selection::kPIDnSigmaMax, - "Track selection: ")}; - Configurable> confTrkPIDspecies{ - "confTrkPIDspecies", - std::vector{o2::track::PID::Pion, o2::track::PID::Kaon, - o2::track::PID::Proton, o2::track::PID::Deuteron}, - "Trk sel: Particles species for PID (Pion=2, Kaon=3, Proton=4, " - "Deuteron=5)"}; - Configurable confIsOnlyMCTrack{"confIsOnlyMCTrack", false, - "Enable filling of only MC Tracks"}; - // Numbers from - // ~/alice/O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h - // //static constexpr ID Pion = 2; static constexpr ID Kaon = 3; static - // constexpr ID Proton = 4; static constexpr ID Deuteron = 5; - - Configurable confTrkMinChi2PerClusterTPC{ - "confTrkMinChi2PerClusterTPC", 0.0, - "Lower limit of the Chi2 per TPC Cluster"}; - Configurable confTrkMaxChi2PerClusterTPC{ - "confTrkMaxChi2PerClusterTPC", 100.0, - "Upper limit of the Chi2 per TPC Cluster"}; - Configurable confTrkMaxChi2PerClusterITS{ - "confTrkMaxChi2PerClusterITS", 100.0, - "Upper limit of the Chi2 per ITS Cluster"}; - Configurable confTrkTPCRefit{"confTrkTPCRefit", false, - "Enable TPC refit"}; - Configurable confTrkITSRefit{"confTrkITSRefit", false, - "Enable ITS refit"}; + Configurable> confTrkCharge{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kSign, "ConfTrk"), std::vector{-1, 1}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kSign, "Track selection: ")}; + Configurable> confTrkPtmin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMin, "ConfTrk"), std::vector{0.5f, 0.4f, 0.6f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMin, "Track selection: ")}; + Configurable> confTrkPtmax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMax, "ConfTrk"), std::vector{5.4f, 5.6f, 5.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMax, "Track selection: ")}; + Configurable> confTrkEta{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kEtaMax, "ConfTrk"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kEtaMax, "Track selection: ")}; + Configurable> confTrkTPCnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCnClsMin, "ConfTrk"), std::vector{70.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCnClsMin, "Track selection: ")}; + Configurable> confTrkTPCfCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCfClsMin, "ConfTrk"), std::vector{0.83f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCfClsMin, "Track selection: ")}; + Configurable> confTrkTPCcRowsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCcRowsMin, "ConfTrk"), std::vector{70.f, 60.f, 80.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCcRowsMin, "Track selection: ")}; + Configurable> confTrkTPCsCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCsClsMax, "Track selection: ")}; + Configurable> confTrkTPCfracsCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCfracsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCfracsClsMax, "Track selection: ")}; + Configurable> confTrkITSnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsMin, "ConfTrk"), std::vector{-1.f, 2.f, 4.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsMin, "Track selection: ")}; + Configurable> confTrkITSnclsIbMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsIbMin, "ConfTrk"), std::vector{-1.f, 1.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsIbMin, "Track selection: ")}; + Configurable> confTrkDCAxyMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAxyMax, "ConfTrk"), std::vector{0.1f, 3.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAxyMax, "Track selection: ")}; + Configurable> confTrkDCAzMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAzMax, "ConfTrk"), std::vector{0.2f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAzMax, "Track selection: ")}; /// \todo Reintegrate PID to the general selection container + Configurable> confTrkPIDnSigmaMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kPIDnSigmaMax, "ConfTrk"), std::vector{3.5f, 3.f, 2.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kPIDnSigmaMax, "Track selection: ")}; + Configurable> confTrkPIDspecies{"confTrkPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton, o2::track::PID::Deuteron}, "Trk sel: Particles species for PID (Pion=2, Kaon=3, Proton=4, Deuteron=5)"}; + Configurable confIsOnlyMCTrack{"confIsOnlyMCTrack", false, "Enable filling of only MC Tracks"}; + // Numbers from ~/alice/O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h //static constexpr ID Pion = 2; static constexpr ID Kaon = 3; static constexpr ID Proton = 4; static constexpr ID Deuteron = 5; + + Configurable confTrkMinChi2PerClusterTPC{"confTrkMinChi2PerClusterTPC", 0.0, "Lower limit of the Chi2 per TPC Cluster"}; + Configurable confTrkMaxChi2PerClusterTPC{"confTrkMaxChi2PerClusterTPC", 100.0, "Upper limit of the Chi2 per TPC Cluster"}; + Configurable confTrkMaxChi2PerClusterITS{"confTrkMaxChi2PerClusterITS", 100.0, "Upper limit of the Chi2 per ITS Cluster"}; + Configurable confTrkTPCRefit{"confTrkTPCRefit", false, "Enable TPC refit"}; + Configurable confTrkITSRefit{"confTrkITSRefit", false, "Enable ITS refit"}; } ConfTrkSelection; - Configurable confTrkPIDnSigmaOffsetTPC{ - "confTrkPIDnSigmaOffsetTPC", 0., - "Offset for TPC nSigma because of bad calibration"}; - Configurable confTrkPIDnSigmaOffsetTOF{ - "confTrkPIDnSigmaOffsetTOF", 0., - "Offset for TOF nSigma because of bad calibration"}; + Configurable confTrkPIDnSigmaOffsetTPC{"confTrkPIDnSigmaOffsetTPC", 0., "Offset for TPC nSigma because of bad calibration"}; + Configurable confTrkPIDnSigmaOffsetTOF{"confTrkPIDnSigmaOffsetTOF", 0., "Offset for TOF nSigma because of bad calibration"}; Configurable confTOFpTmin{"confTOFpTmin", 500, "TOF pT min"}; // TrackSelection *o2PhysicsTrackSelection; @@ -401,438 +222,144 @@ struct FemtoUniverseProducerTask { // V0 FemtoUniverseV0Selection v0Cuts; struct : o2::framework::ConfigurableGroup { - Configurable> confV0Sign{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0Sign, "ConfV0"), - std::vector{-1, 1}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0Sign, "V0 selection: ")}; - Configurable> confV0PtMin{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0pTMin, "ConfV0"), - std::vector{0.3f, 0.4f, 0.5f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0pTMin, "V0 selection: ")}; - Configurable> confV0PtMax{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0pTMax, "ConfV0"), - std::vector{3.3f, 3.4f, 3.5f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0pTMax, "V0 selection: ")}; - Configurable> confV0EtaMax{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0etaMax, "ConfV0"), - std::vector{0.8f, 0.7f, 0.9f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0etaMax, "V0 selection: ")}; - Configurable> confV0DCADaughMax{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0DCADaughMax, "ConfV0"), - std::vector{1.2f, 1.5f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0DCADaughMax, "V0 selection: ")}; - Configurable> confV0CPAMin{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0CPAMin, "ConfV0"), - std::vector{0.99f, 0.995f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0CPAMin, "V0 selection: ")}; - Configurable> confV0TranRadMin{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0TranRadMin, "ConfV0"), - std::vector{0.2f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0TranRadMin, "V0 selection: ")}; - Configurable> confV0TranRadMax{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0TranRadMax, "ConfV0"), - std::vector{100.f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0TranRadMax, "V0 selection: ")}; - Configurable> confV0DecVtxMax{ - FemtoUniverseV0Selection::getSelectionName( - femto_universe_v0_selection::kV0DecVtxMax, "ConfV0"), - std::vector{100.f}, - FemtoUniverseV0Selection::getSelectionHelper( - femto_universe_v0_selection::kV0DecVtxMax, "V0 selection: ")}; - - Configurable> confChildCharge{ - "confChildCharge", std::vector{-1, 1}, "V0 Child sel: Charge"}; - Configurable> confChildEtaMax{ - "confChildEtaMax", std::vector{0.8f}, "V0 Child sel: max eta"}; - Configurable> confChildTPCnClsMin{ - "confChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, - "V0 Child sel: Min. nCls TPC"}; - Configurable> confChildDCAMin{ - "confChildDCAMin", std::vector{0.05f, 0.06f}, - "V0 Child sel: Max. DCA Daugh to PV (cm)"}; - Configurable> confChildPIDnSigmaMax{ - "confChildPIDnSigmaMax", std::vector{5.f, 4.f}, - "V0 Child sel: Max. PID nSigma TPC"}; - Configurable> confChildPIDspecies{ - "confChildPIDspecies", - std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, - "V0 Child sel: Particles species for PID"}; - - Configurable confV0InvMassLowLimit{ - "confV0InvMassLowLimit", 1.05, "Lower limit of the V0 invariant mass"}; - Configurable confV0InvMassUpLimit{ - "confV0InvMassUpLimit", 1.30, "Upper limit of the V0 invariant mass"}; - - Configurable confV0RejectKaons{"confV0RejectKaons", false, - "Switch to reject kaons"}; - Configurable confV0InvKaonMassLowLimit{ - "confV0InvKaonMassLowLimit", 0.48, - "Lower limit of the V0 invariant mass for Kaon rejection"}; - Configurable confV0InvKaonMassUpLimit{ - "confV0InvKaonMassUpLimit", 0.515, - "Upper limit of the V0 invariant mass for Kaon rejection"}; - - Configurable> confV0PDGMCTruth{ - "confV0PDGMCTruth", std::vector{2212, -211, 3122}, - "PDG codes of V0 daughters and mother, the order must be as follows -- " - "positive daughter, negative daughter, mother"}; + Configurable> confV0Sign{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0Sign, "ConfV0"), std::vector{-1, 1}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0Sign, "V0 selection: ")}; + Configurable> confV0PtMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMin, "ConfV0"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMin, "V0 selection: ")}; + Configurable> confV0PtMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMax, "ConfV0"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMax, "V0 selection: ")}; + Configurable> confV0EtaMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0etaMax, "ConfV0"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0etaMax, "V0 selection: ")}; + Configurable> confV0DCADaughMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0DCADaughMax, "ConfV0"), std::vector{1.2f, 1.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0DCADaughMax, "V0 selection: ")}; + Configurable> confV0CPAMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0CPAMin, "ConfV0"), std::vector{0.99f, 0.995f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0CPAMin, "V0 selection: ")}; + Configurable> confV0TranRadMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0TranRadMin, "ConfV0"), std::vector{0.2f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0TranRadMin, "V0 selection: ")}; + Configurable> confV0TranRadMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0TranRadMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0TranRadMax, "V0 selection: ")}; + Configurable> confV0DecVtxMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0DecVtxMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0DecVtxMax, "V0 selection: ")}; + + Configurable> confChildCharge{"confChildCharge", std::vector{-1, 1}, "V0 Child sel: Charge"}; + Configurable> confChildEtaMax{"confChildEtaMax", std::vector{0.8f}, "V0 Child sel: max eta"}; + Configurable> confChildTPCnClsMin{"confChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, "V0 Child sel: Min. nCls TPC"}; + Configurable> confChildDCAMin{"confChildDCAMin", std::vector{0.05f, 0.06f}, "V0 Child sel: Max. DCA Daugh to PV (cm)"}; + Configurable> confChildPIDnSigmaMax{"confChildPIDnSigmaMax", std::vector{5.f, 4.f}, "V0 Child sel: Max. PID nSigma TPC"}; + Configurable> confChildPIDspecies{"confChildPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, "V0 Child sel: Particles species for PID"}; + + Configurable confV0InvMassLowLimit{"confV0InvMassLowLimit", 1.05, "Lower limit of the V0 invariant mass"}; + Configurable confV0InvMassUpLimit{"confV0InvMassUpLimit", 1.30, "Upper limit of the V0 invariant mass"}; + + Configurable confV0RejectKaons{"confV0RejectKaons", false, "Switch to reject kaons"}; + Configurable confV0InvKaonMassLowLimit{"confV0InvKaonMassLowLimit", 0.48, "Lower limit of the V0 invariant mass for Kaon rejection"}; + Configurable confV0InvKaonMassUpLimit{"confV0InvKaonMassUpLimit", 0.515, "Upper limit of the V0 invariant mass for Kaon rejection"}; + + Configurable> confV0PDGMCTruth{"confV0PDGMCTruth", std::vector{2212, -211, 3122}, "PDG codes of V0 daughters and mother, the order must be as follows -- positive daughter, negative daughter, mother"}; } ConfV0Selection; struct : o2::framework::ConfigurableGroup { - Configurable confPtLowFilterCut{ - "confPtLowFilterCut", 0.14, - "Lower limit for Pt for the global track"}; // pT low - Configurable confPtHighFilterCut{ - "confPtHighFilterCut", 5.0, - "Higher limit for Pt for the global track"}; // pT high - Configurable confEtaFilterCut{"confEtaFilterCut", 0.8, - "Eta cut for the global track"}; // eta - Configurable confDcaXYCustom1FilterCut{ - "confDcaXYCustom1FilterCut", 0.0105, - "Value for [1] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; - Configurable confDcaXYCustom2FilterCut{ - "confDcaXYCustom2FilterCut", 0.035, - "Value for [2] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; - Configurable confDcaZCustom1FilterCut{ - "confDcaZCustom1FilterCut", 0.02, - "Value for [1] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; - Configurable confDcaZCustom2FilterCut{ - "confDcaZCustom2FilterCut", 0.0, - "Value for [2] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; - Configurable confIsApplyTrkCutMCTruth{ - "confIsApplyTrkCutMCTruth", false, - "Apply eta, pT selection cut on MCTruth tracks "}; - Configurable confIsOnlyPrimary{"confIsOnlyPrimary", false, - "Select only primaries"}; + Configurable confPtLowFilterCut{"confPtLowFilterCut", 0.14, "Lower limit for Pt for the global track"}; // pT low + Configurable confPtHighFilterCut{"confPtHighFilterCut", 5.0, "Higher limit for Pt for the global track"}; // pT high + Configurable confEtaFilterCut{"confEtaFilterCut", 0.8, "Eta cut for the global track"}; // eta + Configurable confDcaXYCustom1FilterCut{"confDcaXYCustom1FilterCut", 0.0105, "Value for [1] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; + Configurable confDcaXYCustom2FilterCut{"confDcaXYCustom2FilterCut", 0.035, "Value for [2] custom DCAxy cut -> |DCAxy| < [1] + [2]/pT"}; + Configurable confDcaZCustom1FilterCut{"confDcaZCustom1FilterCut", 0.02, "Value for [1] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; + Configurable confDcaZCustom2FilterCut{"confDcaZCustom2FilterCut", 0.0, "Value for [2] custom cut on DCAz -> |DCAz| < [1] + [2]/pT"}; + Configurable confIsApplyTrkCutMCTruth{"confIsApplyTrkCutMCTruth", false, "Apply eta, pT selection cut on MCTruth tracks "}; + Configurable confIsOnlyPrimary{"confIsOnlyPrimary", false, "Select only primaries"}; } ConfFilterCuts; Filter globalCutFilter = requireGlobalTrackWoDCAInFilter(); - Filter customTrackFilter = - (aod::track::pt > ConfFilterCuts.confPtLowFilterCut) && - (aod::track::pt < ConfFilterCuts.confPtHighFilterCut) && - (nabs(aod::track::eta) < ConfFilterCuts.confEtaFilterCut) && - (nabs(aod::track::dcaZ) < - (ConfFilterCuts.confDcaZCustom1FilterCut + - ConfFilterCuts.confDcaZCustom2FilterCut / aod::track::pt)) && - (nabs(aod::track::dcaXY) < - (ConfFilterCuts.confDcaXYCustom1FilterCut + - ConfFilterCuts.confDcaXYCustom2FilterCut / aod::track::pt)); + Filter customTrackFilter = (aod::track::pt > ConfFilterCuts.confPtLowFilterCut) && + (aod::track::pt < ConfFilterCuts.confPtHighFilterCut) && + (nabs(aod::track::eta) < ConfFilterCuts.confEtaFilterCut) && + (nabs(aod::track::dcaZ) < (ConfFilterCuts.confDcaZCustom1FilterCut + ConfFilterCuts.confDcaZCustom2FilterCut / aod::track::pt)) && + (nabs(aod::track::dcaXY) < (ConfFilterCuts.confDcaXYCustom1FilterCut + ConfFilterCuts.confDcaXYCustom2FilterCut / aod::track::pt)); // CASCADE FemtoUniverseCascadeSelection cascadeCuts; struct : o2::framework::ConfigurableGroup { - Configurable> confCascSign{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeSign, "ConfCasc"), - std::vector{-1, 1}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeSign, - "Cascade selection: ")}; - Configurable> confCascPtMin{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadepTMin, "ConfCasc"), - std::vector{0.3f, 0.4f, 0.5f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadepTMin, - "Cascade selection: ")}; - Configurable> confCascPtMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadepTMax, "ConfCasc"), - std::vector{3.3f, 3.4f, 3.5f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadepTMax, - "Cascade selection: ")}; - Configurable> confCascEtaMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeetaMax, "ConfCasc"), - std::vector{0.8f, 0.7f, 0.9f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeetaMax, - "Cascade selection: ")}; - Configurable> confCascV0DCADaughMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0DCADaughMax, - "ConfCasc"), - std::vector{1.f, 1.2f, 1.5f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0DCADaughMax, - "Cascade selection: ")}; - Configurable> confCascV0CPAMin{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0CPAMin, "ConfCasc"), - std::vector{0.99f, 0.95f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0CPAMin, - "Cascade selection: ")}; - Configurable> confCascV0TranRadMin{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0TranRadMin, "ConfCasc"), - std::vector{0.2f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0TranRadMin, - "Cascade selection: ")}; - Configurable> confCascV0TranRadMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0TranRadMax, "ConfCasc"), - std::vector{100.f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0TranRadMax, - "Cascade selection: ")}; - Configurable> confCascV0DecVtxMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0DecVtxMax, "ConfCasc"), - std::vector{100.f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0DecVtxMax, - "Cascade selection: ")}; - Configurable> confCascDCADaughMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeDCADaughMax, "ConfCasc"), - std::vector{1.f, 1.2f, 1.5f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeDCADaughMax, - "Cascade selection: ")}; - Configurable> confCascCPAMin{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeCPAMin, "ConfCasc"), - std::vector{0.99f, 0.95f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeCPAMin, - "Cascade selection: ")}; - Configurable> confCascTranRadMin{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeTranRadMin, "ConfCasc"), - std::vector{0.2f, 0.5f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeTranRadMin, - "Cascade selection: ")}; - Configurable> confCascTranRadMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeTranRadMax, "ConfCasc"), - std::vector{100.f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeTranRadMax, - "Cascade selection: ")}; - Configurable> confCascDecVtxMax{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeDecVtxMax, "ConfCasc"), - std::vector{100.f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeDecVtxMax, - "Cascade selection: ")}; - - Configurable> confCascDCAPosToPV{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeDCAPosToPV, "ConfCasc"), - std::vector{0.1f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeDCAPosToPV, - "Cascade selection: ")}; - Configurable> confCascDCANegToPV{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeDCANegToPV, "ConfCasc"), - std::vector{0.1f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeDCANegToPV, - "Cascade selection: ")}; - Configurable> confCascDCABachToPV{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeDCABachToPV, "ConfCasc"), - std::vector{0.1f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeDCABachToPV, - "Cascade selection: ")}; - Configurable> confCascDCAV0ToPV{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeDCAV0ToPV, "ConfCasc"), - std::vector{0.01f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeDCAV0ToPV, - "Cascade selection: ")}; - Configurable> confCascV0MassLowLimit{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0MassMin, "ConfCasc"), - std::vector{1.05f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0MassMin, - "Cascade selection: ")}; - Configurable> confCascV0MassUpLimit{ - FemtoUniverseCascadeSelection::getSelectionName( - femto_universe_cascade_selection::kCascadeV0MassMax, "ConfCasc"), - std::vector{1.30f}, - FemtoUniverseCascadeSelection::getSelectionHelper( - femto_universe_cascade_selection::kCascadeV0MassMax, - "Cascade selection: ")}; - - Configurable> confCascChildCharge{ - "confCascChildCharge", std::vector{-1, 1}, - "Cascade Child sel: Charge"}; - Configurable> confCascChildEtaMax{ - "confCascChildEtaMax", std::vector{0.8f}, - "Cascade Child sel: max eta"}; - Configurable> confCascChildTPCnClsMin{ - "confCascChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, - "Cascade Child sel: Min. nCls TPC"}; - // Configurable> - // confCascChildDCAMin{"confCascChildDCAMin", std::vector{0.05f, - // 0.06f}, "Cascade Child sel: Max. DCA Daugh to PV (cm)"}; //Commented: - // not used variable - Configurable> confCascChildPIDnSigmaMax{ - "confCascChildPIDnSigmaMax", std::vector{3.f, 4.f}, - "Cascade Child sel: Max. PID nSigma TPC"}; - Configurable> confCascChildPIDspecies{ - "confCascChildPIDspecies", - std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, - "Cascade Child sel: particle species for PID"}; - - Configurable confXiInvMassLowLimit{ - "confXiInvMassLowLimit", 1.25, "Lower limit of the Xi invariant mass"}; - Configurable confXiInvMassUpLimit{ - "confXiInvMassUpLimit", 1.40, "Upper limit of the Xi invariant mass"}; - Configurable confOmegaInvMassLowLimit{ - "confOmegaInvMassLowLimit", 1.60, - "Lower limit of the Omega invariant mass"}; - Configurable confOmegaInvMassUpLimit{ - "confOmegaInvMassUpLimit", 1.80, - "Upper limit of the Omega invariant mass"}; + Configurable> confCascSign{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeSign, "ConfCasc"), std::vector{-1, 1}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeSign, "Cascade selection: ")}; + Configurable> confCascPtMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadepTMin, "ConfCasc"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadepTMin, "Cascade selection: ")}; + Configurable> confCascPtMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadepTMax, "ConfCasc"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadepTMax, "Cascade selection: ")}; + Configurable> confCascEtaMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeetaMax, "ConfCasc"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeetaMax, "Cascade selection: ")}; + Configurable> confCascV0DCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0DCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0DCADaughMax, "Cascade selection: ")}; + Configurable> confCascV0CPAMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0CPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0CPAMin, "Cascade selection: ")}; + Configurable> confCascV0TranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0TranRadMin, "ConfCasc"), std::vector{0.2f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0TranRadMin, "Cascade selection: ")}; + Configurable> confCascV0TranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0TranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0TranRadMax, "Cascade selection: ")}; + Configurable> confCascV0DecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0DecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0DecVtxMax, "Cascade selection: ")}; + Configurable> confCascDCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCADaughMax, "Cascade selection: ")}; + Configurable> confCascCPAMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeCPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeCPAMin, "Cascade selection: ")}; + Configurable> confCascTranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeTranRadMin, "ConfCasc"), std::vector{0.2f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeTranRadMin, "Cascade selection: ")}; + Configurable> confCascTranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeTranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeTranRadMax, "Cascade selection: ")}; + Configurable> confCascDecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDecVtxMax, "Cascade selection: ")}; + + Configurable> confCascDCAPosToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCAPosToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCAPosToPV, "Cascade selection: ")}; + Configurable> confCascDCANegToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCANegToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCANegToPV, "Cascade selection: ")}; + Configurable> confCascDCABachToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCABachToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCABachToPV, "Cascade selection: ")}; + Configurable> confCascDCAV0ToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCAV0ToPV, "ConfCasc"), std::vector{0.01f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCAV0ToPV, "Cascade selection: ")}; + Configurable> confCascV0MassLowLimit{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0MassMin, "ConfCasc"), std::vector{1.05f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0MassMin, "Cascade selection: ")}; + Configurable> confCascV0MassUpLimit{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0MassMax, "ConfCasc"), std::vector{1.30f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0MassMax, "Cascade selection: ")}; + + Configurable> confCascChildCharge{"confCascChildCharge", std::vector{-1, 1}, "Cascade Child sel: Charge"}; + Configurable> confCascChildEtaMax{"confCascChildEtaMax", std::vector{0.8f}, "Cascade Child sel: max eta"}; + Configurable> confCascChildTPCnClsMin{"confCascChildTPCnClsMin", std::vector{80.f, 70.f, 60.f}, "Cascade Child sel: Min. nCls TPC"}; + // Configurable> confCascChildDCAMin{"confCascChildDCAMin", std::vector{0.05f, 0.06f}, "Cascade Child sel: Max. DCA Daugh to PV (cm)"}; //Commented: not used variable + Configurable> confCascChildPIDnSigmaMax{"confCascChildPIDnSigmaMax", std::vector{3.f, 4.f}, "Cascade Child sel: Max. PID nSigma TPC"}; + Configurable> confCascChildPIDspecies{"confCascChildPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Proton}, "Cascade Child sel: particle species for PID"}; + + Configurable confXiInvMassLowLimit{"confXiInvMassLowLimit", 1.25, "Lower limit of the Xi invariant mass"}; + Configurable confXiInvMassUpLimit{"confXiInvMassUpLimit", 1.40, "Upper limit of the Xi invariant mass"}; + Configurable confOmegaInvMassLowLimit{"confOmegaInvMassLowLimit", 1.60, "Lower limit of the Omega invariant mass"}; + Configurable confOmegaInvMassUpLimit{"confOmegaInvMassUpLimit", 1.80, "Upper limit of the Omega invariant mass"}; } ConfCascadeSelection; // PHI FemtoUniversePhiSelection phiCuts; struct : o2::framework::ConfigurableGroup { /// Phi meson - Configurable confPhiPtLowLimit{"confPhiPtLowLimit", 0.8, - "Lower limit of the Phi pT."}; - Configurable confPhiPtHighLimit{"confPhiPtHighLimit", 4.0, - "Higher limit of the Phi pT."}; - Configurable confPhiEtaHighLimit{"confPhiEtaHighLimit", 0.8, - "Maximum eta value of the Phi"}; - Configurable confPhiInvMassLowLimit{ - "confPhiInvMassLowLimit", 1.011, - "Lower limit of the Phi invariant mass"}; - Configurable confPhiInvMassUpLimit{ - "confPhiInvMassUpLimit", 1.027, - "Upper limit of the Phi invariant mass"}; + Configurable confPhiPtLowLimit{"confPhiPtLowLimit", 0.8, "Lower limit of the Phi pT."}; + Configurable confPhiPtHighLimit{"confPhiPtHighLimit", 4.0, "Higher limit of the Phi pT."}; + Configurable confPhiEtaHighLimit{"confPhiEtaHighLimit", 0.8, "Maximum eta value of the Phi"}; + Configurable confPhiInvMassLowLimit{"confPhiInvMassLowLimit", 1.011, "Lower limit of the Phi invariant mass"}; + Configurable confPhiInvMassUpLimit{"confPhiInvMassUpLimit", 1.027, "Upper limit of the Phi invariant mass"}; // Phi meson daughters - Configurable confPhiKaonRejectPionNsigma{ - "confPhiKaonRejectPionNsigma", 3.0, - "Reject if particle could be a Pion combined nsigma value."}; - Configurable confPhiKaonRejectProtonNsigma{ - "confPhiKaonRejectProtonNsigma", 3.0, - "Reject if particle could be a Proton combined nsigma value."}; + Configurable confPhiKaonRejectPionNsigma{"confPhiKaonRejectPionNsigma", 3.0, "Reject if particle could be a Pion combined nsigma value."}; + Configurable confPhiKaonRejectProtonNsigma{"confPhiKaonRejectProtonNsigma", 3.0, "Reject if particle could be a Proton combined nsigma value."}; // Kaons - Configurable confPhiDoLFPID4Kaons{ - "confPhiDoLFPID4Kaons", true, "Switch on do PID for Kaons as in LF"}; - Configurable confNSigmaTPCKaonLF{"confNSigmaTPCKaonLF", 3.0, - "TPC Kaon Sigma as in LF"}; - Configurable confNSigmaCombKaonLF{ - "confNSigmaCombKaonLF", 3.0, - "TPC and TOF Kaon Sigma (combined) as in LF"}; - Configurable confMomKaonLF{ - "confMomKaonLF", 0.5, - "Momentum threshold for kaon identification as in LF"}; - Configurable confMomKaonRejected{ - "confMomKaonRejected", 0.5, "Momentum threshold for rejected kaon"}; - Configurable confMomKaon03{ - "confMomKaon03", 0.3, - "Momentum threshold for kaon identification pT = 0.3 GeV/c"}; - Configurable confMomKaon045{ - "confMomKaon045", 0.45, - "Momentum threshold for kaon identification pT = 0.45 GeV/c"}; - Configurable confMomKaon055{ - "confMomKaon055", 0.55, - "Momentum threshold for kaon identification pT = 0.55 GeV/c"}; - Configurable confMomKaon15{ - "confMomKaon15", 1.5, - "Momentum threshold for kaon identification pT = 1.5 GeV/c"}; - Configurable confPhiKaonNsigmaTPCfrom00to03{ - "confPhiKaonNsigmaTPCfrom00to03", 3.0, - "Reject if Kaons in 0.0-0.3 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom03to045{ - "confPhiKaonNsigmaTPCfrom03to045", 2.0, - "Reject if Kaons in 0.3-0.45 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom045to055{ - "confPhiKaonNsigmaTPCfrom045to055", 1.0, - "Reject if Kaons in 0.45-0.55 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom055to15{ - "confPhiKaonNsigmaTPCfrom055to15", 3.0, - "Reject if Kaons in 0.55-1.5 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTOFfrom055to15{ - "confPhiKaonNsigmaTOFfrom055to15", 3.0, - "Reject if Kaons in 0.55-1.5 are have TOF n sigma above this value."}; - Configurable confPhiKaonNsigmaTPCfrom15{ - "confPhiKaonNsigmaTPCfrom15", 3.0, - "Reject if Kaons above 1.5 are have TPC n sigma above this value."}; - Configurable confPhiKaonNsigmaTOFfrom15{ - "confPhiKaonNsigmaTOFfrom15", 3.0, - "Reject if Kaons above 1.5 are have TOF n sigma above this value."}; + Configurable confPhiDoLFPID4Kaons{"confPhiDoLFPID4Kaons", true, "Switch on do PID for Kaons as in LF"}; + Configurable confNSigmaTPCKaonLF{"confNSigmaTPCKaonLF", 3.0, "TPC Kaon Sigma as in LF"}; + Configurable confNSigmaCombKaonLF{"confNSigmaCombKaonLF", 3.0, "TPC and TOF Kaon Sigma (combined) as in LF"}; + Configurable confMomKaonLF{"confMomKaonLF", 0.5, "Momentum threshold for kaon identification as in LF"}; + Configurable confMomKaonRejected{"confMomKaonRejected", 0.5, "Momentum threshold for rejected kaon"}; + Configurable confMomKaon03{"confMomKaon03", 0.3, "Momentum threshold for kaon identification pT = 0.3 GeV/c"}; + Configurable confMomKaon045{"confMomKaon045", 0.45, "Momentum threshold for kaon identification pT = 0.45 GeV/c"}; + Configurable confMomKaon055{"confMomKaon055", 0.55, "Momentum threshold for kaon identification pT = 0.55 GeV/c"}; + Configurable confMomKaon15{"confMomKaon15", 1.5, "Momentum threshold for kaon identification pT = 1.5 GeV/c"}; + Configurable confPhiKaonNsigmaTPCfrom00to03{"confPhiKaonNsigmaTPCfrom00to03", 3.0, "Reject if Kaons in 0.0-0.3 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom03to045{"confPhiKaonNsigmaTPCfrom03to045", 2.0, "Reject if Kaons in 0.3-0.45 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom045to055{"confPhiKaonNsigmaTPCfrom045to055", 1.0, "Reject if Kaons in 0.45-0.55 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom055to15{"confPhiKaonNsigmaTPCfrom055to15", 3.0, "Reject if Kaons in 0.55-1.5 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTOFfrom055to15{"confPhiKaonNsigmaTOFfrom055to15", 3.0, "Reject if Kaons in 0.55-1.5 are have TOF n sigma above this value."}; + Configurable confPhiKaonNsigmaTPCfrom15{"confPhiKaonNsigmaTPCfrom15", 3.0, "Reject if Kaons above 1.5 are have TPC n sigma above this value."}; + Configurable confPhiKaonNsigmaTOFfrom15{"confPhiKaonNsigmaTOFfrom15", 3.0, "Reject if Kaons above 1.5 are have TOF n sigma above this value."}; } ConfPhiSelection; // PDG codes for fillMCParticle function - Configurable confPDGCodePartOne{"confPDGCodePartOne", 321, - "Particle 1 - PDG code"}; - Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 321, - "Particle 2 - PDG code"}; + Configurable confPDGCodePartOne{"confPDGCodePartOne", 321, "Particle 1 - PDG code"}; + Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 321, "Particle 2 - PDG code"}; // D0/D0bar mesons struct : o2::framework::ConfigurableGroup { - Configurable trackD0CandEtaMax{"trackD0CandEtaMax", 0.8, - "max. track/D0 cand. pseudorapidity"}; - Configurable yD0CandGenMax{"yD0CandGenMax", 0.5, - "max. gen. D0 cand. rapidity"}; - Configurable yD0CandMax{"yD0CandMax", 0.8, - "max. D0 cand. rapidity"}; - Configurable trackD0pTGenMin{ - "trackD0pTGenMin", 0.0, - "MC Truth, min. pT for tracks and D0/D0bar cand."}; - Configurable trackD0pTGenMax{ - "trackD0pTGenMax", 24.0, - "MC Truth, max. pT for tracks and D0/D0bar cand."}; - Configurable useYCutD0Cand{ - "useYCutD0Cand", true, - "True - apply cut on y of D0 cand./false - apply cut on eta"}; - Configurable storeD0D0barDoubleMassHypo{ - "storeD0D0barDoubleMassHypo", false, - "Store D0/D0bar cand. which pass selection criteria for both, D0 and " - "D0bar"}; - Configurable fillCorrBkgsD0{ - "fillCorrBkgsD0", false, - "Flag to fill derived tables with correlated background candidates"}; + Configurable trackD0CandEtaMax{"trackD0CandEtaMax", 0.8, "max. track/D0 cand. pseudorapidity"}; + Configurable yD0CandGenMax{"yD0CandGenMax", 0.5, "max. gen. D0 cand. rapidity"}; + Configurable yD0CandMax{"yD0CandMax", 0.8, "max. D0 cand. rapidity"}; + Configurable trackD0pTGenMin{"trackD0pTGenMin", 0.0, "MC Truth, min. pT for tracks and D0/D0bar cand."}; + Configurable trackD0pTGenMax{"trackD0pTGenMax", 24.0, "MC Truth, max. pT for tracks and D0/D0bar cand."}; + Configurable useYCutD0Cand{"useYCutD0Cand", true, "True - apply cut on y of D0 cand./false - apply cut on eta"}; + Configurable storeD0D0barDoubleMassHypo{"storeD0D0barDoubleMassHypo", false, "Store D0/D0bar cand. which pass selection criteria for both, D0 and D0bar"}; + Configurable fillCorrBkgsD0{"fillCorrBkgsD0", false, "Flag to fill derived tables with correlated background candidates"}; } ConfD0Selection; // PID bitmask configurables struct : o2::framework::ConfigurableGroup { - Configurable confMinMomTOF{ - "confMinMomTOF", 0.75, - "momentum threshold for particle identification using TOF"}; - Configurable confNsigmaTPCParticleChild{ - "confNsigmaTPCParticleChild", 3.0, - "TPC Sigma for particle (daugh & bach) momentum < Confmom"}; - Configurable confNsigmaTOFParticleChild{ - "confNsigmaTOFParticleChild", 3.0, - "TOF Sigma for particle (daugh & bach) momentum > Confmom"}; - Configurable confNsigmaTPCParticle{ - "confNsigmaTPCParticle", 3.0, - "TPC Sigma for particle (track) momentum < Confmom"}; - Configurable confNsigmaCombinedParticle{ - "confNsigmaCombinedParticle", 3.0, - "TPC and TOF Sigma (combined) for particle (track) momentum > Confmom"}; + Configurable confMinMomTOF{"confMinMomTOF", 0.75, "momentum threshold for particle identification using TOF"}; + Configurable confNsigmaTPCParticleChild{"confNsigmaTPCParticleChild", 3.0, "TPC Sigma for particle (daugh & bach) momentum < Confmom"}; + Configurable confNsigmaTOFParticleChild{"confNsigmaTOFParticleChild", 3.0, "TOF Sigma for particle (daugh & bach) momentum > Confmom"}; + Configurable confNsigmaTPCParticle{"confNsigmaTPCParticle", 3.0, "TPC Sigma for particle (track) momentum < Confmom"}; + Configurable confNsigmaCombinedParticle{"confNsigmaCombinedParticle", 3.0, "TPC and TOF Sigma (combined) for particle (track) momentum > Confmom"}; } ConfPIDBitmask; HfHelper hfHelper; @@ -840,32 +367,25 @@ struct FemtoUniverseProducerTask { { if (mom < ConfPhiSelection.confMomKaon03) { // 0.0-0.3 - if (std::abs(nsigmaTPCK) < - ConfPhiSelection.confPhiKaonNsigmaTPCfrom00to03) { + if (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom00to03) { return true; } else { return false; } } else if (mom < ConfPhiSelection.confMomKaon045) { // 0.30 - 0.45 - if (std::abs(nsigmaTPCK) < - ConfPhiSelection.confPhiKaonNsigmaTPCfrom03to045) { + if (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom03to045) { return true; } else { return false; } } else if (mom < ConfPhiSelection.confMomKaon055) { // 0.45-0.55 - if (std::abs(nsigmaTPCK) < - ConfPhiSelection.confPhiKaonNsigmaTPCfrom045to055) { + if (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom045to055) { return true; } else { return false; } - } else if (mom < ConfPhiSelection - .confMomKaon15) { // 0.55-1.5 (now we use TPC and TOF) - if ((std::abs(nsigmaTOFK) < - ConfPhiSelection.confPhiKaonNsigmaTOFfrom055to15) && - (std::abs(nsigmaTPCK) < - ConfPhiSelection.confPhiKaonNsigmaTPCfrom055to15)) { + } else if (mom < ConfPhiSelection.confMomKaon15) { // 0.55-1.5 (now we use TPC and TOF) + if ((std::abs(nsigmaTOFK) < ConfPhiSelection.confPhiKaonNsigmaTOFfrom055to15) && (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom055to15)) { { return true; } @@ -873,10 +393,7 @@ struct FemtoUniverseProducerTask { return false; } } else if (mom > ConfPhiSelection.confMomKaon15) { // 1.5 - - if ((std::abs(nsigmaTOFK) < - ConfPhiSelection.confPhiKaonNsigmaTOFfrom15) && - (std::abs(nsigmaTPCK) < - ConfPhiSelection.confPhiKaonNsigmaTPCfrom15)) { + if ((std::abs(nsigmaTOFK) < ConfPhiSelection.confPhiKaonNsigmaTOFfrom15) && (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom15)) { return true; } else { return false; @@ -886,8 +403,7 @@ struct FemtoUniverseProducerTask { } } - bool isKaonNSigmaLF(float mom, float nsigmaTPCK, float nsigmaTOFK, - bool hasTOF) + bool isKaonNSigmaLF(float mom, float nsigmaTPCK, float nsigmaTOFK, bool hasTOF) { if (mom < ConfPhiSelection.confMomKaonLF) { if (std::abs(nsigmaTPCK) < ConfPhiSelection.confNSigmaTPCKaonLF) { @@ -895,13 +411,11 @@ struct FemtoUniverseProducerTask { } else { return false; } - } else if (mom >= ConfPhiSelection - .confMomKaonLF) { // 0.5-1.5 (now we use TPC and TOF) + } else if (mom >= ConfPhiSelection.confMomKaonLF) { // 0.5-1.5 (now we use TPC and TOF) if (!hasTOF) { return false; } else { - if (std::sqrt(nsigmaTPCK * nsigmaTPCK + nsigmaTOFK * nsigmaTOFK) < - ConfPhiSelection.confNSigmaCombKaonLF) { + if (std::sqrt(nsigmaTPCK * nsigmaTPCK + nsigmaTOFK * nsigmaTOFK) < ConfPhiSelection.confNSigmaCombKaonLF) { return true; } else { return false; @@ -912,24 +426,19 @@ struct FemtoUniverseProducerTask { } } - bool isKaonRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, - float nsigmaTPCPi, float nsigmaTOFPi) + bool isKaonRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi) { if (mom < ConfPhiSelection.confMomKaonRejected) { - if (std::abs(nsigmaTPCPi) < - ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { + if (std::abs(nsigmaTPCPi) < ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { return true; - } else if (std::abs(nsigmaTPCPr) < - ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { + } else if (std::abs(nsigmaTPCPr) < ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { return true; } } if (mom > ConfPhiSelection.confMomKaonRejected) { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < - ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { + if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPhiSelection.confPhiKaonRejectPionNsigma.value) { return true; - } else if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < - ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { + } else if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPhiSelection.confPhiKaonRejectProtonNsigma.value) { return true; } else { return false; @@ -941,48 +450,39 @@ struct FemtoUniverseProducerTask { bool isNSigmaTPC(float nsigmaTPCParticle) { - return (std::abs(nsigmaTPCParticle) < - ConfPIDBitmask.confNsigmaTPCParticleChild); + return (std::abs(nsigmaTPCParticle) < ConfPIDBitmask.confNsigmaTPCParticleChild); } bool isNSigmaTOF(float mom, float nsigmaTOFParticle, bool hasTOF) { // Cut only on daughter and bachelor tracks, that have TOF signal if (mom > ConfPIDBitmask.confMinMomTOF && hasTOF) { - return (std::abs(nsigmaTOFParticle) < - ConfPIDBitmask.confNsigmaTOFParticleChild); + return (std::abs(nsigmaTOFParticle) < ConfPIDBitmask.confNsigmaTOFParticleChild); } else { return true; } } - bool isNSigmaCombined(float mom, float nsigmaTPCParticle, - float nsigmaTOFParticle) + bool isNSigmaCombined(float mom, float nsigmaTPCParticle, float nsigmaTOFParticle) { if (mom <= ConfPIDBitmask.confMinMomTOF) { - return (std::abs(nsigmaTPCParticle) < - ConfPIDBitmask.confNsigmaTPCParticle); + return (std::abs(nsigmaTPCParticle) < ConfPIDBitmask.confNsigmaTPCParticle); } else { - return (std::hypot(nsigmaTOFParticle, nsigmaTPCParticle) < - ConfPIDBitmask.confNsigmaCombinedParticle); + return (std::hypot(nsigmaTOFParticle, nsigmaTPCParticle) < ConfPIDBitmask.confNsigmaCombinedParticle); } } template - aod::femtouniverseparticle::CutContainerType - PIDBitmask(const TrackType& track) + aod::femtouniverseparticle::CutContainerType PIDBitmask(const TrackType& track) { - static const o2::track::PID pids[] = { - o2::track::PID::Proton, o2::track::PID::Pion, o2::track::PID::Kaon}; + static const o2::track::PID pids[] = {o2::track::PID::Proton, o2::track::PID::Pion, o2::track::PID::Kaon}; aod::femtouniverseparticle::CutContainerType mask = 0u; for (UInt_t i = 0; i < 3; ++i) { if (isNSigmaTPC(trackCuts.getNsigmaTPC(track, pids[i]))) mask |= (1u << i); - if (isNSigmaTOF(track.p(), trackCuts.getNsigmaTOF(track, pids[i]), - track.hasTOF())) + if (isNSigmaTOF(track.p(), trackCuts.getNsigmaTOF(track, pids[i]), track.hasTOF())) mask |= (8u << i); - if (isNSigmaCombined(track.p(), trackCuts.getNsigmaTPC(track, pids[i]), - trackCuts.getNsigmaTOF(track, pids[i]))) + if (isNSigmaCombined(track.p(), trackCuts.getNsigmaTPC(track, pids[i]), trackCuts.getNsigmaTOF(track, pids[i]))) mask |= (64u << i); } if (track.hasTOF()) @@ -995,12 +495,10 @@ struct FemtoUniverseProducerTask { /// bitmask to save strangeness TOF for V0 analysis template - aod::femtouniverseparticle::CutContainerType - PIDStrangeTOFBitmaskV0(const V0Type& v0) + aod::femtouniverseparticle::CutContainerType PIDStrangeTOFBitmaskV0(const V0Type& v0) { aod::femtouniverseparticle::CutContainerType mask = 0u; - if constexpr (std::experimental::is_detected::value) { + if constexpr (std::experimental::is_detected::value) { if (v0.tofNSigmaLaPr() < ConfPIDBitmask.confNsigmaTOFParticleChild) mask |= (1u); if (v0.tofNSigmaLaPi() < ConfPIDBitmask.confNsigmaTOFParticleChild) @@ -1022,12 +520,10 @@ struct FemtoUniverseProducerTask { /// bitmask to save strangeness TOF for cascade analysis template - aod::femtouniverseparticle::CutContainerType - PIDStrangeTOFBitmaskCasc(const CascType& casc) + aod::femtouniverseparticle::CutContainerType PIDStrangeTOFBitmaskCasc(const CascType& casc) { aod::femtouniverseparticle::CutContainerType mask = 0u; - if constexpr (std::experimental::is_detected::value) { + if constexpr (std::experimental::is_detected::value) { if (casc.tofNSigmaXiLaPi() < ConfPIDBitmask.confNsigmaTOFParticleChild) mask |= (1u); if (casc.tofNSigmaXiLaPr() < ConfPIDBitmask.confNsigmaTOFParticleChild) @@ -1048,22 +544,15 @@ struct FemtoUniverseProducerTask { OutputObj zorroSummary{"zorroSummary"}; int mRunNumberZorro = 0; - HistogramRegistry qaRegistry{ - "QAHistos", - {}, - OutputObjHandlingPolicy::QAObject}; - HistogramRegistry cascadeQaRegistry{ - "CascadeQAHistos", - {}, - OutputObjHandlingPolicy::QAObject}; + HistogramRegistry qaRegistry{"QAHistos", {}, OutputObjHandlingPolicy::QAObject}; + HistogramRegistry cascadeQaRegistry{"CascadeQAHistos", {}, OutputObjHandlingPolicy::QAObject}; void initZorro(aod::BCsWithTimestamps::iterator const& bc) { if (mRunNumberZorro == bc.runNumber()) return; - zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), - zorroMask.value); + zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), zorroMask.value); zorro.populateHistRegistry(qaRegistry, bc.runNumber()); mRunNumberZorro = bc.runNumber(); } @@ -1082,36 +571,10 @@ struct FemtoUniverseProducerTask { void init(InitContext&) { - if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || - doprocessTrackV0 || doprocessTrackCascadeData || - doprocessTrackV0Cascade || doprocessTrackD0mesonData || - doprocessTrackD0DataML || doprocessTrackCentRun2Data || - doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || - doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || - doprocessTrackDataCentPP) == false && - (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || - doprocessTrackMCGen || doprocessTruthAndFullMCV0 || - doprocessTrackD0MC || doprocessTruthAndFullMCCasc || - doprocessFullMCCent || doprocessTrackCentRun3DataMC || - doprocessTruthAndFullMCCentRun3 || - doprocessTruthAndFullMCCentRun3V0) == false) { - LOGF(fatal, - "Neither processFullData nor processFullMC enabled. Please " - "choose one."); - } - if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || - doprocessTrackV0 || doprocessTrackCascadeData || - doprocessTrackV0Cascade || doprocessTrackD0mesonData || - doprocessTrackD0DataML || doprocessTrackCentRun2Data || - doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || - doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || - doprocessTrackDataCentPP) == true && - (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || - doprocessTrackMCGen || doprocessTruthAndFullMCV0 || - doprocessTrackD0MC || doprocessTruthAndFullMCCasc || - doprocessFullMCCent || doprocessTrackCentRun3DataMC || - doprocessTruthAndFullMCCentRun3 || - doprocessTruthAndFullMCCentRun3V0) == true) { + if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || doprocessTrackV0 || doprocessTrackCascadeData || doprocessTrackV0Cascade || doprocessTrackD0mesonData || doprocessTrackD0DataML || doprocessTrackCentRun2Data || doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || doprocessTrackDataCentPP) == false && (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || doprocessTrackMCGen || doprocessTruthAndFullMCV0 || doprocessTrackD0MC || doprocessTruthAndFullMCCasc || doprocessFullMCCent || doprocessTrackCentRun3DataMC || doprocessTruthAndFullMCCentRun3 || doprocessTruthAndFullMCCentRun3V0) == false) { + LOGF(fatal, "Neither processFullData nor processFullMC enabled. Please choose one."); + } + if ((doprocessFullData || doprocessTrackPhiData || doprocessTrackData || doprocessTrackV0 || doprocessTrackCascadeData || doprocessTrackV0Cascade || doprocessTrackD0mesonData || doprocessTrackD0DataML || doprocessTrackCentRun2Data || doprocessTrackV0CentRun2Data || doprocessTrackCentRun3Data || doprocessV0CentRun3Data || doprocessCascadeCentRun3Data || doprocessTrackDataCentPP) == true && (doprocessFullMC || doprocessTrackMC || doprocessTrackMCTruth || doprocessTrackMCGen || doprocessTruthAndFullMCV0 || doprocessTrackD0MC || doprocessTruthAndFullMCCasc || doprocessFullMCCent || doprocessTrackCentRun3DataMC || doprocessTruthAndFullMCCentRun3 || doprocessTruthAndFullMCCentRun3V0) == true) { LOGF(fatal, "Cannot enable process Data and process MC at the same time. " "Please choose one."); @@ -1119,161 +582,66 @@ struct FemtoUniverseProducerTask { zorroSummary.setObject(zorro.getZorroSummary()); - colCuts.setCuts(ConfGeneral.confEvtZvtx, ConfGeneral.confEvtTriggerCheck, - ConfGeneral.confEvtTriggerSel, - ConfGeneral.confEvtOfflineCheck, confIsRun3, - ConfGeneral.confCentFT0Min, ConfGeneral.confCentFT0Max); + colCuts.setCuts(ConfGeneral.confEvtZvtx, ConfGeneral.confEvtTriggerCheck, ConfGeneral.confEvtTriggerSel, ConfGeneral.confEvtOfflineCheck, confIsRun3, ConfGeneral.confCentFT0Min, ConfGeneral.confCentFT0Max); colCuts.init(&qaRegistry); - trackCuts.setSelection(ConfTrkSelection.confTrkCharge, - femto_universe_track_selection::kSign, - femto_universe_selection::kEqual); - trackCuts.setSelection(ConfTrkSelection.confTrkPtmin, - femto_universe_track_selection::kpTMin, - femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkPtmax, - femto_universe_track_selection::kpTMax, - femto_universe_selection::kUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkEta, - femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCnclsMin, - femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCfCls, - femto_universe_track_selection::kTPCfClsMin, - femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCcRowsMin, - femto_universe_track_selection::kTPCcRowsMin, - femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCsCls, - femto_universe_track_selection::kTPCsClsMax, - femto_universe_selection::kUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkTPCfracsCls, - femto_universe_track_selection::kTPCfracsClsMax, - femto_universe_selection::kUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsMin, - femto_universe_track_selection::kITSnClsMin, - femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsIbMin, - femto_universe_track_selection::kITSnClsIbMin, - femto_universe_selection::kLowerLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkDCAxyMax, - femto_universe_track_selection::kDCAxyMax, - femto_universe_selection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkDCAzMax, - femto_universe_track_selection::kDCAzMax, - femto_universe_selection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkSelection.confTrkPIDnSigmaMax, - femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + trackCuts.setSelection(ConfTrkSelection.confTrkPtmin, femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkPtmax, femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkEta, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCnclsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCfCls, femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCcRowsMin, femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCsCls, femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkTPCfracsCls, femto_universe_track_selection::kTPCfracsClsMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsMin, femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkITSnclsIbMin, femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkDCAxyMax, femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkDCAzMax, femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkSelection.confTrkPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); trackCuts.setPIDSpecies(ConfTrkSelection.confTrkPIDspecies); - trackCuts.setnSigmaPIDOffset(confTrkPIDnSigmaOffsetTPC, - confTrkPIDnSigmaOffsetTOF); - trackCuts.init(&qaRegistry); + trackCuts.setnSigmaPIDOffset(confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); + trackCuts.init(&qaRegistry); /// \todo fix how to pass array to setSelection, getRow() passing a /// different type! // v0Cuts.setSelection(ConfV0Selection->getRow(0), - // femto_universe_v0_selection::kDecVtxMax, - // femto_universe_selection::kAbsUpperLimit); + // femto_universe_v0_selection::kDecVtxMax, femto_universe_selection::kAbsUpperLimit); if (ConfGeneral.confIsActivateV0) { // initializing for V0 - v0Cuts.setSelection(ConfV0Selection.confV0Sign, - femto_universe_v0_selection::kV0Sign, - femto_universe_selection::kEqual); - v0Cuts.setSelection(ConfV0Selection.confV0PtMin, - femto_universe_v0_selection::kV0pTMin, - femto_universe_selection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0PtMax, - femto_universe_v0_selection::kV0pTMax, - femto_universe_selection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0EtaMax, - femto_universe_v0_selection::kV0etaMax, - femto_universe_selection::kAbsUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0DCADaughMax, - femto_universe_v0_selection::kV0DCADaughMax, - femto_universe_selection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0CPAMin, - femto_universe_v0_selection::kV0CPAMin, - femto_universe_selection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0TranRadMin, - femto_universe_v0_selection::kV0TranRadMin, - femto_universe_selection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0TranRadMax, - femto_universe_v0_selection::kV0TranRadMax, - femto_universe_selection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0DecVtxMax, - femto_universe_v0_selection::kV0DecVtxMax, - femto_universe_selection::kUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, - ConfV0Selection.confChildCharge, - femto_universe_track_selection::kSign, - femto_universe_selection::kEqual); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, - ConfV0Selection.confChildEtaMax, - femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, - ConfV0Selection.confChildTPCnClsMin, - femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, - ConfV0Selection.confChildDCAMin, - femto_universe_track_selection::kDCAMin, - femto_universe_selection::kAbsLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, - ConfV0Selection.confChildPIDnSigmaMax, - femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, - ConfV0Selection.confChildCharge, - femto_universe_track_selection::kSign, - femto_universe_selection::kEqual); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, - ConfV0Selection.confChildEtaMax, - femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, - ConfV0Selection.confChildTPCnClsMin, - femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, - ConfV0Selection.confChildDCAMin, - femto_universe_track_selection::kDCAMin, - femto_universe_selection::kAbsLowerLimit); - v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, - ConfV0Selection.confChildPIDnSigmaMax, - femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); - v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kPosTrack, - ConfV0Selection.confChildPIDspecies); - v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kNegTrack, - ConfV0Selection.confChildPIDspecies); - v0Cuts.init(&qaRegistry); - v0Cuts.setInvMassLimits(ConfV0Selection.confV0InvMassLowLimit, - ConfV0Selection.confV0InvMassUpLimit); - - v0Cuts.setChildRejectNotPropagatedTracks( - femto_universe_v0_selection::kPosTrack, confTrkRejectNotPropagated); - v0Cuts.setChildRejectNotPropagatedTracks( - femto_universe_v0_selection::kNegTrack, confTrkRejectNotPropagated); + v0Cuts.setSelection(ConfV0Selection.confV0Sign, femto_universe_v0_selection::kV0Sign, femto_universe_selection::kEqual); + v0Cuts.setSelection(ConfV0Selection.confV0PtMin, femto_universe_v0_selection::kV0pTMin, femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0PtMax, femto_universe_v0_selection::kV0pTMax, femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0EtaMax, femto_universe_v0_selection::kV0etaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0DCADaughMax, femto_universe_v0_selection::kV0DCADaughMax, femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0CPAMin, femto_universe_v0_selection::kV0CPAMin, femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0TranRadMin, femto_universe_v0_selection::kV0TranRadMin, femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0TranRadMax, femto_universe_v0_selection::kV0TranRadMax, femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0DecVtxMax, femto_universe_v0_selection::kV0DecVtxMax, femto_universe_selection::kUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildDCAMin, femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildDCAMin, femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildPIDspecies); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildPIDspecies); + v0Cuts.init(&qaRegistry); + v0Cuts.setInvMassLimits(ConfV0Selection.confV0InvMassLowLimit, ConfV0Selection.confV0InvMassUpLimit); + + v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kPosTrack, confTrkRejectNotPropagated); + v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kNegTrack, confTrkRejectNotPropagated); v0Cuts.setnSigmaPIDOffsetTPC(confTrkPIDnSigmaOffsetTPC); - v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kPosTrack, - confTrkPIDnSigmaOffsetTPC, - confTrkPIDnSigmaOffsetTOF); - v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kNegTrack, - confTrkPIDnSigmaOffsetTPC, - confTrkPIDnSigmaOffsetTOF); + v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kPosTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); + v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kNegTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); if (ConfV0Selection.confV0RejectKaons) { - v0Cuts.setKaonInvMassLimits(ConfV0Selection.confV0InvKaonMassLowLimit, - ConfV0Selection.confV0InvKaonMassUpLimit); + v0Cuts.setKaonInvMassLimits(ConfV0Selection.confV0InvKaonMassLowLimit, ConfV0Selection.confV0InvKaonMassUpLimit); } // if (ConfRejectITSHitandTOFMissing) { // o2PhysicsTrackSelection = new @@ -1284,164 +652,56 @@ struct FemtoUniverseProducerTask { if (ConfGeneral.confIsActivateCascade) { // initializing for cascades - cascadeCuts.setSelection(ConfCascadeSelection.confCascSign, - femto_universe_cascade_selection::kCascadeSign, - femto_universe_selection::kEqual); - cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMin, - femto_universe_cascade_selection::kCascadepTMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMax, - femto_universe_cascade_selection::kCascadepTMax, - femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascEtaMax, - femto_universe_cascade_selection::kCascadeetaMax, - femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascSign, femto_universe_cascade_selection::kCascadeSign, femto_universe_selection::kEqual); + cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMin, femto_universe_cascade_selection::kCascadepTMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMax, femto_universe_cascade_selection::kCascadepTMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascEtaMax, femto_universe_cascade_selection::kCascadeetaMax, femto_universe_selection::kAbsUpperLimit); // v0 child cuts - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0DCADaughMax, - femto_universe_cascade_selection::kCascadeV0DCADaughMax, - femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0CPAMin, - femto_universe_cascade_selection::kCascadeV0CPAMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0TranRadMin, - femto_universe_cascade_selection::kCascadeV0TranRadMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0TranRadMax, - femto_universe_cascade_selection::kCascadeV0TranRadMax, - femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0DecVtxMax, - femto_universe_cascade_selection::kCascadeV0DecVtxMax, - femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DCADaughMax, femto_universe_cascade_selection::kCascadeV0DCADaughMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0CPAMin, femto_universe_cascade_selection::kCascadeV0CPAMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMin, femto_universe_cascade_selection::kCascadeV0TranRadMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMax, femto_universe_cascade_selection::kCascadeV0TranRadMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DecVtxMax, femto_universe_cascade_selection::kCascadeV0DecVtxMax, femto_universe_selection::kUpperLimit); // cascade cuts - cascadeCuts.setSelection( - ConfCascadeSelection.confCascDCADaughMax, - femto_universe_cascade_selection::kCascadeDCADaughMax, - femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascCPAMin, - femto_universe_cascade_selection::kCascadeCPAMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascTranRadMin, - femto_universe_cascade_selection::kCascadeTranRadMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascTranRadMax, - femto_universe_cascade_selection::kCascadeTranRadMax, - femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascDecVtxMax, - femto_universe_cascade_selection::kCascadeDecVtxMax, - femto_universe_selection::kUpperLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascDCAPosToPV, - femto_universe_cascade_selection::kCascadeDCAPosToPV, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascDCANegToPV, - femto_universe_cascade_selection::kCascadeDCANegToPV, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascDCABachToPV, - femto_universe_cascade_selection::kCascadeDCABachToPV, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascDCAV0ToPV, - femto_universe_cascade_selection::kCascadeDCAV0ToPV, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0MassLowLimit, - femto_universe_cascade_selection::kCascadeV0MassMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setSelection( - ConfCascadeSelection.confCascV0MassUpLimit, - femto_universe_cascade_selection::kCascadeV0MassMax, - femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCADaughMax, femto_universe_cascade_selection::kCascadeDCADaughMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascCPAMin, femto_universe_cascade_selection::kCascadeCPAMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMin, femto_universe_cascade_selection::kCascadeTranRadMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMax, femto_universe_cascade_selection::kCascadeTranRadMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDecVtxMax, femto_universe_cascade_selection::kCascadeDecVtxMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAPosToPV, femto_universe_cascade_selection::kCascadeDCAPosToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCANegToPV, femto_universe_cascade_selection::kCascadeDCANegToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCABachToPV, femto_universe_cascade_selection::kCascadeDCABachToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAV0ToPV, femto_universe_cascade_selection::kCascadeDCAV0ToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassLowLimit, femto_universe_cascade_selection::kCascadeV0MassMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassUpLimit, femto_universe_cascade_selection::kCascadeV0MassMax, femto_universe_selection::kUpperLimit); // children cuts - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, - ConfCascadeSelection.confCascChildCharge, - femto_universe_track_selection::kSign, - femto_universe_selection::kEqual); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, - ConfCascadeSelection.confCascChildEtaMax, - femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, - ConfCascadeSelection.confCascChildTPCnClsMin, - femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, - ConfCascadeSelection.confCascChildPIDnSigmaMax, - femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, - ConfCascadeSelection.confCascChildCharge, - femto_universe_track_selection::kSign, - femto_universe_selection::kEqual); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, - ConfCascadeSelection.confCascChildEtaMax, - femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, - ConfCascadeSelection.confCascChildTPCnClsMin, - femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, - ConfCascadeSelection.confCascChildPIDnSigmaMax, - femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, - ConfCascadeSelection.confCascChildCharge, - femto_universe_track_selection::kSign, - femto_universe_selection::kEqual); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, - ConfCascadeSelection.confCascChildEtaMax, - femto_universe_track_selection::kEtaMax, - femto_universe_selection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, - ConfCascadeSelection.confCascChildTPCnClsMin, - femto_universe_track_selection::kTPCnClsMin, - femto_universe_selection::kLowerLimit); - cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, - ConfCascadeSelection.confCascChildPIDnSigmaMax, - femto_universe_track_selection::kPIDnSigmaMax, - femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); // TODO - cascadeCuts.setChildPIDSpecies( - femto_universe_cascade_selection::kPosTrack, - ConfV0Selection.confChildPIDspecies); - cascadeCuts.setChildPIDSpecies( - femto_universe_cascade_selection::kNegTrack, - ConfV0Selection.confChildPIDspecies); - cascadeCuts.setChildPIDSpecies( - femto_universe_cascade_selection::kBachTrack, - ConfCascadeSelection.confCascChildPIDspecies); + cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kPosTrack, ConfV0Selection.confChildPIDspecies); + cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kNegTrack, ConfV0Selection.confChildPIDspecies); + cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildPIDspecies); // check if works correctly for bachelor track - cascadeCuts - .init( - &cascadeQaRegistry); + cascadeCuts.init(&cascadeQaRegistry); // invmass cuts - cascadeCuts.setInvMassLimits( - ConfCascadeSelection.confXiInvMassLowLimit, - ConfCascadeSelection.confOmegaInvMassLowLimit, - ConfCascadeSelection.confXiInvMassUpLimit, - ConfCascadeSelection.confOmegaInvMassUpLimit); + cascadeCuts.setInvMassLimits(ConfCascadeSelection.confXiInvMassLowLimit, ConfCascadeSelection.confOmegaInvMassLowLimit, ConfCascadeSelection.confXiInvMassUpLimit, ConfCascadeSelection.confOmegaInvMassUpLimit); } if (ConfGeneral.confIsActivatePhi) { // initializing for Phi meson - phiCuts.init(&qaRegistry); + phiCuts.init(&qaRegistry); } mRunNumber = 0; @@ -1451,18 +711,15 @@ struct FemtoUniverseProducerTask { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); - int64_t now = std::chrono::duration_cast( - std::chrono::system_clock::now().time_since_epoch()) - .count(); + int64_t now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); ccdb->setCreatedNotAfter(now); } - /// Function to retrieve the nominal magnetic field in kG (0.1T) and convert - /// it directly to T + /// Function to retrieve the nominal magnetic field in kG (0.1T) and convert it directly to T void getMagneticFieldTesla(aod::BCsWithTimestamps::iterator bc) { - // TODO done only once (and not per run). Will be replaced by - // CCDBConfigurable get magnetic field for run + // TODO done only once (and not per run). Will be replaced by CCDBConfigurable + // get magnetic field for run if (mRunNumber == bc.runNumber()) return; auto timestamp = bc.timestamp(); @@ -1470,102 +727,89 @@ struct FemtoUniverseProducerTask { if (confIsRun3 && !confIsForceGRP) { static o2::parameters::GRPMagField* grpo = nullptr; - grpo = ccdb->getForTimeStamp( - "GLO/Config/GRPMagField", timestamp); + grpo = ccdb->getForTimeStamp("GLO/Config/GRPMagField", timestamp); if (grpo == nullptr) { LOGF(fatal, "GRP object not found for timestamp %llu", timestamp); return; } - LOGF(info, "Retrieved GRP for timestamp %llu with L3 ", timestamp, - grpo->getL3Current()); - // taken from GRP onject definition of getnominalL3Field; update later to - // something smarter (mnominalL3Field = std::lround(5.f * mL3Current / - // 30000.f);) + LOGF(info, "Retrieved GRP for timestamp %llu with L3 ", timestamp, grpo->getL3Current()); + // taken from GRP onject definition of getnominalL3Field; update later to something smarter (mnominalL3Field = std::lround(5.f * mL3Current / 30000.f);) auto nominalL3Field = std::lround(5.f * grpo->getL3Current() / 30000.f); output = 0.1 * (nominalL3Field); } else { static o2::parameters::GRPObject* grpo = nullptr; - grpo = ccdb->getForTimeStamp("GLO/GRP/GRP", - timestamp); + grpo = ccdb->getForTimeStamp("GLO/GRP/GRP", timestamp); if (grpo == nullptr) { LOGF(fatal, "GRP object not found for timestamp %llu", timestamp); return; } - LOGF(info, - "Retrieved GRP for timestamp %llu with magnetic field of %d kG", - timestamp, grpo->getNominalL3Field()); + LOGF(info, "Retrieved GRP for timestamp %llu with magnetic field of %d kG", timestamp, grpo->getNominalL3Field()); output = 0.1 * (grpo->getNominalL3Field()); } mMagField = output; mRunNumber = bc.runNumber(); } - template + template void fillDebugParticle(ParticleType const& particle) { if constexpr (isTrackOrV0) { - if constexpr (std::experimental::is_detected::value) { - outputDebugParts( - particle.sign(), (uint8_t)particle.tpcNClsFound(), - particle.tpcNClsFindable(), (uint8_t)particle.tpcNClsCrossedRows(), - particle.tpcNClsShared(), particle.tpcFractionSharedCls(), - particle.tpcInnerParam(), particle.itsNCls(), - particle.itsNClsInnerBarrel(), particle.dcaXY(), particle.dcaZ(), - particle.tpcSignal(), particle.tpcNSigmaStoreEl(), - particle.tpcNSigmaStorePi(), particle.tpcNSigmaStoreKa(), - particle.tpcNSigmaStorePr(), particle.tpcNSigmaStoreDe(), - particle.tofNSigmaStoreEl(), particle.tofNSigmaStorePi(), - particle.tofNSigmaStoreKa(), particle.tofNSigmaStorePr(), - particle.tofNSigmaStoreDe(), particle.tofNSigmaLaPr(), - particle.tofNSigmaLaPi(), particle.tofNSigmaALaPr(), - particle.tofNSigmaALaPi(), particle.tofNSigmaK0PiPlus(), - particle.tofNSigmaK0PiMinus()); + if constexpr (std::experimental::is_detected::value) { + outputDebugParts(particle.sign(), (uint8_t)particle.tpcNClsFound(), + particle.tpcNClsFindable(), + (uint8_t)particle.tpcNClsCrossedRows(), + particle.tpcNClsShared(), particle.tpcFractionSharedCls(), particle.tpcInnerParam(), + particle.itsNCls(), particle.itsNClsInnerBarrel(), + particle.dcaXY(), particle.dcaZ(), particle.tpcSignal(), + particle.tpcNSigmaStoreEl(), particle.tpcNSigmaStorePi(), + particle.tpcNSigmaStoreKa(), particle.tpcNSigmaStorePr(), + particle.tpcNSigmaStoreDe(), particle.tofNSigmaStoreEl(), + particle.tofNSigmaStorePi(), particle.tofNSigmaStoreKa(), + particle.tofNSigmaStorePr(), particle.tofNSigmaStoreDe(), + particle.tofNSigmaLaPr(), particle.tofNSigmaLaPi(), particle.tofNSigmaALaPr(), + particle.tofNSigmaALaPi(), particle.tofNSigmaK0PiPlus(), particle.tofNSigmaK0PiMinus()); } else { - outputDebugParts( - particle.sign(), (uint8_t)particle.tpcNClsFound(), - particle.tpcNClsFindable(), (uint8_t)particle.tpcNClsCrossedRows(), - particle.tpcNClsShared(), particle.tpcFractionSharedCls(), - particle.tpcInnerParam(), particle.itsNCls(), - particle.itsNClsInnerBarrel(), particle.dcaXY(), particle.dcaZ(), - particle.tpcSignal(), particle.tpcNSigmaStoreEl(), - particle.tpcNSigmaStorePi(), particle.tpcNSigmaStoreKa(), - particle.tpcNSigmaStorePr(), particle.tpcNSigmaStoreDe(), - particle.tofNSigmaStoreEl(), particle.tofNSigmaStorePi(), - particle.tofNSigmaStoreKa(), particle.tofNSigmaStorePr(), - particle.tofNSigmaStoreDe(), -999., -999., -999., -999., -999., - -999.); + outputDebugParts(particle.sign(), (uint8_t)particle.tpcNClsFound(), + particle.tpcNClsFindable(), + (uint8_t)particle.tpcNClsCrossedRows(), + particle.tpcNClsShared(), particle.tpcFractionSharedCls(), particle.tpcInnerParam(), + particle.itsNCls(), particle.itsNClsInnerBarrel(), + particle.dcaXY(), particle.dcaZ(), particle.tpcSignal(), + particle.tpcNSigmaStoreEl(), particle.tpcNSigmaStorePi(), + particle.tpcNSigmaStoreKa(), particle.tpcNSigmaStorePr(), + particle.tpcNSigmaStoreDe(), particle.tofNSigmaStoreEl(), + particle.tofNSigmaStorePi(), particle.tofNSigmaStoreKa(), + particle.tofNSigmaStorePr(), particle.tofNSigmaStoreDe(), + -999., -999., -999., -999., -999., -999.); } } else if constexpr (isPhiOrD0) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999.); // QA for phi or D0/D0bar children } else if constexpr (isCasc) { - if constexpr (std::experimental::is_detected::value) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., -999., - particle.tofNSigmaXiLaPi(), particle.tofNSigmaXiLaPr(), - particle.tofNSigmaXiPi(), particle.tofNSigmaOmLaPi(), + if constexpr (std::experimental::is_detected::value) { + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999., -999., particle.tofNSigmaXiLaPi(), + particle.tofNSigmaXiLaPr(), particle.tofNSigmaXiPi(), particle.tofNSigmaOmLaPi(), particle.tofNSigmaOmLaPr(), particle.tofNSigmaOmKa(), particle.dcacascdaughters(), particle.cascradius(), particle.x(), particle.y(), particle.z(), -999.); } else { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., particle.dcacascdaughters(), particle.cascradius(), particle.x(), particle.y(), particle.z(), -999.); } } else { // LOGF(info, "isTrack0orV0: %d, isPhi: %d", isTrackOrV0, isPhiOrD0); - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., - -999., particle.dcav0topv(), -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., + particle.dcav0topv(), -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., particle.dcaV0daughters(), particle.v0radius(), particle.x(), particle.y(), particle.z(), particle.mK0Short()); // QA for v0 @@ -1576,28 +820,30 @@ struct FemtoUniverseProducerTask { void fillDebugD0D0barML(ParticleType const& particle) { if constexpr (isD0ML) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., + -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0()[0], // getter decayVtxX particle.mlProbD0()[1], // getter decayVtxY particle.mlProbD0()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else if constexpr (isD0barML) { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., + -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0bar()[0], // getter decayVtxX particle.mlProbD0bar()[1], // getter decayVtxY particle.mlProbD0bar()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999.); + -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999.); } } @@ -1614,29 +860,30 @@ struct FemtoUniverseProducerTask { } if constexpr (isD0ML) { outputDebugParts(particle.flagMcMatchRec(), // getter sign - originMcReco, -999., -999., -999., -999., -999., -999., + originMcReco, -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., + -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0()[0], // getter decayVtxX particle.mlProbD0()[1], // getter decayVtxY particle.mlProbD0()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else if constexpr (isD0barML) { - outputDebugParts(particle.flagMcMatchRec(), -999., -999., -999., -999., - -999., -999., -999., -999., originMcReco, -999., -999., - -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., + outputDebugParts(particle.flagMcMatchRec(), -999., -999., -999., -999., -999., -999., -999., -999., + originMcReco, -999., -999., -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., + -999., hfHelper.yD0(particle), // getter transRadius particle.mlProbD0bar()[0], // getter decayVtxX particle.mlProbD0bar()[1], // getter decayVtxY particle.mlProbD0bar()[2], // getter decayVtxZ -999.); // Additional info for D0/D0bar } else { - outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999., -999., -999., -999., -999., + outputDebugParts(-999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., - -999., -999., -999., -999.); + -999., -999., -999., -999., -999., + -999., -999., -999., -999., -999., -999.); } } @@ -1646,9 +893,7 @@ struct FemtoUniverseProducerTask { if (particle.isPhysicalPrimary()) { return 0; } else if (particle.has_mothers()) { - if (particle.getProcess() == 20 || - particle.getProcess() == 23) { // treat particles from hadronic - // scattering (20, 23) as primary + if (particle.getProcess() == 20 || particle.getProcess() == 23) { // treat particles from hadronic scattering (20, 23) as primary return 0; } auto motherparticlesMC = particle.template mothers_as(); @@ -1666,39 +911,31 @@ struct FemtoUniverseProducerTask { } template - void fillMCParticle(ParticleType const& particle, - o2::aod::femtouniverseparticle::ParticleType fdparttype) + void fillMCParticle(ParticleType const& particle, o2::aod::femtouniverseparticle::ParticleType fdparttype) { if (particle.has_mcParticle()) { // get corresponding MC particle and its info auto particleMC = particle.mcParticle(); auto pdgCode = particleMC.pdgCode(); int particleOrigin = 99; - auto motherparticlesMC = - particleMC.template mothers_as(); + auto motherparticlesMC = particleMC.template mothers_as(); - if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || - std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { + if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { if (particleMC.isPhysicalPrimary()) { - particleOrigin = - aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else if (!motherparticlesMC.empty()) { auto motherparticleMC = motherparticlesMC.front(); if (motherparticleMC.producedByGenerator()) { - particleOrigin = - checkDaughterType(fdparttype, motherparticleMC.pdgCode()); + particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode()); } else { - particleOrigin = aod::femtouniverse_mc_particle:: - ParticleOriginMCTruth::kMaterial; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kMaterial; } } } else { - particleOrigin = - aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } - outputPartsMC(particleOrigin, pdgCode, particleMC.pt(), particleMC.eta(), - particleMC.phi()); + outputPartsMC(particleOrigin, pdgCode, particleMC.pt(), particleMC.eta(), particleMC.phi()); fillDebugParticleMC(particleMC); outputPartsMCLabels(outputPartsMC.lastIndex()); } else { @@ -1708,19 +945,15 @@ struct FemtoUniverseProducerTask { } template - void - fillMCTruthParticle(MCParticleType const& mcparticle, - o2::aod::femtouniverseparticle::ParticleType fdparttype) + void fillMCTruthParticle(MCParticleType const& mcparticle, o2::aod::femtouniverseparticle::ParticleType fdparttype) { auto pdgCode = mcparticle.pdgCode(); int particleOrigin = 99; // Determine particle origin - if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || - std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { + if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { if (mcparticle.isPhysicalPrimary()) { - particleOrigin = - aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else { auto mothers = mcparticle.template mothers_as(); if (!mothers.empty()) { @@ -1728,28 +961,24 @@ struct FemtoUniverseProducerTask { if (mother.producedByGenerator()) { particleOrigin = checkDaughterType(fdparttype, mother.pdgCode()); } else { - particleOrigin = aod::femtouniverse_mc_particle:: - ParticleOriginMCTruth::kMaterial; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kMaterial; } } } } else { - particleOrigin = - aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } // Fill MC companion tables - outputPartsMC(particleOrigin, pdgCode, mcparticle.pt(), mcparticle.eta(), - mcparticle.phi()); + outputPartsMC(particleOrigin, pdgCode, mcparticle.pt(), mcparticle.eta(), mcparticle.phi()); fillDebugParticleMC(mcparticle); outputPartsMCLabels(outputPartsMC.lastIndex()); - // Artificial fill of a debug table -- solves conflicts between FDParticles - // and FDExtParticles tables - outputDebugParts(-111., -111., -111., -111., -111., -111., -111., -111., + // Artificial fill of a debug table -- solves conflicts between FDParticles and FDExtParticles tables + outputDebugParts(-111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., -111., - -111., -111., -111., -111., -111., -111., -111., -111., - -111., -111., -111., -111.); + -111., -111., -111., -111., -111., + -111., -111., -111., -111., -111., -111.); } template @@ -1766,45 +995,32 @@ struct FemtoUniverseProducerTask { auto motherskaon1MC = kaon1MC.template mothers_as(); auto motherskaon2MC = kaon2MC.template mothers_as(); - if (std::abs(pdgCode1) == std::abs(321) || - std::abs(pdgCode2) == std::abs(-321)) { - if ((kaon1MC.isPhysicalPrimary() && kaon2MC.isPhysicalPrimary()) && - (!motherskaon1MC.empty() && !motherskaon2MC.empty())) { + if (std::abs(pdgCode1) == std::abs(321) || std::abs(pdgCode2) == std::abs(-321)) { + if ((kaon1MC.isPhysicalPrimary() && kaon2MC.isPhysicalPrimary()) && (!motherskaon1MC.empty() && !motherskaon2MC.empty())) { for (const auto& particleMotherOfNeg : motherskaon1MC) { for (const auto& particleMotherOfPos : motherskaon2MC) { - if (particleMotherOfNeg == particleMotherOfPos && - particleMotherOfNeg.pdgCode() == Pdg::kPhi) { - phiOrigin = aod::femtouniverse_mc_particle:: - ParticleOriginMCTruth::kPrimary; + if (particleMotherOfNeg == particleMotherOfPos && particleMotherOfNeg.pdgCode() == Pdg::kPhi) { + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else { - phiOrigin = aod::femtouniverse_mc_particle:: - ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } } } } else { - phiOrigin = - aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } } else { - phiOrigin = - aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } TLorentzVector part1Vec; TLorentzVector part2Vec; - const auto mMassOne = - o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service - // of the common header - const auto mMassTwo = - o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service - // of the common header + const auto mMassOne = o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service of the common header + const auto mMassTwo = o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service of the common header - part1Vec.SetPtEtaPhiM(kaon1MC.pt(), kaon1MC.eta(), kaon1MC.phi(), - mMassOne); - part2Vec.SetPtEtaPhiM(kaon2MC.pt(), kaon2MC.eta(), kaon2MC.phi(), - mMassTwo); + part1Vec.SetPtEtaPhiM(kaon1MC.pt(), kaon1MC.eta(), kaon1MC.phi(), mMassOne); + part2Vec.SetPtEtaPhiM(kaon2MC.pt(), kaon2MC.eta(), kaon2MC.phi(), mMassTwo); TLorentzVector sumVec(part1Vec); sumVec += part2Vec; @@ -1850,26 +1066,16 @@ struct FemtoUniverseProducerTask { if (zorroMask.value != "") { auto bc = col.template bc_as(); initZorro(bc); - if (!zorro.isSelected( - col.template bc_as().globalBC())) + if (!zorro.isSelected(col.template bc_as().globalBC())) return false; } if (!ConfGeneral.confIsUsePileUp) { - outputCollision(vtxZ, mult, multNtr, - confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, - mMagField); + outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); colCuts.fillQA(col); return true; - } else if ((!ConfGeneral.confEvNoSameBunchPileup || - col.selection_bit(aod::evsel::kNoSameBunchPileup)) && - (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || - col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && - (!ConfGeneral.confEvIsVertexITSTPC || - col.selection_bit(aod::evsel::kIsVertexITSTPC))) { - outputCollision(vtxZ, mult, multNtr, - confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, - mMagField); + } else if ((!ConfGeneral.confEvNoSameBunchPileup || col.selection_bit(aod::evsel::kNoSameBunchPileup)) && (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && (!ConfGeneral.confEvIsVertexITSTPC || col.selection_bit(aod::evsel::kIsVertexITSTPC))) { + outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); colCuts.fillQA(col); return true; } else { @@ -1904,20 +1110,11 @@ struct FemtoUniverseProducerTask { return false; } if (!ConfGeneral.confIsUsePileUp) { - outputCollision(vtxZ, mult, multNtr, - confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, - mMagField); + outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); colCuts.fillQA(col); return true; - } else if ((!ConfGeneral.confEvNoSameBunchPileup || - col.selection_bit(aod::evsel::kNoSameBunchPileup)) && - (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || - col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && - (!ConfGeneral.confEvIsVertexITSTPC || - col.selection_bit(aod::evsel::kIsVertexITSTPC))) { - outputCollision(vtxZ, mult, multNtr, - confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, - mMagField); + } else if ((!ConfGeneral.confEvNoSameBunchPileup || col.selection_bit(aod::evsel::kNoSameBunchPileup)) && (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && (!ConfGeneral.confEvIsVertexITSTPC || col.selection_bit(aod::evsel::kIsVertexITSTPC))) { + outputCollision(vtxZ, mult, multNtr, confDoSpher ? colCuts.computeSphericity(col, tracks) : 2, mMagField); colCuts.fillQA(col); return true; } else { @@ -1926,8 +1123,7 @@ struct FemtoUniverseProducerTask { } template - void fillMCTruthCollisions(CollisionType const& col, - TrackType const& tracks) + void fillMCTruthCollisions(CollisionType const& col, TrackType const& tracks) { for (const auto& c : col) { const auto vtxZ = c.posZ(); @@ -1939,8 +1135,7 @@ struct FemtoUniverseProducerTask { } if (confDoSpher) { - outputCollision(vtxZ, mult, multNtr, - colCuts.computeSphericity(col, tracks), mMagField); + outputCollision(vtxZ, mult, multNtr, colCuts.computeSphericity(col, tracks), mMagField); } else { outputCollision(vtxZ, mult, multNtr, 2, mMagField); } @@ -1981,29 +1176,18 @@ struct FemtoUniverseProducerTask { // in case of trigger run - store such collisions but don't store any // particle candidates for such collisions - if (!colCuts.isSelectedRun3(col) || - (occupancy < ConfGeneral.confTPCOccupancyMin || - occupancy > ConfGeneral.confTPCOccupancyMax)) { + if (!colCuts.isSelectedRun3(col) || (occupancy < ConfGeneral.confTPCOccupancyMin || occupancy > ConfGeneral.confTPCOccupancyMax)) { return false; } else { - if ((!ConfGeneral.confEvNoSameBunchPileup || - col.selection_bit(aod::evsel::kNoSameBunchPileup)) && - (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || - col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && - (!ConfGeneral.confIsGoodITSLayersAll || - col.selection_bit(aod::evsel::kIsGoodITSLayersAll)) && - (!ConfGeneral.confNoCollInRofStandard || - col.selection_bit(aod::evsel::kNoCollInRofStandard)) && - (!ConfGeneral.confNoHighMultCollInPrevRof || - col.selection_bit(aod::evsel::kNoHighMultCollInPrevRof)) && - (!ConfGeneral.confEvIsVertexITSTPC || - col.selection_bit(aod::evsel::kIsVertexITSTPC)) && - (!ConfGeneral.confNoCollInTimeRangeStandard || - col.selection_bit(aod::evsel::kNoCollInTimeRangeStandard)) && - (!ConfGeneral.confNoITSROFrameBorder || - col.selection_bit(aod::evsel::kNoITSROFrameBorder)) && - (!ConfGeneral.confNoTimeFrameBorder || - col.selection_bit(aod::evsel::kNoTimeFrameBorder))) { + if ((!ConfGeneral.confEvNoSameBunchPileup || col.selection_bit(aod::evsel::kNoSameBunchPileup)) && + (!ConfGeneral.confEvIsGoodZvtxFT0vsPV || col.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && + (!ConfGeneral.confIsGoodITSLayersAll || col.selection_bit(aod::evsel::kIsGoodITSLayersAll)) && + (!ConfGeneral.confNoCollInRofStandard || col.selection_bit(aod::evsel::kNoCollInRofStandard)) && + (!ConfGeneral.confNoHighMultCollInPrevRof || col.selection_bit(aod::evsel::kNoHighMultCollInPrevRof)) && + (!ConfGeneral.confEvIsVertexITSTPC || col.selection_bit(aod::evsel::kIsVertexITSTPC)) && + (!ConfGeneral.confNoCollInTimeRangeStandard || col.selection_bit(aod::evsel::kNoCollInTimeRangeStandard)) && + (!ConfGeneral.confNoITSROFrameBorder || col.selection_bit(aod::evsel::kNoITSROFrameBorder)) && + (!ConfGeneral.confNoTimeFrameBorder || col.selection_bit(aod::evsel::kNoTimeFrameBorder))) { outputCollision(vtxZ, cent, multNtr, 2, mMagField); return true; } else { @@ -2033,31 +1217,22 @@ struct FemtoUniverseProducerTask { } template - void fillTracksITSTPCTOF(TrackType const& tracks) + void fillTracks(TrackType const& tracks) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index for (const auto& track : tracks) { /// if the most open selection criteria are not fulfilled there is no /// point looking further at the track - if (!trackCuts.isSelectedMinimal(track)) { continue; } - if (track.tpcChi2NCl() < ConfTrkSelection.confTrkMinChi2PerClusterTPC || - track.tpcChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterTPC) { + if (track.tpcChi2NCl() < ConfTrkSelection.confTrkMinChi2PerClusterTPC || track.tpcChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterTPC) { continue; } - if (track.itsChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterITS) { - continue; - } - if ((ConfTrkSelection.confTrkTPCRefit && !track.hasTPC()) || - (ConfTrkSelection.confTrkITSRefit && !track.hasITS())) { + if (ConfTrkSelection.confTrkTPCRefit && !track.hasTPC()) { continue; } @@ -2070,53 +1245,52 @@ struct FemtoUniverseProducerTask { trackCuts.fillQA(track); // the bit-wise container of the systematic variations is obtained - auto cutContainerITS = trackCuts.getCutContainerWithITS< - aod::femtouniverseparticle::CutContainerType>(track); + auto cutContainer = trackCuts.getCutContainer(track); // now the table is filled - outputParts( - outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), - aod::femtouniverseparticle::ParticleType::kTrack, - cutContainerITS.at( - femto_universe_track_selection::TrackContainerPosition::kCuts), - cutContainerITS.at( - femto_universe_track_selection::TrackContainerPosition::kPID), - track.dcaXY(), childIDs, 0, - track.sign()); // sign getter is mAntiLambda() + outputParts(outputCollision.lastIndex(), track.pt(), track.eta(), + track.phi(), aod::femtouniverseparticle::ParticleType::kTrack, + cutContainer.at( + femto_universe_track_selection::TrackContainerPosition::kCuts), + confIsUseCutculator ? cutContainer.at( + femto_universe_track_selection::TrackContainerPosition::kPID) + : PIDBitmask(track), + track.dcaXY(), childIDs, + track.hasTOF(), // hasTOF getter is mLambda() + track.sign()); // sign getter is mAntiLambda() tmpIDtrack.push_back(track.globalIndex()); - fillDebugParticle(track); - outputDebugITSParts(track.itsNSigmaEl(), track.itsNSigmaPi(), - track.itsNSigmaKa(), track.itsNSigmaPr(), - track.itsNSigmaDe()); + if (confIsDebug) { + fillDebugParticle(track); + } + if constexpr (isMC) { - fillMCParticle(track, - o2::aod::femtouniverseparticle::ParticleType::kTrack); + fillMCParticle(track, o2::aod::femtouniverseparticle::ParticleType::kTrack); } } } template - void fillTracks(TrackType const& tracks) + void fillTracksITSTPCTOF(TrackType const& tracks) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index for (const auto& track : tracks) { /// if the most open selection criteria are not fulfilled there is no /// point looking further at the track + if (!trackCuts.isSelectedMinimal(track)) { continue; } - if (track.tpcChi2NCl() < ConfTrkSelection.confTrkMinChi2PerClusterTPC || - track.tpcChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterTPC) { + if (track.tpcChi2NCl() < ConfTrkSelection.confTrkMinChi2PerClusterTPC || track.tpcChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterTPC) { continue; } - if (ConfTrkSelection.confTrkTPCRefit && !track.hasTPC()) { + if (track.itsChi2NCl() > ConfTrkSelection.confTrkMaxChi2PerClusterITS) { + continue; + } + if ((ConfTrkSelection.confTrkTPCRefit && !track.hasTPC()) || (ConfTrkSelection.confTrkITSRefit && !track.hasITS())) { continue; } @@ -2126,49 +1300,36 @@ struct FemtoUniverseProducerTask { } } - trackCuts.fillQA(track); + trackCuts.fillQA(track); // the bit-wise container of the systematic variations is obtained - auto cutContainer = - trackCuts - .getCutContainer( - track); + auto cutContainerITS = trackCuts.getCutContainerWithITS(track); // now the table is filled - outputParts( - outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), - aod::femtouniverseparticle::ParticleType::kTrack, - cutContainer.at( - femto_universe_track_selection::TrackContainerPosition::kCuts), - confIsUseCutculator - ? cutContainer.at(femto_universe_track_selection:: - TrackContainerPosition::kPID) - : PIDBitmask(track), - track.dcaXY(), childIDs, - track.hasTOF(), // hasTOF getter is mLambda() - track.sign()); // sign getter is mAntiLambda() + outputParts(outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), + aod::femtouniverseparticle::ParticleType::kTrack, + cutContainerITS.at( + femto_universe_track_selection::TrackContainerPosition::kCuts), + cutContainerITS.at( + femto_universe_track_selection::TrackContainerPosition::kPID), + track.dcaXY(), childIDs, 0, + track.sign()); // sign getter is mAntiLambda() tmpIDtrack.push_back(track.globalIndex()); - if (confIsDebug) { - fillDebugParticle(track); - } + fillDebugParticle(track); + outputDebugITSParts(track.itsNSigmaEl(), track.itsNSigmaPi(), + track.itsNSigmaKa(), track.itsNSigmaPr(), + track.itsNSigmaDe()); if constexpr (isMC) { - fillMCParticle(track, - o2::aod::femtouniverseparticle::ParticleType::kTrack); + fillMCParticle(track, o2::aod::femtouniverseparticle::ParticleType::kTrack); } } } - template - void fillV0(CollisionType const& col, V0Type const& fullV0s, - TrackType const&) + template + void fillV0(CollisionType const& col, V0Type const& fullV0s, TrackType const&) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index for (const auto& v0 : fullV0s) { auto postrack = v0.template posTrack_as(); auto negtrack = v0.template negTrack_as(); @@ -2191,66 +1352,63 @@ struct FemtoUniverseProducerTask { // TrackSelection::TrackCuts::kITSHits); // } - v0Cuts.fillQA( - col, v0, postrack, negtrack); ///\todo fill QA also for daughters - auto cutContainerV0 = - v0Cuts.getCutContainer( - col, v0, postrack, negtrack); + v0Cuts.fillQA(col, v0, postrack, negtrack); ///\todo fill QA also for daughters + auto cutContainerV0 = v0Cuts.getCutContainer(col, v0, postrack, negtrack); int postrackID = v0.posTrackId(); int rowInPrimaryTrackTablePos = -1; rowInPrimaryTrackTablePos = getRowDaughters(postrackID, tmpIDtrack); childIDs[0] = rowInPrimaryTrackTablePos; childIDs[1] = 0; - outputParts( - outputCollision.lastIndex(), v0.positivept(), v0.positiveeta(), - v0.positivephi(), aod::femtouniverseparticle::ParticleType::kV0Child, - cutContainerV0.at( - femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - confIsUseCutculator - ? cutContainerV0.at( - femto_universe_v0_selection::V0ContainerPosition::kPosPID) - : PIDBitmask(postrack), - 0., childIDs, 0, postrack.sign()); + outputParts(outputCollision.lastIndex(), v0.positivept(), + v0.positiveeta(), v0.positivephi(), + aod::femtouniverseparticle::ParticleType::kV0Child, + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + confIsUseCutculator ? cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID) : PIDBitmask(postrack), + 0., + childIDs, + 0, + postrack.sign()); const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(postrack, - o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kV0Child); } int negtrackID = v0.negTrackId(); int rowInPrimaryTrackTableNeg = -1; rowInPrimaryTrackTableNeg = getRowDaughters(negtrackID, tmpIDtrack); childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts( - outputCollision.lastIndex(), v0.negativept(), v0.negativeeta(), - v0.negativephi(), aod::femtouniverseparticle::ParticleType::kV0Child, - cutContainerV0.at( - femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - confIsUseCutculator - ? cutContainerV0.at( - femto_universe_v0_selection::V0ContainerPosition::kNegPID) - : PIDBitmask(negtrack), - 0., childIDs, 0, negtrack.sign()); + outputParts(outputCollision.lastIndex(), + v0.negativept(), + v0.negativeeta(), + v0.negativephi(), + aod::femtouniverseparticle::ParticleType::kV0Child, + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + confIsUseCutculator ? cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID) : PIDBitmask(negtrack), + 0., + childIDs, + 0, + negtrack.sign()); const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negtrack, - o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kV0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), v0.pt(), v0.eta(), v0.phi(), + outputParts(outputCollision.lastIndex(), + v0.pt(), + v0.eta(), + v0.phi(), aod::femtouniverseparticle::ParticleType::kV0, - cutContainerV0.at( - femto_universe_v0_selection::V0ContainerPosition::kV0), - PIDStrangeTOFBitmaskV0(v0), v0.v0cosPA(), indexChildID, - v0.mLambda(), v0.mAntiLambda()); + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kV0), + PIDStrangeTOFBitmaskV0(v0), + v0.v0cosPA(), + indexChildID, + v0.mLambda(), + v0.mAntiLambda()); if (confIsDebug) { - fillDebugParticle( - postrack); // QA for positive daughter - fillDebugParticle( - negtrack); // QA for negative daughter - fillDebugParticle(v0); // QA for v0 + fillDebugParticle(postrack); // QA for positive daughter + fillDebugParticle(negtrack); // QA for negative daughter + fillDebugParticle(v0); // QA for v0 } if constexpr (isMC) { fillMCParticle(v0, o2::aod::femtouniverseparticle::ParticleType::kV0); @@ -2265,9 +1423,7 @@ struct FemtoUniverseProducerTask { if (mc.pdgCode() != ConfV0Selection.confV0PDGMCTruth.value[2]) continue; // Artificially single out V0s - auto daughters = mc.template daughters_as< - aod::McParticles>(); // Access daughters (no differentiation of signs, - // it needs to be checked separately) + auto daughters = mc.template daughters_as(); // Access daughters (no differentiation of signs, it needs to be checked separately) bool foundPos = false, foundNeg = false; @@ -2275,31 +1431,39 @@ struct FemtoUniverseProducerTask { int rowPos = 0; int rowNeg = 0; - for (auto const& d : daughters) { // Loop over daughters - if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth - .value[0]) { // Check for a positive child + for (auto const& d : daughters) { // Loop over daughters + if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth.value[0]) { // Check for a positive child foundPos = true; - outputParts(outputCollision.lastIndex(), d.pt(), d.eta(), d.phi(), + outputParts(outputCollision.lastIndex(), + d.pt(), + d.eta(), + d.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - 0, 0, d.pdgCode(), + 0, + 0, + d.pdgCode(), childIDs, // {0, 0} - 0, 0); + 0, + 0); rowPos = outputParts.lastIndex(); - fillMCTruthParticle( - d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); - } else if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth - .value[1]) { // Check for a negative child + fillMCTruthParticle(d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + } else if (d.pdgCode() == ConfV0Selection.confV0PDGMCTruth.value[1]) { // Check for a negative child foundNeg = true; - outputParts(outputCollision.lastIndex(), d.pt(), d.eta(), d.phi(), + outputParts(outputCollision.lastIndex(), + d.pt(), + d.eta(), + d.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - 0, 0, d.pdgCode(), + 0, + 0, + d.pdgCode(), childIDs, // {0, 0} - 0, 0); + 0, + 0); rowNeg = outputParts.lastIndex(); - fillMCTruthParticle( - d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + fillMCTruthParticle(d, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); } } @@ -2308,11 +1472,18 @@ struct FemtoUniverseProducerTask { childIDs[0] = rowPos; childIDs[1] = rowNeg; - outputParts(outputCollision.lastIndex(), mc.pt(), mc.eta(), mc.phi(), - aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 0, 0, - mc.pdgCode(), childIDs, 0, 0); - fillMCTruthParticle( - mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + outputParts(outputCollision.lastIndex(), + mc.pt(), + mc.eta(), + mc.phi(), + aod::femtouniverseparticle::ParticleType::kMCTruthTrack, + 0, + 0, + mc.pdgCode(), + childIDs, + 0, + 0); + fillMCTruthParticle(mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); } } @@ -2321,9 +1492,7 @@ struct FemtoUniverseProducerTask { { for (const auto& mc : mcParticles) { // Loop over all MC Truth particles if (ConfFilterCuts.confIsApplyTrkCutMCTruth) { - if (std::abs(mc.eta()) > ConfFilterCuts.confEtaFilterCut || - mc.pt() < ConfFilterCuts.confPtLowFilterCut || - mc.pt() > ConfFilterCuts.confPtHighFilterCut) { + if (std::abs(mc.eta()) > ConfFilterCuts.confEtaFilterCut || mc.pt() < ConfFilterCuts.confPtLowFilterCut || mc.pt() > ConfFilterCuts.confPtHighFilterCut) { continue; } } @@ -2335,39 +1504,38 @@ struct FemtoUniverseProducerTask { } std::vector childIDs = {0, 0}; - outputParts(outputCollision.lastIndex(), mc.pt(), mc.eta(), mc.phi(), - aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 0, 0, - mc.pdgCode(), childIDs, 0, 0); - fillMCTruthParticle( - mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + outputParts(outputCollision.lastIndex(), + mc.pt(), + mc.eta(), + mc.phi(), + aod::femtouniverseparticle::ParticleType::kMCTruthTrack, + 0, + 0, + mc.pdgCode(), + childIDs, + 0, + 0); + fillMCTruthParticle(mc, aod::femtouniverseparticle::ParticleType::kMCTruthTrack); } } - template - void fillCascade(CollisionType const& col, CascadeType const& fullCascades, - TrackType const&) + template + void fillCascade(CollisionType const& col, CascadeType const& fullCascades, TrackType const&) { - std::vector childIDs = {0, 0, - 0}; // child1, child2, bachelor; these IDs are - // necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + std::vector childIDs = {0, 0, 0}; // child1, child2, bachelor; these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index for (const auto& casc : fullCascades) { const auto& posTrackCasc = casc.template posTrack_as(); const auto& negTrackCasc = casc.template negTrack_as(); const auto& bachTrackCasc = casc.template bachelor_as(); - if (!cascadeCuts.isSelectedMinimal(col, casc, posTrackCasc, negTrackCasc, - bachTrackCasc)) { + if (!cascadeCuts.isSelectedMinimal(col, casc, posTrackCasc, negTrackCasc, bachTrackCasc)) { continue; } cascadeCuts.fillCascadeQA(col, casc, posTrackCasc, negTrackCasc); - cascadeCuts.fillQA(col, casc, posTrackCasc, negTrackCasc, - bachTrackCasc); // fill QA for daughters + cascadeCuts.fillQA(col, casc, posTrackCasc, negTrackCasc, bachTrackCasc); // fill QA for daughters int postrackID = casc.posTrackId(); int rowInPrimaryTrackTablePos = -1; @@ -2376,15 +1544,20 @@ struct FemtoUniverseProducerTask { childIDs[1] = 0; // neg childIDs[2] = 0; // bachelor float hasTOF = posTrackCasc.hasTOF() ? 1 : 0; - outputParts(outputCollision.lastIndex(), casc.positivept(), - casc.positiveeta(), casc.positivephi(), - aod::femtouniverseparticle::ParticleType::kV0Child, 0, - PIDBitmask(posTrackCasc), hasTOF, childIDs, 0, + outputParts(outputCollision.lastIndex(), + casc.positivept(), + casc.positiveeta(), + casc.positivephi(), + aod::femtouniverseparticle::ParticleType::kV0Child, + 0, + PIDBitmask(posTrackCasc), + hasTOF, + childIDs, + 0, posTrackCasc.sign()); const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(posTrackCasc, - o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(posTrackCasc, o2::aod::femtouniverseparticle::ParticleType::kV0Child); } int negtrackID = casc.negTrackId(); int rowInPrimaryTrackTableNeg = -1; @@ -2393,15 +1566,20 @@ struct FemtoUniverseProducerTask { childIDs[1] = rowInPrimaryTrackTableNeg; // neg childIDs[2] = 0; // bachelor hasTOF = negTrackCasc.hasTOF() ? 1 : 0; - outputParts(outputCollision.lastIndex(), casc.negativept(), - casc.negativeeta(), casc.negativephi(), - aod::femtouniverseparticle::ParticleType::kV0Child, 0, - PIDBitmask(negTrackCasc), hasTOF, childIDs, 0, + outputParts(outputCollision.lastIndex(), + casc.negativept(), + casc.negativeeta(), + casc.negativephi(), + aod::femtouniverseparticle::ParticleType::kV0Child, + 0, + PIDBitmask(negTrackCasc), + hasTOF, + childIDs, + 0, negTrackCasc.sign()); const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(negTrackCasc, - o2::aod::femtouniverseparticle::ParticleType::kV0Child); + fillMCParticle(negTrackCasc, o2::aod::femtouniverseparticle::ParticleType::kV0Child); } // bachelor int bachtrackID = casc.bachelorId(); @@ -2411,64 +1589,67 @@ struct FemtoUniverseProducerTask { childIDs[1] = 0; // neg childIDs[2] = rowInPrimaryTrackTableBach; // bachelor hasTOF = bachTrackCasc.hasTOF() ? 1 : 0; - outputParts(outputCollision.lastIndex(), casc.bachelorpt(), - casc.bacheloreta(), casc.bachelorphi(), - aod::femtouniverseparticle::ParticleType::kCascadeBachelor, 0, - PIDBitmask(bachTrackCasc), hasTOF, childIDs, 0, + outputParts(outputCollision.lastIndex(), + casc.bachelorpt(), + casc.bacheloreta(), + casc.bachelorphi(), + aod::femtouniverseparticle::ParticleType::kCascadeBachelor, + 0, + PIDBitmask(bachTrackCasc), + hasTOF, + childIDs, + 0, bachTrackCasc.sign()); const int rowOfBachTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - bachTrackCasc, - o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor); + fillMCParticle(bachTrackCasc, o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor); } // cascade - std::vector indexCascChildID = {rowOfPosTrack, rowOfNegTrack, - rowOfBachTrack}; - outputParts(outputCollision.lastIndex(), casc.pt(), casc.eta(), + std::vector indexCascChildID = {rowOfPosTrack, rowOfNegTrack, rowOfBachTrack}; + outputParts(outputCollision.lastIndex(), + casc.pt(), + casc.eta(), casc.phi(), - aod::femtouniverseparticle::ParticleType::kCascade, 0, - PIDStrangeTOFBitmaskCasc(casc), 0, indexCascChildID, - casc.mXi(), casc.mOmega()); - outputCascParts(outputCollision.lastIndex(), outputParts.lastIndex(), + aod::femtouniverseparticle::ParticleType::kCascade, + 0, + PIDStrangeTOFBitmaskCasc(casc), + 0, + indexCascChildID, + casc.mXi(), + casc.mOmega()); + outputCascParts(outputCollision.lastIndex(), + outputParts.lastIndex(), casc.dcaV0daughters(), casc.v0cosPA(col.posX(), col.posY(), col.posZ()), casc.v0radius(), casc.casccosPA(col.posX(), col.posY(), col.posZ()), - casc.dcacascdaughters(), casc.cascradius(), - casc.dcapostopv(), casc.dcanegtopv(), casc.dcabachtopv(), + casc.dcacascdaughters(), + casc.cascradius(), + casc.dcapostopv(), + casc.dcanegtopv(), + casc.dcabachtopv(), casc.dcav0topv(col.posX(), col.posY(), col.posZ())); if (confIsDebug) { - fillDebugParticle( - posTrackCasc); // QA for positive daughter - fillDebugParticle( - negTrackCasc); // QA for negative daughter - fillDebugParticle( - bachTrackCasc); // QA for negative daughter - fillDebugParticle(casc); // QA for cascade + fillDebugParticle(posTrackCasc); // QA for positive daughter + fillDebugParticle(negTrackCasc); // QA for negative daughter + fillDebugParticle(bachTrackCasc); // QA for negative daughter + fillDebugParticle(casc); // QA for cascade } if constexpr (isMC) { - fillMCParticle(casc, - o2::aod::femtouniverseparticle::ParticleType::kCascade); + fillMCParticle(casc, o2::aod::femtouniverseparticle::ParticleType::kCascade); } } } - template - void fillD0D0barData(CollisionType const&, TrackType const&, - HfCandidate const& hfCands) - { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + template + void fillD0D0barData(CollisionType const&, TrackType const&, HfCandidate const& hfCands) + { + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index double invMassD0 = 0.0; double invMassD0bar = 0.0; bool isD0D0bar = false; - uint8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), - // -1 (daugh of D0bar) + uint8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 (daugh of D0bar) for (const auto& hfCand : hfCands) { @@ -2476,13 +1657,11 @@ struct FemtoUniverseProducerTask { continue; } - if (ConfD0Selection.useYCutD0Cand && - std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { + if (ConfD0Selection.useYCutD0Cand && std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { continue; } - if (!(ConfD0Selection.useYCutD0Cand) && - std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { + if (!(ConfD0Selection.useYCutD0Cand) && std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { continue; } @@ -2522,22 +1701,20 @@ struct FemtoUniverseProducerTask { } if (isD0D0bar) { - outputParts( - outputCollision.lastIndex(), hfCand.ptProng0(), - RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), - hfCand.pzProng0()}), // eta - RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), - -999, childIDs, - postrack.sign(), // D0 mass -> positive daughter of D0/D0bar - daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 - // decay + outputParts(outputCollision.lastIndex(), + hfCand.ptProng0(), + RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta + RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), + -999, + childIDs, + postrack.sign(), // D0 mass -> positive daughter of D0/D0bar + daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 decay const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } // int negtrackID = hfCand.prong1().globalIndex(); int negtrackID = hfCand.prong1Id(); @@ -2546,62 +1723,56 @@ struct FemtoUniverseProducerTask { childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts( - outputCollision.lastIndex(), hfCand.ptProng1(), - RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), - hfCand.pzProng1()}), // eta - RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), - -999, childIDs, - negtrack.sign(), // negative daughter of D0/D0bar - daughFlag); // sign that the daugh is from D0 or D0 decay + outputParts(outputCollision.lastIndex(), + hfCand.ptProng1(), + RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta + RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), + -999, + childIDs, + negtrack.sign(), // negative daughter of D0/D0bar + daughFlag); // sign that the daugh is from D0 or D0 decay const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), hfCand.pt(), hfCand.eta(), - hfCand.phi(), aod::femtouniverseparticle::ParticleType::kD0, + outputParts(outputCollision.lastIndex(), + hfCand.pt(), + hfCand.eta(), + hfCand.phi(), + aod::femtouniverseparticle::ParticleType::kD0, -999, // cut, CutContainerType -999, // PID, CutContainerType - -999., indexChildID, + -999., + indexChildID, invMassD0, // D0 mass (mLambda) invMassD0bar); // D0bar mass (mAntiLambda) if (confIsDebug) { - fillDebugParticle( - postrack); // QA for positive daughter - fillDebugParticle( - negtrack); // QA for negative daughter - fillDebugParticle(hfCand); // QA for D0/D0bar + fillDebugParticle(postrack); // QA for positive daughter + fillDebugParticle(negtrack); // QA for negative daughter + fillDebugParticle(hfCand); // QA for D0/D0bar } if constexpr (isMC) { - fillMCParticle(hfCand, - o2::aod::femtouniverseparticle::ParticleType::kD0); + fillMCParticle(hfCand, o2::aod::femtouniverseparticle::ParticleType::kD0); } } } } - template - void fillD0D0barDataMl(CollisionType const&, TrackType const&, - HfCandidate const& hfCands) - { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + template + void fillD0D0barDataMl(CollisionType const&, TrackType const&, HfCandidate const& hfCands) + { + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index double invMassD0 = 0.0; double invMassD0bar = 0.0; bool isD0D0bar = false; - int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 - // (daugh of D0bar) + int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 (daugh of D0bar) for (const auto& hfCand : hfCands) { @@ -2609,13 +1780,11 @@ struct FemtoUniverseProducerTask { continue; } - if (ConfD0Selection.useYCutD0Cand && - std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { + if (ConfD0Selection.useYCutD0Cand && std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { continue; } - if (!(ConfD0Selection.useYCutD0Cand) && - std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { + if (!(ConfD0Selection.useYCutD0Cand) && std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { continue; } @@ -2654,22 +1823,20 @@ struct FemtoUniverseProducerTask { } if (isD0D0bar) { - outputParts( - outputCollision.lastIndex(), hfCand.ptProng0(), - RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), - hfCand.pzProng0()}), // eta - RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), - -999, childIDs, - postrack.sign(), // D0 mass -> positive daughter of D0/D0bar - daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 - // decay + outputParts(outputCollision.lastIndex(), + hfCand.ptProng0(), + RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta + RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), + -999, + childIDs, + postrack.sign(), // D0 mass -> positive daughter of D0/D0bar + daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 decay const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } // int negtrackID = hfCand.prong1().globalIndex(); int negtrackID = hfCand.prong1Id(); @@ -2678,26 +1845,28 @@ struct FemtoUniverseProducerTask { childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts( - outputCollision.lastIndex(), hfCand.ptProng1(), - RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), - hfCand.pzProng1()}), // eta - RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), - -999, childIDs, - negtrack.sign(), // negative daughter of D0/D0bar - daughFlag); // sign that the daugh is from D0 or D0 decay + outputParts(outputCollision.lastIndex(), + hfCand.ptProng1(), + RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta + RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), + -999, + childIDs, + negtrack.sign(), // negative daughter of D0/D0bar + daughFlag); // sign that the daugh is from D0 or D0 decay const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), hfCand.pt(), hfCand.eta(), - hfCand.phi(), aod::femtouniverseparticle::ParticleType::kD0, + outputParts(outputCollision.lastIndex(), + hfCand.pt(), + hfCand.eta(), + hfCand.phi(), + aod::femtouniverseparticle::ParticleType::kD0, -999, // cut, CutContainerType -999, // PID, CutContainerType -999., // tempFitVar @@ -2706,10 +1875,8 @@ struct FemtoUniverseProducerTask { invMassD0bar); // D0bar mass (mAntiLambda) if (confIsDebug) { - fillDebugParticle( - postrack); // QA for positive daughter - fillDebugParticle( - negtrack); // QA for negative daughter + fillDebugParticle(postrack); // QA for positive daughter + fillDebugParticle(negtrack); // QA for negative daughter if (hfCand.isSelD0() == 1) { fillDebugD0D0barML(hfCand); // QA for D0/D0bar } else if (hfCand.isSelD0bar() == 1) { @@ -2725,23 +1892,17 @@ struct FemtoUniverseProducerTask { } } - template - void fillD0D0barMcMl(CollisionType const&, TrackType const&, - HfCandidate const& hfCands, McPart const& mcParticles) + template + void fillD0D0barMcMl(CollisionType const&, TrackType const&, HfCandidate const& hfCands, McPart const& mcParticles) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index double invMassD0 = 0.0; double invMassD0bar = 0.0; bool isD0D0bar = false; int indexMcRec = -1; int8_t sign = 0; - int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 - // (daugh of D0bar) + int8_t daughFlag = 0; // flag = 0 (daugh of D0 or D0bar), 1 (daug of D0), -1 (daugh of D0bar) for (const auto& hfCand : hfCands) { @@ -2751,13 +1912,11 @@ struct FemtoUniverseProducerTask { } } - if (ConfD0Selection.useYCutD0Cand && - std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { + if (ConfD0Selection.useYCutD0Cand && std::abs(hfHelper.yD0(hfCand)) > ConfD0Selection.yD0CandMax) { continue; } - if (!(ConfD0Selection.useYCutD0Cand) && - std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { + if (!(ConfD0Selection.useYCutD0Cand) && std::abs(hfCand.eta()) > ConfD0Selection.trackD0CandEtaMax) { continue; } @@ -2765,17 +1924,13 @@ struct FemtoUniverseProducerTask { auto postrack = hfCand.template prong0_as(); auto negtrack = hfCand.template prong1_as(); auto arrayDaughters = std::array{postrack, negtrack}; - indexMcRec = RecoDecay::getMatchedMCRec( - mcParticles, arrayDaughters, Pdg::kD0, std::array{+kPiPlus, -kKPlus}, - true, &sign); + indexMcRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kD0, std::array{+kPiPlus, -kKPlus}, true, &sign); if (!ConfD0Selection.fillCorrBkgsD0 && !(indexMcRec > -1)) { continue; } - if ((std::abs(hfCand.flagMcMatchRec()) == - o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) || - (ConfD0Selection.fillCorrBkgsD0 && hfCand.flagMcMatchRec() != 0)) { + if ((std::abs(hfCand.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) || (ConfD0Selection.fillCorrBkgsD0 && hfCand.flagMcMatchRec() != 0)) { int postrackID = hfCand.prong0Id(); // Index to first prong int rowInPrimaryTrackTablePos = -1; rowInPrimaryTrackTablePos = getRowDaughters(postrackID, tmpIDtrack); @@ -2809,23 +1964,20 @@ struct FemtoUniverseProducerTask { } if (isD0D0bar) { - outputParts( - outputCollision.lastIndex(), hfCand.ptProng0(), - RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), - hfCand.pzProng0()}), // eta - RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), - -999, childIDs, - postrack.sign(), // D0 mass -> positive daughter of D0/D0bar - daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 - // decay + outputParts(outputCollision.lastIndex(), + hfCand.ptProng0(), + RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta + RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), + -999, + childIDs, + postrack.sign(), // D0 mass -> positive daughter of D0/D0bar + daughFlag); // D0bar mass -> sign that the daugh is from D0 or D0 decay const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - postrack, - o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle(postrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } // int negtrackID = hfCand.prong1().globalIndex(); int negtrackID = hfCand.prong1Id(); @@ -2834,26 +1986,26 @@ struct FemtoUniverseProducerTask { childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts( - outputCollision.lastIndex(), hfCand.ptProng1(), - RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), - hfCand.pzProng1()}), // eta - RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi - aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), - -999, childIDs, - negtrack.sign(), // negative daughter of D0/D0bar - daughFlag); // sign that the daugh is from D0 or D0 decay + outputParts(outputCollision.lastIndex(), + hfCand.ptProng1(), + RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta + RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi + aod::femtouniverseparticle::ParticleType::kD0Child, + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), + -999, + childIDs, + negtrack.sign(), // negative daughter of D0/D0bar + daughFlag); // sign that the daugh is from D0 or D0 decay const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle( - negtrack, - o2::aod::femtouniverseparticle::ParticleType::kD0Child); + fillMCParticle(negtrack, o2::aod::femtouniverseparticle::ParticleType::kD0Child); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), hfCand.pt(), hfCand.eta(), + outputParts(outputCollision.lastIndex(), + hfCand.pt(), + hfCand.eta(), hfCand.phi(), aod::femtouniverseparticle::ParticleType::kD0, -999, // cut, CutContainerType @@ -2864,10 +2016,8 @@ struct FemtoUniverseProducerTask { invMassD0bar); // D0bar mass (mAntiLambda) if (confIsDebug) { - fillDebugParticle( - postrack); // QA for positive daughter - fillDebugParticle( - negtrack); // QA for negative daughter + fillDebugParticle(postrack); // QA for positive daughter + fillDebugParticle(negtrack); // QA for negative daughter if (hfCand.isSelD0() == 1) { fillDebugD0D0barMcMl(hfCand); // QA for D0/D0bar } else if (hfCand.isSelD0bar() == 1) { @@ -2877,13 +2027,9 @@ struct FemtoUniverseProducerTask { } } if constexpr (isMC) { - auto particleMother = - mcParticles.rawIteratorAt(indexMcRec); // gen. level pT - auto yGen = - RecoDecay::y(particleMother.pVector(), - o2::constants::physics::MassD0); // gen. level y - outputPartsMC(0, particleMother.pdgCode(), particleMother.pt(), - yGen, particleMother.phi()); + auto particleMother = mcParticles.rawIteratorAt(indexMcRec); // gen. level pT + auto yGen = RecoDecay::y(particleMother.pVector(), o2::constants::physics::MassD0); // gen. level y + outputPartsMC(0, particleMother.pdgCode(), particleMother.pt(), yGen, particleMother.phi()); outputPartsMCLabels(outputPartsMC.lastIndex()); } } @@ -2894,16 +2040,11 @@ struct FemtoUniverseProducerTask { template void fillPhi(CollisionType const& col, TrackType const& tracks) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children - std::vector - tmpIDtrack; // this vector keeps track of the matching of the primary - // track table row <-> aod::track table global index + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children + std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index // lorentz vectors and filling the tables - for (const auto& [p1, p2] : - combinations(soa::CombinationsFullIndexPolicy(tracks, tracks))) { - if (!trackCuts.isSelectedMinimal(p1) || - !trackCuts.isSelectedMinimal(p1)) { + for (const auto& [p1, p2] : combinations(soa::CombinationsFullIndexPolicy(tracks, tracks))) { + if (!trackCuts.isSelectedMinimal(p1) || !trackCuts.isSelectedMinimal(p1)) { continue; } if ((!(p1.sign() == 1)) || (!(p2.sign() == -1))) { @@ -2911,60 +2052,35 @@ struct FemtoUniverseProducerTask { } // implementing PID cuts for phi children if (ConfPhiSelection.confPhiDoLFPID4Kaons) { - if ((p1.isGlobalTrackWoDCA() == false) || - (p2.isGlobalTrackWoDCA() == false) || - (p1.isPVContributor() == false) || - (p2.isPVContributor() == false)) { + if ((p1.isGlobalTrackWoDCA() == false) || (p2.isGlobalTrackWoDCA() == false) || (p1.isPVContributor() == false) || (p2.isPVContributor() == false)) { continue; } - if (!(isKaonNSigmaLF(p1.pt(), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), - p1.hasTOF()))) { + if (!(isKaonNSigmaLF(p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), p1.hasTOF()))) { continue; } - if (!(isKaonNSigmaLF(p2.pt(), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), - p2.hasTOF()))) { + if (!(isKaonNSigmaLF(p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), p2.hasTOF()))) { continue; } } else { - if (!(isKaonNSigma(p1.pt(), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon)))) { + if (!(isKaonNSigma(p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon)))) { continue; } - if (!(isKaonNSigma(p2.pt(), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon)))) { + if (!(isKaonNSigma(p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon)))) { continue; } } - if (isKaonRejected(p1.p(), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion))) { + if (isKaonRejected(p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion))) { continue; } - if (isKaonRejected(p2.p(), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion))) { + if (isKaonRejected(p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion))) { continue; } TLorentzVector part1Vec; TLorentzVector part2Vec; - const auto mMassOne = - o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service - // of the common header - const auto mMassTwo = - o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service - // of the common header + const auto mMassOne = o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service of the common header + const auto mMassTwo = o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service of the common header part1Vec.SetPtEtaPhiM(p1.pt(), p1.eta(), p1.phi(), mMassOne); part2Vec.SetPtEtaPhiM(p2.pt(), p2.eta(), p2.phi(), mMassTwo); @@ -2978,21 +2094,17 @@ struct FemtoUniverseProducerTask { } float phiPt = sumVec.Pt(); - if ((phiPt < ConfPhiSelection.confPhiPtLowLimit.value) || - (phiPt > ConfPhiSelection.confPhiPtHighLimit.value)) { + if ((phiPt < ConfPhiSelection.confPhiPtLowLimit.value) || (phiPt > ConfPhiSelection.confPhiPtHighLimit.value)) { continue; } float phiPhi = RecoDecay::constrainAngle(sumVec.Phi(), 0); float phiM = sumVec.M(); - if ((phiM < ConfPhiSelection.confPhiInvMassLowLimit) || - (phiM > ConfPhiSelection.confPhiInvMassUpLimit)) + if ((phiM < ConfPhiSelection.confPhiInvMassLowLimit) || (phiM > ConfPhiSelection.confPhiInvMassUpLimit)) continue; - phiCuts.fillQA( - col, p1, p1, p2, 321, -321); ///\todo fill QA also for daughters + phiCuts.fillQA(col, p1, p1, p2, 321, -321); ///\todo fill QA also for daughters int postrackID = p1.globalIndex(); int rowInPrimaryTrackTablePos = -1; // does it do anything? @@ -3000,46 +2112,52 @@ struct FemtoUniverseProducerTask { childIDs[0] = rowInPrimaryTrackTablePos; childIDs[1] = 0; - outputParts(outputCollision.lastIndex(), p1.pt(), p1.eta(), p1.phi(), + outputParts(outputCollision.lastIndex(), p1.pt(), + p1.eta(), p1.phi(), aod::femtouniverseparticle::ParticleType::kPhiChild, -999, // cutContainer -999, // cutContainer p1.dcaXY(), // tempFitVar - childIDs, 0, p1.sign()); + childIDs, + 0, + p1.sign()); const int rowOfPosTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(p1, - o2::aod::femtouniverseparticle::ParticleType::kPhiChild); + fillMCParticle(p1, o2::aod::femtouniverseparticle::ParticleType::kPhiChild); } int negtrackID = p2.globalIndex(); int rowInPrimaryTrackTableNeg = -1; rowInPrimaryTrackTableNeg = getRowDaughters(negtrackID, tmpIDtrack); childIDs[0] = 0; childIDs[1] = rowInPrimaryTrackTableNeg; - outputParts(outputCollision.lastIndex(), p2.pt(), p2.eta(), p2.phi(), + outputParts(outputCollision.lastIndex(), + p2.pt(), + p2.eta(), + p2.phi(), aod::femtouniverseparticle::ParticleType::kPhiChild, -999, // cutContainer -999, // cutContainer p2.dcaXY(), // tempFitVar - childIDs, 0, + childIDs, + 0, p2.sign()); // sign, workaround for now const int rowOfNegTrack = outputParts.lastIndex(); if constexpr (isMC) { - fillMCParticle(p2, - o2::aod::femtouniverseparticle::ParticleType::kPhiChild); + fillMCParticle(p2, o2::aod::femtouniverseparticle::ParticleType::kPhiChild); } std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; - outputParts( - outputCollision.lastIndex(), phiPt, phiEta, phiPhi, - aod::femtouniverseparticle::ParticleType::kPhi, - -999, // cutContainer - 0, - phiM, // tempFitVar - indexChildID, - phiM, // phi.mLambda(), //for now it will have a mLambda getter, maybe - // we will change it in the future so it's more logical - 0); // phi.mAntiLambda() <- sign + outputParts(outputCollision.lastIndex(), + phiPt, + phiEta, + phiPhi, + aod::femtouniverseparticle::ParticleType::kPhi, + -999, // cutContainer + 0, + phiM, // tempFitVar + indexChildID, + phiM, // phi.mLambda(), //for now it will have a mLambda getter, maybe we will change it in the future so it's more logical + 0); // phi.mAntiLambda() <- sign if (confIsDebug) { fillDebugParticle(p1); // QA for positive daughter @@ -3052,47 +2170,34 @@ struct FemtoUniverseProducerTask { } } - template - void fillParticles(TrackType const& tracks, - std::optional>> - recoMcIds = std::nullopt) + template + void fillParticles(TrackType const& tracks, std::optional>> recoMcIds = std::nullopt) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children std::vector tmpIDtrack; for (const auto& particle : tracks) { /// if the most open selection criteria are not fulfilled there is no /// point looking further at the track - if (particle.eta() < -ConfFilterCuts.confEtaFilterCut || - particle.eta() > ConfFilterCuts.confEtaFilterCut) + if (particle.eta() < -ConfFilterCuts.confEtaFilterCut || particle.eta() > ConfFilterCuts.confEtaFilterCut) continue; - if (particle.pt() < ConfFilterCuts.confPtLowFilterCut || - particle.pt() > ConfFilterCuts.confPtHighFilterCut) + if (particle.pt() < ConfFilterCuts.confPtLowFilterCut || particle.pt() > ConfFilterCuts.confPtHighFilterCut) continue; uint32_t pdgCode = static_cast(particle.pdgCode()); if (ConfGeneral.confMCTruthAnalysisWithPID) { bool pass = false; - std::vector tmpPDGCodes = - ConfGeneral.confMCTruthPDGCodes; // necessary due to some features - // of the Configurable + std::vector tmpPDGCodes = ConfGeneral.confMCTruthPDGCodes; // necessary due to some features of the Configurable for (auto const& pdg : tmpPDGCodes) { if (static_cast(pdg) == static_cast(pdgCode)) { - if (pdgCode == Pdg::kPhi) { // && (recoMcIds && - // recoMcIds->get().contains(particle.globalIndex()))) - // { // ATTENTION: all Phi mesons are - // NOT primary particles + if (pdgCode == Pdg::kPhi) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles pass = true; } else if (pdgCode == Pdg::kD0) { pass = true; } else { - if (confStoreMCmothers || particle.isPhysicalPrimary() || - (ConfGeneral.confActivateSecondaries && recoMcIds && - recoMcIds->get().contains(particle.globalIndex()))) + if (confStoreMCmothers || particle.isPhysicalPrimary() || (ConfGeneral.confActivateSecondaries && recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) pass = true; } } @@ -3109,12 +2214,10 @@ struct FemtoUniverseProducerTask { // trackCuts.fillQA(track); // the bit-wise container of the systematic variations is obtained - // auto cutContainer = - // trackCuts.getCutContainer(track); + // auto cutContainer = trackCuts.getCutContainer(track); // instead of the bitmask, the PDG of the particle is stored as uint32_t - int32_t variablePDG = - confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); + int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0; // now the table is filled @@ -3125,10 +2228,17 @@ struct FemtoUniverseProducerTask { if (ConfGeneral.confIsActivateCascade) childIDs.push_back(0); - outputParts(outputCollision.lastIndex(), particle.pt(), particle.eta(), + outputParts(outputCollision.lastIndex(), + particle.pt(), + particle.eta(), particle.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - variableCut, pdgCode, variablePDG, childIDs, 0, 0); + variableCut, + pdgCode, + variablePDG, + childIDs, + 0, + 0); if (confIsDebug) { fillDebugParticle(particle); @@ -3150,11 +2260,8 @@ struct FemtoUniverseProducerTask { minDaughs = 3ul; } for (std::size_t i = 0; i < tmpIDtrack.size(); i++) { - const auto& particle = - tracks.iteratorAt(tmpIDtrack[i] - tracks.begin().globalIndex()); - for (int daughIndex = 0, - n = std::min(minDaughs, particle.daughtersIds().size()); - daughIndex < n; daughIndex++) { + const auto& particle = tracks.iteratorAt(tmpIDtrack[i] - tracks.begin().globalIndex()); + for (int daughIndex = 0, n = std::min(minDaughs, particle.daughtersIds().size()); daughIndex < n; daughIndex++) { // loop to find the corresponding index of the daughters for (std::size_t j = 0; j < tmpIDtrack.size(); j++) { if (tmpIDtrack[j] == particle.daughtersIds()[daughIndex]) { @@ -3164,15 +2271,20 @@ struct FemtoUniverseProducerTask { } } - int32_t variablePDG = - confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); + int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode(); int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0; - outputParts(outputCollision.lastIndex(), particle.pt(), particle.eta(), + outputParts(outputCollision.lastIndex(), + particle.pt(), + particle.eta(), particle.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - variableCut, static_cast(particle.pdgCode()), - variablePDG, childIDs, 0, 0); + variableCut, + static_cast(particle.pdgCode()), + variablePDG, + childIDs, + 0, + 0); if (confIsDebug) { fillDebugParticle(particle); @@ -3191,23 +2303,19 @@ struct FemtoUniverseProducerTask { template void fillMCTruthParticlesD0(TrackType const& mcParts) { - std::vector childIDs = { - 0, 0}; // these IDs are necessary to keep track of the children + std::vector childIDs = {0, 0}; // these IDs are necessary to keep track of the children std::vector tmpIDtrack; for (const auto& particle : mcParts) { - if (particle.pt() < ConfD0Selection.trackD0pTGenMin || - particle.pt() > ConfD0Selection.trackD0pTGenMax) + if (particle.pt() < ConfD0Selection.trackD0pTGenMin || particle.pt() > ConfD0Selection.trackD0pTGenMax) continue; int pdgCode = particle.pdgCode(); if (ConfGeneral.confMCTruthAnalysisWithPID) { bool pass = false; - std::vector tmpPDGCodes = - ConfGeneral.confMCTruthPDGCodes; // necessary due to some features - // of the Configurable + std::vector tmpPDGCodes = ConfGeneral.confMCTruthPDGCodes; // necessary due to some features of the Configurable for (auto const& pdg : tmpPDGCodes) { if (static_cast(pdg) == static_cast(pdgCode)) { if (pdgCode == Pdg::kPhi) { @@ -3228,10 +2336,7 @@ struct FemtoUniverseProducerTask { int8_t sign = 0; int8_t origin = -99; int8_t mcGenFlag = -99; - if (std::abs(particle.pdgCode()) == Pdg::kD0 && - !RecoDecay::isMatchedMCGen(mcParts, particle, Pdg::kD0, - std::array{+kPiPlus, -kKPlus}, true, - &sign)) { + if (std::abs(particle.pdgCode()) == Pdg::kD0 && !RecoDecay::isMatchedMCGen(mcParts, particle, Pdg::kD0, std::array{+kPiPlus, -kKPlus}, true, &sign)) { /// check if we have D0(bar) → π± K∓ continue; } @@ -3249,12 +2354,16 @@ struct FemtoUniverseProducerTask { } } - outputParts(outputCollision.lastIndex(), particle.pt(), particle.eta(), + outputParts(outputCollision.lastIndex(), + particle.pt(), + particle.eta(), particle.phi(), aod::femtouniverseparticle::ParticleType::kMCTruthTrack, - -999., pdgCode, + -999., + pdgCode, pdgCode, // getter tempFitVar - childIDs, mcGenFlag, + childIDs, + mcGenFlag, origin); // D0(bar) origin if (confIsDebug) { @@ -3272,9 +2381,7 @@ struct FemtoUniverseProducerTask { template - bool fillCollisionsAndTracksAndV0AndPhi(CollisionType const& col, - TrackType const& tracks, - V0Type const& fullV0s) + bool fillCollisionsAndTracksAndV0AndPhi(CollisionType const& col, TrackType const& tracks, V0Type const& fullV0s) { const auto colcheck = fillCollisions(col, tracks); if (colcheck) { @@ -3299,8 +2406,7 @@ struct FemtoUniverseProducerTask { // fill the tables fillCollisionsAndTracksAndV0AndPhi(col, tracks, fullV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processFullData, - "Provide experimental data", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processFullData, "Provide experimental data", false); void processTrackV0(aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, @@ -3312,14 +2418,12 @@ struct FemtoUniverseProducerTask { // fill the tables fillCollisionsAndTracksAndV0AndPhi(col, tracks, fullV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0, - "Provide experimental data for track v0", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0, "Provide experimental data for track v0", false); - void - processTrackCascadeData(aod::FemtoFullCollision const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - o2::aod::CascDatas const& fullCascades) + void processTrackCascadeData(aod::FemtoFullCollision const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + o2::aod::CascDatas const& fullCascades) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -3330,14 +2434,13 @@ struct FemtoUniverseProducerTask { fillCascade(col, fullCascades, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCascadeData, - "Provide experimental data for track cascades", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCascadeData, "Provide experimental data for track cascades", false); - void processTrackV0Cascade( - aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - soa::Join const& fullV0s, - soa::Join const& fullCascades) + void processTrackV0Cascade(aod::FemtoFullCollision const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + soa::Join const& fullV0s, + soa::Join const& fullCascades) { getMagneticFieldTesla(col.bc_as()); const auto colcheck = fillCollisions(col, tracks); @@ -3351,8 +2454,7 @@ struct FemtoUniverseProducerTask { } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0Cascade, - "Provide experimental data for track, v0 and cascades", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0Cascade, "Provide experimental data for track, v0 and cascades", false); /*void processTrackV0CentRun3(aod::FemtoFullCollisionCentRun3 const& col, aod::BCsWithTimestamps const&, @@ -3366,27 +2468,27 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); fillV0(col, fullV0s, tracks); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0CentRun3, "Provide - experimental data for track v0", false);*/ + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0CentRun3, "Provide experimental data for track v0", false);*/ - void processFullMC( - aod::FemtoFullCollisionMC const& col, aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, aod::McParticles const&, - soa::Join const& fullV0s) + void processFullMC(aod::FemtoFullCollisionMC const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, + aod::McParticles const&, + soa::Join const& fullV0s) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); // fill the tables fillCollisionsAndTracksAndV0AndPhi(col, tracks, fullV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMC, - "Provide MC data (tracks, V0, Phi)", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMC, "Provide MC data (tracks, V0, Phi)", false); - void processTrackMC( - aod::FemtoFullCollisionMC const& col, aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, aod::McParticles const&) + void processTrackMC(aod::FemtoFullCollisionMC const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, + aod::McParticles const&) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -3396,13 +2498,13 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMC, - "Provide MC data for track analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMC, "Provide MC data for track analysis", false); - void processTrackPhiMC( - aod::FemtoFullCollisionMC const& col, aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, aod::McParticles const&) + void processTrackPhiMC(aod::FemtoFullCollisionMC const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, + aod::McParticles const&) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -3413,8 +2515,7 @@ struct FemtoUniverseProducerTask { fillPhi(col, tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackPhiMC, - "Provide MC data for track Phi analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackPhiMC, "Provide MC data for track Phi analysis", false); void processTrackData(aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, @@ -3471,10 +2572,10 @@ struct FemtoUniverseProducerTask { PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackPhiData, "Provide experimental data for track phi", false); - void processTrackD0mesonData( - aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - soa::Join const& candidates) + void processTrackD0mesonData(aod::FemtoFullCollision const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + soa::Join const& candidates) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -3491,8 +2592,7 @@ struct FemtoUniverseProducerTask { void processTrackD0DataML(aod::FemtoFullCollision const& col, aod::BCsWithTimestamps const&, soa::Filtered const& tracks, - soa::Join const& candidates) + soa::Join const& candidates) { // get magnetic field for run getMagneticFieldTesla(col.bc_as()); @@ -3503,24 +2603,20 @@ struct FemtoUniverseProducerTask { fillD0D0barDataMl(col, tracks, candidates); } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processTrackD0DataML, - "Provide experimental data for track D0 meson using ML selection for D0s", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackD0DataML, + "Provide experimental data for track D0 meson using ML selection for D0s", false); - void processTrackMCTruth( - aod::McCollision const&, - soa::SmallGroups> const& collisions, - aod::McParticles const& mcParticles, aod::BCsWithTimestamps const&) + void processTrackMCTruth(aod::McCollision const&, + soa::SmallGroups> const& collisions, + aod::McParticles const& mcParticles, + aod::BCsWithTimestamps const&) { // magnetic field for run not needed for mc truth // fill the tables fillMCTruthCollisions(collisions, mcParticles); fillParticles(mcParticles); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCTruth, - "Provide MC data for MC truth track analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCTruth, "Provide MC data for MC truth track analysis", false); void processTrackMCGen(aod::McCollision const& col, aod::McParticles const& mcParticles) @@ -3528,30 +2624,25 @@ struct FemtoUniverseProducerTask { outputCollision(col.posZ(), 0, 0, 2, 0); fillParticles(mcParticles); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCGen, - "Provide MC Generated for model comparisons", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackMCGen, "Provide MC Generated for model comparisons", false); template using HasBachelor = decltype(std::declval().bachelorphi()); Preslice perMCCollision = aod::mcparticle::mcCollisionId; - PresliceUnsorted> - recoCollsPerMCColl = aod::mcparticle::mcCollisionId; - PresliceUnsorted> - recoCollsPerMCCollCentPbPb = aod::mcparticle::mcCollisionId; - Preslice> - perCollisionTracks = aod::track::collisionId; + PresliceUnsorted> recoCollsPerMCColl = aod::mcparticle::mcCollisionId; + PresliceUnsorted> recoCollsPerMCCollCentPbPb = aod::mcparticle::mcCollisionId; + Preslice> perCollisionTracks = aod::track::collisionId; template void processTruthAndFullMC( - aod::McCollisions const& mccols, aod::McParticles const& mcParticles, - soa::Join const& collisions, + aod::McCollisions const& mccols, + aod::McParticles const& mcParticles, + soa::Join const& collisions, soa::Filtered> const& tracks, - StrangePartType const& strangeParts, aod::BCsWithTimestamps const&, + StrangePartType const& strangeParts, + aod::BCsWithTimestamps const&, Preslice& ps) { // recos @@ -3561,13 +2652,10 @@ struct FemtoUniverseProducerTask { mcColIds.clear(); for (const auto& col : collisions) { - auto groupedTracks = - tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); auto groupedStrageParts = strangeParts.sliceBy(ps, col.globalIndex()); getMagneticFieldTesla(col.bc_as()); - if constexpr (std::experimental::is_detected< - HasBachelor, - typename StrangePartType::iterator>::value) { + if constexpr (std::experimental::is_detected::value) { const auto colcheck = fillCollisions(col, groupedTracks); if (colcheck) { mcColIds.insert(col.mcCollisionId()); @@ -3575,8 +2663,7 @@ struct FemtoUniverseProducerTask { fillCascade(col, groupedStrageParts, groupedTracks); } } else { - const auto colcheck = fillCollisionsAndTracksAndV0AndPhi( - col, groupedTracks, groupedStrageParts); + const auto colcheck = fillCollisionsAndTracksAndV0AndPhi(col, groupedTracks, groupedStrageParts); if (colcheck) { mcColIds.insert(col.mcCollisionId()); } @@ -3589,38 +2676,30 @@ struct FemtoUniverseProducerTask { // truth for (const auto& mccol : mccols) { - auto groupedMCParticles = - mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); + auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); if (confCollMCTruthOnlyReco && !mcColIds.contains(mccol.globalIndex())) { continue; } - auto groupedCollisions = - collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); - fillMCTruthCollisions( - groupedCollisions, - groupedMCParticles); // fills the reco collisions for mc collision - fillParticles( - groupedMCParticles, recoMcIds); // fills mc particles + auto groupedCollisions = collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); + fillMCTruthCollisions(groupedCollisions, groupedMCParticles); // fills the reco collisions for mc collision + fillParticles(groupedMCParticles, recoMcIds); // fills mc particles } } - void processTruthAndFullMCCentRun3( - aod::McCollisions const& mccols, aod::McParticles const& mcParticles, - aod::FemtoFullCollisionCentRun3MCs const& collisions, - soa::Filtered> const& tracks, - aod::BCsWithTimestamps const&) + void processTruthAndFullMCCentRun3(aod::McCollisions const& mccols, + aod::McParticles const& mcParticles, + aod::FemtoFullCollisionCentRun3MCs const& collisions, + soa::Filtered> const& tracks, + aod::BCsWithTimestamps const&) { // recos std::set recoMcIds; std::set mcCollisions; for (const auto& col : collisions) { - auto groupedTracks = - tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), - mRunNumber, "ZNC hadronic") * - 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR bool colcheck = false; // fill the tables @@ -3643,22 +2722,17 @@ struct FemtoUniverseProducerTask { // truth for (const auto& mccol : mccols) { - if (confCollMCTruthOnlyReco && - !mcCollisions.contains(mccol.globalIndex())) { + if (confCollMCTruthOnlyReco && !mcCollisions.contains(mccol.globalIndex())) { continue; } - auto groupedCollisions = - collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); + auto groupedCollisions = collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); for (const auto& col : groupedCollisions) { - const auto colcheck = fillMCTruthCollisionsCentRun3( - col); // fills the reco collisions for mc collision + const auto colcheck = fillMCTruthCollisionsCentRun3(col); // fills the reco collisions for mc collision if (colcheck) { - auto groupedMCParticles = - mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); + auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); outputCollExtra(1.0, 1.0); if (!ConfTrkSelection.confIsOnlyMCTrack) { - fillParticles( - groupedMCParticles, recoMcIds); // fills mc particles + fillParticles(groupedMCParticles, recoMcIds); // fills mc particles } else { fillTracksMCTruth(groupedMCParticles); } @@ -3666,46 +2740,37 @@ struct FemtoUniverseProducerTask { } } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3, - "Provide both MC truth and reco for tracks in Pb-Pb", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3, "Provide both MC truth and reco for tracks in Pb-Pb", false); - Preslice> - perCollisionV0s = aod::track::collisionId; + Preslice> perCollisionV0s = aod::track::collisionId; void processTruthAndFullMCV0( - aod::McCollisions const& mccols, aod::McParticles const& mcParticles, - soa::Join const& collisions, + aod::McCollisions const& mccols, + aod::McParticles const& mcParticles, + soa::Join const& collisions, soa::Filtered> const& tracks, soa::Join const& fullV0s, aod::BCsWithTimestamps const& bcs) { - processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullV0s, bcs, - perCollisionV0s); + processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullV0s, bcs, perCollisionV0s); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCV0, - "Provide both MC truth and reco for tracks and V0s", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCV0, "Provide both MC truth and reco for tracks and V0s", false); - Preslice< - soa::Join> - perCollisionCascs = aod::track::collisionId; + Preslice> perCollisionCascs = aod::track::collisionId; void processTruthAndFullMCCasc( - aod::McCollisions const& mccols, aod::McParticles const& mcParticles, - soa::Join const& collisions, + aod::McCollisions const& mccols, + aod::McParticles const& mcParticles, + soa::Join const& collisions, soa::Filtered> const& tracks, - soa::Join const& fullCascades, + soa::Join const& fullCascades, aod::BCsWithTimestamps const& bcs) { - processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullCascades, - bcs, perCollisionCascs); + processTruthAndFullMC(mccols, mcParticles, collisions, tracks, fullCascades, bcs, perCollisionCascs); } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCasc, - "Provide both MC truth and reco for tracks and Cascades", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCasc, "Provide both MC truth and reco for tracks and Cascades", false); void processTruthAndFullMCCentRun3Casc( - aod::McCollisions const& mccols, aod::McParticles const& mcParticles, + aod::McCollisions const& mccols, + aod::McParticles const& mcParticles, aod::FemtoFullCollisionCentRun3MCs const& collisions, soa::Filtered> const& tracks, soa::Join const& fullCascades, @@ -3715,10 +2780,8 @@ struct FemtoUniverseProducerTask { // recos std::set recoMcIds; for (const auto& col : collisions) { - auto groupedTracks = - tracks.sliceBy(perCollisionTracks, col.globalIndex()); - auto groupedCascParts = - fullCascades.sliceBy(perCollisionCascs, col.globalIndex()); + auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedCascParts = fullCascades.sliceBy(perCollisionCascs, col.globalIndex()); getMagneticFieldTesla(col.bc_as()); const auto colcheck = fillCollisionsCentRun3(col); if (colcheck) { @@ -3733,47 +2796,33 @@ struct FemtoUniverseProducerTask { // truth for (const auto& mccol : mccols) { - auto groupedCollisions = - collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); + auto groupedCollisions = collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); for (const auto& col : groupedCollisions) { - const auto colcheck = fillMCTruthCollisionsCentRun3( - col); // fills the reco collisions for mc collision + const auto colcheck = fillMCTruthCollisionsCentRun3(col); // fills the reco collisions for mc collision if (colcheck) { - auto groupedMCParticles = - mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); + auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); outputCollExtra(1.0, 1.0); - fillParticles( - groupedMCParticles, recoMcIds); // fills mc particles + fillParticles(groupedMCParticles, recoMcIds); // fills mc particles } } } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processTruthAndFullMCCentRun3Casc, - "Provide both MC truth and reco for tracks and cascades with centrality", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3Casc, "Provide both MC truth and reco for tracks and cascades with centrality", false); - Preslice> - mcPartPerMcColl = aod::mcparticle::mcCollisionId; - Preslice> - perCollisionD0s = aod::track::collisionId; - void processTrackD0MC( - aod::McCollisions const& mccols, - soa::Join const& collisions, - soa::Filtered> const& tracks, - soa::Join const& hfMcGenCands, - soa::Join const& hfMcRecoCands, - aod::BCsWithTimestamps const&, aod::McParticles const& mcParts) + Preslice> mcPartPerMcColl = aod::mcparticle::mcCollisionId; + Preslice> perCollisionD0s = aod::track::collisionId; + void processTrackD0MC(aod::McCollisions const& mccols, + soa::Join const& collisions, + soa::Filtered> const& tracks, + soa::Join const& hfMcGenCands, + soa::Join const& hfMcRecoCands, + aod::BCsWithTimestamps const&, + aod::McParticles const& mcParts) { // MC Reco for (const auto& col : collisions) { - auto groupedTracks = - tracks.sliceBy(perCollisionTracks, col.globalIndex()); - auto groupedD0s = - hfMcRecoCands.sliceBy(perCollisionD0s, col.globalIndex()); + auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); + auto groupedD0s = hfMcRecoCands.sliceBy(perCollisionD0s, col.globalIndex()); // get magnetic field for run getMagneticFieldTesla(col.bc_as()); // fill the tables @@ -3785,32 +2834,24 @@ struct FemtoUniverseProducerTask { } // MC Truth for (const auto& mccol : mccols) { - auto groupedMCParticles = - hfMcGenCands.sliceBy(mcPartPerMcColl, mccol.globalIndex()); - auto groupedCollisions = - collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); - fillMCTruthCollisions( - groupedCollisions, - groupedMCParticles); // fills the reco collisions for mc collision - fillMCTruthParticlesD0( - groupedMCParticles); // fills mc particles - } - } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackD0MC, - "Provide MC data for track D0 analysis", false); - - void processFullMCCent( - aod::FemtoFullCollisionCentRun3 const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, aod::McParticles const&) + auto groupedMCParticles = hfMcGenCands.sliceBy(mcPartPerMcColl, mccol.globalIndex()); + auto groupedCollisions = collisions.sliceBy(recoCollsPerMCColl, mccol.globalIndex()); + fillMCTruthCollisions(groupedCollisions, groupedMCParticles); // fills the reco collisions for mc collision + fillMCTruthParticlesD0(groupedMCParticles); // fills mc particles + } + } + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackD0MC, "Provide MC data for track D0 analysis", false); + + void processFullMCCent(aod::FemtoFullCollisionCentRun3 const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, + aod::McParticles const&) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const double ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), - mRunNumber, "ZNC hadronic") * - 1.e-3; // fetch IR + const double ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -3819,13 +2860,11 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMCCent, - "Provide MC data with centrality bins", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processFullMCCent, "Provide MC data with centrality bins", false); - void - processTrackCentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks) + void processTrackCentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks) { // get magnetic field for run auto bc = col.bc_as(); @@ -3839,16 +2878,12 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processTrackCentRun2Data, - "Provide experimental data for Run 2 with centrality for track track", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun2Data, "Provide experimental data for Run 2 with centrality for track track", false); - void - processTrackV0CentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - aod::V0Datas const& fullV0s) + void processTrackV0CentRun2Data(aod::FemtoFullCollisionCentRun2 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + aod::V0Datas const& fullV0s) { // get magnetic field for run auto bc = col.bc_as(); @@ -3863,29 +2898,18 @@ struct FemtoUniverseProducerTask { fillV0(col, fullV0s, tracks); } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processTrackV0CentRun2Data, - "Provide experimental data for Run 2 with centrality for track V0", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackV0CentRun2Data, "Provide experimental data for Run 2 with centrality for track V0", false); - void - processTrackCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks) + void processTrackCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, - "ZNC hadronic") * - 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR - auto tracksWithItsPid = - soa::Attach, - aod::pidits::ITSNSigmaEl, aod::pidits::ITSNSigmaPi, - aod::pidits::ITSNSigmaKa, aod::pidits::ITSNSigmaPr, - aod::pidits::ITSNSigmaDe, aod::pidits::ITSNSigmaTr, - aod::pidits::ITSNSigmaHe>(tracks); + auto tracksWithItsPid = soa::Attach, aod::pidits::ITSNSigmaEl, aod::pidits::ITSNSigmaPi, aod::pidits::ITSNSigmaKa, aod::pidits::ITSNSigmaPr, aod::pidits::ITSNSigmaDe, aod::pidits::ITSNSigmaTr, aod::pidits::ITSNSigmaHe>(tracks); // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -3898,23 +2922,18 @@ struct FemtoUniverseProducerTask { } } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processTrackCentRun3Data, - "Provide experimental data for Run 3 with centrality for track track", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun3Data, "Provide experimental data for Run 3 with centrality for track track", false); - void processTrackCentRun3DataMC( - aod::FemtoFullCollisionCentRun3MC const& col, - aod::BCsWithTimestamps const&, - soa::Join const& tracks, - aod::McCollisions const&, aod::McParticles const&) + void processTrackCentRun3DataMC(aod::FemtoFullCollisionCentRun3MC const& col, + aod::BCsWithTimestamps const&, + soa::Join const& tracks, + aod::McCollisions const&, + aod::McParticles const&) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, - "ZNC hadronic") * - 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -3923,8 +2942,7 @@ struct FemtoUniverseProducerTask { fillTracks(tracks); } } - PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun3DataMC, - "Provide MC data for track analysis", false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTrackCentRun3DataMC, "Provide MC data for track analysis", false); void processV0CentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, aod::BCsWithTimestamps const&, @@ -3934,9 +2952,7 @@ struct FemtoUniverseProducerTask { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, - "ZNC hadronic") * - 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -3946,13 +2962,11 @@ struct FemtoUniverseProducerTask { fillV0(col, fullV0s, tracks); } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processV0CentRun3Data, - "Provide experimental data for Run 3 with centrality for track track", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processV0CentRun3Data, "Provide experimental data for Run 3 with centrality for track track", false); void processTruthAndFullMCCentRun3V0( - aod::McCollisions const& mccols, aod::McParticles const& mcParticles, + aod::McCollisions const& mccols, + aod::McParticles const& mcParticles, aod::FemtoFullCollisionCentRun3MCs const& collisions, soa::Filtered> const& tracks, soa::Join const& fullV0s, @@ -3962,11 +2976,9 @@ struct FemtoUniverseProducerTask { // MCReco std::set recoMcIds; std::set mcCollisions; - for (const auto& col : collisions) { // loop over collisions - auto groupedTracks = tracks.sliceBy( - perCollisionTracks, col.globalIndex()); // slicing for tracks - auto groupedV0Parts = - fullV0s.sliceBy(perCollisionV0s, col.globalIndex()); // slicing for V0 + for (const auto& col : collisions) { // loop over collisions + auto groupedTracks = tracks.sliceBy(perCollisionTracks, col.globalIndex()); // slicing for tracks + auto groupedV0Parts = fullV0s.sliceBy(perCollisionV0s, col.globalIndex()); // slicing for V0 getMagneticFieldTesla(col.bc_as()); const auto colcheck = fillCollisionsCentRun3(col); if (colcheck) { @@ -3982,15 +2994,11 @@ struct FemtoUniverseProducerTask { // MCTruth for (const auto& mccol : mccols) { - if (confCollMCTruthOnlyReco && - !mcCollisions.contains(mccol.globalIndex())) { + if (confCollMCTruthOnlyReco && !mcCollisions.contains(mccol.globalIndex())) { continue; } - auto groupedCollisions = - collisions.sliceBy(recoCollsPerMCCollCentPbPb, - mccol.globalIndex()); // slicing for MC collisions - auto groupedMCParticles = mcParticles.sliceBy( - perMCCollision, mccol.globalIndex()); // slicing for MC particles + auto groupedCollisions = collisions.sliceBy(recoCollsPerMCCollCentPbPb, mccol.globalIndex()); // slicing for MC collisions + auto groupedMCParticles = mcParticles.sliceBy(perMCCollision, mccol.globalIndex()); // slicing for MC particles for (const auto& col : groupedCollisions) { const auto colcheck = fillMCTruthCollisionsCentRun3(col); if (colcheck) { @@ -3998,30 +3006,23 @@ struct FemtoUniverseProducerTask { if (confFillMCTruthV0Daugh) { fillV0MCTruth(groupedMCParticles); // fills MC V0s and its daughters } else { - fillParticles( - groupedMCParticles, recoMcIds); // fills mc particles + fillParticles(groupedMCParticles, recoMcIds); // fills mc particles } } } } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processTruthAndFullMCCentRun3V0, - "Provide both MC truth and reco for tracks and V0s with centrality", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processTruthAndFullMCCentRun3V0, "Provide both MC truth and reco for tracks and V0s with centrality", false); - void - processCascadeCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, - aod::BCsWithTimestamps const&, - soa::Filtered const& tracks, - aod::CascDatas const& fullCascades) + void processCascadeCentRun3Data(aod::FemtoFullCollisionCentRun3 const& col, + aod::BCsWithTimestamps const&, + soa::Filtered const& tracks, + aod::CascDatas const& fullCascades) { // get magnetic field for run auto bc = col.bc_as(); getMagneticFieldTesla(bc); - const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, - "ZNC hadronic") * - 1.e-3; // fetch IR + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // fetch IR // fill the tables const auto colcheck = fillCollisionsCentRun3(col); @@ -4031,10 +3032,7 @@ struct FemtoUniverseProducerTask { fillCascade(col, fullCascades, tracks); } } - PROCESS_SWITCH( - FemtoUniverseProducerTask, processCascadeCentRun3Data, - "Provide experimental data for Run 3 with centrality for track track", - false); + PROCESS_SWITCH(FemtoUniverseProducerTask, processCascadeCentRun3Data, "Provide experimental data for Run 3 with centrality for track track", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx index b5ba332f961..f03ad811289 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2025 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -10,11 +10,8 @@ // or submit itself to any jurisdiction. /// \file femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx -/// \brief Tasks that reads the track tables used for the pairing and builds -/// pairs of two tracks and compute relative pair-momentum in three dimesnions -/// \remark This file is inherited from -/// ~/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx on -/// 17/06/2024 +/// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks and compute relative pair-momentum in three dimesnions +/// \remark This file is inherited from ~/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx on 17/06/2024 /// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@pw.edu.pl #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" @@ -53,15 +50,17 @@ namespace static constexpr int nPart = 2; static constexpr int nCuts = 5; static const std::vector partNames{"PartOne", "PartTwo"}; -static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", - "nSigmaTPCTOF", "MaxP"}; -static const float cutsTable[nPart][nCuts]{{4.05f, 1.f, 3.f, 3.f, 100.f}, - {4.05f, 1.f, 3.f, 3.f, 100.f}}; +static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; +static const float cutsTable[nPart][nCuts]{ + {4.05f, 1.f, 3.f, 3.f, 100.f}, + {4.05f, 1.f, 3.f, 3.f, 100.f}}; } // namespace -enum PairType { PlusMinus, - PlusPlus, - MinusMinus }; +enum PairType { + PlusMinus, + PlusPlus, + MinusMinus +}; struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { @@ -71,295 +70,129 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { /// Table for both particles struct : o2::framework::ConfigurableGroup { - Configurable confNsigmaCombined{ - "confNsigmaCombined", 3.0f, - "TPC and TOF Pion Sigma (combined) for momentum > confTOFPtMin"}; - Configurable confNsigmaTPC{ - "confNsigmaTPC", 3.0f, "TPC Pion Sigma for momentum < confTOFPtMin"}; - Configurable confNsigmaITSTPCCombined{ - "confNsigmaITSTPCCombined", 3.0f, - "ITS and TPC Pion Sigma (combined) for momentum < confTOFPtMin"}; - Configurable confIsElReject{"confIsElReject", false, - "Is electron rejection activated"}; - Configurable confIsAddITSNsigma{"confIsAddITSNsigma", false, - "Is ITS Pions nsigma added"}; - Configurable confNsigmaTPCElRejectMin{ - "confNsigmaTPCElRejectMin", 2.0f, - "TPC Electron SigmaMin for momentum < confTOFPtMin"}; - Configurable confNsigmaTPCElRejectMax{ - "confNsigmaTPCElRejectMax", 2.0f, - "TPC Electron SigmaMax for momentum < confTOFPtMin"}; - Configurable confTOFPtMin{ - "confTOFPtMin", 0.5f, "Min. Pt for which TOF is required for PID."}; - Configurable confEtaMax{ - "confEtaMax", 0.8f, - "Higher limit for |Eta| (the same for both particles)"}; - - Configurable> confCutTable{ - "confCutTable", - {cutsTable[0], nPart, nCuts, partNames, cutNames}, - "Particle selections"}; - Configurable confNspecies{"confNspecies", 2, - "Number of particle spieces with PID info"}; - Configurable confIsMC{ - "confIsMC", false, - "Enable additional Histogramms in the case of a MonteCarlo Run"}; - Configurable> confTrkPIDnSigmaMax{ - "confTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, - "This Configurable needs to be the same as the one used in the " - "producer task"}; - Configurable confUse3D{ - "confUse3D", false, - "Enable three dimensional histogramms (to be used only for analysis " - "with high statistics): k* vs mT vs multiplicity"}; - Configurable confPhiBins{"confPhiBins", 29, - "Number of phi bins in deta dphi"}; - Configurable confEtaBins{"confEtaBins", 29, - "Number of eta bins in deta dphi"}; + Configurable confNsigmaCombined{"confNsigmaCombined", 3.0f, "TPC and TOF Pion Sigma (combined) for momentum > confTOFPtMin"}; + Configurable confNsigmaTPC{"confNsigmaTPC", 3.0f, "TPC Pion Sigma for momentum < confTOFPtMin"}; + Configurable confNsigmaITSTPCCombined{"confNsigmaITSTPCCombined", 3.0f, "ITS and TPC Pion Sigma (combined) for momentum < confTOFPtMin"}; + Configurable confIsElReject{"confIsElReject", false, "Is electron rejection activated"}; + Configurable confIsAddITSNsigma{"confIsAddITSNsigma", false, "Is ITS Pions nsigma added"}; + Configurable confNsigmaTPCElRejectMin{"confNsigmaTPCElRejectMin", 2.0f, "TPC Electron SigmaMin for momentum < confTOFPtMin"}; + Configurable confNsigmaTPCElRejectMax{"confNsigmaTPCElRejectMax", 2.0f, "TPC Electron SigmaMax for momentum < confTOFPtMin"}; + Configurable confTOFPtMin{"confTOFPtMin", 0.5f, "Min. Pt for which TOF is required for PID."}; + Configurable confEtaMax{"confEtaMax", 0.8f, "Higher limit for |Eta| (the same for both particles)"}; + + Configurable> confCutTable{"confCutTable", {cutsTable[0], nPart, nCuts, partNames, cutNames}, "Particle selections"}; + Configurable confNspecies{"confNspecies", 2, "Number of particle spieces with PID info"}; + Configurable confIsMC{"confIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; + Configurable> confTrkPIDnSigmaMax{"confTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, "This Configurable needs to be the same as the one used in the producer task"}; + Configurable confUse3D{"confUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; + Configurable confPhiBins{"confPhiBins", 29, "Number of phi bins in deta dphi"}; + Configurable confEtaBins{"confEtaBins", 29, "Number of eta bins in deta dphi"}; Configurable confIsCPR{"confIsCPR", true, "Close Pair Rejection"}; - Configurable confIsCPRatITS{"confIsCPRatITS", false, - "Close Pair check at ITS"}; - Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, - "Plot CPR per radii"}; - Configurable confCPRdeltaPhiCutMax{ - "confCPRdeltaPhiCutMax", 0.0, - "Delta Phi max cut for Close Pair Rejection"}; - Configurable confCPRdeltaPhiCutMin{ - "confCPRdeltaPhiCutMin", 0.0, - "Delta Phi min cut for Close Pair Rejection"}; - Configurable confCPRdeltaEtaCutMax{ - "confCPRdeltaEtaCutMax", 0.0, - "Delta Eta max cut for Close Pair Rejection"}; - Configurable confCPRdeltaEtaCutMin{ - "confCPRdeltaEtaCutMin", 0.0, - "Delta Eta min cut for Close Pair Rejection"}; - Configurable confIsCPRkT{ - "confIsCPRkT", true, - "kT dependent deltaEta-deltaPhi cut for Close Pair Rejection"}; - Configurable confIsCPRFraction{ - "confIsCPRFraction", true, - "Close Pair Rejection with fraction of merged points"}; - Configurable confTrkDCAxyMax{"confTrkDCAxyMax", 0.2, - "Max DCA in xy "}; + Configurable confIsCPRatITS{"confIsCPRatITS", false, "Close Pair check at ITS"}; + Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable confCPRdeltaPhiCutMax{"confCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; + Configurable confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; + Configurable confIsCPRkT{"confIsCPRkT", true, "kT dependent deltaEta-deltaPhi cut for Close Pair Rejection"}; + Configurable confIsCPRFraction{"confIsCPRFraction", true, "Close Pair Rejection with fraction of merged points"}; + Configurable confTrkDCAxyMax{"confTrkDCAxyMax", 0.2, "Max DCA in xy "}; Configurable confTrkDCAzMax{"confTrkDCAzMax", 0.2, "Max DCA in z "}; - Configurable confTrkTPCcRowsMin{"confTrkTPCcRowsMin", 80, - "Min of TPC crossed rows"}; - Configurable confTrkTPCfClsMin{ - "confTrkTPCfClsMin", 0.83, - "Min. fraction of crossed rows/findable TPC clusters"}; - Configurable confTrkTPCfracsClsMax{ - "confTrkTPCfracsClsMax", 1.0, "Max of fraction of TPC shared cluster "}; - Configurable confTrkTPCnClsMin{"confTrkTPCnClsMin", 80, - "Min number of TPC clusters"}; - Configurable confTrkTPCsClsMax{"confTrkTPCsClsMax", 160, - "Max number of TPC shared clusters"}; - Configurable confPairFracSharedTPCclsMin{ - "confPairFracSharedTPCclsMin", 0.0, - "Min. fraction of TPC shared clusters between two closed tracks"}; - Configurable confPairFracSharedTPCclsMax{ - "confPairFracSharedTPCclsMax", 1.0, - "Miax. fraction of TPC shared clusters between two closed tracks"}; - Configurable confCPRChosenRadii{ - "confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; - Configurable confUseCCImCut{ - "confUseCCImCut", false, - "Fill SH within specific quadrants of qout-qside"}; - Configurable confMinqTcut{"confMinqTcut", 0.005, - "Min. qT cut on filling SH"}; - Configurable confUse1stand3rd{ - "confUse1stand3rd", false, - "Use first and third quadrants of qout-qside"}; - Configurable confUse2ndand4th{ - "confUse2ndand4th", false, - "Use second and fourth quadrants of qout-qside"}; - Configurable confIsFillAngqLCMS{"confIsFillAngqLCMS", true, - "Fill qLCMS vs dEta vs dPhi"}; - Configurable confCPRDistMax{ - "confCPRDistMax", 0.0, - "Max. radial seperation between two closed-pairs"}; - Configurable confCPRFracMax{ - "confCPRFracMax", 0.0, - "Max. allowed fraction bad to all TPC points of radial seperation " - "between two closed-pairs"}; - Configurable confCPRDphiAvgOrDist{ - "confCPRDphiAvgOrDist", true, - "Close Pair Rejection by radial or angular seperation"}; - Configurable confIsCircularCut{ - "confIsCircularCut", true, "Close Pair Rejection within circular area"}; - Configurable confIs1D{"confIs1D", true, - "Filling 1D 2k* dist. in MC truth"}; - Configurable confisIdenLCMS{ - "confisIdenLCMS", true, - "Choosing identical or non-identical pairs in LCMS"}; - Configurable confIsWeight{"confIsWeight", true, - "Fill quantum weight"}; - Configurable confisIdenPRF{ - "confisIdenPRF", false, - "Choosing identical or non-identical pairs in PRF"}; - Configurable confIsfilldEtadPhiTPCcls{ - "confIsfilldEtadPhiTPCcls", false, - "Filling of 3D histogram PairFracSharedTPCcls vs. dEta vs. dPhiStar"}; - - Configurable> confCPRdeltaEtaCutMaxVec{ - "confCPRdeltaEtaCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for max delta eta cut in CPR"}; - Configurable> confCPRdeltaEtaCutMinVec{ - "confCPRdeltaEtaCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for min delta eta cut in CPR"}; - Configurable> confCPRdeltaPhiCutMaxVec{ - "confCPRdeltaPhiCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for max delta phi cut in CPR"}; - Configurable> confCPRdeltaPhiCutMinVec{ - "confCPRdeltaPhiCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for min delta phi cut in CPR"}; - - Configurable> confCPRdeltaEtaCutFractionMaxVec{ - "confCPRdeltaEtaCutFractionMaxVec", - std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for max delta eta cut in CPR Fraction"}; - Configurable> confCPRdeltaEtaCutFractionMinVec{ - "confCPRdeltaEtaCutFractionMinVec", - std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for min delta eta cut in CPR Fraction"}; - Configurable> confCPRdeltaPhiCutFractionMaxVec{ - "confCPRdeltaPhiCutFractionMaxVec", - std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for max delta phi cut in CPR Fraction"}; - Configurable> confCPRdeltaPhiCutFractionMinVec{ - "confCPRdeltaPhiCutFractionMinVec", - std::vector{0.0f, 0.0f, 0.0f, 0.0f}, - "Bins for min delta phi cut in CPR Fraction"}; - - ConfigurableAxis confDeltaEtaAxis{ - "confDeltaEtaAxis", - {100, -0.15, 0.15}, - "DeltaEta"}; - ConfigurableAxis confDeltaPhiStarAxis{ - "confDeltaPhiStarAxis", - {100, -0.15, 0.15}, - "DeltaPhiStar"}; + Configurable confTrkTPCcRowsMin{"confTrkTPCcRowsMin", 80, "Min of TPC crossed rows"}; + Configurable confTrkTPCfClsMin{"confTrkTPCfClsMin", 0.83, "Min. fraction of crossed rows/findable TPC clusters"}; + Configurable confTrkTPCfracsClsMax{"confTrkTPCfracsClsMax", 1.0, "Max of fraction of TPC shared cluster "}; + Configurable confTrkTPCnClsMin{"confTrkTPCnClsMin", 80, "Min number of TPC clusters"}; + Configurable confTrkTPCsClsMax{"confTrkTPCsClsMax", 160, "Max number of TPC shared clusters"}; + Configurable confPairFracSharedTPCclsMin{"confPairFracSharedTPCclsMin", 0.0, "Min. fraction of TPC shared clusters between two closed tracks"}; + Configurable confPairFracSharedTPCclsMax{"confPairFracSharedTPCclsMax", 1.0, "Miax. fraction of TPC shared clusters between two closed tracks"}; + Configurable confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; + Configurable confUseCCImCut{"confUseCCImCut", false, "Fill SH within specific quadrants of qout-qside"}; + Configurable confMinqTcut{"confMinqTcut", 0.005, "Min. qT cut on filling SH"}; + Configurable confUse1stand3rd{"confUse1stand3rd", false, "Use first and third quadrants of qout-qside"}; + Configurable confUse2ndand4th{"confUse2ndand4th", false, "Use second and fourth quadrants of qout-qside"}; + Configurable confIsFillAngqLCMS{"confIsFillAngqLCMS", true, "Fill qLCMS vs dEta vs dPhi"}; + Configurable confCPRDistMax{"confCPRDistMax", 0.0, "Max. radial seperation between two closed-pairs"}; + Configurable confCPRFracMax{"confCPRFracMax", 0.0, "Max. allowed fraction bad to all TPC points of radial seperation between two closed-pairs"}; + Configurable confCPRDphiAvgOrDist{"confCPRDphiAvgOrDist", true, "Close Pair Rejection by radial or angular seperation"}; + Configurable confIsCircularCut{"confIsCircularCut", true, "Close Pair Rejection within circular area"}; + Configurable confIs1D{"confIs1D", true, "Filling 1D 2k* dist. in MC truth"}; + Configurable confisIdenLCMS{"confisIdenLCMS", true, "Choosing identical or non-identical pairs in LCMS"}; + Configurable confIsWeight{"confIsWeight", true, "Fill quantum weight"}; + Configurable confisIdenPRF{"confisIdenPRF", false, "Choosing identical or non-identical pairs in PRF"}; + Configurable confIsfilldEtadPhiTPCcls{"confIsfilldEtadPhiTPCcls", false, "Filling of 3D histogram PairFracSharedTPCcls vs. dEta vs. dPhiStar"}; + + Configurable> confCPRdeltaEtaCutMaxVec{"confCPRdeltaEtaCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta eta cut in CPR"}; + Configurable> confCPRdeltaEtaCutMinVec{"confCPRdeltaEtaCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta eta cut in CPR"}; + Configurable> confCPRdeltaPhiCutMaxVec{"confCPRdeltaPhiCutMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta phi cut in CPR"}; + Configurable> confCPRdeltaPhiCutMinVec{"confCPRdeltaPhiCutMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta phi cut in CPR"}; + + Configurable> confCPRdeltaEtaCutFractionMaxVec{"confCPRdeltaEtaCutFractionMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta eta cut in CPR Fraction"}; + Configurable> confCPRdeltaEtaCutFractionMinVec{"confCPRdeltaEtaCutFractionMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta eta cut in CPR Fraction"}; + Configurable> confCPRdeltaPhiCutFractionMaxVec{"confCPRdeltaPhiCutFractionMaxVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for max delta phi cut in CPR Fraction"}; + Configurable> confCPRdeltaPhiCutFractionMinVec{"confCPRdeltaPhiCutFractionMinVec", std::vector{0.0f, 0.0f, 0.0f, 0.0f}, "Bins for min delta phi cut in CPR Fraction"}; + + ConfigurableAxis confDeltaEtaAxis{"confDeltaEtaAxis", {100, -0.15, 0.15}, "DeltaEta"}; + ConfigurableAxis confDeltaPhiStarAxis{"confDeltaPhiStarAxis", {100, -0.15, 0.15}, "DeltaPhiStar"}; } twotracksconfigs; - using FemtoFullParticles = - soa::Join; + using FemtoFullParticles = soa::Join; // Filters for selecting particles (both p1 and p2) - Filter trackAdditionalfilter = - ((nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax) && - (aod::track::dcaXY <= twotracksconfigs.confTrkDCAxyMax) && - (aod::track::dcaZ <= twotracksconfigs.confTrkDCAzMax) && - (aod::femtouniverseparticle::tpcNClsCrossedRows >= - static_cast(twotracksconfigs.confTrkTPCcRowsMin)) && - (aod::femtouniverseparticle::tpcFractionSharedCls <= - twotracksconfigs.confTrkTPCfracsClsMax) && - (aod::femtouniverseparticle::tpcNClsFound >= - static_cast(twotracksconfigs.confTrkTPCnClsMin)) && - (aod::track::tpcNClsShared <= - static_cast(twotracksconfigs.confTrkTPCsClsMax))); + Filter trackAdditionalfilter = ((nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax) && + (aod::track::dcaXY <= twotracksconfigs.confTrkDCAxyMax) && + (aod::track::dcaZ <= twotracksconfigs.confTrkDCAzMax) && + (aod::femtouniverseparticle::tpcNClsCrossedRows >= static_cast(twotracksconfigs.confTrkTPCcRowsMin)) && + (aod::femtouniverseparticle::tpcFractionSharedCls <= twotracksconfigs.confTrkTPCfracsClsMax) && + (aod::femtouniverseparticle::tpcNClsFound >= static_cast(twotracksconfigs.confTrkTPCnClsMin)) && + (aod::track::tpcNClsShared <= static_cast(twotracksconfigs.confTrkTPCsClsMax))); using FilteredFemtoFullParticles = soa::Filtered; - // using FilteredFemtoFullParticles = FemtoFullParticles; //if no filtering is - // applied uncomment this optionconfIsCPRkT - using FemtoRecoParticles = soa::Join; + // using FilteredFemtoFullParticles = FemtoFullParticles; //if no filtering is applied uncomment this optionconfIsCPRkT + using FemtoRecoParticles = soa::Join; using FilteredFemtoRecoParticles = soa::Filtered; SliceCache cache; - Preslice perCol = - aod::femtouniverseparticle::fdCollisionId; + Preslice perCol = aod::femtouniverseparticle::fdCollisionId; - using FemtoTruthParticles = soa::Join; - Preslice perColMCTruth = - aod::femtouniverseparticle::fdCollisionId; + using FemtoTruthParticles = soa::Join; + Preslice perColMCTruth = aod::femtouniverseparticle::fdCollisionId; /// Particle 1 struct : o2::framework::ConfigurableGroup { - Configurable confPDGCodePartOne{"confPDGCodePartOne", 211, - "Particle 1 - PDG code"}; - Configurable confPIDPartOne{ - "confPIDPartOne", 2, - "Particle 1 - Read from cutCulator"}; // we also need the possibility to - // specify whether the bit is - // true/false - // ->std>>vector>int>> - Configurable confPtLowPart1{ - "confPtLowPart1", 0.14, "Lower limit for Pt for the first particle"}; - Configurable confPtHighPart1{ - "confPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; + Configurable confPDGCodePartOne{"confPDGCodePartOne", 211, "Particle 1 - PDG code"}; + Configurable confPIDPartOne{"confPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> + Configurable confPtLowPart1{"confPtLowPart1", 0.14, "Lower limit for Pt for the first particle"}; + Configurable confPtHighPart1{"confPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; Configurable confChargePart1{"confChargePart1", 1, "Particle 1 sign"}; } trackonefilter; /// Partition for particle 1 - Partition partsOne = - (aod::femtouniverseparticle::partType == - uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && - aod::femtouniverseparticle::sign == - as(trackonefilter.confChargePart1) && - aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && - aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMC = - (aod::femtouniverseparticle::partType == - uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && - aod::femtouniverseparticle::sign == - as(trackonefilter.confChargePart1) && - aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && - aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMCTruth = - aod::femtouniverseparticle::partType == - uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); // /// Histogramming for particle 1 - FemtoUniverseParticleHisto - trackHistoPartOne; + FemtoUniverseParticleHisto trackHistoPartOne; /// Particle 2 struct : o2::framework::ConfigurableGroup { - Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 211, - "Particle 2 - PDG code"}; - // Configurable confCutPartTwo{"confCutPartTwo", 5542474, - // "Particle 2 - Selection bit"}; - Configurable confPIDPartTwo{ - "confPIDPartTwo", 2, - "Particle 2 - Read from cutCulator"}; // we also need the possibility to - // specify whether the bit is - // true/false - // ->std>>vector> - - Configurable confPtLowPart2{ - "confPtLowPart2", 0.14, "Lower limit for Pt for the second particle"}; - Configurable confPtHighPart2{ - "confPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; + Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 211, "Particle 2 - PDG code"}; + // Configurable confCutPartTwo{"confCutPartTwo", 5542474, "Particle 2 - Selection bit"}; + Configurable confPIDPartTwo{"confPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> + + Configurable confPtLowPart2{"confPtLowPart2", 0.14, "Lower limit for Pt for the second particle"}; + Configurable confPtHighPart2{"confPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; Configurable confChargePart2{"confChargePart2", -1, "Particle 2 sign"}; } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = - (aod::femtouniverseparticle::partType == - uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && - (aod::femtouniverseparticle::sign == - as(tracktwofilter.confChargePart2)) && - aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && - aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMC = - aod::femtouniverseparticle::partType == - uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && - (aod::femtouniverseparticle::sign == - as(tracktwofilter.confChargePart2)) && - aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && - aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMCTruth = - aod::femtouniverseparticle::partType == - uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); /// Histogramming for particle 2 - FemtoUniverseParticleHisto - trackHistoPartTwo; + FemtoUniverseParticleHisto trackHistoPartTwo; /// Histogramming for Event FemtoUniverseEventHisto eventHisto; @@ -369,268 +202,110 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { std::vector kNsigma; /// Event part - Configurable confV0MLow{"confV0MLow", 0.0, - "Lower limit for V0M multiplicity"}; - Configurable confV0MHigh{"confV0MHigh", 25000.0, - "Upper limit for V0M multiplicity"}; - Configurable confTPCOccupancyLow{"confTPCOccupancyLow", 0, - "Lower limit for TPC occupancy"}; - Configurable confTPCOccupancyHigh{"confTPCOccupancyHigh", 500, - "Higher limit for TPC occupancy"}; - Configurable confIntRateLow{"confIntRateLow", 0.0, - "Lower limit for interaction rate"}; - Configurable confIntRateHigh{"confIntRateHigh", 10000.0, - "Higher limit for interaction rate"}; - Configurable confIsCent{ - "confIsCent", true, - "Condition to choose centrality of multiplicity for mixing"}; - - Filter collfilterFDtable = - (o2::aod::femtouniversecollision::multV0M > confV0MLow) && - (o2::aod::femtouniversecollision::multV0M < confV0MHigh); - Filter collfilterFDExttable = - (o2::aod::femtouniversecollision::interactionRate > confIntRateLow) && - (o2::aod::femtouniversecollision::interactionRate < confIntRateHigh) && - (o2::aod::femtouniversecollision::occupancy >= confTPCOccupancyLow) && - (o2::aod::femtouniversecollision::occupancy < confTPCOccupancyHigh); - using FilteredFDCollisions = - soa::Filtered>; + Configurable confV0MLow{"confV0MLow", 0.0, "Lower limit for V0M multiplicity"}; + Configurable confV0MHigh{"confV0MHigh", 25000.0, "Upper limit for V0M multiplicity"}; + Configurable confTPCOccupancyLow{"confTPCOccupancyLow", 0, "Lower limit for TPC occupancy"}; + Configurable confTPCOccupancyHigh{"confTPCOccupancyHigh", 500, "Higher limit for TPC occupancy"}; + Configurable confIntRateLow{"confIntRateLow", 0.0, "Lower limit for interaction rate"}; + Configurable confIntRateHigh{"confIntRateHigh", 10000.0, "Higher limit for interaction rate"}; + Configurable confIsCent{"confIsCent", true, "Condition to choose centrality of multiplicity for mixing"}; + + Filter collfilterFDtable = (o2::aod::femtouniversecollision::multV0M > confV0MLow) && (o2::aod::femtouniversecollision::multV0M < confV0MHigh); + Filter collfilterFDExttable = (o2::aod::femtouniversecollision::interactionRate > confIntRateLow) && (o2::aod::femtouniversecollision::interactionRate < confIntRateHigh) && + (o2::aod::femtouniversecollision::occupancy >= confTPCOccupancyLow) && (o2::aod::femtouniversecollision::occupancy < confTPCOccupancyHigh); + using FilteredFDCollisions = soa::Filtered>; using FilteredFDCollision = FilteredFDCollisions::iterator; - // Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < - // twotracksconfigs.confEtaMax); // example filtering on Configurable + // Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax); // example filtering on Configurable /// Particle part - ConfigurableAxis confTempFitVarBins{ - "confDTempFitVarBins", - {300, -0.15, 0.15}, - "binning of the TempFitVar in the pT vs. TempFitVar plot"}; - ConfigurableAxis confTempFitVarpTBins{ - "confTempFitVarpTBins", - {20, 0.5, 4.05}, - "pT binning of the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarBins{"confDTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarpTBins{"confTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; /// Correlation part - ConfigurableAxis confMultBinsCent{ - "confMultBinsCent", - {VARIABLE_WIDTH, 0.0f, 2.5f, 5.0f, 7.5f, 10.0f, 12.5f, 15.0f, 17.5f, - 20.0f, 22.5f, 25.0f, 27.5f, 30.0f, 32.5f, 35.0f, 37.5f, 40.0f, - 42.5f, 45.0f, 47.5f, 50.0f, 52.5f, 55.0f, 57.5f, 60.0f, 62.5f, - 65.0f, 67.5f, 70.5f, 75.0f, 80.0f, 90.0f, 100.0f, 99999.f}, - "Mixing bins - centrality"}; - ConfigurableAxis confMultBinsMult{ - "confMultBinsMult", - {VARIABLE_WIDTH, 0.0f, 400.0f, 800.0f, 1200.0f, 1600.0f, - 2000.0f, 2500.0f, 3000.0f, 3500.0f, 4000.0f, 4500.0f, - 5000.0f, 6000.0f, 7000.0f, 8000.0f, 9000.0f, 10000.0f, - 11000.0f, 12000.0f, 13000.0f, 14000.0f, 15000.0f, 16000.0f, - 17000.0f, 18000.0f, 99999.f}, - "Mixing bins - centrality"}; - ConfigurableAxis confMultKstarBins{"confMultKstarBins", - {VARIABLE_WIDTH, 0.0f, 200.0f}, - "Bins for kstar analysis in multiplicity " - "or centrality bins (10 is maximum)"}; - ConfigurableAxis confKtKstarBins{"confKtKstarBins", - {VARIABLE_WIDTH, 0.1f, 0.2f, 0.3f, 0.4f}, - "Bins for kstar analysis in kT bins"}; - ConfigurableAxis confVtxBins{"confVtxBins", - {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, - 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, - "Mixing bins - z-vertex"}; - - ConfigurableAxis confmTBins3D{ - "confmTBins3D", - {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, - "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set " - "<> to true in order to use)"}; - ConfigurableAxis confmultBins3D{ - "confmultBins3D", - {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, - "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs " - "mT (set <> to true in order to use)"}; - - ColumnBinningPolicy - colBinningCent{{confVtxBins, confMultBinsCent}, true}; - ColumnBinningPolicy - colBinningNtr{{confVtxBins, confMultBinsMult}, true}; - - ConfigurableAxis confkstarBins{ - "confkstarBins", - {60, 0.0, 0.3}, - "binning kstar"}; + ConfigurableAxis confMultBinsCent{"confMultBinsCent", {VARIABLE_WIDTH, 0.0f, 2.5f, 5.0f, 7.5f, 10.0f, 12.5f, 15.0f, 17.5f, 20.0f, 22.5f, 25.0f, 27.5f, 30.0f, 32.5f, 35.0f, 37.5f, 40.0f, 42.5f, 45.0f, 47.5f, 50.0f, 52.5f, 55.0f, 57.5f, 60.0f, 62.5f, 65.0f, 67.5f, 70.5f, 75.0f, 80.0f, 90.0f, 100.0f, 99999.f}, "Mixing bins - centrality"}; + ConfigurableAxis confMultBinsMult{"confMultBinsMult", {VARIABLE_WIDTH, 0.0f, 400.0f, 800.0f, 1200.0f, 1600.0f, 2000.0f, 2500.0f, 3000.0f, 3500.0f, 4000.0f, 4500.0f, 5000.0f, 6000.0f, 7000.0f, 8000.0f, 9000.0f, 10000.0f, 11000.0f, 12000.0f, 13000.0f, 14000.0f, 15000.0f, 16000.0f, 17000.0f, 18000.0f, 99999.f}, "Mixing bins - centrality"}; + ConfigurableAxis confMultKstarBins{"confMultKstarBins", {VARIABLE_WIDTH, 0.0f, 200.0f}, "Bins for kstar analysis in multiplicity or centrality bins (10 is maximum)"}; + ConfigurableAxis confKtKstarBins{"confKtKstarBins", {VARIABLE_WIDTH, 0.1f, 0.2f, 0.3f, 0.4f}, "Bins for kstar analysis in kT bins"}; + ConfigurableAxis confVtxBins{"confVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + + ConfigurableAxis confmTBins3D{"confmTBins3D", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + ConfigurableAxis confmultBins3D{"confmultBins3D", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + + ColumnBinningPolicy colBinningCent{{confVtxBins, confMultBinsCent}, true}; + ColumnBinningPolicy colBinningNtr{{confVtxBins, confMultBinsMult}, true}; + + ConfigurableAxis confkstarBins{"confkstarBins", {60, 0.0, 0.3}, "binning kstar"}; ConfigurableAxis confkTBins{"confkTBins", {150, 0., 9.}, "binning kT"}; ConfigurableAxis confmTBins{"confmTBins", {225, 0., 7.5}, "binning mT"}; Configurable confIsLCMS{"confIsLCMS", true, "Choosing LCMS or PRF"}; - Configurable confNEventsMix{"confNEventsMix", 5, - "Number of events for mixing"}; + Configurable confNEventsMix{"confNEventsMix", 5, "Number of events for mixing"}; Configurable confLMax{"confLMax", 2, "Maximum value of l"}; - Configurable cfgProcessPM{"cfgProcessPM", false, - "Process particles of the opposite charge"}; - Configurable cfgProcessPP{ - "cfgProcessPP", true, "Process particles of the same, positice charge"}; - Configurable cfgProcessMM{ - "cfgProcessMM", true, "Process particles of the same, positice charge"}; - Configurable cfgProcessMultBins{ - "cfgProcessMultBins", true, - "Process kstar histograms in multiplicity bins (in multiplicity bins)"}; - Configurable cfgProcessKtBins{ - "cfgProcessKtBins", true, - "Process kstar histograms in kT bins (if cfgProcessMultBins is set " - "false, this will not be processed regardless this Configurable state)"}; - Configurable cfgProcessKtMt3DCF{ - "cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; - - FemtoUniverseSHContainer - sameEventCont; - FemtoUniverseSHContainer - mixedEventCont; - - FemtoUniverseSHContainer - sameEventContPP; - FemtoUniverseSHContainer - mixedEventContPP; - - FemtoUniverseSHContainer - sameEventContMM; - FemtoUniverseSHContainer - mixedEventContMM; - - FemtoUniverseContainer - sameEventCont1D_PP; - FemtoUniverseContainer - mixedEventCont1D_PP; - FemtoUniverseContainer - sameEventCont1D_MM; - FemtoUniverseContainer - mixedEventCont1D_MM; - - FemtoUniversePairCleaner - pairCleaner; - FemtoUniverseDetaDphiStar - pairCloseRejection; + Configurable cfgProcessPM{"cfgProcessPM", false, "Process particles of the opposite charge"}; + Configurable cfgProcessPP{"cfgProcessPP", true, "Process particles of the same, positice charge"}; + Configurable cfgProcessMM{"cfgProcessMM", true, "Process particles of the same, positice charge"}; + Configurable cfgProcessMultBins{"cfgProcessMultBins", true, "Process kstar histograms in multiplicity bins (in multiplicity bins)"}; + Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"}; + Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; + + FemtoUniverseSHContainer sameEventCont; + FemtoUniverseSHContainer mixedEventCont; + + FemtoUniverseSHContainer sameEventContPP; + FemtoUniverseSHContainer mixedEventContPP; + + FemtoUniverseSHContainer sameEventContMM; + FemtoUniverseSHContainer mixedEventContMM; + + FemtoUniverseContainer sameEventCont1D_PP; + FemtoUniverseContainer mixedEventCont1D_PP; + FemtoUniverseContainer sameEventCont1D_MM; + FemtoUniverseContainer mixedEventCont1D_MM; + + FemtoUniversePairCleaner pairCleaner; + FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairSHCentMultKt - sameEventMultCont; - PairSHCentMultKt - mixedEventMultCont; - - PairSHCentMultKt - sameEventMultContPP; - PairSHCentMultKt - mixedEventMultContPP; - - PairSHCentMultKt - sameEventMultContMM; - PairSHCentMultKt - mixedEventMultContMM; + PairSHCentMultKt sameEventMultCont; + PairSHCentMultKt mixedEventMultCont; + + PairSHCentMultKt sameEventMultContPP; + PairSHCentMultKt mixedEventMultContPP; + + PairSHCentMultKt sameEventMultContMM; + PairSHCentMultKt mixedEventMultContMM; float mass1 = -1; float mass2 = -1; /// Histogram output - HistogramRegistry qaRegistry{ - "TrackQA", - {}, - OutputObjHandlingPolicy::AnalysisObject}; - HistogramRegistry resultRegistry{ - "Correlations", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry resultRegistry1D{"Correlations1D", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry resultRegistryPM{"CorrelationsPM", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry resultRegistryPP{"CorrelationsPP", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry resultRegistryMM{"CorrelationsMM", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry MixQaRegistry{ - "MixQaRegistry", - {}, - OutputObjHandlingPolicy::AnalysisObject}; - - HistogramRegistry SameMultRegistryPM{"SameMultRegistryPM", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry MixedMultRegistryPM{"MixedMultRegistryPM", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - - HistogramRegistry SameMultRegistryPP{"SameMultRegistryPP", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry MixedMultRegistryPP{"MixedMultRegistryPP", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - - HistogramRegistry SameMultRegistryMM{"SameMultRegistryMM", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; - HistogramRegistry MixedMultRegistryMM{"MixedMultRegistryMM", - {}, - OutputObjHandlingPolicy::AnalysisObject, - true, - true}; + HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry resultRegistry1D{"Correlations1D", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry resultRegistryPM{"CorrelationsPM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry resultRegistryPP{"CorrelationsPP", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry resultRegistryMM{"CorrelationsMM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry MixQaRegistry{"MixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; + + HistogramRegistry SameMultRegistryPM{"SameMultRegistryPM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry MixedMultRegistryPM{"MixedMultRegistryPM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + + HistogramRegistry SameMultRegistryPP{"SameMultRegistryPP", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry MixedMultRegistryPP{"MixedMultRegistryPP", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + + HistogramRegistry SameMultRegistryMM{"SameMultRegistryMM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + HistogramRegistry MixedMultRegistryMM{"MixedMultRegistryMM", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; TRandom2* randgen; // PID for protons - bool IsProtonNSigma( - float mom, float nsigmaTPCPr, - float - nsigmaTOFPr) // previous version from: - // https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx + bool IsProtonNSigma(float mom, float nsigmaTPCPr, float nsigmaTOFPr) // previous version from: https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using Configurables: - // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF - // not needed confNsigmaTPC -> TPC Sigma for momentum < 0.5 + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed + // confNsigmaTPC -> TPC Sigma for momentum < 0.5 // confNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > 0.5 if (mom < twotracksconfigs.confTOFPtMin) { @@ -640,8 +315,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { return false; } } else { - if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < - twotracksconfigs.confNsigmaCombined) { + if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -689,30 +363,25 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } } - bool IsPionNSigma(float mom, float nsigmaITSPi, float nsigmaTPCPi, - float nsigmaTOFPi, float nsigmaTPCElReject) + bool IsPionNSigma(float mom, float nsigmaITSPi, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCElReject) { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using Configurables: - // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF - // not needed confNsigmaTPC -> TPC Sigma for momentum < 0.5 - // confNsigmaCombined -> TPC and TOF Pion Sigma (combined) for momentum > - // 0.5 + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed + // confNsigmaTPC -> TPC Sigma for momentum < 0.5 + // confNsigmaCombined -> TPC and TOF Pion Sigma (combined) for momentum > 0.5 if (true) { if (mom < twotracksconfigs.confTOFPtMin) { if (twotracksconfigs.confIsElReject) { - if ((std::abs(nsigmaTPCPi) < twotracksconfigs.confNsigmaTPC) && - (nsigmaTPCElReject < twotracksconfigs.confNsigmaTPCElRejectMin || - nsigmaTPCElReject > twotracksconfigs.confNsigmaTPCElRejectMax)) { + if ((std::abs(nsigmaTPCPi) < twotracksconfigs.confNsigmaTPC) && (nsigmaTPCElReject < twotracksconfigs.confNsigmaTPCElRejectMin || nsigmaTPCElReject > twotracksconfigs.confNsigmaTPCElRejectMax)) { return true; } else { return false; } } else if (twotracksconfigs.confIsAddITSNsigma) { - if (std::hypot(nsigmaITSPi, nsigmaTPCPi) < - twotracksconfigs.confNsigmaITSTPCCombined) { + if (std::hypot(nsigmaITSPi, nsigmaTPCPi) < twotracksconfigs.confNsigmaITSTPCCombined) { return true; } else { return false; @@ -725,8 +394,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } } } else { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < - twotracksconfigs.confNsigmaCombined) { + if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -736,10 +404,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { return false; } - bool IsParticleNSigma(int8_t particle_number, float mom, float nsigmaITSPi, - float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, - float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK, - float nsigmaTPCElReject) + bool IsParticleNSigma(int8_t particle_number, float mom, float nsigmaITSPi, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK, float nsigmaTPCElReject) { if (particle_number == 1) { switch (trackonefilter.confPDGCodePartOne) { @@ -749,8 +414,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { break; case 211: // Pion+ case -211: // Pion- - return IsPionNSigma(mom, nsigmaITSPi, nsigmaTPCPi, nsigmaTOFPi, - nsigmaTPCElReject); + return IsPionNSigma(mom, nsigmaITSPi, nsigmaTPCPi, nsigmaTOFPi, nsigmaTPCElReject); break; case 321: // Kaon+ case -321: // Kaon- @@ -768,8 +432,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { break; case 211: // Pion+ case -211: // Pion- - return IsPionNSigma(mom, nsigmaITSPi, nsigmaTPCPi, nsigmaTOFPi, - nsigmaTPCElReject); + return IsPionNSigma(mom, nsigmaITSPi, nsigmaTPCPi, nsigmaTOFPi, nsigmaTPCElReject); break; case 321: // Kaon+ case -321: // Kaon- @@ -780,9 +443,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } return false; } else { - LOGF(fatal, - "Wrong number of particle chosen! It should be 1 or 2. It is -> %d", - particle_number); + LOGF(fatal, "Wrong number of particle chosen! It should be 1 or 2. It is -> %d", particle_number); } return false; } @@ -790,20 +451,12 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { void init(InitContext&) { eventHisto.init(&qaRegistry); - trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, - confTempFitVarBins, twotracksconfigs.confIsMC, - trackonefilter.confPDGCodePartOne, true, - std::nullopt, twotracksconfigs.confIsAddITSNsigma); + trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, trackonefilter.confPDGCodePartOne, true, std::nullopt, twotracksconfigs.confIsAddITSNsigma); - trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, - confTempFitVarBins, twotracksconfigs.confIsMC, - tracktwofilter.confPDGCodePartTwo, true, - std::nullopt, twotracksconfigs.confIsAddITSNsigma); + trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, tracktwofilter.confPDGCodePartTwo, true, std::nullopt, twotracksconfigs.confIsAddITSNsigma); - MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, - {{120, -0.5, 119.5}}); - MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, - {{120, -0.5, 119.5}}); + MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); mass1 = pdg->Mass(trackonefilter.confPDGCodePartOne); mass2 = pdg->Mass(tracktwofilter.confPDGCodePartTwo); @@ -812,17 +465,11 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!cfgProcessKtMt3DCF) { sameEventCont.init(&resultRegistryPM, confkstarBins, confLMax); mixedEventCont.init(&resultRegistryPM, confkstarBins, confLMax); - sameEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); - mixedEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); + sameEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + mixedEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); } else { - sameEventMultCont.init(&SameMultRegistryPM, confkstarBins, - confMultKstarBins, confKtKstarBins, confLMax, - twotracksconfigs.confIs1D); - mixedEventMultCont.init(&MixedMultRegistryPM, confkstarBins, - confMultKstarBins, confKtKstarBins, confLMax, - twotracksconfigs.confIs1D); + sameEventMultCont.init(&SameMultRegistryPM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); + mixedEventMultCont.init(&MixedMultRegistryPM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); } } @@ -830,89 +477,38 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!cfgProcessKtMt3DCF) { sameEventContPP.init(&resultRegistryPP, confkstarBins, confLMax); mixedEventContPP.init(&resultRegistryPP, confkstarBins, confLMax); - sameEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); - mixedEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); + sameEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + mixedEventContPP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); } else { - sameEventMultContPP.init(&SameMultRegistryPP, confkstarBins, - confMultKstarBins, confKtKstarBins, confLMax, - twotracksconfigs.confIs1D); - mixedEventMultContPP.init(&MixedMultRegistryPP, confkstarBins, - confMultKstarBins, confKtKstarBins, confLMax, - twotracksconfigs.confIs1D); - } - sameEventCont1D_PP.init( - &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, - confmTBins, confmultBins3D, confmTBins3D, - twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, - twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - sameEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); - mixedEventCont1D_PP.init( - &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, - confmTBins, confmultBins3D, confmTBins3D, - twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, - twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - mixedEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); + sameEventMultContPP.init(&SameMultRegistryPP, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); + mixedEventMultContPP.init(&MixedMultRegistryPP, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); + } + sameEventCont1D_PP.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + sameEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + mixedEventCont1D_PP.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + mixedEventCont1D_PP.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); } if (cfgProcessMM) { if (!cfgProcessKtMt3DCF) { sameEventContMM.init(&resultRegistryMM, confkstarBins, confLMax); mixedEventContMM.init(&resultRegistryMM, confkstarBins, confLMax); - sameEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); - mixedEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); + sameEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + mixedEventContMM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); } else { - sameEventMultContMM.init(&SameMultRegistryMM, confkstarBins, - confMultKstarBins, confKtKstarBins, confLMax, - twotracksconfigs.confIs1D); - mixedEventMultContMM.init(&MixedMultRegistryMM, confkstarBins, - confMultKstarBins, confKtKstarBins, confLMax, - twotracksconfigs.confIs1D); - } - sameEventCont1D_MM.init( - &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, - confmTBins, confmultBins3D, confmTBins3D, - twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, - twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - sameEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); - mixedEventCont1D_MM.init( - &resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, - confmTBins, confmultBins3D, confmTBins3D, - twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, - twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); - mixedEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, - tracktwofilter.confPDGCodePartTwo); + sameEventMultContMM.init(&SameMultRegistryMM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); + mixedEventMultContMM.init(&MixedMultRegistryMM, confkstarBins, confMultKstarBins, confKtKstarBins, confLMax, twotracksconfigs.confIs1D); + } + sameEventCont1D_MM.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + sameEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + mixedEventCont1D_MM.init(&resultRegistry1D, confkstarBins, confMultBinsCent, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confEtaBins, twotracksconfigs.confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + mixedEventCont1D_MM.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); } pairCleaner.init(&qaRegistry); if (twotracksconfigs.confIsCPR.value) { - pairCloseRejection.init(&resultRegistry, &qaRegistry, - twotracksconfigs.confDeltaEtaAxis, - twotracksconfigs.confDeltaPhiStarAxis, - twotracksconfigs.confCPRdeltaPhiCutMin.value, - twotracksconfigs.confCPRdeltaPhiCutMax.value, - twotracksconfigs.confCPRdeltaEtaCutMin.value, - twotracksconfigs.confCPRdeltaEtaCutMax.value, - twotracksconfigs.confCPRChosenRadii.value, - twotracksconfigs.confCPRPlotPerRadii.value); - pairCloseRejection.init_kT( - &resultRegistry, confKtKstarBins, twotracksconfigs.confDeltaEtaAxis, - twotracksconfigs.confDeltaPhiStarAxis, - twotracksconfigs.confCPRdeltaPhiCutMinVec.value, - twotracksconfigs.confCPRdeltaPhiCutMaxVec.value, - twotracksconfigs.confCPRdeltaEtaCutMinVec.value, - twotracksconfigs.confCPRdeltaEtaCutMaxVec.value, - twotracksconfigs.confCPRdeltaPhiCutFractionMinVec.value, - twotracksconfigs.confCPRdeltaPhiCutFractionMaxVec.value, - twotracksconfigs.confCPRdeltaEtaCutFractionMinVec.value, - twotracksconfigs.confCPRdeltaEtaCutFractionMaxVec.value, - twotracksconfigs.confIsfilldEtadPhiTPCcls); + pairCloseRejection.init(&resultRegistry, &qaRegistry, twotracksconfigs.confDeltaEtaAxis, twotracksconfigs.confDeltaPhiStarAxis, twotracksconfigs.confCPRdeltaPhiCutMin.value, twotracksconfigs.confCPRdeltaPhiCutMax.value, twotracksconfigs.confCPRdeltaEtaCutMin.value, twotracksconfigs.confCPRdeltaEtaCutMax.value, twotracksconfigs.confCPRChosenRadii.value, twotracksconfigs.confCPRPlotPerRadii.value); + pairCloseRejection.init_kT(&resultRegistry, confKtKstarBins, twotracksconfigs.confDeltaEtaAxis, twotracksconfigs.confDeltaPhiStarAxis, twotracksconfigs.confCPRdeltaPhiCutMinVec.value, twotracksconfigs.confCPRdeltaPhiCutMaxVec.value, twotracksconfigs.confCPRdeltaEtaCutMinVec.value, twotracksconfigs.confCPRdeltaEtaCutMaxVec.value, twotracksconfigs.confCPRdeltaPhiCutFractionMinVec.value, twotracksconfigs.confCPRdeltaPhiCutFractionMaxVec.value, twotracksconfigs.confCPRdeltaEtaCutFractionMinVec.value, twotracksconfigs.confCPRdeltaEtaCutFractionMaxVec.value, twotracksconfigs.confIsfilldEtadPhiTPCcls); } vPIDPartOne = trackonefilter.confPIDPartOne.value; @@ -924,73 +520,43 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { void fillCollision(CollisionType col, bool IsCent) { if (IsCent) { - MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), - colBinningCent.getBin({col.posZ(), col.multV0M()})); + MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinningCent.getBin({col.posZ(), col.multV0M()})); } else { - MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), - colBinningNtr.getBin({col.posZ(), col.multNtr()})); + MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinningNtr.getBin({col.posZ(), col.multNtr()})); } eventHisto.fillQA(col); } - /// This function processes the same event and takes care of all the - /// histogramming - /// \todo the trivial loops over the tracks should be factored out since they - /// will be common to all combinations of T-T, T-V0, V0-V0, ... + /// This function processes the same event and takes care of all the histogramming + /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... /// @tparam PartitionType /// @tparam PartType /// @tparam isMC: enables Monte Carlo truth specific histograms - /// @param groupPartsOne partition for the first particle passed by the - /// process function - /// @param groupPartsTwo partition for the second particle passed by the - /// process function - /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined - /// with FemtoUniverseMCLabels) + /// @param groupPartsOne partition for the first particle passed by the process function + /// @param groupPartsTwo partition for the second particle passed by the process function + /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) /// @param magFieldTesla magnetic field of the collision /// @param multCol multiplicity of the collision template - void doSameEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, - PartType parts, float magFieldTesla, int multCol, - PairType contType, bool fillQA) + void doSameEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, PartType parts, float magFieldTesla, int multCol, PairType contType, bool fillQA) { /// Histogramming same event - if ((contType == PairType::PlusMinus || contType == PairType::PlusPlus) && - fillQA) { + if ((contType == PairType::PlusMinus || contType == PairType::PlusPlus) && fillQA) { for (const auto& part : groupPartsOne) { - if (!IsParticleNSigma( - (int8_t)1, part.p(), - trackCuts.getNsigmaITS(part, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { + if (!IsParticleNSigma((int8_t)1, part.p(), trackCuts.getNsigmaITS(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { continue; } trackHistoPartOne.fillQA(part); if (twotracksconfigs.confIsAddITSNsigma) { trackHistoPartOne.fillQAITSPID<>(part); } - trackHistoPartOne.fillQAMisIden( - part, trackonefilter.confPDGCodePartOne); + trackHistoPartOne.fillQAMisIden(part, trackonefilter.confPDGCodePartOne); } } - if ((contType == PairType::PlusMinus || contType == PairType::MinusMinus) && - fillQA) { + if ((contType == PairType::PlusMinus || contType == PairType::MinusMinus) && fillQA) { for (const auto& part : groupPartsTwo) { - if (!IsParticleNSigma( - (int8_t)2, part.p(), - trackCuts.getNsigmaITS(part, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { + if (!IsParticleNSigma((int8_t)2, part.p(), trackCuts.getNsigmaITS(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Electron))) { continue; } trackHistoPartTwo.fillQA(part); @@ -1003,32 +569,13 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (contType == PairType::PlusMinus) { /// Now build the combinations for non-identical particle pairs - for (const auto& [p1, p2] : combinations( - CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - - if (!IsParticleNSigma( - (int8_t)1, p1.p(), - trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if (!IsParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { continue; } - if (!IsParticleNSigma( - (int8_t)2, p2.p(), - trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { + if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { continue; } @@ -1038,44 +585,23 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (kT < firstRealElement || kT > lastElement) continue; - float pairFractionTPCsCls = - static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / - static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); - if (pairFractionTPCsCls < - twotracksconfigs.confPairFracSharedTPCclsMin.value || - pairFractionTPCsCls >= - twotracksconfigs.confPairFracSharedTPCclsMax.value) { + float pairFractionTPCsCls = static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); + if (pairFractionTPCsCls < twotracksconfigs.confPairFracSharedTPCclsMin.value || pairFractionTPCsCls >= twotracksconfigs.confPairFracSharedTPCclsMax.value) { continue; } if (twotracksconfigs.confIsCPR.value) { - if (twotracksconfigs.confIsCPRatITS && - twotracksconfigs.confCPRFracMax.value) { - if (pairCloseRejection.isClosePairAtITS( - p1, p2, magFieldTesla, - femto_universe_container::EventType::same)) { + if (twotracksconfigs.confIsCPRatITS && twotracksconfigs.confCPRFracMax.value) { + if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } else { if (twotracksconfigs.confIsCPRkT) { - if (pairCloseRejection.isClosePairkT( - p1, p2, femto_universe_container::EventType::same, kT, - twotracksconfigs.confIsCircularCut, - twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, - twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax, - twotracksconfigs.confIsfilldEtadPhiTPCcls, - pairFractionTPCsCls)) { + if (pairCloseRejection.isClosePairkT(p1, p2, femto_universe_container::EventType::same, kT, twotracksconfigs.confIsCircularCut, twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsfilldEtadPhiTPCcls, pairFractionTPCsCls)) { continue; } } else { - if (pairCloseRejection.isClosePairFrac( - p1, p2, magFieldTesla, - femto_universe_container::EventType::same, - twotracksconfigs.confCPRDphiAvgOrDist, - twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax, - twotracksconfigs.confIsCircularCut)) { + if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, twotracksconfigs.confCPRDphiAvgOrDist, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsCircularCut)) { continue; } } @@ -1086,39 +612,16 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!pairCleaner.isCleanPair(p1, p2, parts)) { continue; } - sameEventMultCont.fillMultNumDen( - p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, - kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, - twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else { - for (const auto& [p1, p2] : - combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, - groupPartsOne))) { - - if (!IsParticleNSigma( - (int8_t)2, p1.p(), - trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { + for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { + + if (!IsParticleNSigma((int8_t)2, p1.p(), trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { continue; } - if (!IsParticleNSigma( - (int8_t)2, p2.p(), - trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { + if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { continue; } @@ -1129,13 +632,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (kT < firstRealElement || kT > lastElement) continue; - float pairFractionTPCsCls = - static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / - static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); - if (pairFractionTPCsCls < - twotracksconfigs.confPairFracSharedTPCclsMin.value || - pairFractionTPCsCls >= - twotracksconfigs.confPairFracSharedTPCclsMax.value) { + float pairFractionTPCsCls = static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); + if (pairFractionTPCsCls < twotracksconfigs.confPairFracSharedTPCclsMin.value || pairFractionTPCsCls >= twotracksconfigs.confPairFracSharedTPCclsMax.value) { continue; } @@ -1151,41 +649,22 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (twotracksconfigs.confIsCPR.value) { - if (twotracksconfigs.confIsCPRatITS && - twotracksconfigs.confCPRFracMax.value) { - if (pairCloseRejection.isClosePairAtITS( - part1, part2, magFieldTesla, - femto_universe_container::EventType::same)) { + if (twotracksconfigs.confIsCPRatITS && twotracksconfigs.confCPRFracMax.value) { + if (pairCloseRejection.isClosePairAtITS(part1, part2, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } else { if (twotracksconfigs.confIsCPRkT) { - if (pairCloseRejection.isClosePairkT( - p1, p2, femto_universe_container::EventType::same, kT, - twotracksconfigs.confIsCircularCut, - twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, - twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax, - twotracksconfigs.confIsfilldEtadPhiTPCcls, - pairFractionTPCsCls)) { + if (pairCloseRejection.isClosePairkT(part1, part2, femto_universe_container::EventType::same, kT, twotracksconfigs.confIsCircularCut, twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsfilldEtadPhiTPCcls, pairFractionTPCsCls)) { continue; } if (twotracksconfigs.confIsCPRFraction) { - if (pairCloseRejection.isClosePairFractionkT( - p1, p2, femto_universe_container::EventType::same, kT, - magFieldTesla, twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax)) { + if (pairCloseRejection.isClosePairFractionkT(part1, part2, femto_universe_container::EventType::same, kT, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax)) { continue; } } } else { - if (pairCloseRejection.isClosePairFrac( - part1, part2, magFieldTesla, - femto_universe_container::EventType::same, - twotracksconfigs.confCPRDphiAvgOrDist, - twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax, - twotracksconfigs.confIsCircularCut)) { + if (pairCloseRejection.isClosePairFrac(part1, part2, magFieldTesla, femto_universe_container::EventType::same, twotracksconfigs.confCPRDphiAvgOrDist, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsCircularCut)) { continue; } } @@ -1202,93 +681,53 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { float outsideref = 0.0; switch (contType) { case PairType::PlusPlus: { - f3d = FemtoUniverseMath::newpairfunc( - part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - sameEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || - (f3d[1] < outsideref && f3d[2] < outsideref)) { - sameEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { + sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || - (f3d[1] >= outsideref && f3d[2] < outsideref)) { - sameEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { + sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - sameEventCont1D_PP.setPair(part1, part2, multCol, - twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + sameEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS( - part1, part2, magFieldTesla, - femto_universe_container::EventType::same, kv); + pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::same, kv); } break; } case PairType::MinusMinus: { - f3d = FemtoUniverseMath::newpairfunc( - part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - sameEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || - (f3d[1] < outsideref && f3d[2] < outsideref)) { - sameEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { + sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || - (f3d[1] >= outsideref && f3d[2] < outsideref)) { - sameEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { + sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - sameEventCont1D_MM.setPair(part1, part2, multCol, - twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + sameEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS( - part1, part2, magFieldTesla, - femto_universe_container::EventType::same, kv); + pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::same, kv); } break; } @@ -1307,57 +746,40 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { { fillCollision(col, confIsCent); - auto thegroupPartsOne = partsOne->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); - auto thegroupPartsTwo = partsTwo->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); bool fillQA = true; randgen = new TRandom2(0); if (confIsCent) { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, - col.magField(), col.multV0M(), PairType::PlusMinus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::PlusMinus, fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, - col.magField(), col.multV0M(), PairType::PlusPlus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multV0M(), PairType::PlusPlus, fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, - col.magField(), col.multV0M(), PairType::MinusMinus, - fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::MinusMinus, fillQA); } } else { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, - col.magField(), col.multNtr(), PairType::PlusMinus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::PlusMinus, fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, - col.magField(), col.multNtr(), PairType::PlusPlus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multNtr(), PairType::PlusPlus, fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, - col.magField(), col.multNtr(), PairType::MinusMinus, - fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::MinusMinus, fillQA); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processSameEvent, "Enable processing same event", true); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processSameEvent, "Enable processing same event", true); /// process function for to call doSameEvent with Monte Carlo - /// \param col subscribe to the collision table (Monte Carlo Reconstructed - /// reconstructed) - /// \param parts subscribe to joined table FemtoUniverseParticles and - /// FemtoUniverseMCLables to access Monte Carlo truth + /// \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed) + /// \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table void processSameEventMC(o2::aod::FdCollision const& col, FilteredFemtoRecoParticles const& parts, @@ -1365,79 +787,55 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { { fillCollision(col, confIsCent); - auto thegroupPartsOne = partsOneMC->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); - auto thegroupPartsTwo = partsTwoMC->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); bool fillQA = true; randgen = new TRandom2(0); if (confIsCent) { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, - col.magField(), col.multV0M(), PairType::PlusMinus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::PlusMinus, fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, - col.magField(), col.multV0M(), PairType::PlusPlus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multV0M(), PairType::PlusPlus, fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, - col.magField(), col.multV0M(), PairType::MinusMinus, - fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multV0M(), PairType::MinusMinus, fillQA); } } else { if (cfgProcessPM) { - doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, - col.magField(), col.multNtr(), PairType::PlusMinus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::PlusMinus, fillQA); } if (cfgProcessPP) { - doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, - col.magField(), col.multNtr(), PairType::PlusPlus, - fillQA); + doSameEvent(thegroupPartsOne, thegroupPartsOne, parts, col.magField(), col.multNtr(), PairType::PlusPlus, fillQA); } if (cfgProcessMM) { - doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, - col.magField(), col.multNtr(), PairType::MinusMinus, - fillQA); + doSameEvent(thegroupPartsTwo, thegroupPartsTwo, parts, col.magField(), col.multNtr(), PairType::MinusMinus, fillQA); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processSameEventMC, - "Enable processing same event for Monte Carlo", false); - - /// This function processes the same event and takes care of all the - /// histogramming - /// \todo the trivial loops over the tracks should be factored out since they - /// will be common to all combinations of T-T, T-V0, V0-V0, ... + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processSameEventMC, "Enable processing same event for Monte Carlo", false); + + /// This function processes the same event and takes care of all the histogramming + /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... /// @tparam PartitionType /// @tparam PartType /// @tparam isMC: enables Monte Carlo truth specific histograms - /// @param groupPartsOne partition for the first particle passed by the - /// process function - /// @param groupPartsTwo partition for the second particle passed by the - /// process function - /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined - /// with FemtoUniverseMCLabels) + /// @param groupPartsOne partition for the first particle passed by the process function + /// @param groupPartsTwo partition for the second particle passed by the process function + /// @param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) /// @param magFieldTesla magnetic field of the collision /// @param multCol multiplicity of the collision template - void doSameEventMCTruth(PartitionType groupPartsOne, - PartitionType groupPartsTwo, int multCol, - PairType contType, bool fillQA) + void doSameEventMCTruth(PartitionType groupPartsOne, PartitionType groupPartsTwo, int multCol, PairType contType, bool fillQA) { randgen = new TRandom2(0); /// Histogramming same event if ((cfgProcessPM || cfgProcessPP) && fillQA) { for (const auto& part : groupPartsOne) { - if (part.partType() == - uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { int pdgCode = static_cast(part.tempFitVar()); const auto& pdgParticle = pdg->GetParticle(pdgCode); if (pdgParticle) { @@ -1449,8 +847,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if ((cfgProcessPM || cfgProcessMM) && fillQA) { for (const auto& part : groupPartsTwo) { - if (part.partType() == - uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { int pdgCode = static_cast(part.tempFitVar()); const auto& pdgParticle = pdg->GetParticle(pdgCode); if (pdgParticle) { @@ -1463,27 +860,19 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (cfgProcessPM) { /// Now build the combinations for non-identical particle pairs - for (const auto& [p1, p2] : combinations( - CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { int pdgCodePartOne = static_cast(p1.tempFitVar()); const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); int pdgCodePartTwo = static_cast(p2.tempFitVar()); const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo); - if (pdgParticleOne && pdgParticleTwo && - (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && - (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { + if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); - sameEventMultCont.fillMultNumDen( - p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, - kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, - twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } } else { - for (const auto& [p1, p2] : - combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, - groupPartsOne))) { + for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { int pdgCodePartOne = static_cast(p1.tempFitVar()); const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); @@ -1494,9 +883,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { double rand; rand = randgen->Rndm(); std::vector f3d; - if (pdgParticleOne && pdgParticleTwo && - (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && - (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { + if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { auto part1 = p1; auto part2 = p2; @@ -1509,40 +896,22 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { switch (contType) { case PairType::PlusPlus: { if (twotracksconfigs.confIs1D) { - f3d = FemtoUniverseMath::newpairfunc( - part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); float weight = f3d[5]; - sameEventCont1D_PP.setPair( - part1, part2, multCol, twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + sameEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } else { - sameEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + sameEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } break; } case PairType::MinusMinus: { if (twotracksconfigs.confIs1D) { - f3d = FemtoUniverseMath::newpairfunc( - part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); float weight = f3d[5]; - sameEventCont1D_MM.setPair( - part1, part2, multCol, twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + sameEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } else { - sameEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::same, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + sameEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } break; } @@ -1556,20 +925,16 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } /// process function for to call doSameEvent with Monte Carlo - /// \param col subscribe to the collision table (Monte Carlo Reconstructed - /// reconstructed) - /// \param parts subscribe to joined table FemtoUniverseParticles and - /// FemtoUniverseMCLables to access Monte Carlo truth + /// \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed) + /// \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table void processSameEventMCTruth(o2::aod::FdCollision const& col, FemtoTruthParticles const&) { fillCollision(col, confIsCent); - auto thegroupPartsOne = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); - auto thegroupPartsTwo = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); + auto thegroupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); bool fillQA = true; PairType pairType = PairType::PlusMinus; @@ -1583,81 +948,49 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (confIsCent) { if (cfgProcessPM) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, - col.multV0M(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, col.multV0M(), pairType, fillQA); } if (cfgProcessPP) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, - col.multV0M(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, col.multV0M(), pairType, fillQA); } if (cfgProcessMM) { - doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, - col.multV0M(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, col.multV0M(), pairType, fillQA); } } else { if (cfgProcessPM) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, - col.multNtr(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsTwo, col.multNtr(), pairType, fillQA); } if (cfgProcessPP) { - doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, - col.multNtr(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsOne, thegroupPartsOne, col.multNtr(), pairType, fillQA); } if (cfgProcessMM) { - doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, - col.multNtr(), pairType, fillQA); + doSameEventMCTruth(thegroupPartsTwo, thegroupPartsTwo, col.multNtr(), pairType, fillQA); } } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processSameEventMCTruth, - "Enable processing same event for MC truth", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processSameEventMCTruth, "Enable processing same event for MC truth", false); /// This function processes the mixed event - /// \todo the trivial loops over the collisions and tracks should be factored - /// out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... /// \tparam PartitionType /// \tparam PartType /// \tparam isMC: enables Monte Carlo truth specific histograms - /// \param groupPartsOne partition for the first particle passed by the - /// process function - /// \param groupPartsTwo partition for the second particle passed by the - /// process function - /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined - /// with FemtoUniverseMCLabels) + /// \param groupPartsOne partition for the first particle passed by the process function + /// \param groupPartsTwo partition for the second particle passed by the process function + /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) /// \param magFieldTesla magnetic field of the collision /// \param multCol multiplicity of the collision template - void doMixedEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, - float magFieldTesla, int multCol, PairType contType) + void doMixedEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, float magFieldTesla, int multCol, PairType contType) { - for (const auto& [p1, p2] : combinations( - CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - - if (!IsParticleNSigma( - (int8_t)2, p1.p(), - trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if (!IsParticleNSigma((int8_t)2, p1.p(), trackCuts.getNsigmaITS(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Electron))) { continue; } - if (!IsParticleNSigma( - (int8_t)2, p2.p(), - trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), - trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { + if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaITS(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Electron))) { continue; } @@ -1668,13 +1001,8 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (kT < firstRealElement || kT > lastElement) continue; - float pairFractionTPCsCls = - static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / - static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); - if (pairFractionTPCsCls < - twotracksconfigs.confPairFracSharedTPCclsMin.value || - pairFractionTPCsCls >= - twotracksconfigs.confPairFracSharedTPCclsMax.value) { + float pairFractionTPCsCls = static_cast((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast((p1.tpcNClsFound() + p2.tpcNClsFound())); + if (pairFractionTPCsCls < twotracksconfigs.confPairFracSharedTPCclsMin.value || pairFractionTPCsCls >= twotracksconfigs.confPairFracSharedTPCclsMax.value) { continue; } @@ -1689,41 +1017,22 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (twotracksconfigs.confIsCPR.value) { - if (twotracksconfigs.confIsCPRatITS && - twotracksconfigs.confCPRFracMax.value) { - if (pairCloseRejection.isClosePairAtITS( - part1, part2, magFieldTesla, - femto_universe_container::EventType::mixed)) { + if (twotracksconfigs.confIsCPRatITS && twotracksconfigs.confCPRFracMax.value) { + if (pairCloseRejection.isClosePairAtITS(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } else { if (twotracksconfigs.confIsCPRkT) { - if (pairCloseRejection.isClosePairkT( - p1, p2, femto_universe_container::EventType::mixed, kT, - twotracksconfigs.confIsCircularCut, - twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, - twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax, - twotracksconfigs.confIsfilldEtadPhiTPCcls, - pairFractionTPCsCls)) { + if (pairCloseRejection.isClosePairkT(part1, part2, femto_universe_container::EventType::mixed, kT, twotracksconfigs.confIsCircularCut, twotracksconfigs.confCPRDphiAvgOrDist, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsfilldEtadPhiTPCcls, pairFractionTPCsCls)) { continue; } if (twotracksconfigs.confIsCPRFraction) { - if (pairCloseRejection.isClosePairFractionkT( - p1, p2, femto_universe_container::EventType::mixed, kT, - magFieldTesla, twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax)) { + if (pairCloseRejection.isClosePairFractionkT(part1, part2, femto_universe_container::EventType::mixed, kT, magFieldTesla, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax)) { continue; } } } else { - if (pairCloseRejection.isClosePairFrac( - part1, part2, magFieldTesla, - femto_universe_container::EventType::mixed, - twotracksconfigs.confCPRDphiAvgOrDist, - twotracksconfigs.confCPRDistMax, - twotracksconfigs.confCPRFracMax, - twotracksconfigs.confIsCircularCut)) { + if (pairCloseRejection.isClosePairFrac(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed, twotracksconfigs.confCPRDphiAvgOrDist, twotracksconfigs.confCPRDistMax, twotracksconfigs.confCPRFracMax, twotracksconfigs.confIsCircularCut)) { continue; } } @@ -1736,103 +1045,59 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { switch (contType) { case PairType::PlusMinus: { - mixedEventMultCont.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + mixedEventMultCont.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); break; } case PairType::PlusPlus: { - f3d = FemtoUniverseMath::newpairfunc( - part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - mixedEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || - (f3d[1] < outsideref && f3d[2] < outsideref)) { - mixedEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { + mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || - (f3d[1] >= outsideref && f3d[2] < outsideref)) { - mixedEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { + mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - mixedEventCont1D_PP.setPair(part1, part2, multCol, - twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS( - part1, part2, magFieldTesla, - femto_universe_container::EventType::mixed, kv); + pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed, kv); } break; } case PairType::MinusMinus: { - f3d = FemtoUniverseMath::newpairfunc( - part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); + f3d = FemtoUniverseMath::newpairfunc(part1, mass1, part2, mass2, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); if (!twotracksconfigs.confUseCCImCut) { - mixedEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } else { if (twotracksconfigs.confUse1stand3rd) { - if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || - (f3d[1] < outsideref && f3d[2] < outsideref)) { - mixedEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] >= outsideref && f3d[2] >= outsideref) || (f3d[1] < outsideref && f3d[2] < outsideref)) { + mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else if (twotracksconfigs.confUse2ndand4th) { - if ((f3d[1] < outsideref && f3d[2] >= outsideref) || - (f3d[1] >= outsideref && f3d[2] < outsideref)) { - mixedEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, - 2, multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + if ((f3d[1] < outsideref && f3d[2] >= outsideref) || (f3d[1] >= outsideref && f3d[2] < outsideref)) { + mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } } if (twotracksconfigs.confIsMC || twotracksconfigs.confUse3D) { float weight = 1.0f; - mixedEventCont1D_MM.setPair(part1, part2, multCol, - twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } if (twotracksconfigs.confIsFillAngqLCMS) { kv = std::sqrt(f3d[1] * f3d[1] + f3d[2] * f3d[2] + f3d[3] * f3d[3]); - pairCloseRejection.ClosePairqLCMS( - part1, part2, magFieldTesla, - femto_universe_container::EventType::mixed, kv); + pairCloseRejection.ClosePairqLCMS(part1, part2, magFieldTesla, femto_universe_container::EventType::mixed, kv); } break; } @@ -1859,13 +1124,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations( - colBinningCent, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningCent, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill( - HIST("MixingQA/hMECollisionBins"), - colBinningCent.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningCent.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -1875,41 +1137,24 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (cfgProcessPM) { - auto groupPartsOne = - partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = - partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = - partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processMixedEventCent, - "Enable processing mixed events for centrality", true); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventCent, "Enable processing mixed events for centrality", true); /// process function for to call doMixedEvent with Data /// @param cols subscribe to the collisions table (Data) @@ -1927,13 +1172,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : - soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill( - HIST("MixingQA/hMECollisionBins"), - colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -1943,52 +1185,32 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (cfgProcessPM) { - auto groupPartsOne = - partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = - partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = - partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processMixedEventNtr, - "Enable processing mixed events for centrality", false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventNtr, "Enable processing mixed events for centrality", false); /// brief process function for to call doMixedEvent with Monte Carlo - /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed - /// reconstructed) - /// @param parts subscribe to joined table FemtoUniverseParticles and - /// FemtoUniverseMCLables to access Monte Carlo truth + /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed) + /// @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processMixedEventMCCent( - o2::aod::FdCollisions const& cols, - soa::Join const&, - o2::aod::FdMCParticles const&) + void processMixedEventMCCent(o2::aod::FdCollisions const& cols, + soa::Join const&, + o2::aod::FdMCParticles const&) { randgen = new TRandom2(0); PairType pairType = PairType::PlusMinus; @@ -2000,13 +1222,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations( - colBinningCent, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningCent, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill( - HIST("MixingQA/hMECollisionBins"), - colBinningCent.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningCent.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -2014,58 +1233,36 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (magFieldTesla1 != magFieldTesla2) { continue; } - /// \todo before mixing we should check whether both collisions contain a - /// pair of particles! - // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || - // partsTwo.size() == 0 ) continue; + /// \todo before mixing we should check whether both collisions contain a pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; if (cfgProcessPM) { - auto groupPartsOne = - partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = - partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = - partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processMixedEventMCCent, "Enable processing mixed events MC", - false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventMCCent, "Enable processing mixed events MC", false); /// brief process function for to call doMixedEvent with Monte Carlo - /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed - /// reconstructed) - /// @param parts subscribe to joined table FemtoUniverseParticles and - /// FemtoUniverseMCLables to access Monte Carlo truth + /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed) + /// @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processMixedEventMCNtr( - o2::aod::FdCollisions const& cols, - soa::Join const&, - o2::aod::FdMCParticles const&) + void processMixedEventMCNtr(o2::aod::FdCollisions const& cols, + soa::Join const&, + o2::aod::FdMCParticles const&) { randgen = new TRandom2(0); PairType pairType = PairType::PlusMinus; @@ -2077,13 +1274,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : - soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill( - HIST("MixingQA/hMECollisionBins"), - colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); const auto& magFieldTesla1 = collision1.magField(); const auto& magFieldTesla2 = collision2.magField(); @@ -2091,70 +1285,44 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (magFieldTesla1 != magFieldTesla2) { continue; } - /// \todo before mixing we should check whether both collisions contain a - /// pair of particles! - // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || - // partsTwo.size() == 0 ) continue; + /// \todo before mixing we should check whether both collisions contain a pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; if (cfgProcessPM) { - auto groupPartsOne = - partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = - partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = - partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision1.globalIndex(), cache); - auto groupPartsTwo = - partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, - collision2.globalIndex(), cache); - doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, - multiplicityCol, pairType); + auto groupPartsOne = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEvent(groupPartsOne, groupPartsTwo, magFieldTesla1, multiplicityCol, pairType); } } delete randgen; } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processMixedEventMCNtr, "Enable processing mixed events MC", - false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventMCNtr, "Enable processing mixed events MC", false); /// This function processes the mixed event - /// \todo the trivial loops over the collisions and tracks should be factored - /// out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... /// \tparam PartitionType /// \tparam PartType /// \tparam isMC: enables Monte Carlo truth specific histograms - /// \param groupPartsOne partition for the first particle passed by the - /// process function - /// \param groupPartsTwo partition for the second particle passed by the - /// process function - /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined - /// with FemtoUniverseMCLabels) + /// \param groupPartsOne partition for the first particle passed by the process function + /// \param groupPartsTwo partition for the second particle passed by the process function + /// \param parts femtoUniverseParticles table (in case of Monte Carlo joined with FemtoUniverseMCLabels) /// \param magFieldTesla magnetic field of the collision /// \param multCol multiplicity of the collision template - void doMixedEventMCTruth(PartitionType groupPartsOne, - PartitionType groupPartsTwo, int multCol, - PairType contType) + void doMixedEventMCTruth(PartitionType groupPartsOne, PartitionType groupPartsTwo, int multCol, PairType contType) { randgen = new TRandom2(0); - for (const auto& [p1, p2] : combinations( - CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { int pdgCodePartOne = static_cast(p1.tempFitVar()); const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); @@ -2166,9 +1334,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { rand = randgen->Rndm(); std::vector f3d; - if (pdgParticleOne && pdgParticleTwo && - (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && - (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { + if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { auto part1 = p1; auto part2 = p2; @@ -2179,26 +1345,16 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } switch (contType) { case PairType::PlusMinus: { - mixedEventMultCont.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + mixedEventMultCont.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); break; } case PairType::PlusPlus: { if (twotracksconfigs.confIs1D) { float weight = 1.0; - mixedEventCont1D_PP.setPair( - part1, part2, multCol, twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_PP.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } else { - mixedEventMultContPP.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + mixedEventMultContPP.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } break; } @@ -2206,15 +1362,9 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { case PairType::MinusMinus: { if (twotracksconfigs.confIs1D) { float weight = 1.0; - mixedEventCont1D_MM.setPair( - part1, part2, multCol, twotracksconfigs.confUse3D, weight, - twotracksconfigs.confisIdenLCMS); + mixedEventCont1D_MM.setPair(part1, part2, multCol, twotracksconfigs.confUse3D, weight, twotracksconfigs.confisIdenLCMS); } else { - mixedEventMultContMM.fillMultNumDen( - part1, part2, femto_universe_sh_container::EventType::mixed, 2, - multCol, kT, twotracksconfigs.confisIdenLCMS, - twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, - twotracksconfigs.confisIdenPRF); + mixedEventMultContMM.fillMultNumDen(part1, part2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } break; } @@ -2241,50 +1391,29 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : - soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningNtr, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill( - HIST("MixingQA/hMECollisionBins"), - colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); if (cfgProcessPM) { - auto groupPartsOne = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), - cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), - cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), - cache); - auto groupPartsTwo = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), - cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), - cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), - cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, - multiplicityCol, pairType); + auto groupPartsOne = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); } } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processMixedEventNtrMCTruth, - "Enable processing MC Truth mixed events for multiplicity", - false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventNtrMCTruth, "Enable processing MC Truth mixed events for multiplicity", false); /// process function for to call doMixedEvent with Data /// @param cols subscribe to the collisions table (Data) @@ -2301,57 +1430,35 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairType = PairType::MinusMinus; } - for (const auto& [collision1, collision2] : soa::selfCombinations( - colBinningCent, confNEventsMix, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinningCent, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); - MixQaRegistry.fill( - HIST("MixingQA/hMECollisionBins"), - colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinningNtr.getBin({collision1.posZ(), multiplicityCol})); if (cfgProcessPM) { - auto groupPartsOne = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), - cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), - cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); } if (cfgProcessPP) { - auto groupPartsOne = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), - cache); - auto groupPartsTwo = partsOneMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), - cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, - multiplicityCol, pairType); + auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); } if (cfgProcessMM) { - auto groupPartsOne = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), - cache); - auto groupPartsTwo = partsTwoMCTruth->sliceByCached( - aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), - cache); - doMixedEventMCTruth(groupPartsOne, groupPartsTwo, - multiplicityCol, pairType); + auto groupPartsOne = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); + auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); + doMixedEventMCTruth(groupPartsOne, groupPartsTwo, multiplicityCol, pairType); } } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, - processMixedEventCentMCTruth, - "Enable processing MC Truth mixed events for multiplicity", - false); + PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processMixedEventCentMCTruth, "Enable processing MC Truth mixed events for multiplicity", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{ - adaptAnalysisTask( - cfgc), + adaptAnalysisTask(cfgc), }; return workflow; }