Skip to content

Commit 9c87fba

Browse files
authored
Refactor mass window configurations and filtering logic
Updated mass window configurations for Phi and K*0 resonances, removing old mass limits and adding new configurable groups for peak mass and sigma. Adjusted mass window checks in the filtering logic to use the new configurations.
1 parent 6aebba0 commit 9c87fba

1 file changed

Lines changed: 45 additions & 12 deletions

File tree

‎PWGLF/TableProducer/Resonances/hResonanceCorrelationFilter.cxx‎

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
#include <Framework/HistogramRegistry.h>
4141
#include <Framework/HistogramSpec.h>
4242
#include <Framework/InitContext.h>
43+
#include <Framework/Logger.h>
4344
#include <Framework/OutputObjHeader.h>
4445
#include <Framework/runDataProcessing.h>
4546

46-
#include <Math/Vector4Dfwd.h>
47+
#include <Math/Vector4D.h>
4748
#include <TH1.h>
4849

4950
#include <cmath>
@@ -85,12 +86,6 @@ struct HResonanceCorrelationFilter {
8586
Configurable<float> cfgTPCNsigmaKaon{"cfgTPCNsigmaKaon", 3.0f, "TPC Kaon PID"};
8687
Configurable<float> cfgTOFNsigmaKaon{"cfgTOFNsigmaKaon", 3.0f, "TOF Kaon PID"};
8788

88-
Configurable<float> cfgMinMass{"cfgMinMass", 1.005f, "Minimum KK mass"};
89-
Configurable<float> cfgMaxMass{"cfgMaxMass", 1.035f, "Maximum KK mass"};
90-
91-
Configurable<float> cfgMinMassKstar{"cfgMinMassKstar", 0.796f, "Minimum K#pi mass"};
92-
Configurable<float> cfgMaxMassKstar{"cfgMaxMassKstar", 0.996f, "Maximum K#pi mass"};
93-
9489
Configurable<float> cfgRapidity{"cfgRapidity", 0.5f, "Rapidity cut"};
9590

9691
// used for event selections in Pb-Pb
@@ -223,7 +218,38 @@ struct HResonanceCorrelationFilter {
223218
Configurable<std::string> parameterCCDBPath{"parameterCCDBPath", "Users/k/kcui/LHC25b4a/parameter", "Path of the mean and sigma"};
224219

225220
// must include windows for background and peak
226-
Configurable<float> maxMassNSigma{"maxMassNSigma", 12.0f, "max mass region to be considered for further analysis"};
221+
//
222+
// This filter-level cut is an acceptance pre-cut only -- it decides what
223+
// ever reaches AssocPhis/AssocKstars, not what counts as signal. It must
224+
// stay wider than whatever signal+background region hResonanceCorrelation.cxx
225+
// wants downstream (its massWindowConfigurationsPhi/Kstar go out to
226+
// maxBgNSigma=6 by default), or that background region gets silently
227+
// truncated before it ever reaches the analysis task. peakMass/sigma here
228+
// mirror the analysis task's own massWindowConfigurationsPhi/Kstar
229+
// (sigma = PDG Gamma/2.355 placeholder -- refit from your own peak and
230+
// update both files together, they must agree on what "sigma" means).
231+
Configurable<float> maxMassNSigma{"maxMassNSigma", 12.0f, "max mass region to be considered for further analysis, in units of sigma"};
232+
233+
struct : ConfigurableGroup {
234+
std::string prefix = "massWindowConfigurationsPhi";
235+
Configurable<float> peakMass{"peakMass", 1.019455f, "Phi(1020) PDG mass (GeV)"};
236+
Configurable<float> sigma{"sigma", 0.0018f, "effective width (GeV) for the maxMassNSigma pre-cut -- keep in sync with hResonanceCorrelation.cxx's massWindowConfigurationsPhi.sigma"};
237+
} massWindowConfigurationsPhi;
238+
239+
struct : ConfigurableGroup {
240+
std::string prefix = "massWindowConfigurationsKstar";
241+
Configurable<float> peakMass{"peakMass", 0.89555f, "K*0(892) PDG mass (GeV)"};
242+
Configurable<float> sigma{"sigma", 0.0201f, "effective width (GeV) for the maxMassNSigma pre-cut -- keep in sync with hResonanceCorrelation.cxx's massWindowConfigurationsKstar.sigma"};
243+
} massWindowConfigurationsKstar;
244+
245+
// Derived acceptance-window bounds, computed once in init() from the
246+
// Configurables above (peakMass +/- maxMassNSigma * sigma) rather than
247+
// hand-entered GeV numbers, so there is exactly one place to widen the
248+
// pre-cut instead of four independent literals that can drift apart.
249+
float mMinMassPhi = 0.f;
250+
float mMaxMassPhi = 0.f;
251+
float mMinMassKstar = 0.f;
252+
float mMaxMassKstar = 0.f;
227253

228254
// For extracting strangeness mass QA plots
229255
struct : ConfigurableGroup {
@@ -292,6 +318,13 @@ struct HResonanceCorrelationFilter {
292318

293319
zorroSummary.setObject(zorro.getZorroSummary());
294320
mRunNumber = -1;
321+
322+
mMinMassPhi = massWindowConfigurationsPhi.peakMass - maxMassNSigma * massWindowConfigurationsPhi.sigma;
323+
mMaxMassPhi = massWindowConfigurationsPhi.peakMass + maxMassNSigma * massWindowConfigurationsPhi.sigma;
324+
mMinMassKstar = massWindowConfigurationsKstar.peakMass - maxMassNSigma * massWindowConfigurationsKstar.sigma;
325+
mMaxMassKstar = massWindowConfigurationsKstar.peakMass + maxMassNSigma * massWindowConfigurationsKstar.sigma;
326+
LOGF(info, "Assoc mass pre-cut windows: Phi [%.4f, %.4f] GeV, K*0 [%.4f, %.4f] GeV",
327+
mMinMassPhi, mMaxMassPhi, mMinMassKstar, mMaxMassKstar);
295328
}
296329

297330
void initCCDB(aod::BCsWithTimestamps::iterator const& bc)
@@ -1095,7 +1128,7 @@ struct HResonanceCorrelationFilter {
10951128
}
10961129

10971130
// optional mass window
1098-
if (invMass < cfgMinMass || invMass > cfgMaxMass) {
1131+
if (invMass < mMinMassPhi || invMass > mMaxMassPhi) {
10991132
continue;
11001133
}
11011134

@@ -1181,7 +1214,7 @@ struct HResonanceCorrelationFilter {
11811214
}
11821215

11831216
// optional mass window
1184-
if (invMass < cfgMinMass || invMass > cfgMaxMass) {
1217+
if (invMass < mMinMassPhi || invMass > mMaxMassPhi) {
11851218
continue;
11861219
}
11871220

@@ -1294,7 +1327,7 @@ struct HResonanceCorrelationFilter {
12941327
}
12951328

12961329
// mass window
1297-
if (invMass < cfgMinMassKstar || invMass > cfgMaxMassKstar) {
1330+
if (invMass < mMinMassKstar || invMass > mMaxMassKstar) {
12981331
continue;
12991332
}
13001333

@@ -1375,7 +1408,7 @@ struct HResonanceCorrelationFilter {
13751408
}
13761409

13771410
// mass window
1378-
if (invMass < cfgMinMassKstar || invMass > cfgMaxMassKstar) {
1411+
if (invMass < mMinMassKstar || invMass > mMaxMassKstar) {
13791412
continue;
13801413
}
13811414

0 commit comments

Comments
 (0)