Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
17 changes: 17 additions & 0 deletions PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, //!
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down
14 changes: 14 additions & 0 deletions PWGDQ/Tasks/tableReader_withAssoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@
o2::framework::Produces<o2::aod::DileptonsInfo> dileptonInfoList;
o2::framework::Produces<o2::aod::JPsieeCandidates> PromptNonPromptSepTable;
o2::framework::Produces<o2::aod::DileptonPolarization> dileptonPolarList;
o2::framework::Produces<o2::aod::DileptonA2> dileptonA2List;
o2::framework::Produces<o2::aod::DileptonsEventInfo> dileptonEventInfoList;
o2::framework::Produces<o2::aod::DileptonsMiniTree> dileptonMiniTree;

Expand Down Expand Up @@ -1406,6 +1407,7 @@
struct : o2::framework::ConfigurableGroup {
o2::framework::Configurable<bool> flatTables{"cfgFlatTables", false, "Produce a single flat tables with all relevant information of the pairs and single tracks"};
o2::framework::Configurable<bool> polarTables{"cfgPolarTables", false, "Produce tables with dilepton polarization information"};
o2::framework::Configurable<bool> A2Tables{"cfgA2Tables", false, "Produce tables with coherent jpsi A2 information"};
o2::framework::Configurable<bool> useKFVertexing{"cfgUseKFVertexing", false, "Use KF Particle for secondary vertex reconstruction (DCAFitter is used by default)"};
o2::framework::Configurable<bool> useAbsDCA{"cfgUseAbsDCA", false, "Use absolute DCA minimization instead of chi^2 minimization in secondary vertexing"};
o2::framework::Configurable<bool> noCorr{"cfgNoCorrFwdProp", false, "Do not correct for MCS effects in track propagation"};
Expand Down Expand Up @@ -1976,6 +1978,10 @@
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);
Expand Down Expand Up @@ -2093,6 +2099,14 @@
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],

Check failure on line 2104 in PWGDQ/Tasks/tableReader_withAssoc.h

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
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]);
}
Expand Down
Loading