Skip to content

Commit e417ce2

Browse files
committed
Feat: Add photons to femto framework
1 parent 1e3614d commit e417ce2

11 files changed

Lines changed: 988 additions & 4 deletions

File tree

‎PWGCF/Femto/Core/dataTypes.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ using V0MaskType = uint32_t;
3535
using V0MaskType001 = uint16_t; // old data type, was too narrow
3636
using V0Type = uint16_t;
3737

38+
// datatypes for photons
39+
using PhotonMaskType = uint16_t;
40+
3841
// datatypes for kinks
3942
using KinkMaskType = uint32_t;
4043
using KinkType = uint8_t;

‎PWGCF/Femto/Core/partitions.h‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@
123123
(o2::aod::femtobase::stored::mass < (selection).massMax) && \
124124
ncheckbit(o2::aod::femtov0s::mask, (selection).mask)
125125

126+
// partition for photons (PCM)
127+
// no sign/mass handling: photons are their own antiparticle and have no mass window
128+
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
129+
#define MAKE_PHOTON_PARTITION(selection) \
130+
(o2::aod::femtobase::stored::pt > (selection).ptMin) && \
131+
(o2::aod::femtobase::stored::pt < (selection).ptMax) && \
132+
(o2::aod::femtobase::stored::eta > (selection).etaMin) && \
133+
(o2::aod::femtobase::stored::eta < (selection).etaMax) && \
134+
(o2::aod::femtobase::stored::phi > (selection).phiMin) && \
135+
(o2::aod::femtobase::stored::phi < (selection).phiMax) && \
136+
ncheckbit(o2::aod::femtophotons::mask, (selection).mask)
137+
126138
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
127139
#define MAKE_CASCADE_PARTITION(selection) \
128140
ifnode((selection).sign.node() != 0, \

‎PWGCF/Femto/Core/photonBuilder.h‎

Lines changed: 404 additions & 0 deletions
Large diffs are not rendered by default.

‎PWGCF/Femto/Core/photonHistManager.h‎

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.

‎PWGCF/Femto/Core/v0Builder.h‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,9 @@ class V0Builder
715715
v0.v0radius(),
716716
v0.x(),
717717
v0.y(),
718-
v0.z());
718+
v0.z(),
719+
v0.alpha(),
720+
v0.qtarm());
719721
}
720722
}
721723

@@ -754,7 +756,9 @@ class V0Builder
754756
v0.v0radius(),
755757
v0.x(),
756758
v0.y(),
757-
v0.z());
759+
v0.z(),
760+
v0.alpha(),
761+
v0.qtarm());
758762
}
759763
}
760764

