Skip to content

Commit 05c04d0

Browse files
hfribertHenrik Fribert
andauthored
[PWGCF,PWGLF] Add Sigma+ via PCM reco to Femto framework (#18510)
Co-authored-by: Henrik Fribert <ge35huh@nidoking.ktas.ph.tum.de>
1 parent c3d6182 commit 05c04d0

14 files changed

Lines changed: 962 additions & 39 deletions

‎PWGCF/Femto/Core/kinkBuilder.h‎

Lines changed: 458 additions & 6 deletions
Large diffs are not rendered by default.

‎PWGCF/Femto/Core/kinkHistManager.h‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ struct ConfSigmaPlusBinning : o2::framework::ConfigurableGroup {
105105
std::string prefix = Prefix;
106106
KINK_DEFAULT_BINNING(1.1, 1.3)
107107
};
108+
template <auto& Prefix>
109+
struct ConfSigmaPlusPcmBinning : o2::framework::ConfigurableGroup {
110+
std::string prefix = Prefix;
111+
KINK_DEFAULT_BINNING(1.1, 1.3)
112+
};
108113

109114
#undef KINK_DEFAULT_BINNING
110115

@@ -114,6 +119,9 @@ using ConfSigmaBinning1 = ConfSigmaBinning<PrefixSigmaBinning1>;
114119
constexpr const char PrefixSigmaPlusBinning1[] = "SigmaPlusBinning1";
115120
using ConfSigmaPlusBinning1 = ConfSigmaPlusBinning<PrefixSigmaPlusBinning1>;
116121

122+
constexpr const char PrefixSigmaPlusPcmBinning1[] = "SigmaPlusPcmBinning1";
123+
using ConfSigmaPlusPcmBinning1 = ConfSigmaPlusPcmBinning<PrefixSigmaPlusPcmBinning1>;
124+
117125
template <auto& Prefix>
118126
struct ConfKinkQaBinning : o2::framework::ConfigurableGroup {
119127
std::string prefix = Prefix;
@@ -262,6 +270,8 @@ constexpr char PrefixSigmaPlusQa[] = "SigmaPlusQA/";
262270
constexpr char PrefixSigmaPlus1Se[] = "SigmaPlus1/SE/";
263271
constexpr char PrefixSigmaPlus1Me[] = "SigmaPlus1/ME/";
264272
constexpr char PrefixSigmaPlus2[] = "SigmaPlus2/";
273+
constexpr char PrefixSigmaPlusPcm1Se[] = "SigmaPlusPcm1/SE/";
274+
constexpr char PrefixSigmaPlusPcm1Me[] = "SigmaPlusPcm1/ME/";
265275

266276
constexpr std::string_view AnalysisDir = "Analysis/";
267277
constexpr std::string_view QaDir = "QA/";
@@ -508,7 +518,7 @@ class KinkHistManager
508518
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kPhi, HistTable)), kinkcandidate.phi());
509519
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kMass, HistTable)), kinkcandidate.mass());
510520

511-
if constexpr (isEqual(kink, modes::Kink::kSigma) || isEqual(kink, modes::Kink::kSigmaPlus)) {
521+
if constexpr (isEqual(kink, modes::Kink::kSigma) || isEqual(kink, modes::Kink::kSigmaPlus) || isEqual(kink, modes::Kink::kSigmaPlusPcm)) {
512522
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), kinkcandidate.sign());
513523
}
514524
}

