diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index ed09b758655..ae20c8150b7 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -4516,7 +4516,10 @@ void VarManager::FillPairME(T1 const& t1, T2 const& t2, float* values) values[kWV24ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : 1.0; // coherent Jpsi A2 - bool useCoherentJpsiA2 = fgUsedVars[kA2EPME_TPC] || fgUsedVars[kA2EPME_FT0A] || fgUsedVars[kA2EPME_FT0C]; + bool useA2TPC = fgUsedVars[kDeltaPhiME_TPC] || fgUsedVars[kCos2DeltaPhiME_TPC] || fgUsedVars[kA2EPME_TPC]; + bool useA2FT0C = fgUsedVars[kDeltaPhiME_FT0C] || fgUsedVars[kCos2DeltaPhiME_FT0C] || fgUsedVars[kA2EPME_FT0C]; + bool useA2FT0A = fgUsedVars[kDeltaPhiME_FT0A] || fgUsedVars[kCos2DeltaPhiME_FT0A] || fgUsedVars[kA2EPME_FT0A]; + bool useCoherentJpsiA2 = useA2TPC || useA2FT0C || useA2FT0A; if (useCoherentJpsiA2) { ROOT::Math::Boost boostv12{v12.BoostToCM()}; ROOT::Math::PtEtaPhiMVector v_daughter = boostv12(t1.sign() > 0 ? v1 : v2); @@ -4666,7 +4669,10 @@ void VarManager::FillPairMEAcrossTFs(T const& t1, T const& t2, float* values) } } - bool useCoherentJpsiA2 = fgUsedVars[kA2EP_TPC] || fgUsedVars[kA2EP_FT0A] || fgUsedVars[kA2EP_FT0C]; + bool useA2TPC = fgUsedVars[kDeltaPhi_TPC] || fgUsedVars[kCos2DeltaPhi_TPC] || fgUsedVars[kA2EP_TPC]; + bool useA2FT0C = fgUsedVars[kDeltaPhi_FT0C] || fgUsedVars[kCos2DeltaPhi_FT0C] || fgUsedVars[kA2EP_FT0C]; + bool useA2FT0A = fgUsedVars[kDeltaPhi_FT0A] || fgUsedVars[kCos2DeltaPhi_FT0A] || fgUsedVars[kA2EP_FT0A]; + bool useCoherentJpsiA2 = useA2TPC || useA2FT0C || useA2FT0A; if (useCoherentJpsiA2) { ROOT::Math::Boost boostv12{v12.BoostToCM()}; ROOT::Math::PtEtaPhiMVector v_daughter = boostv12(v1); @@ -4676,6 +4682,7 @@ void VarManager::FillPairMEAcrossTFs(T const& t1, T const& t2, float* values) // reaction plane float phi = RecoDecay::constrainAngle(v_daughter.Phi(), -o2::constants::math::PI); + values[kPhiDau] = phi; values[kDeltaPhi_TPC] = phi > Psi2A ? phi - Psi2A : Psi2A - phi; values[kDeltaPhi_TPC] = values[kDeltaPhi_TPC] > TMath::Pi() ? 2. * TMath::Pi() - values[kDeltaPhi_TPC] : values[kDeltaPhi_TPC]; values[kDeltaPhi_FT0A] = phi > Psi2B ? phi - Psi2B : Psi2B - phi; @@ -6252,7 +6259,10 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values) } // Coherent Jpsi A2 - bool useCoherentJpsiA2 = fgUsedVars[kA2EP_TPC] || fgUsedVars[kA2EP_FT0A] || fgUsedVars[kA2EP_FT0C]; + bool useA2TPC = fgUsedVars[kDeltaPhi_TPC] || fgUsedVars[kCos2DeltaPhi_TPC] || fgUsedVars[kA2EP_TPC]; + bool useA2FT0C = fgUsedVars[kDeltaPhi_FT0C] || fgUsedVars[kCos2DeltaPhi_FT0C] || fgUsedVars[kA2EP_FT0C]; + bool useA2FT0A = fgUsedVars[kDeltaPhi_FT0A] || fgUsedVars[kCos2DeltaPhi_FT0A] || fgUsedVars[kA2EP_FT0A]; + bool useCoherentJpsiA2 = useA2TPC || useA2FT0C || useA2FT0A; if (useCoherentJpsiA2) { // remove daughter from TPC Q-vector // TODO: remove based on track cut in qVectorTable @@ -6297,6 +6307,7 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values) // reaction plane float phi = v_daughter.Phi() > o2::constants::math::PI ? o2::constants::math::TwoPI - v_daughter.Phi() : v_daughter.Phi(); + values[kPhiDau] = phi; values[kDeltaPhi_TPC] = phi > Psi2ATPC ? phi - Psi2ATPC : Psi2ATPC - phi; values[kDeltaPhi_TPC] = values[kDeltaPhi_TPC] > o2::constants::math::PI ? o2::constants::math::TwoPI - values[kDeltaPhi_TPC] : values[kDeltaPhi_TPC]; values[kDeltaPhi_FT0A] = phi > Psi2B ? phi - Psi2B : Psi2B - phi; diff --git a/PWGDQ/DataModel/ReducedInfoTables.h b/PWGDQ/DataModel/ReducedInfoTables.h index eeed55d4886..ae19685ed93 100644 --- a/PWGDQ/DataModel/ReducedInfoTables.h +++ b/PWGDQ/DataModel/ReducedInfoTables.h @@ -887,6 +887,16 @@ DECLARE_SOA_COLUMN(CosThetaStarTPC, costhetaStarTPC, float); //! global polari DECLARE_SOA_COLUMN(CosThetaStarFT0A, costhetaStarFT0A, float); //! global polarization, event plane reconstructed from FT0A tracks DECLARE_SOA_COLUMN(CosThetaStarFT0C, costhetaStarFT0C, float); //! global polarization, event plane reconstructed from FT0C tracks DECLARE_SOA_COLUMN(CosThetaStarRandom, costhetaStarRandom, float); //! global polarization, event plane reconstructed from random tracks +DECLARE_SOA_COLUMN(PhiDaughter, phiDaughter, float); //! azimuthal angle of the daughter particle in the pair rest frame +DECLARE_SOA_COLUMN(DeltaPhiTPC, deltaPhiTPC, float); //! azimuthal angle difference between the daughter and TPC event plane +DECLARE_SOA_COLUMN(DeltaPhiFT0A, deltaPhiFT0A, float); //! azimuthal angle difference between the daughter and FT0A event plane +DECLARE_SOA_COLUMN(DeltaPhiFT0C, deltaPhiFT0C, float); //! azimuthal angle difference between the daughter and FT0C event plane +DECLARE_SOA_COLUMN(Cos2DeltaPhiTPC, cos2DeltaPhiTPC, float); //! cos(2*deltaPhi) between the daughter and TPC event plane +DECLARE_SOA_COLUMN(Cos2DeltaPhiFT0A, cos2DeltaPhiFT0A, float); //! cos(2*deltaPhi) between the daughter and FT0A event plane +DECLARE_SOA_COLUMN(Cos2DeltaPhiFT0C, cos2DeltaPhiFT0C, float); //! cos(2*deltaPhi) between the daughter and FT0C +DECLARE_SOA_COLUMN(A2TPC, a2TPC, float); //! cos(2*deltaPhi)/R2SP_TPC +DECLARE_SOA_COLUMN(A2FT0A, a2FT0A, float); //! cos(2*deltaPhi)/R2SP_FT0A +DECLARE_SOA_COLUMN(A2FT0C, a2FT0C, float); //! cos(2*deltaPhi)/R2SP_FT0C DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pt, float phi) -> float { return pt * std::cos(phi); }); DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //! @@ -1051,6 +1061,12 @@ DECLARE_SOA_TABLE(DileptonsPolarization, "AOD", "RTDILPOLAR", //! reducedpair::CosThetaPP, reducedpair::PhiPP, reducedpair::PhiTildePP, reducedpair::CosThetaRM, reducedpair::CosThetaStarTPC, reducedpair::CosThetaStarFT0A, reducedpair::CosThetaStarFT0C, reducedpair::CosThetaStarRandom); +DECLARE_SOA_TABLE(DileptonsA2, "AOD", "RTDILEPTONA2", //! + reducedpair::Mass, reducedpair::Pt, reducedpair::Eta, reducedpair::Sign, reducedpair::FilterMap, + reducedpair::A2TPC, reducedpair::A2FT0A, reducedpair::A2FT0C, + reducedpair::Cos2DeltaPhiTPC, reducedpair::Cos2DeltaPhiFT0A, reducedpair::Cos2DeltaPhiFT0C + reducedpair::DeltaPhiTPC, reducedpair::DeltaPhiFT0A, reducedpair::DeltaPhiFT0C, + reducedpair::PhiDaughter); DECLARE_SOA_TABLE(DileptonsEventInfo, "AOD", "RTDILEVENTINFO", //! cent::CentFT0C, collision::PosZ, collision::NumContrib, reducedevent::Psi2Random, reducedevent::Psi2A, reducedevent::Psi2B, reducedevent::Psi2C); @@ -1070,6 +1086,7 @@ using DileptonMiniTree = DileptonsMiniTree::iterator; using DileptonMiniTreeGen = DileptonsMiniTreeGen::iterator; using DileptonMiniTreeRec = DileptonsMiniTreeRec::iterator; using DileptonPolarization = DileptonsPolarization::iterator; +using DileptonA2 = DileptonsA2::iterator; using DileptonEventInfo = DileptonsEventInfo::iterator; // Tables for using analysis-dilepton-track with analysis-asymmetric-pairing diff --git a/PWGDQ/Tasks/tableReader_withAssoc.h b/PWGDQ/Tasks/tableReader_withAssoc.h index e7952a1fdad..8623bdb2425 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.h +++ b/PWGDQ/Tasks/tableReader_withAssoc.h @@ -1360,6 +1360,7 @@ struct AnalysisSameEventPairing { o2::framework::Produces dileptonInfoList; o2::framework::Produces PromptNonPromptSepTable; o2::framework::Produces dileptonPolarList; + o2::framework::Produces dileptonA2List; o2::framework::Produces dileptonEventInfoList; o2::framework::Produces dileptonMiniTree; @@ -1406,6 +1407,7 @@ struct AnalysisSameEventPairing { struct : o2::framework::ConfigurableGroup { o2::framework::Configurable flatTables{"cfgFlatTables", false, "Produce a single flat tables with all relevant information of the pairs and single tracks"}; o2::framework::Configurable polarTables{"cfgPolarTables", false, "Produce tables with dilepton polarization information"}; + o2::framework::Configurable A2Tables{"cfgA2Tables", false, "Produce tables with coherent jpsi A2 information"}; o2::framework::Configurable useKFVertexing{"cfgUseKFVertexing", false, "Use KF Particle for secondary vertex reconstruction (DCAFitter is used by default)"}; o2::framework::Configurable useAbsDCA{"cfgUseAbsDCA", false, "Use absolute DCA minimization instead of chi^2 minimization in secondary vertexing"}; o2::framework::Configurable noCorr{"cfgNoCorrFwdProp", false, "Do not correct for MCS effects in track propagation"}; @@ -1976,6 +1978,10 @@ struct AnalysisSameEventPairing { if (useMiniTree.fConfigMiniTree) { dileptonMiniTree.reserve(reserveSize); } + if (fConfigOptions.A2Tables.value) { + dileptonA2List.reserve(reserveSize); + dileptonEventInfoList.reserve(reserveSize); + } fAmbiguousPairs.clear(); constexpr bool eventHasQvector = ((TEventFillMap & VarManager::ObjTypes::ReducedEventQvector) > 0); @@ -2093,6 +2099,14 @@ struct AnalysisSameEventPairing { VarManager::fgValues[VarManager::kCosThetaStarTPC], VarManager::fgValues[VarManager::kCosThetaStarFT0A], VarManager::fgValues[VarManager::kCosThetaStarFT0C], VarManager::fgValues[VarManager::kCosThetaStarRandom]); dileptonEventInfoList(VarManager::fgValues[VarManager::kCentFT0C], VarManager::fgValues[VarManager::kVtxZ], VarManager::fgValues[VarManager::kVtxNcontrib], VarManager::fgValues[VarManager::kRandomPsi2], VarManager::fgValues[VarManager::kPsi2A], VarManager::fgValues[VarManager::kPsi2B], VarManager::fgValues[VarManager::kPsi2C]); } + if (fConfigOptions.A2Tables.value) { + dileptonA2List(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kEta], t1.sign() + t2.sign(), twoTrackFilter, + VarManager::fgValues[VarManager::kA2EP_TPC], VarManager::fgValues[VarManager::kA2EP_FT0A], VarManager::fgValues[VarManager::kA2EP_FT0C], + VarManager::fgValues[VarManager::kCos2DeltaPhi_TPC], VarManager::fgValues[VarManager::kCos2DeltaPhi_FT0A], VarManager::fgValues[VarManager::kCos2DeltaPhi_FT0C], + VarManager::fgValues[VarManager::kDeltaPhi_TPC], VarManager::fgValues[VarManager::kDeltaPhi_FT0A], VarManager::fgValues[VarManager::kDeltaPhi_FT0C], + VarManager::fgValues[VarManager::kPhiDau]); + dileptonEventInfoList(VarManager::fgValues[VarManager::kCentFT0C], VarManager::fgValues[VarManager::kVtxZ], VarManager::fgValues[VarManager::kVtxNcontrib], VarManager::fgValues[VarManager::kRandomPsi2], VarManager::fgValues[VarManager::kPsi2A], VarManager::fgValues[VarManager::kPsi2B], VarManager::fgValues[VarManager::kPsi2C]); + } if constexpr (trackHasCov && TTwoProngFitter) { dielectronsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauzProjected], VarManager::fgValues[VarManager::kVertexingLzProjected], VarManager::fgValues[VarManager::kVertexingLxyProjected]); }