‎PWGCF/Femto/Core/v0HistManager.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ enum V0Hist {
7575
kK0shortMassVsAntiLambdaMass,
7676
kStrangeTofVsTofPosDau,
7777
kStrangeTofVsTofNegDau,
78+
kArmenterosQtVsAlpha,
7879
// mc
7980
kOrigin,
8081
kPdg,
@@ -145,6 +146,8 @@ struct ConfV0QaBinning : o2::framework::ConfigurableGroup {
145146
o2::framework::ConfigurableAxis massAntiLambda{"massAntiLambda", {{100, 1, 1.2}}, "mass for antiparticle hypothesis"};
146147
o2::framework::ConfigurableAxis massK0short{"massK0short", {{200, 0.45, 0.55}}, "Mass for k0short hypothesis"};
147148
o2::framework::ConfigurableAxis strangeTof{"strangeTof", {{500, -5, 5}}, "Strangeness TOF vs TOF Nsigma for daughters"};
149+
o2::framework::ConfigurableAxis armenterosAlpha{"armenterosAlpha", {{200, -1, 1}}, "Armenteros-Podolanski alpha"};
150+
o2::framework::ConfigurableAxis armenterosQt{"armenterosQt", {{150, 0, 0.3}}, "Armenteros-Podolanski qt (GeV/#it{c})"};
148151
};
149152

150153
constexpr const char PrefixLambdaQaBinning1[] = "LambdaQaBinning1";
@@ -188,6 +191,7 @@ constexpr std::array<histmanager::HistInfo<V0Hist>, kV0HistLast> HistTable = {
188191
{kLambdaMassVsAntiLambdaMass, o2::framework::HistType::kTH2F, "hLambdaMassVsAntiLambdaMass", "#Lambda mass vs #bar{#Lambda}; m_{p#pi^{-}} (GeV/#it{c}^{2}); m_{#bar{p}#pi^{+}} (GeV/#it{c}^{2})"},
189192
{kStrangeTofVsTofPosDau, o2::framework::HistType::kTH2F, "hStrangeTofVsTofPosDau", "TOF_{Strange} vs TOF_{Tracking} of positive Daughter; n#sigma_{TOF, strange}; n#sigma_{TOF, tracking}"},
190193
{kStrangeTofVsTofNegDau, o2::framework::HistType::kTH2F, "hStrangeTofVsTofNegDau", "TOF_{Strange} vs TOF_{Tracking} of negative Daughter; n#sigma_{TOF, strange}; n#sigma_{TOF, tracking}"},
194+
{kArmenterosQtVsAlpha, o2::framework::HistType::kTH2F, "hArmenterosPodolanski", "Armenteros-Podolanski; #alpha; q_{T} (GeV/#it{c})"},
191195
{kOrigin, o2::framework::HistType::kTH1F, "hOrigin", "Status Codes (=Origin); Status Code; Entries"},
192196
{kPdg, o2::framework::HistType::kTH1F, "hPdg", "PDG Codes of reconstructed v0; PDG Code; Entries"},
193197
{kPdgMother, o2::framework::HistType::kTH1F, "hPdgMother", "PDG Codes of mother of reconstructed v0; PDG Code; Entries"},
@@ -251,7 +255,8 @@ constexpr std::array<histmanager::HistInfo<V0Hist>, kV0HistLast> HistTable = {
251255
{kK0shortMassVsLambdaMass, {(confQa).massK0short, (confQa).massLambda}}, \
252256
{kK0shortMassVsAntiLambdaMass, {(confQa).massK0short, (confQa).massAntiLambda}}, \
253257
{kStrangeTofVsTofPosDau, {(confQa).strangeTof, (confQa).strangeTof}}, \
254-
{kStrangeTofVsTofNegDau, {(confQa).strangeTof, (confQa).strangeTof}},
258+
{kStrangeTofVsTofNegDau, {(confQa).strangeTof, (confQa).strangeTof}}, \
259+
{kArmenterosQtVsAlpha, {(confQa).armenterosAlpha, (confQa).armenterosQt}},
255260

256261
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
257262
#define V0_HIST_MC_QA_MAP(confAnalysis, confQa) \
@@ -518,6 +523,7 @@ class V0HistManager
518523
mHistogramRegistry->add(qaDir + getHistNameV2(kK0shortMassVsAntiLambdaMass, HistTable), getHistDesc(kK0shortMassVsAntiLambdaMass, HistTable), getHistType(kK0shortMassVsAntiLambdaMass, HistTable), {V0Specs.at(kK0shortMassVsAntiLambdaMass)});
519524
mHistogramRegistry->add(qaDir + getHistNameV2(kStrangeTofVsTofPosDau, HistTable), getHistDesc(kStrangeTofVsTofPosDau, HistTable), getHistType(kStrangeTofVsTofPosDau, HistTable), {V0Specs.at(kStrangeTofVsTofPosDau)});
520525
mHistogramRegistry->add(qaDir + getHistNameV2(kStrangeTofVsTofNegDau, HistTable), getHistDesc(kStrangeTofVsTofNegDau, HistTable), getHistType(kStrangeTofVsTofNegDau, HistTable), {V0Specs.at(kStrangeTofVsTofNegDau)});
526+
mHistogramRegistry->add(qaDir + getHistNameV2(kArmenterosQtVsAlpha, HistTable), getHistDesc(kArmenterosQtVsAlpha, HistTable), getHistType(kArmenterosQtVsAlpha, HistTable), {V0Specs.at(kArmenterosQtVsAlpha)});
521527
}
522528
}
523529

@@ -640,6 +646,7 @@ class V0HistManager
640646
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsAntiLambdaMass, HistTable)), massK0short, massAntiLambda);
641647
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kStrangeTofVsTofPosDau, HistTable)), v0candidate.strangeTofPosDau(), tofPosDau);
642648
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kStrangeTofVsTofNegDau, HistTable)), v0candidate.strangeTofNegDau(), tofNegDau);
649+
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kArmenterosQtVsAlpha, HistTable)), v0candidate.alpha(), v0candidate.qtArm());
643650
}
644651
}
645652

