Skip to content

Commit fb94c41

Browse files
committed
[PWGHF] Simplify SigmaC femtoscopy selection and configuration
Use a fixed 0.135 GeV/c2 producer DeltaM lower bound and the common charm mass-window and histogram parameters in the pairing task. Remove the particle-sign selector and duplicate LambdaC mass selection while retaining charge information in the candidate output. Apply the SigmaC review cleanup for redundant upstream checks and task selections. Validation: O2 linter and diff checks; syntax checks for both workflows; SigmaC data/MC and legacy Lc, D+, D0, D*, Xic regression checks.
1 parent 5325a80 commit fb94c41

2 files changed

Lines changed: 14 additions & 47 deletions

File tree

‎PWGHF/HFC/TableProducer/producerCharmHadronsTrackFemtoDream.cxx‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ enum class D0CandFlag : uint8_t {
117117

118118
struct HfProducerCharmHadronsTrackFemtoDream {
119119

120+
static constexpr float SigmacDeltaMassMin = 0.135f; // Broad retention threshold below the physical DeltaM limit.
121+
120122
struct : ProducesGroup {
121123
Produces<aod::FDCollisions> outputCollision;
122124
Produces<aod::FDColMasks> rowMasks;
@@ -207,7 +209,6 @@ struct HfProducerCharmHadronsTrackFemtoDream {
207209

208210
struct : ConfigurableGroup {
209211
std::string prefix = "sigmac";
210-
Configurable<float> deltaMassMin{"deltaMassMin", static_cast<float>(o2::constants::physics::MassPiPlus), "Minimum retained DeltaM, including sidebands (GeV/c2)"};
211212
Configurable<float> deltaMassMax{"deltaMassMax", 0.190f, "Maximum retained DeltaM, including sidebands (GeV/c2)"};
212213
Configurable<float> lcMassWindow{"lcMassWindow", 0.03f, "Maximum |M(Lc)-PDG|, also limited by the HF creator (GeV/c2)"};
213214
Configurable<float> yMax{"yMax", 0.8f, "Maximum |y| using the SigmaC(2455) mass"};
@@ -287,7 +288,7 @@ struct HfProducerCharmHadronsTrackFemtoDream {
287288
}
288289

289290
if ((doprocessDataScToLcPi || doprocessDataScToLcPiWithML || doprocessMcScToLcPi || doprocessMcScToLcPiWithML) &&
290-
(sigmacCfg.deltaMassMin.value >= sigmacCfg.deltaMassMax.value || sigmacCfg.lcMassWindow.value <= 0.f || sigmacCfg.yMax.value <= 0.f)) {
291+
(SigmacDeltaMassMin >= sigmacCfg.deltaMassMax.value || sigmacCfg.lcMassWindow.value <= 0.f || sigmacCfg.yMax.value <= 0.f)) {
291292
LOG(fatal) << "Invalid SigmaC mass or rapidity window.";
292293
}
293294
if (doprocessDataScToLcPi || doprocessDataScToLcPiWithML || doprocessMcScToLcPi || doprocessMcScToLcPiWithML) {
@@ -1449,27 +1450,17 @@ struct HfProducerCharmHadronsTrackFemtoDream {
14491450
int nSelectedSc = 0;
14501451
constexpr std::size_t NumMlScores = 3;
14511452
constexpr int NumHypotheses = 2;
1452-
constexpr int ChargeDoublyCharged = 2;
14531453
auto bc = col.template bc_as<aod::BCsWithTimestamps>();
14541454
for (auto const& sc : candidates) {
1455-
if (sc.charge() != 0 && std::abs(sc.charge()) != ChargeDoublyCharged) {
1456-
continue;
1457-
}
14581455
auto const rapidity = sc.charge() == 0 ? HfHelper::ySc0(sc) : HfHelper::yScPlusPlus(sc);
14591456
if (!std::isfinite(rapidity) || std::abs(rapidity) > sigmacCfg.yMax.value) {
14601457
continue;
14611458
}
14621459
auto lc = sc.template prongLc_as<LcType>();
1463-
if (lc.collisionId() != sc.collisionId()) {
1464-
continue;
1465-
}
14661460
auto p0 = lc.template prong0_as<DaughterTracks>();
14671461
auto p1 = lc.template prong1_as<DaughterTracks>();
14681462
auto p2 = lc.template prong2_as<DaughterTracks>();
14691463
auto softPi = sc.template prong1_as<DaughterTracks>();
1470-
if (softPi.globalIndex() == p0.globalIndex() || softPi.globalIndex() == p1.globalIndex() || softPi.globalIndex() == p2.globalIndex()) {
1471-
continue;
1472-
}
14731464
std::array<double, NumHypotheses> const lcMass{HfHelper::invMassLcToPKPi(lc), HfHelper::invMassLcToPiKP(lc)};
14741465
std::array<double, NumHypotheses> const scMass{HfHelper::invMassScRecoLcToPKPi(sc, lc), HfHelper::invMassScRecoLcToPiKP(sc, lc)};
14751466
auto const decayMask = o2::hf_sigmac_utils::isDecayToPKPiToPiKP(lc, sc);
@@ -1503,7 +1494,7 @@ struct HfProducerCharmHadronsTrackFemtoDream {
15031494
}
15041495
for (int h = 0; h < NumHypotheses; ++h) {
15051496
double const deltaMass = scMass[h] - lcMass[h];
1506-
if (!accepted[h] || !std::isfinite(deltaMass) || deltaMass < sigmacCfg.deltaMassMin.value || deltaMass > sigmacCfg.deltaMassMax.value) {
1497+
if (!accepted[h] || !std::isfinite(deltaMass) || deltaMass < SigmacDeltaMassMin || deltaMass > sigmacCfg.deltaMassMax.value) {
15071498
continue;
15081499
}
15091500
tables.rowCandCharmSc(tables.outputCollision.lastIndex(), bc.timestamp(), sc.charge(),

‎PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx‎

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,14 @@ struct HfTaskCharmHadronsTrackFemtoDream {
117117
Configurable<int> charmHadMcSel{"charmHadMcSel", DecayChannelMain::LcToPKPi, "MC matching flag for the selected charm hadron decay channel"};
118118
Configurable<float> charmHadFdBDTmin{"charmHadFdBDTmin", 0., "Minimum feed-down bdt score Charm Hadron (particle 2)"};
119119
Configurable<float> charmHadFdBDTmax{"charmHadFdBDTmax", 1., "Maximum feed-down bdt score Charm Hadron (particle 2)"};
120-
Configurable<float> charmHadMaxInvMass{"charmHadMaxInvMass", 2.45, "Maximum invariant mass of Charm Hadron (particle 2)"};
121-
Configurable<float> charmHadMinInvMass{"charmHadMinInvMass", 2.15, "Minimum invariant mass of Charm Hadron (particle 2)"};
120+
Configurable<float> charmHadMaxInvMass{"charmHadMaxInvMass", 2.45, "Maximum charm invariant mass or DeltaM (GeV/c2)"};
121+
Configurable<float> charmHadMinInvMass{"charmHadMinInvMass", 2.15, "Minimum charm invariant mass or DeltaM (GeV/c2)"};
122122
Configurable<float> charmHadMinPt{"charmHadMinPt", 0., "Minimum pT of Charm Hadron (particle 2)"};
123123
Configurable<float> charmHadMaxPt{"charmHadMaxPt", 999., "Maximum pT of Charm Hadron (particle 2)"};
124124
Configurable<int> charmHadPDGCode{"charmHadPDGCode", Pdg::kLambdaCPlus, "PDG code of particle 2 Charm Hadron"};
125125
Configurable<float> charmHadPromptBDTmin{"charmHadPromptBDTmin", 0., "Minimum prompt bdt score Charm Hadron (particle 2)"};
126126
Configurable<float> charmHadPromptBDTmax{"charmHadPromptBDTmax", 1., "Maximum prompt bdt score Charm Hadron (particle 2)"};
127127
} charmSel;
128-
struct : ConfigurableGroup {
129-
std::string prefix = "sigmac";
130-
Configurable<int> particleSign{"particleSign", 0, "1: particle, -1: antiparticle, 0: both (also for neutral SigmaC)"};
131-
Configurable<float> deltaMassMin{"deltaMassMin", 0.160f, "Lower DeltaM edge (GeV/c2), tune using mass fits"};
132-
Configurable<float> deltaMassMax{"deltaMassMax", 0.175f, "Upper DeltaM edge (GeV/c2), configurable for sidebands"};
133-
Configurable<float> lcMassWindow{"lcMassWindow", 0.03f, "Maximum |M(Lc)-PDG| (GeV/c2)"};
134-
ConfigurableAxis deltaMassBins{"deltaMassBins", {300, 0.138, 0.198}, "SigmaC DeltaM histogram binning"};
135-
} sigmacSel;
136128
/// General options
137129
struct : ConfigurableGroup {
138130
Configurable<float> cprDeltaEtaMax{"cprDeltaEtaMax", 0.01, "Max. Delta Eta for Close Pair Rejection"};
@@ -250,17 +242,13 @@ struct HfTaskCharmHadronsTrackFemtoDream {
250242
Partition<FilteredCharmCand3ProngsXic> partitionCharmHadron3ProngXic = aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin&& aod::fdhf::bdtPrompt<charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt> charmSel.charmHadPromptBDTmin;
251243
Partition<FilteredCharmCand2Prongs> partitionCharmHadron2Prong = aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin&& aod::fdhf::bdtPrompt<charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt> charmSel.charmHadPromptBDTmin;
252244
Partition<FilteredCharmCandDstars> partitionCharmHadronDstar = aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin&& aod::fdhf::bdtPrompt<charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt> charmSel.charmHadPromptBDTmin;
253-
Partition<FilteredCharmCandScs> partitionCharmHadronSc = ((aod::fdhf::bdtBkg < 0.f && aod::fdhf::bdtPrompt < 0.f && aod::fdhf::bdtFD < 0.f) ||
254-
(aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin &&
255-
aod::fdhf::bdtPrompt < charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt > charmSel.charmHadPromptBDTmin));
245+
Partition<FilteredCharmCandScs> partitionCharmHadronSc = aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin && aod::fdhf::bdtPrompt < charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt > charmSel.charmHadPromptBDTmin;
256246

257247
Partition<FilteredCharmMcCand3Prongs> partitionMcCharmHadron3Prong = aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD;
258248
Partition<FilteredCharmMcCand3ProngsXic> partitionMcCharmHadron3ProngXic = aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD;
259249
Partition<FilteredCharmMcCand2Prongs> partitionMcCharmHadron2Prong = aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD;
260250
Partition<FilteredCharmMcCandDstars> partitionMcCharmHadronDstar = aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD;
261-
Partition<FilteredCharmMcCandScs> partitionMcCharmHadronSc = (aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD) && ((aod::fdhf::bdtBkg < 0.f && aod::fdhf::bdtPrompt < 0.f && aod::fdhf::bdtFD < 0.f) ||
262-
(aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin &&
263-
aod::fdhf::bdtPrompt < charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt > charmSel.charmHadPromptBDTmin));
251+
Partition<FilteredCharmMcCandScs> partitionMcCharmHadronSc = aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD;
264252

265253
/// Axis configurables
266254
ConfigurableAxis dummy{"dummy", {1, 0, 1}, "dummy axis"};
@@ -269,7 +257,7 @@ struct HfTaskCharmHadronsTrackFemtoDream {
269257
ConfigurableAxis bin4DMult{"bin4DMult", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f}, "multiplicity Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)"};
270258
ConfigurableAxis bin4DmT{"bin4DmT", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)"};
271259
ConfigurableAxis bin4DmultPercentile{"bin4DmultPercentile", {10, 0.0f, 100.0f}, "multiplicity percentile Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)"};
272-
ConfigurableAxis binInvMass{"binInvMass", {400, 2.10, 2.50}, "InvMass binning"};
260+
ConfigurableAxis binInvMass{"binInvMass", {400, 2.10, 2.50}, "Charm invariant mass binning"};
273261
ConfigurableAxis binpTCharm{"binpTCharm", {360, 0, 36}, "pT binning of charm hadron"};
274262
ConfigurableAxis binTempFitVarTrack{"binTempFitVarTrack", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot (Track)"};
275263
ConfigurableAxis binmT{"binmT", {225, 0., 7.5}, "binning mT"};
@@ -337,10 +325,9 @@ struct HfTaskCharmHadronsTrackFemtoDream {
337325
bool const processSc = doprocessDataScTrk || doprocessMcScTrk;
338326
if (processSc) {
339327
isMc.value = doprocessMcScTrk.value;
340-
if (std::abs(sigmacSel.particleSign.value) > 1 || sigmacSel.deltaMassMin.value >= sigmacSel.deltaMassMax.value || sigmacSel.lcMassWindow.value <= 0.f) {
341-
LOG(fatal) << "Invalid SigmaC sign or mass window.";
328+
if (charmSel.charmHadMinInvMass.value >= charmSel.charmHadMaxInvMass.value) {
329+
LOG(fatal) << "Invalid SigmaC mass window.";
342330
}
343-
binInvMass.value = sigmacSel.deltaMassBins.value;
344331
}
345332

346333
massOne = o2::analysis::femtoDream::getMass(trackSel.pdgCodeTrack1.value);
@@ -354,24 +341,22 @@ struct HfTaskCharmHadronsTrackFemtoDream {
354341
allTrackHisto.init(&registry, binmultTempFit, binMulPercentile, binpTTrack, binEta, binPhi, binTempFitVarTrack, binNSigmaTPC, binNSigmaTOF, binNSigmaTPCTOF, binTPCClusters, dummy, dummy, isMc, trackSel.pdgCodeTrack1, true);
355342
selectedTrackHisto.init(&registry, binmultTempFit, binMulPercentile, binpTTrack, binEta, binPhi, binTempFitVarTrack, binNSigmaTPC, binNSigmaTOF, binNSigmaTPCTOF, binTPCClusters, dummy, dummy, isMc, trackSel.pdgCodeTrack1, true);
356343

357-
// SigmaC masses are updated from each candidate's charge when filling pairs.
358-
int const charmPdg = processSc ? Pdg::kSigmaCPlusPlus : charmSel.charmHadPDGCode.value;
359344
sameEventCont.init(&registry,
360345
binkstar, binpTTrack, binkT, binmT, mixingBinMult, mixingBinMultPercentile,
361346
bin4Dkstar, bin4DmT, bin4DMult, bin4DmultPercentile,
362347
isMc, pairQASetting.use4D, pairQASetting.extendedPlots,
363348
highkstarCut,
364349
smearingByOrigin, binInvMass);
365350

366-
sameEventCont.setPDGCodes(trackSel.pdgCodeTrack1.value, charmPdg);
351+
sameEventCont.setPDGCodes(trackSel.pdgCodeTrack1.value, charmSel.charmHadPDGCode.value);
367352
mixedEventCont.init(&registry,
368353
binkstar, binpTTrack, binkT, binmT, mixingBinMult, mixingBinMultPercentile,
369354
bin4Dkstar, bin4DmT, bin4DMult, bin4DmultPercentile,
370355
isMc, pairQASetting.use4D, pairQASetting.extendedPlots,
371356
highkstarCut,
372357
smearingByOrigin, binInvMass);
373358

374-
mixedEventCont.setPDGCodes(trackSel.pdgCodeTrack1.value, charmPdg);
359+
mixedEventCont.setPDGCodes(trackSel.pdgCodeTrack1.value, charmSel.charmHadPDGCode.value);
375360
registryMixQa.add("MixingQA/hSECollisionBins", "; bin; Entries", kTH1F, {{120, -0.5, 119.5}});
376361
registryMixQa.add("MixingQA/hSECollisionPool", "; Vz (cm); Mul", kTH2F, {{100, -10, 10}, {200, 0, 200}});
377362
registryMixQa.add("MixingQA/hMECollisionBins", "; bin; Entries", kTH1F, {{120, -0.5, 119.5}});
@@ -536,9 +521,7 @@ struct HfTaskCharmHadronsTrackFemtoDream {
536521
if constexpr (Channel == DecayChannel::ScToLcPi) {
537522
int const chargeAbs = std::abs(candidate.charge());
538523
return (chargeAbs == 0 || chargeAbs == ChargeDoublyCharged) &&
539-
(sigmacSel.particleSign.value == 0 || candidate.chargeLc() == sigmacSel.particleSign.value) &&
540-
mass >= sigmacSel.deltaMassMin.value && mass <= sigmacSel.deltaMassMax.value &&
541-
std::abs(candidate.massLc() - MassLambdaCPlus) <= sigmacSel.lcMassWindow.value &&
524+
mass >= charmSel.charmHadMinInvMass.value && mass <= charmSel.charmHadMaxInvMass.value &&
542525
candidate.pt() >= charmSel.charmHadMinPt.value && candidate.pt() <= charmSel.charmHadMaxPt.value;
543526
}
544527
return mass >= charmSel.charmHadMinInvMass.value && mass <= charmSel.charmHadMaxInvMass.value;
@@ -767,13 +750,6 @@ struct HfTaskCharmHadronsTrackFemtoDream {
767750
}
768751
}
769752

770-
if constexpr (Channel == DecayChannel::ScToLcPi) {
771-
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() ||
772-
p1.trackId() == p2.prong2Id() || p1.trackId() == p2.softPiId()) {
773-
continue;
774-
}
775-
}
776-
777753
if constexpr (Channel == DecayChannel::DstarToD0Pi) {
778754

779755
if (pairQASetting.useCPR.value) {

0 commit comments

Comments
 (0)