diff --git a/PWGLF/DataModel/LFHypernucleiTables.h b/PWGLF/DataModel/LFHypernucleiTables.h index 46955373222..e86ae9e42c7 100644 --- a/PWGLF/DataModel/LFHypernucleiTables.h +++ b/PWGLF/DataModel/LFHypernucleiTables.h @@ -34,49 +34,50 @@ DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); // Multiplicity with DECLARE_SOA_COLUMN(PsiTPC, psiTPC, float); // Psi with TPC estimator DECLARE_SOA_COLUMN(MultTPC, multTPC, float); // Multiplicity with TPC estimator -DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter -DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); // Pt of the He daughter -DECLARE_SOA_COLUMN(PhiHe3, phiHe3, float); // Phi of the He daughter -DECLARE_SOA_COLUMN(EtaHe3, etaHe3, float); // Eta of the He daughter -DECLARE_SOA_COLUMN(PtPi, ptPi, float); // Pt of the Pi daughter -DECLARE_SOA_COLUMN(PhiPi, phiPi, float); // Phi of the Pi daughter -DECLARE_SOA_COLUMN(EtaPi, etaPi, float); // Eta of the Pi daughter -DECLARE_SOA_COLUMN(XPrimVtx, xPrimVtx, float); // Decay vertex of the candidate (x direction) -DECLARE_SOA_COLUMN(YPrimVtx, yPrimVtx, float); // Decay vertex of the candidate (y direction) -DECLARE_SOA_COLUMN(ZPrimVtx, zPrimVtx, float); // Decay vertex of the candidate (z direction) -DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); // Decay vertex of the candidate (x direction) -DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); // Decay vertex of the candidate (y direction) -DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); // Decay vertex of the candidate (z direction) -DECLARE_SOA_COLUMN(MassH3L, massH3L, float); // Squared mass w/ hypertriton mass hypo -DECLARE_SOA_COLUMN(MassH4L, massH4L, float); // Squared mass w/ H4L mass hypo -DECLARE_SOA_COLUMN(DcaV0Daug, dcaV0Daug, float); // DCA between daughters -DECLARE_SOA_COLUMN(CosPA, cosPA, double); // Cosine of the pointing angle -DECLARE_SOA_COLUMN(NSigmaHe, nSigmaHe, float); // Number of sigmas of the He daughter -DECLARE_SOA_COLUMN(NTPCclusHe, nTPCclusHe, uint8_t); // Number of TPC clusters of the He daughter -DECLARE_SOA_COLUMN(NTPCclusPi, nTPCclusPi, uint8_t); // Number of TPC clusters of the Pi daughter -DECLARE_SOA_COLUMN(TPCsignalHe, tpcSignalHe, uint16_t); // TPC signal of the He daughter -DECLARE_SOA_COLUMN(TPCsignalPi, tpcSignalPi, uint16_t); // TPC signal of the Pi daughter -DECLARE_SOA_COLUMN(TPCChi2He, tpcChi2He, float); // TPC chi2 of the He daughter -DECLARE_SOA_COLUMN(TrackedClSize, trackedClSize, int); // int: zero for non-tracked candidates -DECLARE_SOA_COLUMN(Flags, flags, uint8_t); // Flags for PID in tracking (bits [0, 3] for negative daughter, [4,7] for positive daughter) -DECLARE_SOA_COLUMN(TPCmomHe, tpcMomHe, float); // TPC momentum of the He daughter -DECLARE_SOA_COLUMN(TPCmomPi, tpcMomPi, float); // TPC momentum of the Pi daughter -DECLARE_SOA_COLUMN(ITSclusterSizesHe, itsClusterSizesHe, uint32_t); // ITS cluster size of the He daughter -DECLARE_SOA_COLUMN(ITSclusterSizesPi, itsClusterSizesPi, uint32_t); // ITS cluster size of the Pi daughter +DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter +DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); // Pt of the He daughter +DECLARE_SOA_COLUMN(PhiHe3, phiHe3, float); // Phi of the He daughter +DECLARE_SOA_COLUMN(EtaHe3, etaHe3, float); // Eta of the He daughter +DECLARE_SOA_COLUMN(PtPi, ptPi, float); // Pt of the Pi daughter +DECLARE_SOA_COLUMN(PhiPi, phiPi, float); // Phi of the Pi daughter +DECLARE_SOA_COLUMN(EtaPi, etaPi, float); // Eta of the Pi daughter +DECLARE_SOA_COLUMN(XPrimVtx, xPrimVtx, float); // Decay vertex of the candidate (x direction) +DECLARE_SOA_COLUMN(YPrimVtx, yPrimVtx, float); // Decay vertex of the candidate (y direction) +DECLARE_SOA_COLUMN(ZPrimVtx, zPrimVtx, float); // Decay vertex of the candidate (z direction) +DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); // Decay vertex of the candidate (x direction) +DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); // Decay vertex of the candidate (y direction) +DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); // Decay vertex of the candidate (z direction) +DECLARE_SOA_COLUMN(MassH3L, massH3L, float); // Squared mass w/ hypertriton mass hypo +DECLARE_SOA_COLUMN(MassH4L, massH4L, float); // Squared mass w/ H4L mass hypo +DECLARE_SOA_COLUMN(DcaV0Daug, dcaV0Daug, float); // DCA between daughters +DECLARE_SOA_COLUMN(CosPA, cosPA, double); // Cosine of the pointing angle +DECLARE_SOA_COLUMN(NSigmaHe, nSigmaHe, float); // Number of sigmas of the He daughter +DECLARE_SOA_COLUMN(NTPCclusHe, nTPCclusHe, uint8_t); // Number of TPC clusters of the He daughter +DECLARE_SOA_COLUMN(NTPCclusPi, nTPCclusPi, uint8_t); // Number of TPC clusters of the Pi daughter +DECLARE_SOA_COLUMN(TPCsignalHe, tpcSignalHe, uint16_t); // TPC signal of the He daughter +DECLARE_SOA_COLUMN(TPCsignalPi, tpcSignalPi, uint16_t); // TPC signal of the Pi daughter +DECLARE_SOA_COLUMN(TPCChi2He, tpcChi2He, float); // TPC chi2 of the He daughter +DECLARE_SOA_COLUMN(TrackedClSize, trackedClSize, int); // int: zero for non-tracked candidates +DECLARE_SOA_COLUMN(Flags, flags, uint8_t); // Flags for PID in tracking (bits [0, 3] for negative daughter, [4,7] for positive daughter) +DECLARE_SOA_COLUMN(TPCmomHe, tpcMomHe, float); // TPC momentum of the He daughter +DECLARE_SOA_COLUMN(TPCmomPi, tpcMomPi, float); // TPC momentum of the Pi daughter +DECLARE_SOA_COLUMN(TOFMass, tofMass, float); // TOF mass of the candidate +DECLARE_SOA_COLUMN(ITSclusterSizesHe, itsClusterSizesHe, uint32_t); // ITS cluster size of the He daughter +DECLARE_SOA_COLUMN(ITSclusterSizesPi, itsClusterSizesPi, uint32_t); // ITS cluster size of the Pi daughter DECLARE_SOA_COLUMN(ITSclusterSizesHyp, itsClusterSizesHyp, uint32_t); // ITS cluster size of the Pi daughter -DECLARE_SOA_COLUMN(DcaHe, dcaHe, float); // DCA between He daughter and V0 -DECLARE_SOA_COLUMN(DcaPi, dcaPi, float); // DCA between pi daughter and V0 -DECLARE_SOA_COLUMN(GenPt, genPt, float); // Pt of the hypertriton -DECLARE_SOA_COLUMN(GenPhi, genPhi, float); // Phi of the hypertriton -DECLARE_SOA_COLUMN(GenEta, genEta, float); // Eta of the hypertriton -DECLARE_SOA_COLUMN(GenPtHe3, genPtHe3, float); // Pt of the He daughter (to be used for the recalibration) -DECLARE_SOA_COLUMN(GenXDecVtx, genXDecVtx, float); // Decay vertex of the candidate (x direction) -DECLARE_SOA_COLUMN(GenYDecVtx, genYDecVtx, float); // Decay vertex of the candidate (y direction) -DECLARE_SOA_COLUMN(GenZDecVtx, genZDecVtx, float); // Decay vertex of the candidate (z direction) -DECLARE_SOA_COLUMN(IsReco, isReco, bool); // bool: true for reco -DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for signal -DECLARE_SOA_COLUMN(IsRecoMCCollision, isRecoMCCollision, bool); // bool: true for reco MC collision -DECLARE_SOA_COLUMN(IsSurvEvSel, isSurvEvSel, bool); // bool: true for survived event selection +DECLARE_SOA_COLUMN(DcaHe, dcaHe, float); // DCA between He daughter and V0 +DECLARE_SOA_COLUMN(DcaPi, dcaPi, float); // DCA between pi daughter and V0 +DECLARE_SOA_COLUMN(GenPt, genPt, float); // Pt of the hypertriton +DECLARE_SOA_COLUMN(GenPhi, genPhi, float); // Phi of the hypertriton +DECLARE_SOA_COLUMN(GenEta, genEta, float); // Eta of the hypertriton +DECLARE_SOA_COLUMN(GenPtHe3, genPtHe3, float); // Pt of the He daughter (to be used for the recalibration) +DECLARE_SOA_COLUMN(GenXDecVtx, genXDecVtx, float); // Decay vertex of the candidate (x direction) +DECLARE_SOA_COLUMN(GenYDecVtx, genYDecVtx, float); // Decay vertex of the candidate (y direction) +DECLARE_SOA_COLUMN(GenZDecVtx, genZDecVtx, float); // Decay vertex of the candidate (z direction) +DECLARE_SOA_COLUMN(IsReco, isReco, bool); // bool: true for reco +DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for signal +DECLARE_SOA_COLUMN(IsRecoMCCollision, isRecoMCCollision, bool); // bool: true for reco MC collision +DECLARE_SOA_COLUMN(IsSurvEvSel, isSurvEvSel, bool); // bool: true for survived event selection } // namespace hyperrec DECLARE_SOA_TABLE(DataHypCands, "AOD", "HYPCANDS", @@ -91,6 +92,7 @@ DECLARE_SOA_TABLE(DataHypCands, "AOD", "HYPCANDS", hyperrec::DcaV0Daug, hyperrec::DcaHe, hyperrec::DcaPi, hyperrec::NSigmaHe, hyperrec::NTPCclusHe, hyperrec::NTPCclusPi, hyperrec::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, hyperrec::TPCChi2He, + hyperrec::TOFMass, hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi, hyperrec::Flags, hyperrec::TrackedClSize); @@ -109,6 +111,7 @@ DECLARE_SOA_TABLE(DataHypCandsFlow, "AOD", "HYPCANDSFLOW", hyperrec::DcaV0Daug, hyperrec::DcaHe, hyperrec::DcaPi, hyperrec::NSigmaHe, hyperrec::NTPCclusHe, hyperrec::NTPCclusPi, hyperrec::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, hyperrec::TPCChi2He, + hyperrec::TOFMass, hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi, hyperrec::Flags, hyperrec::TrackedClSize); @@ -124,6 +127,7 @@ DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS", hyperrec::DcaV0Daug, hyperrec::DcaHe, hyperrec::DcaPi, hyperrec::NSigmaHe, hyperrec::NTPCclusHe, hyperrec::NTPCclusPi, hyperrec::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, hyperrec::TPCChi2He, + hyperrec::TOFMass, hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi, hyperrec::Flags, hyperrec::TrackedClSize, hyperrec::GenPt, diff --git a/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx b/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx index 0068d7a506e..6acf6578717 100644 --- a/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx @@ -34,6 +34,8 @@ #include "EventFiltering/ZorroSummary.h" #include "Common/Core/PID/TPCPIDResponse.h" +#include "Common/Core/PID/PIDTOF.h" +#include "Common/TableProducer/PID/pidTOFBase.h" #include "DataFormatsTPC/BetheBlochAleph.h" #include "DCAFitter/DCAFitterN.h" #include "PWGLF/Utils/svPoolCreator.h" @@ -44,7 +46,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using std::array; using CollBracket = o2::math_utils::Bracket; -using TracksFull = soa::Join; +using TracksFull = soa::Join; using CollisionsFull = soa::Join; using CollisionsFullMC = soa::Join; @@ -54,7 +56,7 @@ namespace { constexpr double betheBlochDefault[1][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}}; static const std::vector betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; -static const std::vector particleNames{"He3"}; +static const std::vector particleName{"He3"}; std::shared_ptr hEvents; std::shared_ptr hZvtx; std::shared_ptr hCentFT0A; @@ -103,6 +105,7 @@ struct hyperCandidate { uint16_t tpcSignalHe3 = 0u; uint16_t tpcSignalPi = 0u; float tpcChi2He3 = 0.f; + float massTOFHe3 = 0.f; uint8_t nTPCClustersHe3 = 0u; uint8_t nTPCClustersPi = 0u; uint32_t clusterSizeITSHe3 = 0u; @@ -152,6 +155,8 @@ struct hyperRecoTask { o2::vertexing::DCAFitterN<2> fitter; svPoolCreator svCreator{heDauPdg, 211}; + o2::pid::tof::Beta responseBeta; + // daughter masses float he3Mass = o2::constants::physics::MassHelium3; float he4Mass = o2::constants::physics::MassAlpha; @@ -160,7 +165,7 @@ struct hyperRecoTask { Configurable useCustomVertexer{"useCustomVertexer", false, "Use custom vertexer"}; Configurable skipAmbiTracks{"skipAmbiTracks", false, "Skip ambiguous tracks"}; Configurable customVertexerTimeMargin{"customVertexerTimeMargin", 800, "Time margin for custom vertexer (ns)"}; - Configurable> cfgBetheBlochParams{"cfgBetheBlochParams", {betheBlochDefault[0], 1, 6, particleNames, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for He3"}; + Configurable> cfgBetheBlochParams{"cfgBetheBlochParams", {betheBlochDefault[0], 1, 6, particleName, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for He3"}; Configurable cfgCompensatePIDinTracking{"cfgCompensatePIDinTracking", true, "If true, divide tpcInnerParam by the electric charge"}; Configurable cfgMaterialCorrection{"cfgMaterialCorrection", static_cast(o2::base::Propagator::MatCorrType::USEMatCorrNONE), "Type of material correction"}; @@ -500,6 +505,12 @@ struct hyperRecoTask { hypCand.piTrackID = piTrack.globalIndex(); hypCand.collisionID = collision.globalIndex(); + if (heTrack.hasTOF()) { + float beta = responseBeta.GetBeta(heTrack); + beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked + hypCand.massTOFHe3 = hypCand.momHe3TPC * 2.f * std::sqrt(1.f / (beta * beta) - 1.f); + } + hDeDx3HeSel->Fill(heTrack.sign() * hypCand.momHe3TPC, heTrack.tpcSignal()); hNsigma3HeSel->Fill(heTrack.sign() * hypCand.momHe3TPC, hypCand.nSigmaHe3); hyperCandidates.push_back(hypCand); @@ -653,6 +664,7 @@ struct hyperRecoTask { hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY, hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi, hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, hypCand.tpcChi2He3, + hypCand.massTOFHe3, hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, trackedHypClSize); } } @@ -683,6 +695,7 @@ struct hyperRecoTask { hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY, hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi, hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, hypCand.tpcChi2He3, + hypCand.massTOFHe3, hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, trackedHypClSize); } } @@ -717,6 +730,7 @@ struct hyperRecoTask { hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY, hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi, hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, hypCand.tpcChi2He3, + hypCand.massTOFHe3, hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, trackedHypClSize, chargeFactor * hypCand.genPt(), hypCand.genPhi(), hypCand.genEta(), hypCand.genPtHe3(), hypCand.gDecVtx[0], hypCand.gDecVtx[1], hypCand.gDecVtx[2], @@ -789,7 +803,7 @@ struct hyperRecoTask { -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, false, chargeFactor * hypCand.genPt(), hypCand.genPhi(), hypCand.genEta(), hypCand.genPtHe3(), hypCand.gDecVtx[0], hypCand.gDecVtx[1], hypCand.gDecVtx[2],