‎PWGCF/Femto/DataModel/FemtoTables.h‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(DecayVtx, decayVtx, //! distance of d
637637
[](float vtxX, float vtxY, float vtxZ) -> float {
638638
return std::hypot(vtxX, vtxY, vtxZ);
639639
});
640+
DECLARE_SOA_COLUMN(Alpha, alpha, float); //! Armenteros-Podolanski alpha
641+
DECLARE_SOA_COLUMN(QtArm, qtArm, float); //! Armenteros-Podolanski qt
640642

641643
// id columns for Lambda daughter tracks
642644
DECLARE_SOA_INDEX_COLUMN_FULL(PosDau, posDau, int32_t, FTracks, "_PosDau"); //! index column for positive daughter track
@@ -740,6 +742,8 @@ DECLARE_SOA_TABLE_STAGED_VERSIONED(FLambdaExtras_001, "FLAMBDAEXTRA", 1, //! lam
740742
femtov0s::DecayVtxX,
741743
femtov0s::DecayVtxY,
742744
femtov0s::DecayVtxZ,
745+
femtov0s::Alpha,
746+
femtov0s::QtArm,
743747
femtov0s::DecayVtx<femtov0s::DecayVtxX, femtov0s::DecayVtxY, femtov0s::DecayVtxZ>,
744748
femtov0s::Pa<femtov0s::CosPa>);
745749

@@ -800,11 +804,101 @@ DECLARE_SOA_TABLE_STAGED_VERSIONED(FK0shortExtras_001, "FK0SHORTEXTRA", 1, //! k
800804
femtov0s::DecayVtxX,
801805
femtov0s::DecayVtxY,
802806
femtov0s::DecayVtxZ,
807+
femtov0s::Alpha,
808+
femtov0s::QtArm,
803809
femtov0s::DecayVtx<femtov0s::DecayVtxX, femtov0s::DecayVtxY, femtov0s::DecayVtxZ>,
804810
femtov0s::Pa<femtov0s::CosPa>);
805811

806812
using FK0shortExtras = FK0shortExtras_001;
807813

