Skip to content

Commit bf977d4

Browse files
authored
[PWGCF] Add SE/ME split for single particles (#18455)
1 parent 6ee9184 commit bf977d4

32 files changed

Lines changed: 959 additions & 492 deletions

‎PWGCF/Femto/Core/cascadeHistManager.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,11 @@ std::map<CascadeHist, std::vector<o2::framework::AxisSpec>> makeCascadeMcQaHistS
291291
#undef CASCADE_HIST_MC_QA_MAP
292292

293293
constexpr char PrefixXiQa[] = "XiQA/";
294-
constexpr char PrefixXi[] = "Xi/";
294+
constexpr char PrefixXiSe[] = "Xi/SE/";
295+
constexpr char PrefixXiMe[] = "Xi/ME/";
295296
constexpr char PrefixOmegaQa[] = "OmegaQa/";
296-
constexpr char PrefixOmega[] = "Omega/";
297+
constexpr char PrefixOmegaSe[] = "Omega/SE/";
298+
constexpr char PrefixOmegaMe[] = "Omega/ME/";
297299

298300
constexpr char PrefixLambdaCascade[] = "LambdaCascadeQa/";
299301

‎PWGCF/Femto/Core/charmHadronHistManager.h‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,15 @@ auto makeLcMcQaHistSpecMap(const T1& confBinningAnalysis, const T2& confBinningQ
291291
#undef LC_HIST_QA_MAP
292292

293293
// prefixes for the output directories in the histogram registry
294-
constexpr char PrefixD01[] = "D01/";
295-
constexpr char PrefixD02[] = "D02/";
294+
// same-event / mixed-event siblings: single-candidate histograms for a given slot, split by
295+
// whether the candidate came from a same-event or mixed-event pair
296+
constexpr char PrefixD01Se[] = "D01/SE/";
297+
constexpr char PrefixD02Se[] = "D02/SE/";
298+
constexpr char PrefixD01Me[] = "D01/ME/";
299+
constexpr char PrefixD02Me[] = "D02/ME/";
296300
constexpr char PrefixD0Qa[] = "D0QA/";
297-
constexpr char PrefixLc1[] = "Lc1/";
301+
constexpr char PrefixLc1Se[] = "Lc1/SE/";
302+
constexpr char PrefixLc1Me[] = "Lc1/ME/";
298303
constexpr char PrefixLcQa[] = "LcQA/";
299304
constexpr std::string_view AnalysisDir = "Analysis/";
300305
constexpr std::string_view McDir = "MC/";

‎PWGCF/Femto/Core/kinkHistManager.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,12 @@ std::map<KinkHist, std::vector<o2::framework::AxisSpec>> makeKinkMcQaHistSpecMap
255255
#undef KINK_HIST_MC_QA_MAP
256256

257257
constexpr char PrefixSigmaQa[] = "SigmaQA/";
258-
constexpr char PrefixSigma1[] = "Sigma1/";
258+
constexpr char PrefixSigma1Se[] = "Sigma1/SE/";
259+
constexpr char PrefixSigma1Me[] = "Sigma1/ME/";
259260
constexpr char PrefixSigma2[] = "Sigma2/";
260261
constexpr char PrefixSigmaPlusQa[] = "SigmaPlusQA/";
261-
constexpr char PrefixSigmaPlus1[] = "SigmaPlus1/";
262+
constexpr char PrefixSigmaPlus1Se[] = "SigmaPlus1/SE/";
263+
constexpr char PrefixSigmaPlus1Me[] = "SigmaPlus1/ME/";
262264
constexpr char PrefixSigmaPlus2[] = "SigmaPlus2/";
263265

264266
constexpr std::string_view AnalysisDir = "Analysis/";

‎PWGCF/Femto/Core/mcParticleHistManager.h‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ auto makeMcParticleHistSpecMap(const T& confBinning)
146146

147147
inline constexpr char PrefixMcParticle1[] = "McParticle1/";
148148
inline constexpr char PrefixMcParticle2[] = "McParticle2/";
149-
inline constexpr char PrefixMcParticle3[] = "McParticle3/";
149+
inline constexpr char PrefixMcParticle1Se[] = "McParticle1Se/";
150+
inline constexpr char PrefixMcParticle2Se[] = "McParticle2Se/";
151+
inline constexpr char PrefixMcParticle3Se[] = "McParticle3Se/";
152+
inline constexpr char PrefixMcParticle1Me[] = "McParticle1Me/";
153+
inline constexpr char PrefixMcParticle2Me[] = "McParticle2Me/";
154+
inline constexpr char PrefixMcParticle3Me[] = "McParticle3Me/";
150155

151156
constexpr std::string_view McDir = "MC/";
152157

‎PWGCF/Femto/Core/pairBuilder.h‎

Lines changed: 263 additions & 164 deletions
Large diffs are not rendered by default.

‎PWGCF/Femto/Core/pairProcessHelpers.h‎

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ template <modes::Mode mode,
429429
typename T7,
430430
typename T8,
431431
typename T9,
432-
typename T10>
432+
typename T10,
433+
typename T11,
434+
typename T12>
433435
void processMixedEvent(T1 const& Collisions,
434436
T2& Partition1,
435437
T3& Partition2,
@@ -440,7 +442,9 @@ void processMixedEvent(T1 const& Collisions,
440442
T8& PairHistManager,
441443
T9& CprManager,
442444
T10& PcManager,
443-
int eventStride = 1)
445+
int eventStride,
446+
T11& ParticleHistManagerMe1,
447+
T12& ParticleHistManagerMe2)
444448
{
445449
int64_t lastCollisionIndex = -1;
446450
int windowSizeRaw = 0;
@@ -518,6 +522,11 @@ void processMixedEvent(T1 const& Collisions,
518522
hasValidPair = true;
519523
PairHistManager.trackParticlesPerEvent(p1, p2);
520524
PairHistManager.template fill<mode>();
525+
// single-particle histograms for particles that make it into an accepted mixed-event
526+
// pair -- filled once per accepted pair (not deduplicated), so a particle contributes
527+
// here exactly as often as it actually contributes to the mixed-event pair sample.
528+
ParticleHistManagerMe1.template fill<mode>(p1, TrackTable);
529+
ParticleHistManagerMe2.template fill<mode>(p2, TrackTable);
521530
}
522531
}
523532

@@ -551,7 +560,9 @@ template <modes::Mode mode,
551560
typename T13,
552561
typename T14,
553562
typename T15,
554-
typename T16>
563+
typename T16,
564+
typename T17,
565+
typename T18>
555566
void processMixedEvent(T1 const& Collisions,
556567
T2 const& mcCollisions,
557568
T3& Partition1,
@@ -568,7 +579,9 @@ void processMixedEvent(T1 const& Collisions,
568579
T14& ParticleCleaner2,
569580
T15& CprManager,
570581
T16& PcManager,
571-
int eventStride = 1)
582+
int eventStride,
583+
T17& ParticleHistManagerMe1,
584+
T18& ParticleHistManagerMe2)
572585
{
573586
int64_t lastCollisionIndex = -1;
574587
int windowSizeRaw = 0;
@@ -650,6 +663,9 @@ void processMixedEvent(T1 const& Collisions,
650663
hasValidPair = true;
651664
PairHistManager.trackParticlesPerEvent(p1, p2);
652665
PairHistManager.template fill<mode>();
666+
// single-particle histograms for particles that make it into an accepted mixed-event pair
667+
ParticleHistManagerMe1.template fill<mode>(p1, TrackTable);
668+
ParticleHistManagerMe2.template fill<mode>(p2, TrackTable);
653669
}
654670
}
655671

@@ -679,7 +695,9 @@ template <modes::Mode mode,
679695
typename T11,
680696
typename T12,
681697
typename T13,
682-
typename T14>
698+
typename T14,
699+
typename T15,
700+
typename T16>
683701
void processMixedEvent(T1 const& Collisions,
684702
T2& Partition1,
685703
T3& Partition2,
@@ -694,7 +712,9 @@ void processMixedEvent(T1 const& Collisions,
694712
T12& ParticleCleaner2,
695713
T13& CprManager,
696714
T14& PcManager,
697-
int eventStride = 1)
715+
int eventStride,
716+
T15& ParticleHistManagerMe1,
717+
T16& ParticleHistManagerMe2)
698718
{
699719
int64_t lastCollisionIndex = -1;
700720
int windowSizeRaw = 0;
@@ -766,6 +786,9 @@ void processMixedEvent(T1 const& Collisions,
766786
hasValidPair = true;
767787
PairHistManager.trackParticlesPerEvent(p1, p2);
768788
PairHistManager.template fill<mode>();
789+
// single-particle histograms for particles that make it into an accepted mixed-event pair
790+
ParticleHistManagerMe1.fill(p1, mcMothers, mcPartonicMothers);
791+
ParticleHistManagerMe2.fill(p2, mcMothers, mcPartonicMothers);
769792
}
770793
}
771794

‎PWGCF/Femto/Core/photonHistManager.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,15 @@ std::map<PhotonHist, std::vector<o2::framework::AxisSpec>> makePhotonQaHistSpecM
164164
#undef PHOTON_HIST_QA_MAP
165165

166166
constexpr char PrefixPhotonQa[] = "PhotonQA/";
167+
// used only by the standalone QA task
167168
constexpr char PrefixTwoPhotonResonanceDau1Qa[] = "TwoPhotonResonanceDau1Qa/";
168169
constexpr char PrefixTwoPhotonResonanceDau2Qa[] = "TwoPhotonResonanceDau2Qa/";
170+
// same-event siblings, used only by a pair builder's same-event resonance manager
171+
constexpr char PrefixTwoPhotonResonanceDau1Se[] = "TwoPhotonResonanceDau1Se/";
172+
constexpr char PrefixTwoPhotonResonanceDau2Se[] = "TwoPhotonResonanceDau2Se/";
173+
// mixed-event siblings, used only by a pair builder's mixed-event resonance manager
174+
constexpr char PrefixTwoPhotonResonanceDau1Me[] = "TwoPhotonResonanceDau1Me/";
175+
constexpr char PrefixTwoPhotonResonanceDau2Me[] = "TwoPhotonResonanceDau2Me/";
169176

170177
constexpr std::string_view AnalysisDir = "Analysis/";
171178
constexpr std::string_view QaDir = "QA/";

‎PWGCF/Femto/Core/trackHistManager.h‎

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -558,47 +558,72 @@ auto makeTrackMcQaHistSpecMap(T1 const& confBinningAnalysis, T2 const& confBinni
558558
#undef TRACK_HIST_MC_QA_MAP
559559

560560
constexpr char PrefixTrackQa[] = "TrackQA/";
561-
constexpr char PrefixTrack1[] = "Track1/";
562-
constexpr char PrefixTrack2[] = "Track2/";
561+
// same-event / mixed-event siblings: single-particle histograms for a given track slot, split by
562+
// whether the particle came from a same-event or mixed-event pair
563+
constexpr char PrefixTrack1Se[] = "Track1/SE/";
564+
constexpr char PrefixTrack2Se[] = "Track2/SE/";
565+
constexpr char PrefixTrack3Se[] = "Track3/SE/";
566+
constexpr char PrefixTrack1Me[] = "Track1/ME/";
567+
constexpr char PrefixTrack2Me[] = "Track2/ME/";
568+
constexpr char PrefixTrack3Me[] = "Track3/ME/";
563569
// for dN/deta tracks
564570
constexpr char PrefixDndetaTrackGlobal[] = "DndetaTrackGlobal/";
565571
constexpr char PrefixDndetaTrackItsOnly[] = "DndetaTrackItsOnly/";
566-
constexpr char PrefixTrack3[] = "Track3/";
567572

568-
constexpr char PrefixResonancePosDaughter[] = "ResonancePosDau/";
569-
constexpr char PrefixResonanceNegDaughter[] = "ResonanceNegDau/";
573+
// daughter-track prefixes below: Se/Me siblings for pair-builder single-particle histograms
574+
// (split by whether the daughter came from a same-event or mixed-event candidate), plus the
575+
// original, unsplit Qa variants used by standalone QA tasks (left untouched).
576+
constexpr char PrefixResonancePosDaughterSe[] = "ResonancePosDau/SE/";
577+
constexpr char PrefixResonanceNegDaughterSe[] = "ResonanceNegDau/SE/";
578+
constexpr char PrefixResonancePosDaughterMe[] = "ResonancePosDau/ME/";
579+
constexpr char PrefixResonanceNegDaughterMe[] = "ResonanceNegDau/ME/";
570580
constexpr char PrefixResonancePosDaughterQa[] = "ResonancePosDauQa/";
571581
constexpr char PrefixResonanceNegDaughterQa[] = "ResonanceNegDauQa/";
572582

573-
constexpr char PrefixD01PosDaughter[] = "D01PosDau/";
574-
constexpr char PrefixD01NegDaughter[] = "D01NegDau/";
575-
constexpr char PrefixD02PosDaughter[] = "D02PosDau/";
576-
constexpr char PrefixD02NegDaughter[] = "D02NegDau/";
583+
constexpr char PrefixD01PosDaughterSe[] = "D01PosDau/SE/";
584+
constexpr char PrefixD01NegDaughterSe[] = "D01NegDau/SE/";
585+
constexpr char PrefixD02PosDaughterSe[] = "D02PosDau/SE/";
586+
constexpr char PrefixD02NegDaughterSe[] = "D02NegDau/SE/";
587+
constexpr char PrefixD01PosDaughterMe[] = "D01PosDau/ME/";
588+
constexpr char PrefixD01NegDaughterMe[] = "D01NegDau/ME/";
589+
constexpr char PrefixD02PosDaughterMe[] = "D02PosDau/ME/";
590+
constexpr char PrefixD02NegDaughterMe[] = "D02NegDau/ME/";
577591
constexpr char PrefixD01PosDaughterQa[] = "D01PosDauQa/";
578592
constexpr char PrefixD01NegDaughterQa[] = "D01NegDauQa/";
579593

580-
constexpr char PrefixLc1ProtonDaughter[] = "Lc1ProtonDau/";
581-
constexpr char PrefixLc1KaonDaughter[] = "Lc1KaonDau/";
582-
constexpr char PrefixLc1PionDaughter[] = "Lc1PionDau/";
594+
constexpr char PrefixLc1ProtonDaughterSe[] = "Lc1ProtonDau/SE/";
595+
constexpr char PrefixLc1KaonDaughterSe[] = "Lc1KaonDau/SE/";
596+
constexpr char PrefixLc1PionDaughterSe[] = "Lc1PionDau/SE/";
597+
constexpr char PrefixLc1ProtonDaughterMe[] = "Lc1ProtonDau/ME/";
598+
constexpr char PrefixLc1KaonDaughterMe[] = "Lc1KaonDau/ME/";
599+
constexpr char PrefixLc1PionDaughterMe[] = "Lc1PionDau/ME/";
583600
constexpr char PrefixLc1ProtonDaughterQa[] = "Lc1ProtonDauQa/";
584601
constexpr char PrefixLc1KaonDaughterQa[] = "Lc1KaonDauQa/";
585602
constexpr char PrefixLc1PionDaughterQa[] = "Lc1PionDauQa/";
586603

587-
constexpr char PrefixV01PosDaughter[] = "V01PosDau/";
588-
constexpr char PrefixV01NegDaughter[] = "V01NegDau/";
589-
constexpr char PrefixV02PosDaughter[] = "V02PosDau/";
590-
constexpr char PrefixV02NegDaughter[] = "V02NegDau/";
604+
constexpr char PrefixV01PosDaughterSe[] = "V01PosDau/SE/";
605+
constexpr char PrefixV01NegDaughterSe[] = "V01NegDau/SE/";
606+
constexpr char PrefixV02PosDaughterSe[] = "V02PosDau/SE/";
607+
constexpr char PrefixV02NegDaughterSe[] = "V02NegDau/SE/";
608+
constexpr char PrefixV01PosDaughterMe[] = "V01PosDau/ME/";
609+
constexpr char PrefixV01NegDaughterMe[] = "V01NegDau/ME/";
610+
constexpr char PrefixV02PosDaughterMe[] = "V02PosDau/ME/";
611+
constexpr char PrefixV02NegDaughterMe[] = "V02NegDau/ME/";
591612
constexpr char PrefixV0PosDaughterQa[] = "V0PosDauQa/";
592613
constexpr char PrefixV0NegDaughterQa[] = "V0NegDauQa/";
593614

594-
constexpr char PrefixCascadePosDaughter[] = "CascadePosDau/";
595-
constexpr char PrefixCascadeNegDaughter[] = "CascadeNegDau/";
596-
constexpr char PrefixCascadeBachelor[] = "CascadeBachelor/";
615+
constexpr char PrefixCascadePosDaughterSe[] = "CascadePosDau/SE/";
616+
constexpr char PrefixCascadeNegDaughterSe[] = "CascadeNegDau/SE/";
617+
constexpr char PrefixCascadeBachelorSe[] = "CascadeBachelor/SE/";
618+
constexpr char PrefixCascadePosDaughterMe[] = "CascadePosDau/ME/";
619+
constexpr char PrefixCascadeNegDaughterMe[] = "CascadeNegDau/ME/";
620+
constexpr char PrefixCascadeBachelorMe[] = "CascadeBachelor/ME/";
597621
constexpr char PrefixCascadePosDaughterQa[] = "CascadePosDauQa/";
598622
constexpr char PrefixCascadeNegDaughterQa[] = "CascadeNegDauQa/";
599623
constexpr char PrefixCascadeBachelorQa[] = "CascadeBachelorQa/";
600624

601-
constexpr char PrefixKinkChaDaughter[] = "KinkChaDau/";
625+
constexpr char PrefixKinkChaDaughterSe[] = "KinkChaDau/SE/";
626+
constexpr char PrefixKinkChaDaughterMe[] = "KinkChaDau/ME/";
602627
constexpr char PrefixKinkChaDaughterQa[] = "KinkChaDauQa/";
603628

604629
constexpr std::string_view AnalysisDir = "Analysis/";

0 commit comments

Comments
 (0)