diff --git a/PWGLF/DataModel/LFAntinCexTables.h b/PWGLF/DataModel/LFAntinCexTables.h index 7aef0583752..c6810880d43 100644 --- a/PWGLF/DataModel/LFAntinCexTables.h +++ b/PWGLF/DataModel/LFAntinCexTables.h @@ -30,9 +30,15 @@ namespace antin_cex DECLARE_SOA_COLUMN(IsCex, isCex, bool); // 1=CEX (from antin), 0=BG DECLARE_SOA_COLUMN(MotherPdg, motherPdg, int32_t); // mother PDG DECLARE_SOA_COLUMN(MotherP, motherP, float); // mother P -DECLARE_SOA_COLUMN(ColId, colId, int32_t); // mcCollisionId -DECLARE_SOA_COLUMN(PId, pId, int32_t); // proton MC id -DECLARE_SOA_COLUMN(AntipId, antipId, int32_t); // antiproton MC id +DECLARE_SOA_COLUMN(MotherPt, motherPt, float); +DECLARE_SOA_COLUMN(MotherPz, motherPz, float); +DECLARE_SOA_COLUMN(MotherEta, motherEta, float); +DECLARE_SOA_COLUMN(MotherVz, motherVz, float); +DECLARE_SOA_COLUMN(HasPi0, hasPi0, bool); +DECLARE_SOA_COLUMN(AntipProcess, antipProcess, int32_t); +DECLARE_SOA_COLUMN(ColId, colId, int64_t); +DECLARE_SOA_COLUMN(PId, pId, int64_t); +DECLARE_SOA_COLUMN(AntipId, antipId, int64_t); // MC (pair) DECLARE_SOA_COLUMN(McPairP, mcPairP, float); @@ -104,6 +110,8 @@ DECLARE_SOA_COLUMN(SVDeltaRToLayer, svDeltaRToLayer, float); DECLARE_SOA_COLUMN(PTrkItsHitMap, pTrkItsHitMap, uint16_t); DECLARE_SOA_COLUMN(APTrkItsHitMap, apTrkItsHitMap, uint16_t); +DECLARE_SOA_COLUMN(PVtxX, pVtxX, float); +DECLARE_SOA_COLUMN(PVtxY, pVtxY, float); DECLARE_SOA_COLUMN(PVtxZ, pVtxZ, float); // Proton ITS PID @@ -115,29 +123,105 @@ DECLARE_SOA_COLUMN(PTrkTgl, pTrkTgl, float); DECLARE_SOA_COLUMN(AntipTrkItsNSigmaPr, antipTrkItsNSigmaPr, float); DECLARE_SOA_COLUMN(AntipTrkItsPidValid, antipTrkItsPidValid, int8_t); DECLARE_SOA_COLUMN(AntipTrkTgl, antipTrkTgl, float); + +// Proton track quality +DECLARE_SOA_COLUMN(PTrkTpcNClsCrossedRows, pTrkTpcNClsCrossedRows, int); +DECLARE_SOA_COLUMN(PTrkTpcCrossedRowsOverFindableCls, pTrkTpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(PTrkTpcChi2NCl, pTrkTpcChi2NCl, float); +DECLARE_SOA_COLUMN(PTrkItsChi2NCl, pTrkItsChi2NCl, float); + +// Antiproton track quality +DECLARE_SOA_COLUMN(AntipTrkTpcNClsCrossedRows, antipTrkTpcNClsCrossedRows, int); +DECLARE_SOA_COLUMN(AntipTrkTpcCrossedRowsOverFindableCls, antipTrkTpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(AntipTrkTpcChi2NCl, antipTrkTpcChi2NCl, float); +DECLARE_SOA_COLUMN(AntipTrkItsChi2NCl, antipTrkItsChi2NCl, float); } // namespace antin_cex // Table DECLARE_SOA_TABLE(AntinCexPairs, "AOD", "ANTINCEX", antin_cex::IsCex, - antin_cex::MotherPdg, antin_cex::MotherP, antin_cex::ColId, antin_cex::PId, antin_cex::AntipId, - antin_cex::McPairP, antin_cex::McPairPt, antin_cex::McPairPz, - antin_cex::McDplane, antin_cex::McAngleDeg, antin_cex::McVtxX, antin_cex::McVtxY, antin_cex::McVtxZ, - antin_cex::TrkPairP, antin_cex::TrkPairPt, antin_cex::TrkPairPz, antin_cex::TrkAngleDeg, - antin_cex::TrkVtxfitDcaPair, antin_cex::TrkVtxfitR, antin_cex::TrkVtxfitDistToPv, - antin_cex::TrkVtxfitSecVtxX, antin_cex::TrkVtxfitSecVtxY, antin_cex::TrkVtxfitSecVtxZ, - antin_cex::VtxfitChi2, antin_cex::VtxfitStatus, antin_cex::NCand, - antin_cex::VtxfitDX, antin_cex::VtxfitDY, antin_cex::VtxfitDZ, antin_cex::VtxfitD3D, - antin_cex::PTrkP, antin_cex::PTrkPx, antin_cex::PTrkPy, antin_cex::PTrkPz, antin_cex::PTrkEta, antin_cex::PTrkTpcSignal, antin_cex::PTrkNClsIts, - antin_cex::AntipTrkP, antin_cex::AntipTrkPx, antin_cex::AntipTrkPy, antin_cex::AntipTrkPz, antin_cex::AntipTrkEta, antin_cex::AntipTrkTpcSignal, antin_cex::AntipTrkNClsIts, + antin_cex::MotherPdg, + antin_cex::MotherP, + antin_cex::MotherPt, + antin_cex::MotherPz, + antin_cex::MotherEta, + antin_cex::MotherVz, + antin_cex::HasPi0, + antin_cex::AntipProcess, + antin_cex::ColId, + antin_cex::PId, + antin_cex::AntipId, + antin_cex::McPairP, + antin_cex::McPairPt, + antin_cex::McPairPz, + antin_cex::McDplane, + antin_cex::McAngleDeg, + antin_cex::McVtxX, + antin_cex::McVtxY, + antin_cex::McVtxZ, + antin_cex::TrkPairP, + antin_cex::TrkPairPt, + antin_cex::TrkPairPz, + antin_cex::TrkAngleDeg, + antin_cex::TrkVtxfitDcaPair, + antin_cex::TrkVtxfitR, + antin_cex::TrkVtxfitDistToPv, + antin_cex::TrkVtxfitSecVtxX, + antin_cex::TrkVtxfitSecVtxY, + antin_cex::TrkVtxfitSecVtxZ, + antin_cex::VtxfitChi2, + antin_cex::VtxfitStatus, + antin_cex::NCand, + antin_cex::VtxfitDX, + antin_cex::VtxfitDY, + antin_cex::VtxfitDZ, + antin_cex::VtxfitD3D, + antin_cex::PTrkP, + antin_cex::PTrkPx, + antin_cex::PTrkPy, + antin_cex::PTrkPz, + antin_cex::PTrkEta, + antin_cex::PTrkTpcSignal, + antin_cex::PTrkNClsIts, + antin_cex::AntipTrkP, + antin_cex::AntipTrkPx, + antin_cex::AntipTrkPy, + antin_cex::AntipTrkPz, + antin_cex::AntipTrkEta, + antin_cex::AntipTrkTpcSignal, + antin_cex::AntipTrkNClsIts, antin_cex::SelMask, - antin_cex::PairPointingAngleDeg, antin_cex::PvsvThetaDeg, antin_cex::PvsvPhiDeg, antin_cex::PairPBalance, antin_cex::PairPtBalance, antin_cex::PairQ, - antin_cex::DPairP, antin_cex::DPairPt, antin_cex::DPairPz, antin_cex::DOpenAngle, - antin_cex::SVNearestLayerId, antin_cex::SVDeltaRToLayer, - antin_cex::PTrkItsHitMap, antin_cex::APTrkItsHitMap, + antin_cex::PairPointingAngleDeg, + antin_cex::PvsvThetaDeg, + antin_cex::PvsvPhiDeg, + antin_cex::PairPBalance, + antin_cex::PairPtBalance, + antin_cex::PairQ, + antin_cex::DPairP, + antin_cex::DPairPt, + antin_cex::DPairPz, + antin_cex::DOpenAngle, + antin_cex::SVNearestLayerId, + antin_cex::SVDeltaRToLayer, + antin_cex::PTrkItsHitMap, + antin_cex::APTrkItsHitMap, + antin_cex::PVtxX, + antin_cex::PVtxY, antin_cex::PVtxZ, - antin_cex::PTrkItsNSigmaPr, antin_cex::PTrkItsPidValid, antin_cex::PTrkTgl, - antin_cex::AntipTrkItsNSigmaPr, antin_cex::AntipTrkItsPidValid, antin_cex::AntipTrkTgl); + antin_cex::PTrkItsNSigmaPr, + antin_cex::PTrkItsPidValid, + antin_cex::PTrkTgl, + antin_cex::AntipTrkItsNSigmaPr, + antin_cex::AntipTrkItsPidValid, + antin_cex::AntipTrkTgl, + antin_cex::PTrkTpcNClsCrossedRows, + antin_cex::PTrkTpcCrossedRowsOverFindableCls, + antin_cex::PTrkTpcChi2NCl, + antin_cex::PTrkItsChi2NCl, + antin_cex::AntipTrkTpcNClsCrossedRows, + antin_cex::AntipTrkTpcCrossedRowsOverFindableCls, + antin_cex::AntipTrkTpcChi2NCl, + antin_cex::AntipTrkItsChi2NCl); } // namespace o2::aod diff --git a/PWGLF/TableProducer/Nuspex/nucleiAntineutronCex.cxx b/PWGLF/TableProducer/Nuspex/nucleiAntineutronCex.cxx index f732a5f8cc9..1eaa90857ee 100644 --- a/PWGLF/TableProducer/Nuspex/nucleiAntineutronCex.cxx +++ b/PWGLF/TableProducer/Nuspex/nucleiAntineutronCex.cxx @@ -302,7 +302,8 @@ struct NucleiAntineutronCex { double antipE = particle.e(); int antipId = particle.globalIndex(); - // Selection conditions: Produced in the ITS IB + // Selection conditions MC: Produced in the ITS IB + const double r = std::sqrt(antipVx * antipVx + antipVy * antipVy); // Config for ITS // if(3.9<=r && r<=43.0 && std::abs(antipVz)<=48.9){ @@ -543,12 +544,15 @@ struct NucleiAntineutronCex { double antipTrkP = 0.; double antipTrkEta = 0.; double antipTrkTpcSignal = 0; - // int antip_trk_nClsTPC = 0; int antipTrkNClsIts = 0; uint16_t apItsMap = 0; - float pTrkItsNSigmaPr = -999.f; - int8_t pTrkItsPidValid = 0; - float pTrkTgl = 0.f; + float antipTrkItsNSigmaPr = -999.f; + int8_t antipTrkItsPidValid = 0; + float antipTrkTgl = 0.f; + int antipTrkTpcNClsCrossedRows = -1; + float antipTrkTpcCrossedRowsOverFindableCls = -999.f; + float antipTrkTpcChi2NCl = -999.f; + float antipTrkItsChi2NCl = -999.f; bool pLayersCondition = false; bool pHasTrack = false; @@ -558,12 +562,15 @@ struct NucleiAntineutronCex { double pTrkP = 0.; double pTrkEta = 0.; double pTrkTpcSignal = 0; - // int p_trk_nClsTPC = 0; int pTrkNClsIts = 0; uint16_t pItsMap = 0; - float antipTrkItsNSigmaPr = -999.f; - int8_t antipTrkItsPidValid = 0; - float antipTrkTgl = 0.f; + float pTrkItsNSigmaPr = -999.f; + int8_t pTrkItsPidValid = 0; + float pTrkTgl = 0.f; + int pTrkTpcNClsCrossedRows = -1; + float pTrkTpcCrossedRowsOverFindableCls = -999.f; + float pTrkTpcChi2NCl = -999.f; + float pTrkItsChi2NCl = -999.f; o2::aod::ITSResponse itsResponse; @@ -602,6 +609,10 @@ struct NucleiAntineutronCex { // antip_trk_nClsTPC = track.tpcNCls(); antipTrkNClsIts = track.itsNCls(); antipTrkTgl = track.tgl(); + antipTrkTpcNClsCrossedRows = track.tpcNClsCrossedRows(); + antipTrkTpcCrossedRowsOverFindableCls = track.tpcCrossedRowsOverFindableCls(); + antipTrkTpcChi2NCl = track.tpcChi2NCl(); + antipTrkItsChi2NCl = track.itsChi2NCl(); const auto nsigmaITSantip = itsResponse.nSigmaITS(track); antipTrkItsNSigmaPr = static_cast(nsigmaITSantip); antipTrkItsPidValid = std::isfinite(nsigmaITSantip) ? 1 : 0; @@ -629,8 +640,11 @@ struct NucleiAntineutronCex { // p_trk_nClsTPC = track.tpcNCls(); pTrkNClsIts = track.itsNCls(); pTrkTgl = track.tgl(); - const auto nsigmaITSp = - itsResponse.nSigmaITS(track); + pTrkTpcNClsCrossedRows = track.tpcNClsCrossedRows(); + pTrkTpcCrossedRowsOverFindableCls = track.tpcCrossedRowsOverFindableCls(); + pTrkTpcChi2NCl = track.tpcChi2NCl(); + pTrkItsChi2NCl = track.itsChi2NCl(); + const auto nsigmaITSp = itsResponse.nSigmaITS(track); pTrkItsNSigmaPr = static_cast(nsigmaITSp); pTrkItsPidValid = std::isfinite(nsigmaITSp) ? 1 : 0; pHasTrack = true; @@ -714,12 +728,17 @@ struct NucleiAntineutronCex { if (motherPdg != -kNeutron) histos.fill(HIST("cexbg_pairtrkVtxfitDcaPair"), dcaPair); + if (pRow->isPVContributor() || apRow->isPVContributor()) + continue; if (!(antipLayersCondition && pLayersCondition)) continue; + const double radius = std::hypot(secX, secY); + if (radius < kIts2MinR || radius > kIts2MaxR || std::abs(secZ) > kIts2MaxVz) + continue; + double cexPairTrkP = total_trk_pVec.Mag(); double cexPairTrkPt = total_trk_pVec.Pt(); double cexPairTrkPz = pTrkPz + antipTrkPz; - const double radius = std::hypot(secX, secY); const double dxPv = secX - pvtxX; const double dyPv = secY - pvtxY; const double dzPv = secZ - pvtxZ; @@ -812,11 +831,20 @@ struct NucleiAntineutronCex { outPairs( isCex, + motherPdg, motherP, - colId, - pId, - antipId, + motherPt, + motherPz, + motherEta, + motherVz, + + pion0, + static_cast(procEnum), + + static_cast(colId), + static_cast(pId), + static_cast(antipId), cexPairMcP, cexPairMcPt, @@ -882,6 +910,8 @@ struct NucleiAntineutronCex { pItsMap, apItsMap, + pvtxX, + pvtxY, pvtxZ, pTrkItsNSigmaPr, @@ -890,7 +920,17 @@ struct NucleiAntineutronCex { antipTrkItsNSigmaPr, antipTrkItsPidValid, - antipTrkTgl); + antipTrkTgl, + + pTrkTpcNClsCrossedRows, + pTrkTpcCrossedRowsOverFindableCls, + pTrkTpcChi2NCl, + pTrkItsChi2NCl, + + antipTrkTpcNClsCrossedRows, + antipTrkTpcCrossedRowsOverFindableCls, + antipTrkTpcChi2NCl, + antipTrkItsChi2NCl); } } // ==== end DCAFitter2 ====