‎PWGCF/Femto/Core/mcBuilder.h‎

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ struct McBuilderProducts : o2::framework::ProducesGroup {
6666
o2::framework::Produces<o2::aod::FLcLabels> producedLcLabels;
6767
o2::framework::Produces<o2::aod::FSigmaLabels> producedSigmaLabels;
6868
o2::framework::Produces<o2::aod::FSigmaPlusLabels> producedSigmaPlusLabels;
69+
o2::framework::Produces<o2::aod::FSigmaPlusPcmLabels> producedSigmaPlusPcmLabels;
6970
o2::framework::Produces<o2::aod::FXiLabels> producedXiLabels;
7071
o2::framework::Produces<o2::aod::FOmegaLabels> producedOmegaLabels;
7172
};
@@ -86,6 +87,7 @@ struct ConfMcTables : o2::framework::ConfigurableGroup {
8687
o2::framework::Configurable<int> producedLcLabels{"producedLcLabels", -1, "Produce Lc labels (-1: auto; 0 off; 1 on)"};
8788
o2::framework::Configurable<int> producedSigmaLabels{"producedSigmaLabels", -1, "Produce sigma labels (-1: auto; 0 off; 1 on)"};
8889
o2::framework::Configurable<int> producedSigmaPlusLabels{"producedSigmaPlusLabels", -1, "Produce sigma plus labels (-1: auto; 0 off; 1 on)"};
90+
o2::framework::Configurable<int> producedSigmaPlusPcmLabels{"producedSigmaPlusPcmLabels", -1, "Produce sigma plus (PCM) labels (-1: auto; 0 off; 1 on)"};
8991
o2::framework::Configurable<int> producedXiLabels{"producedXiLabels", -1, "Produce xi labels (-1: auto; 0 off; 1 on)"};
9092
o2::framework::Configurable<int> producedOmegaLabels{"producedOmegaLabels", -1, "Produce omega labels (-1: auto; 0 off; 1 on)"};
9193
};
@@ -159,6 +161,7 @@ class McBuilder
159161
mProduceLcLabels = utils::enableTable("FLcLabels_001", table.producedLcLabels.value, initContext);
160162
mProduceSigmaLabels = utils::enableTable("FSigmaLabels_001", table.producedSigmaLabels.value, initContext);
161163
mProduceSigmaPlusLabels = utils::enableTable("FSigmaPlusLabels_001", table.producedSigmaPlusLabels.value, initContext);
164+
mProduceSigmaPlusPcmLabels = utils::enableTable("FSigmaPlusPcmLabels_001", table.producedSigmaPlusPcmLabels.value, initContext);
162165
mProduceXiLabels = utils::enableTable("FXiLabels_001", table.producedXiLabels.value, initContext);
163166
mProduceOmegaLabels = utils::enableTable("FOmegaLabels_001", table.producedOmegaLabels.value, initContext);
164167

@@ -167,7 +170,7 @@ class McBuilder
167170
mProduceMcMothers || mProduceMcPartonicMothers ||
168171
mProduceTrackLabels ||
169172
mProduceLambdaLabels || mProduceK0shortLabels ||
170-
mProduceSigmaLabels || mProduceSigmaPlusLabels ||
173+
mProduceSigmaLabels || mProduceSigmaPlusLabels || mProduceSigmaPlusPcmLabels ||
171174
mProduceXiLabels || mProduceOmegaLabels ||
172175
mProduceD0Labels || mProduceLcLabels) {
173176
mFillAnyTable = true;
@@ -426,6 +429,21 @@ class McBuilder
426429
fillMcLabelGeneric<system>(sigmaPlusDaughter, mcParticles, mcCols, mcProducts, [](auto& prod, int64_t p) { prod.producedSigmaPlusLabels(p); }, true);
427430
}
428431

432+
template <modes::System system, typename T1, typename T2, typename T3, typename T4, typename T5>
433+
void fillMcSigmaPlusPcmWithLabel(T1 const& sigmaPlusPcm, T2 const& chaDaughter, T3 const& mcParticles, T4 const& mcCols, T5& mcProducts)
434+
{
435+
if (!mProduceSigmaPlusPcmLabels) {
436+
mcProducts.producedSigmaPlusPcmLabels(-1);
437+
return;
438+
}
439+
// true sigma plus (proton and photon from it): label of the sigma plus, otherwise label of the proton, its mother gives the origin of the background
440+
if (sigmaPlusPcm.has_mcParticle()) {
441+
fillMcLabelGeneric<system>(sigmaPlusPcm, mcParticles, mcCols, mcProducts, [](auto& prod, int64_t p) { prod.producedSigmaPlusPcmLabels(p); });
442+
} else {
443+
fillMcLabelGeneric<system>(chaDaughter, mcParticles, mcCols, mcProducts, [](auto& prod, int64_t p) { prod.producedSigmaPlusPcmLabels(p); });
444+
}
445+
}
446+
429447
template <modes::System system, typename T1, typename T2, typename T3, typename T4>
430448
void fillMcXiWithLabel(T1 const& xi, T2 const& mcParticles, T3 const& mcCols, T4& mcProducts)
431449
{
@@ -741,6 +759,7 @@ class McBuilder
741759
bool mProduceLcLabels = false;
742760
bool mProduceSigmaLabels = false;
743761
bool mProduceSigmaPlusLabels = false;
762+
bool mProduceSigmaPlusPcmLabels = false;
744763
bool mProduceXiLabels = false;
745764
bool mProduceOmegaLabels = false;
746765
bool mProduceMcMotherLabels = false;
@@ -767,6 +786,7 @@ struct McBuilderDerivedToDerivedProducts : o2::framework::ProducesGroup {
767786
o2::framework::Produces<o2::aod::StoredFTrackLabels> producedTrackLabels;
768787
o2::framework::Produces<o2::aod::StoredFSigmaLabels> producedSigmaLabels;
769788
o2::framework::Produces<o2::aod::StoredFSigmaPlusLabels> producedSigmaPlusLabels;
789+
o2::framework::Produces<o2::aod::StoredFSigmaPlusPcmLabels> producedSigmaPlusPcmLabels;
770790
};
771791

772792
struct ConfMcTablesDerivedToDerived : o2::framework::ConfigurableGroup {
@@ -850,6 +870,18 @@ class McBuilderDerivedToDerived
850870
this->getOrCreateMcParticleRow(mcParticle, mcCols, mcMothers, mcPartonicMothers, mcProducts));
851871
}
852872

