diff --git a/PWGCF/Femto/Core/partitions.h b/PWGCF/Femto/Core/partitions.h index 8af5508982d..ad82cde98ea 100644 --- a/PWGCF/Femto/Core/partitions.h +++ b/PWGCF/Femto/Core/partitions.h @@ -97,15 +97,15 @@ // partition for resonances built from two photons (pi0, eta, ...): unlike MAKE_RESONANCE_0/1_PARTITON // there is no sign and no momentum-threshold PID switch, just a plain mask check per (unordered) daughter // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) -#define MAKE_TWOPHOTONRESONANCE_PARTITION(selection) \ - (o2::aod::femtobase::stored::pt > (selection).ptMin) && \ - (o2::aod::femtobase::stored::pt < (selection).ptMax) && \ - (o2::aod::femtobase::stored::eta > (selection).etaMin) && \ - (o2::aod::femtobase::stored::eta < (selection).etaMax) && \ - (o2::aod::femtobase::stored::phi > (selection).phiMin) && \ - (o2::aod::femtobase::stored::phi < (selection).phiMax) && \ - (o2::aod::femtobase::stored::mass > (selection).massMin) && \ - (o2::aod::femtobase::stored::mass < (selection).massMax) && \ +#define MAKE_TWOPHOTONRESONANCE_PARTITION(selection) \ + (o2::aod::femtobase::stored::pt > (selection).ptMin) && \ + (o2::aod::femtobase::stored::pt < (selection).ptMax) && \ + (o2::aod::femtobase::stored::eta > (selection).etaMin) && \ + (o2::aod::femtobase::stored::eta < (selection).etaMax) && \ + (o2::aod::femtobase::stored::phi > (selection).phiMin) && \ + (o2::aod::femtobase::stored::phi < (selection).phiMax) && \ + (o2::aod::femtobase::stored::mass > (selection).massMin) && \ + (o2::aod::femtobase::stored::mass < (selection).massMax) && \ ncheckbit(o2::aod::femtotwophotonresonances::maskDau1, (selection).dau1Mask) && \ ncheckbit(o2::aod::femtotwophotonresonances::maskDau2, (selection).dau2Mask) diff --git a/PWGCF/Femto/Core/photonBuilder.h b/PWGCF/Femto/Core/photonBuilder.h index d644643273c..38943d09c27 100644 --- a/PWGCF/Femto/Core/photonBuilder.h +++ b/PWGCF/Femto/Core/photonBuilder.h @@ -62,15 +62,15 @@ struct ConfPhotonFilters : o2::framework::ConfigurableGroup { // selection bits for photons (PCM) // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) -#define PHOTON_DEFAULT_BITS \ - o2::framework::Configurable passThrough{"passThrough", false, "If true, all photons are passed through. Bits for all selections are stored."}; \ - o2::framework::Configurable> cosPaMin{"cosPaMin", {-1.f}, "Minimum cosine of pointing angle (not used by EMPhotonFilter, default is permissive)"}; \ - o2::framework::Configurable> dcaToPvXYAbsMax{"dcaToPvXYAbsMax", {1e10f}, "Maximum |DCAxy| of the photon (V0) to the PV (cm)"}; \ - o2::framework::Configurable> dcaToPvZAbsMax{"dcaToPvZAbsMax", {1e10f}, "Maximum |DCAz| of the photon (V0) to the PV (cm)"}; \ - o2::framework::Configurable> chi2NdfMax{"chi2NdfMax", {1e10f}, "Maximum chi2/NDF of the KF conversion vertex"}; \ - o2::framework::Configurable> v0RadiusMin{"v0RadiusMin", {0.f}, "Minimum transverse radius of the conversion point (cm)"}; \ - o2::framework::Configurable> v0RadiusMax{"v0RadiusMax", {1e10f}, "Maximum transverse radius of the conversion point (cm)"}; \ - o2::framework::Configurable> dauAbsEtaMax{"dauAbsEtaMax", {0.9f}, "Maximum |eta| for daughter tracks (matches EMPhotonFilter maxeta_v0, though unused there)"}; \ +#define PHOTON_DEFAULT_BITS \ + o2::framework::Configurable passThrough{"passThrough", false, "If true, all photons are passed through. Bits for all selections are stored."}; \ + o2::framework::Configurable> cosPaMin{"cosPaMin", {-1.f}, "Minimum cosine of pointing angle (not used by EMPhotonFilter, default is permissive)"}; \ + o2::framework::Configurable> dcaToPvXYAbsMax{"dcaToPvXYAbsMax", {1e10f}, "Maximum |DCAxy| of the photon (V0) to the PV (cm)"}; \ + o2::framework::Configurable> dcaToPvZAbsMax{"dcaToPvZAbsMax", {1e10f}, "Maximum |DCAz| of the photon (V0) to the PV (cm)"}; \ + o2::framework::Configurable> chi2NdfMax{"chi2NdfMax", {1e10f}, "Maximum chi2/NDF of the KF conversion vertex"}; \ + o2::framework::Configurable> v0RadiusMin{"v0RadiusMin", {0.f}, "Minimum transverse radius of the conversion point (cm)"}; \ + o2::framework::Configurable> v0RadiusMax{"v0RadiusMax", {1e10f}, "Maximum transverse radius of the conversion point (cm)"}; \ + o2::framework::Configurable> dauAbsEtaMax{"dauAbsEtaMax", {0.9f}, "Maximum |eta| for daughter tracks (matches EMPhotonFilter maxeta_v0, though unused there)"}; \ o2::framework::Configurable> dauTpcNSigmaElAbsMax{"dauTpcNSigmaElAbsMax", {3.5f}, "Maximum |TPC nSigma_e| for V0 daughters (from EMPhotonFilter isSelectedSecondary)"}; \ o2::framework::Configurable keepDaughtersWithoutTpc{"keepDaughtersWithoutTpc", true, "If true, a daughter without a TPC signal is not rejected by the TPC electron PID cut (matches EMPhotonFilter behaviour)"}; @@ -101,13 +101,13 @@ using ConfPhotonSelection1 = ConfPhotonSelection; /// The different selections for photons (PCM) enum PhotonSels { - kCosPaMin, ///< Min. CPA (cosine pointing angle) of the conversion to the PV - kDcaToPvXYAbsMax, ///< Max. |DCAxy| of the photon to the PV - kDcaToPvZAbsMax, ///< Max. |DCAz| of the photon to the PV - kChi2NdfMax, ///< Max. chi2/NDF of the KF conversion vertex - kV0RadiusMin, ///< Min. transverse radius of the conversion point - kV0RadiusMax, ///< Max. transverse radius of the conversion point - kDauAbsEtaMax, ///< Max. absolute pseudorapidity of the daughters + kCosPaMin, ///< Min. CPA (cosine pointing angle) of the conversion to the PV + kDcaToPvXYAbsMax, ///< Max. |DCAxy| of the photon to the PV + kDcaToPvZAbsMax, ///< Max. |DCAz| of the photon to the PV + kChi2NdfMax, ///< Max. chi2/NDF of the KF conversion vertex + kV0RadiusMin, ///< Min. transverse radius of the conversion point + kV0RadiusMax, ///< Max. transverse radius of the conversion point + kDauAbsEtaMax, ///< Max. absolute pseudorapidity of the daughters kPosDauTpcNSigmaEl, ///< TPC electron PID for positive daughter kNegDauTpcNSigmaEl, ///< TPC electron PID for negative daughter kPhotonSelsMax diff --git a/PWGCF/Femto/Core/photonHistManager.h b/PWGCF/Femto/Core/photonHistManager.h index cabbf0fbaa8..8c010060eb8 100644 --- a/PWGCF/Femto/Core/photonHistManager.h +++ b/PWGCF/Femto/Core/photonHistManager.h @@ -123,25 +123,25 @@ constexpr std::array, kPhotonHistLast> HistTab // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define PHOTON_HIST_QA_MAP(confAnalysis, confQa) \ {kCosPa, {(confQa).cosPa}}, \ - {kPa, {(confQa).pa}}, \ - {kDcaToPvXY, {(confQa).dcaToPv}}, \ - {kDcaToPvZ, {(confQa).dcaToPv}}, \ - {kChi2Ndf, {(confQa).chi2Ndf}}, \ - {kV0Radius, {(confQa).v0Radius}}, \ - {kDecayVtxX, {(confQa).decayVertex}}, \ - {kDecayVtxY, {(confQa).decayVertex}}, \ - {kDecayVtxZ, {(confQa).decayVertex}}, \ - {kDecayVtx, {(confQa).decayVertex}}, \ - {kPosDauTpcNSigmaEl, {(confQa).tpcNSigmaEl}}, \ - {kNegDauTpcNSigmaEl, {(confQa).tpcNSigmaEl}}, \ - {kPosDauPt, {(confQa).dauPt}}, \ - {kNegDauPt, {(confQa).dauPt}}, \ - {kPtVsEta, {(confAnalysis).pt, (confAnalysis).eta}}, \ - {kPtVsPhi, {(confAnalysis).pt, (confAnalysis).phi}}, \ - {kPhiVsEta, {(confAnalysis).phi, (confAnalysis).eta}}, \ - {kPtVsCosPa, {(confAnalysis).pt, (confQa).cosPa}}, \ + {kPa, {(confQa).pa}}, \ + {kDcaToPvXY, {(confQa).dcaToPv}}, \ + {kDcaToPvZ, {(confQa).dcaToPv}}, \ + {kChi2Ndf, {(confQa).chi2Ndf}}, \ + {kV0Radius, {(confQa).v0Radius}}, \ + {kDecayVtxX, {(confQa).decayVertex}}, \ + {kDecayVtxY, {(confQa).decayVertex}}, \ + {kDecayVtxZ, {(confQa).decayVertex}}, \ + {kDecayVtx, {(confQa).decayVertex}}, \ + {kPosDauTpcNSigmaEl, {(confQa).tpcNSigmaEl}}, \ + {kNegDauTpcNSigmaEl, {(confQa).tpcNSigmaEl}}, \ + {kPosDauPt, {(confQa).dauPt}}, \ + {kNegDauPt, {(confQa).dauPt}}, \ + {kPtVsEta, {(confAnalysis).pt, (confAnalysis).eta}}, \ + {kPtVsPhi, {(confAnalysis).pt, (confAnalysis).phi}}, \ + {kPhiVsEta, {(confAnalysis).phi, (confAnalysis).eta}}, \ + {kPtVsCosPa, {(confAnalysis).pt, (confQa).cosPa}}, \ {kPosDauVsNegDauTpcNSigmaEl, {(confQa).tpcNSigmaEl, (confQa).tpcNSigmaEl}}, \ - {kPosDauTpcSignalVsP, {(confQa).dauTpcInnerParam, (confQa).dauTpcSignal}}, \ + {kPosDauTpcSignalVsP, {(confQa).dauTpcInnerParam, (confQa).dauTpcSignal}}, \ {kNegDauTpcSignalVsP, {(confQa).dauTpcInnerParam, (confQa).dauTpcSignal}}, template diff --git a/PWGCF/Femto/Core/twoPhotonResonanceBuilder.h b/PWGCF/Femto/Core/twoPhotonResonanceBuilder.h index 43c2159ccf9..484fa18e098 100644 --- a/PWGCF/Femto/Core/twoPhotonResonanceBuilder.h +++ b/PWGCF/Femto/Core/twoPhotonResonanceBuilder.h @@ -58,16 +58,16 @@ using ConfEtaFilters = ConfTwoPhotonResonanceFilters; // unlike TWOTRACKRESONANCE_DEFAULT_SELECTION there is no pos/neg split and no momentum-threshold PID // switch: photon daughters are unordered and have no momentum-dependent PID regime. // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) -#define TWOPHOTONRESONANCE_DEFAULT_SELECTION(defaultMassMin, defaultMassMax) \ - o2::framework::Configurable ptMin{"ptMin", 0.f, "Minimum pT"}; \ - o2::framework::Configurable ptMax{"ptMax", 10.f, "Maximum pT"}; \ - o2::framework::Configurable etaMin{"etaMin", -0.9f, "Minimum eta"}; \ - o2::framework::Configurable etaMax{"etaMax", 0.9f, "Maximum eta"}; \ - o2::framework::Configurable phiMin{"phiMin", 0.f, "Minimum phi"}; \ - o2::framework::Configurable phiMax{"phiMax", 1.f * o2::constants::math::TwoPI, "Maximum phi"}; \ - o2::framework::Configurable massMin{"massMin", (defaultMassMin), "Minimum invariant mass for the resonance"}; \ - o2::framework::Configurable massMax{"massMax", (defaultMassMax), "Maximum invariant mass for the resonance"}; \ - o2::framework::Configurable dau1Mask{"dau1Mask", 0, "Bitmask required for first photon daughter"}; \ +#define TWOPHOTONRESONANCE_DEFAULT_SELECTION(defaultMassMin, defaultMassMax) \ + o2::framework::Configurable ptMin{"ptMin", 0.f, "Minimum pT"}; \ + o2::framework::Configurable ptMax{"ptMax", 10.f, "Maximum pT"}; \ + o2::framework::Configurable etaMin{"etaMin", -0.9f, "Minimum eta"}; \ + o2::framework::Configurable etaMax{"etaMax", 0.9f, "Maximum eta"}; \ + o2::framework::Configurable phiMin{"phiMin", 0.f, "Minimum phi"}; \ + o2::framework::Configurable phiMax{"phiMax", 1.f * o2::constants::math::TwoPI, "Maximum phi"}; \ + o2::framework::Configurable massMin{"massMin", (defaultMassMin), "Minimum invariant mass for the resonance"}; \ + o2::framework::Configurable massMax{"massMax", (defaultMassMax), "Maximum invariant mass for the resonance"}; \ + o2::framework::Configurable dau1Mask{"dau1Mask", 0, "Bitmask required for first photon daughter"}; \ o2::framework::Configurable dau2Mask{"dau2Mask", 0, "Bitmask required for second photon daughter"}; struct ConfPi0Selection : o2::framework::ConfigurableGroup { diff --git a/PWGCF/Femto/Core/twoPhotonResonanceHistManager.h b/PWGCF/Femto/Core/twoPhotonResonanceHistManager.h index aba72d7eb3a..834317c1b03 100644 --- a/PWGCF/Femto/Core/twoPhotonResonanceHistManager.h +++ b/PWGCF/Femto/Core/twoPhotonResonanceHistManager.h @@ -48,10 +48,10 @@ enum TwoPhotonResonanceHist { }; // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) -#define TWOPHOTONRESONANCE_DEFAULT_BINNING(defaultMassMin, defaultMassMax) \ - o2::framework::ConfigurableAxis pt{"pt", {{600, 0, 6}}, "Pt"}; \ - o2::framework::ConfigurableAxis eta{"eta", {{300, -1.5, 1.5}}, "Eta"}; \ - o2::framework::ConfigurableAxis phi{"phi", {{720, 0, 1.f * o2::constants::math::TwoPI}}, "Phi"}; \ +#define TWOPHOTONRESONANCE_DEFAULT_BINNING(defaultMassMin, defaultMassMax) \ + o2::framework::ConfigurableAxis pt{"pt", {{600, 0, 6}}, "Pt"}; \ + o2::framework::ConfigurableAxis eta{"eta", {{300, -1.5, 1.5}}, "Eta"}; \ + o2::framework::ConfigurableAxis phi{"phi", {{720, 0, 1.f * o2::constants::math::TwoPI}}, "Phi"}; \ o2::framework::ConfigurableAxis mass{"mass", {{200, (defaultMassMin), (defaultMassMax)}}, "Mass"}; struct ConfPi0Binning : o2::framework::ConfigurableGroup { @@ -85,10 +85,10 @@ constexpr std::array, kTwoPhotonRe {kPtVsMass, {(conf).pt, (conf).mass}}, // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) -#define TWOPHOTONRESONANCE_HIST_QA_MAP(conf) \ - {kPtVsEta, {(conf).pt, (conf).eta}}, \ - {kPtVsPhi, {(conf).pt, (conf).phi}}, \ - {kPhiVsEta, {(conf).phi, (conf).eta}}, \ +#define TWOPHOTONRESONANCE_HIST_QA_MAP(conf) \ + {kPtVsEta, {(conf).pt, (conf).eta}}, \ + {kPtVsPhi, {(conf).pt, (conf).phi}}, \ + {kPhiVsEta, {(conf).phi, (conf).eta}}, \ {kPtVsMass, {(conf).pt, (conf).mass}}, template diff --git a/PWGCF/Femto/DataModel/FemtoTables.h b/PWGCF/Femto/DataModel/FemtoTables.h index 903931224d2..89841e1b412 100644 --- a/PWGCF/Femto/DataModel/FemtoTables.h +++ b/PWGCF/Femto/DataModel/FemtoTables.h @@ -817,27 +817,27 @@ namespace femtophotons DECLARE_SOA_COLUMN(Mask, mask, o2::analysis::femto::datatypes::PhotonMaskType); //! Bitmask for photon (PCM) selections // columns for debug information -DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of pointing angle of the V0 (conversion) to the primary vertex -DECLARE_SOA_DYNAMIC_COLUMN(Pa, pa, //! pointing angle +DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of pointing angle of the V0 (conversion) to the primary vertex +DECLARE_SOA_DYNAMIC_COLUMN(Pa, pa, //! pointing angle [](float cosPa) -> float { return std::acos(cosPa); }); -DECLARE_SOA_COLUMN(DcaToPvXY, dcaToPvXY, float); //! DCAxy of the photon (V0) to the primary vertex -DECLARE_SOA_COLUMN(DcaToPvZ, dcaToPvZ, float); //! DCAz of the photon (V0) to the primary vertex -DECLARE_SOA_COLUMN(Chi2Ndf, chi2Ndf, float); //! Chi2 / NDF of the reconstructed conversion vertex (KF) -DECLARE_SOA_COLUMN(V0Radius, v0Radius, float); //! Transverse radius of the conversion point -DECLARE_SOA_COLUMN(PosDauTpcNSigmaEl, posDauTpcNSigmaEl, float); //! TPC electron nSigma of the positive daughter -DECLARE_SOA_COLUMN(NegDauTpcNSigmaEl, negDauTpcNSigmaEl, float); //! TPC electron nSigma of the negative daughter -DECLARE_SOA_COLUMN(PosDauPt, posDauPt, float); //! pT of the positive daughter (at the conversion point) -DECLARE_SOA_COLUMN(NegDauPt, negDauPt, float); //! pT of the negative daughter (at the conversion point) +DECLARE_SOA_COLUMN(DcaToPvXY, dcaToPvXY, float); //! DCAxy of the photon (V0) to the primary vertex +DECLARE_SOA_COLUMN(DcaToPvZ, dcaToPvZ, float); //! DCAz of the photon (V0) to the primary vertex +DECLARE_SOA_COLUMN(Chi2Ndf, chi2Ndf, float); //! Chi2 / NDF of the reconstructed conversion vertex (KF) +DECLARE_SOA_COLUMN(V0Radius, v0Radius, float); //! Transverse radius of the conversion point +DECLARE_SOA_COLUMN(PosDauTpcNSigmaEl, posDauTpcNSigmaEl, float); //! TPC electron nSigma of the positive daughter +DECLARE_SOA_COLUMN(NegDauTpcNSigmaEl, negDauTpcNSigmaEl, float); //! TPC electron nSigma of the negative daughter +DECLARE_SOA_COLUMN(PosDauPt, posDauPt, float); //! pT of the positive daughter (at the conversion point) +DECLARE_SOA_COLUMN(NegDauPt, negDauPt, float); //! pT of the negative daughter (at the conversion point) DECLARE_SOA_COLUMN(PosDauTpcInnerParam, posDauTpcInnerParam, float); //! momentum of the positive daughter at the inner wall of the TPC DECLARE_SOA_COLUMN(NegDauTpcInnerParam, negDauTpcInnerParam, float); //! momentum of the negative daughter at the inner wall of the TPC -DECLARE_SOA_COLUMN(PosDauTpcSignal, posDauTpcSignal, float); //! TPC dE/dx of the positive daughter -DECLARE_SOA_COLUMN(NegDauTpcSignal, negDauTpcSignal, float); //! TPC dE/dx of the negative daughter -DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! x coordinate of conversion point -DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! y coordinate of conversion point -DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! z coordinate of conversion point -DECLARE_SOA_DYNAMIC_COLUMN(DecayVtx, decayVtx, //! distance of conversion point from nominal interaction point +DECLARE_SOA_COLUMN(PosDauTpcSignal, posDauTpcSignal, float); //! TPC dE/dx of the positive daughter +DECLARE_SOA_COLUMN(NegDauTpcSignal, negDauTpcSignal, float); //! TPC dE/dx of the negative daughter +DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! x coordinate of conversion point +DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! y coordinate of conversion point +DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! z coordinate of conversion point +DECLARE_SOA_DYNAMIC_COLUMN(DecayVtx, decayVtx, //! distance of conversion point from nominal interaction point [](float vtxX, float vtxY, float vtxZ) -> float { return std::hypot(vtxX, vtxY, vtxZ); });