814+
namespace femtophotons
815+
{
816+
// columns for bit masks
817+
DECLARE_SOA_COLUMN(Mask, mask, o2::analysis::femto::datatypes::PhotonMaskType); //! Bitmask for photon (PCM) selections
818+
819+
// columns for debug information
820+
DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of pointing angle of the V0 (conversion) to the primary vertex
821+
DECLARE_SOA_DYNAMIC_COLUMN(Pa, pa, //! pointing angle
822+
[](float cosPa) -> float {
823+
return std::acos(cosPa);
824+
});
825+
DECLARE_SOA_COLUMN(DcaToPvXY, dcaToPvXY, float); //! DCAxy of the photon (V0) to the primary vertex
826+
DECLARE_SOA_COLUMN(DcaToPvZ, dcaToPvZ, float); //! DCAz of the photon (V0) to the primary vertex
827+
DECLARE_SOA_COLUMN(Chi2Ndf, chi2Ndf, float); //! Chi2 / NDF of the reconstructed conversion vertex (KF)
828+
DECLARE_SOA_COLUMN(V0Radius, v0Radius, float); //! Transverse radius of the conversion point
829+
DECLARE_SOA_COLUMN(PosDauTpcNSigmaEl, posDauTpcNSigmaEl, float); //! TPC electron nSigma of the positive daughter
830+
DECLARE_SOA_COLUMN(NegDauTpcNSigmaEl, negDauTpcNSigmaEl, float); //! TPC electron nSigma of the negative daughter
831+
DECLARE_SOA_COLUMN(PosDauPt, posDauPt, float); //! pT of the positive daughter (at the conversion point)
832+
DECLARE_SOA_COLUMN(NegDauPt, negDauPt, float); //! pT of the negative daughter (at the conversion point)
833+
DECLARE_SOA_COLUMN(PosDauTpcInnerParam, posDauTpcInnerParam, float); //! momentum of the positive daughter at the inner wall of the TPC
834+
DECLARE_SOA_COLUMN(NegDauTpcInnerParam, negDauTpcInnerParam, float); //! momentum of the negative daughter at the inner wall of the TPC
835+
DECLARE_SOA_COLUMN(PosDauTpcSignal, posDauTpcSignal, float); //! TPC dE/dx of the positive daughter
836+
DECLARE_SOA_COLUMN(NegDauTpcSignal, negDauTpcSignal, float); //! TPC dE/dx of the negative daughter
837+
DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! x coordinate of conversion point
838+
DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! y coordinate of conversion point
839+
DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! z coordinate of conversion point
840+
DECLARE_SOA_DYNAMIC_COLUMN(DecayVtx, decayVtx, //! distance of conversion point from nominal interaction point
841+
[](float vtxX, float vtxY, float vtxZ) -> float {
842+
return std::hypot(vtxX, vtxY, vtxZ);
843+
});
844+
} // namespace femtophotons
845+
846+
// table for basic PCM photon information (mass is fixed to 0 by construction, not stored)
847+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FPhotons_001, "FPHOTON", 1, //! femto PCM photons
848+
o2::soa::Index<>,
849+
femtobase::stored::FColId,
850+
femtobase::stored::Pt,
851+
femtobase::stored::Eta,
852+
femtobase::stored::Phi,
853+
femtobase::dynamic::P<femtobase::stored::Pt, femtobase::stored::Eta>,
854+
femtobase::dynamic::Px<femtobase::stored::Pt, femtobase::stored::Phi>,
855+
femtobase::dynamic::Py<femtobase::stored::Pt, femtobase::stored::Phi>,
856+
femtobase::dynamic::Pz<femtobase::stored::Pt, femtobase::stored::Eta>,
857+
femtobase::dynamic::Theta<femtobase::stored::Eta>);
858+
using FPhotons = FPhotons_001;
859+
using StoredFPhotons = StoredFPhotons_001;
860+
861+
// table for basic PCM photon information with compressed/binned kinematics
862+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FLitePhotons_001, "FLITEPHOTON", 1,
863+
o2::soa::Index<>,
864+
femtobase::stored::FLiteColId,
865+
femtobase::lite::UnsignedBinnedPt,
866+
femtobase::lite::BinnedEta,
867+
femtobase::lite::BinnedPhi,
868+
femtobase::lite::unsignedpt::Pt<femtobase::lite::UnsignedBinnedPt>,
869+
femtobase::lite::Eta<femtobase::lite::BinnedEta>,
870+
femtobase::lite::Phi<femtobase::lite::BinnedPhi>);
871+
using FLitePhotons = FLitePhotons_001;
872+
using FLitePhoton = FLitePhotons::iterator;
873+
using StoredFLitePhotons = StoredFLitePhotons_001;
874+
875+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FPhotonMasks_001, "FPHOTONMASK", 1, //! photon (PCM) masks
876+
femtophotons::Mask);
877+
using FPhotonMasks = FPhotonMasks_001;
878+
using StoredFPhotonMasks = StoredFPhotonMasks_001;
879+
880+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FPhotonExtras_001, "FPHOTONEXTRA", 1, //! photon (PCM) extra information
881+
femtophotons::CosPa,
882+
femtophotons::DcaToPvXY,
883+
femtophotons::DcaToPvZ,
884+
femtophotons::Chi2Ndf,
885+
femtophotons::V0Radius,
886+
femtophotons::PosDauPt,
887+
femtophotons::NegDauPt,
888+
femtophotons::PosDauTpcInnerParam,
889+
femtophotons::NegDauTpcInnerParam,
890+
femtophotons::PosDauTpcSignal,
891+
femtophotons::NegDauTpcSignal,
892+
femtophotons::PosDauTpcNSigmaEl,
893+
femtophotons::NegDauTpcNSigmaEl,
894+
femtophotons::DecayVtxX,
895+
femtophotons::DecayVtxY,
896+
femtophotons::DecayVtxZ,
897+
femtophotons::DecayVtx<femtophotons::DecayVtxX, femtophotons::DecayVtxY, femtophotons::DecayVtxZ>,
898+
femtophotons::Pa<femtophotons::CosPa>);
899+
using FPhotonExtras = FPhotonExtras_001;
900+
using StoredFPhotonExtras = StoredFPhotonExtras_001;
901+
808902
namespace femtokinks
809903
{
810904
// columns for bit masks

‎PWGCF/Femto/TableProducer/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
o2physics_add_dpl_workflow(femto-producer
1313
SOURCES ./femtoProducer.cxx
14-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
14+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::PWGEMPhotonMesonCore
1515
COMPONENT_NAME Analysis)
1616

1717
o2physics_add_dpl_workflow(femto-producer-derived-to-derived

0 commit comments

Comments
 (0)