873+
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
874+
void fillSigmaPlusPcmWithLabel(T1 const& sigmaPlusPcm, T2 const& mcCols, T3 const& /*mcParticles*/, T4 const& mcMothers, T5 const& mcPartonicMothers, T6& mcProducts)
875+
{
876+
if (!sigmaPlusPcm.has_fMcParticle()) {
877+
mcProducts.producedSigmaPlusPcmLabels(-1);
878+
return;
879+
}
880+
auto mcParticle = sigmaPlusPcm.template fMcParticle_as<T3>();
881+
mcProducts.producedSigmaPlusPcmLabels(
882+
this->getOrCreateMcParticleRow(mcParticle, mcCols, mcMothers, mcPartonicMothers, mcProducts));
883+
}
884+
853885
template <typename T1, typename T2>
854886
void reset(T1 const& mcCols, T2 const& mcParticles)
855887
{

‎PWGCF/Femto/Core/modes.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ enum class V0 : o2::analysis::femto::datatypes::V0Type {
224224

225225
enum class Kink : o2::analysis::femto::datatypes::KinkType {
226226
kSigma,
227-
kSigmaPlus
227+
kSigmaPlus,
228+
kSigmaPlusPcm
228229
};
229230

230231
enum class Cascade : o2::analysis::femto::datatypes::CascadeType {

‎PWGCF/Femto/Core/particleCleaner.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ constexpr const char PrefixSigmaPlusCleaner2[] = "SigmaPlusCleaner2";
7373
using ConfSigmaPlusCleaner1 = ConfParticleCleaner<PrefixSigmaPlusCleaner1>;
7474
using ConfSigmaPlusCleaner2 = ConfParticleCleaner<PrefixSigmaPlusCleaner2>;
7575

76+
constexpr const char PrefixSigmaPlusPcmCleaner1[] = "SigmaPlusPcmCleaner1";
77+
constexpr const char PrefixSigmaPlusPcmCleaner2[] = "SigmaPlusPcmCleaner2";
78+
using ConfSigmaPlusPcmCleaner1 = ConfParticleCleaner<PrefixSigmaPlusPcmCleaner1>;
79+
using ConfSigmaPlusPcmCleaner2 = ConfParticleCleaner<PrefixSigmaPlusPcmCleaner2>;
80+
7681
constexpr const char PrefixXiCleaner1[] = "XiCleaner1";
7782
constexpr const char PrefixXiCleaner2[] = "XiCleaner2";
7883
using ConfXiCleaner1 = ConfParticleCleaner<PrefixXiCleaner1>;

‎PWGCF/Femto/Core/partitions.h‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,21 @@
244244
(o2::aod::femtobase::stored::mass < (selection).massMax) && \
245245
ncheckbit(o2::aod::femtokinks::mask, (selection).mask)
246246

247+
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
248+
#define MAKE_SIGMAPLUSPCM_PARTITION(selection) \
249+
ifnode((selection).sign.node() != 0, \
250+
ifnode((selection).sign.node() > 0, o2::aod::femtobase::stored::signedPt > 0.f, o2::aod::femtobase::stored::signedPt < 0.f), true) && \
251+
(nabs(o2::aod::femtobase::stored::signedPt) > (selection).ptMin) && \
252+
(nabs(o2::aod::femtobase::stored::signedPt) < (selection).ptMax) && \
253+
(o2::aod::femtobase::stored::eta > (selection).etaMin) && \
254+
(o2::aod::femtobase::stored::eta < (selection).etaMax) && \
255+
(o2::aod::femtobase::stored::phi > (selection).phiMin) && \
256+
(o2::aod::femtobase::stored::phi < (selection).phiMax) && \
257+
(o2::aod::femtobase::stored::mass > (selection).massMin) && \
258+
(o2::aod::femtobase::stored::mass < (selection).massMax) && \
259+
(o2::aod::femtokinks::mlScore >= (selection).mlScoreMin) && \
260+
ncheckbit(o2::aod::femtokinks::mask, (selection).mask)
261+
247262
// partition for D0
248263
// sign of signedPt encodes the hypothesis: D0 (+) / D0bar (-)
249264
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)

‎PWGCF/Femto/DataModel/FemtoTables.h‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,18 @@ DECLARE_SOA_COLUMN(DauTpcNSigmaPi, dauTpcNSigmaPi, float);
10961096
DECLARE_SOA_COLUMN(DauTofNSigmaPr, dauTofNSigmaPr, float);
10971097
DECLARE_SOA_COLUMN(PtOriginal, ptOriginal, float);
10981098

1099+
// columns for sigma plus reconstructed with a PCM photon
1100+
DECLARE_SOA_COLUMN(MlScore, mlScore, float); //! BDT score of the candidate
1101+
DECLARE_SOA_COLUMN(FlightDirTilt, flightDirTilt, float); //! Tilt of the flight direction needed for a real solution of the missing photon
1102+
DECLARE_SOA_COLUMN(DauDcaXY, dauDcaXY, float); //! DCAxy of the charged daughter to the primary vertex
1103+
DECLARE_SOA_COLUMN(DauDcaZ, dauDcaZ, float); //! DCAz of the charged daughter to the primary vertex
1104+
DECLARE_SOA_COLUMN(PhotonDcaXYToPV, photonDcaXYToPV, float); //! Transverse DCA of the photon flight line to the primary vertex
1105+
DECLARE_SOA_COLUMN(PhotonDcaZToPV, photonDcaZToPV, float); //! Longitudinal DCA of the photon flight line to the primary vertex
1106+
DECLARE_SOA_COLUMN(PhotonCosPAToPV, photonCosPAToPV, float); //! Cosine of the photon pointing angle to the primary vertex
1107+
DECLARE_SOA_COLUMN(PhotonConvRadius, photonConvRadius, float); //! Conversion radius of the photon
1108+
DECLARE_SOA_COLUMN(AntiSigmaPointingAngle, antiSigmaPointingAngle, float); //! Angle between the unbent proton momentum and the flight direction
1109+
DECLARE_SOA_COLUMN(DcaDauPhoton, dcaDauPhoton, float); //! DCA between charged daughter and photon at the decay vertex
1110+
10991111
// id column for charged daughter track
11001112
DECLARE_SOA_INDEX_COLUMN_FULL(ChaDau, chaDau, int32_t, FTracks, "_ChaDau"); //!
11011113

@@ -1266,6 +1278,72 @@ DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmaPlusExtras_002, "FSIGMAPLUSEXTRAS", 2,
12661278
using FSigmaPlusExtras = FSigmaPlusExtras_002;
12671279
using StoredFSigmaPlusExtras = StoredFSigmaPlusExtras_002;
12681280

1281+
// table for basic sigma plus information, sigma plus reconstructed with a PCM photon
1282+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmaPlusPcm_001, "FSIGMAPLUSPCM", 1,
1283+
o2::soa::Index<>,
1284+
femtobase::stored::FColId,
1285+
femtobase::stored::SignedPt, // use sign to differentiate between sigma plus (+1) and anti sigma plus (-1)
1286+
femtobase::stored::Eta,
1287+
femtobase::stored::Phi,
1288+
femtobase::stored::Mass,
1289+
femtokinks::ChaDauId,
1290+
femtobase::dynamic::Sign<femtobase::stored::SignedPt>,
1291+
femtobase::dynamic::Pt<femtobase::stored::SignedPt>,
1292+
femtobase::dynamic::P<femtobase::stored::SignedPt, femtobase::stored::Eta>,
1293+
femtobase::dynamic::Px<femtobase::stored::SignedPt, femtobase::stored::Phi>,
1294+
femtobase::dynamic::Py<femtobase::stored::SignedPt, femtobase::stored::Phi>,
1295+
femtobase::dynamic::Pz<femtobase::stored::SignedPt, femtobase::stored::Eta>,
1296+
femtobase::dynamic::Theta<femtobase::stored::Eta>);
1297+
using FSigmaPlusPcm = FSigmaPlusPcm_001;
1298+
using FSigmaPlusPcmRow = FSigmaPlusPcm::iterator;
1299+
using StoredFSigmaPlusPcm = StoredFSigmaPlusPcm_001;
1300+
1301+
// table for basic sigma plus information, sigma plus reconstructed with a PCM photon, compressed/binned kinematics
1302+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FLiteSigmaPlusPcm_001, "FLITESIGMAPCM", 1,
1303+
o2::soa::Index<>,
1304+
femtobase::stored::FLiteColId,
1305+
femtobase::lite::SignedBinnedPt,
1306+
femtobase::lite::BinnedEta,
1307+
femtobase::lite::BinnedPhi,
1308+
femtokinks::lite::BinnedSigmaMass,
1309+
femtokinks::lite::ChaDauId,
1310+
femtobase::lite::Sign<femtobase::lite::SignedBinnedPt>,
1311+
femtobase::lite::SignedPt<femtobase::lite::SignedBinnedPt>,
1312+
femtobase::lite::signedpt::Pt<femtobase::lite::SignedBinnedPt>,
1313+
femtobase::lite::Eta<femtobase::lite::BinnedEta>,
1314+
femtobase::lite::Phi<femtobase::lite::BinnedPhi>,
1315+
femtokinks::lite::SigmaMass<femtokinks::lite::BinnedSigmaMass>);
1316+
using FLiteSigmaPlusPcm = FLiteSigmaPlusPcm_001;
1317+
using FLiteSigmaPlusPcmRow = FLiteSigmaPlusPcm::iterator;
1318+
using StoredFLiteSigmaPlusPcm = StoredFLiteSigmaPlusPcm_001;
1319+
1320+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmaPlusPcmMasks_001, "FSIGMAPCMMASKS", 1,
1321+
femtokinks::Mask);
1322+
using FSigmaPlusPcmMasks = FSigmaPlusPcmMasks_001;
1323+
using StoredFSigmaPlusPcmMasks = StoredFSigmaPlusPcmMasks_001;
1324+
1325+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmaPlusPcmMlScores_001, "FSIGMAPCMML", 1,
1326+
femtokinks::MlScore);
1327+
using FSigmaPlusPcmMlScores = FSigmaPlusPcmMlScores_001;
1328+
using StoredFSigmaPlusPcmMlScores = StoredFSigmaPlusPcmMlScores_001;
1329+
1330+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmaPlusPcmExtras_001, "FSIGMAPCMEXTRA", 1,
1331+
femtokinks::FlightDirTilt,
1332+
femtokinks::DcaMothToPV,
1333+
femtokinks::DauDcaXY,
1334+
femtokinks::DauDcaZ,
1335+
femtokinks::DauTpcNSigmaPr,
1336+
femtokinks::DauTofNSigmaPr,
1337+
femtokinks::PhotonDcaXYToPV,
1338+
femtokinks::PhotonDcaZToPV,
1339+
femtokinks::PhotonCosPAToPV,
1340+
femtokinks::PhotonConvRadius,
1341+
femtokinks::AntiSigmaPointingAngle,
1342+
femtokinks::DcaDauPhoton,
1343+
femtokinks::TransRadius);
1344+
using FSigmaPlusPcmExtras = FSigmaPlusPcmExtras_001;
1345+
using StoredFSigmaPlusPcmExtras = StoredFSigmaPlusPcmExtras_001;
1346+
12691347
namespace femtocascades
12701348
{
12711349
// columns for cascade bit masks
@@ -1754,6 +1832,13 @@ using FSigmaPlusLabel = FSigmaPlusLabels::iterator;
17541832
using StoredFSigmaPlusLabels = StoredFSigmaPlusLabels_001;
17551833
using StoredFSigmaPlusLabel = StoredFSigmaPlusLabels::iterator;
17561834

1835+
DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmaPlusPcmLabels_001, "FSIGMAPCMLABEL", 1, //! label from femto sigma plus (PCM) to femto mc particle
1836+
femtolabels::FMcParticleId);
1837+
using FSigmaPlusPcmLabels = FSigmaPlusPcmLabels_001;
1838+
using FSigmaPlusPcmLabel = FSigmaPlusPcmLabels::iterator;
1839+
using StoredFSigmaPlusPcmLabels = StoredFSigmaPlusPcmLabels_001;
1840+
using StoredFSigmaPlusPcmLabel = StoredFSigmaPlusPcmLabels::iterator;
1841+
17571842
DECLARE_SOA_TABLE_STAGED_VERSIONED(FXiLabels_001, "FXILABEL", 1, //! label from femto xi to femto mc particle
17581843
femtolabels::FMcParticleId);
17591844
using FXiLabels = FXiLabels_001;

0 commit comments

Comments
 (0)