Skip to content

Commit ac346cd

Browse files
authored
[PWGCF] Update femto framework (#14634)
1 parent c9e1de6 commit ac346cd

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

PWGCF/Femto/Core/closePairRejection.h

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ enum CprHist {
5151
kRadius6,
5252
kRadius7,
5353
kRadius8,
54+
kPhi1VsPhi2,
55+
kEta1VsEta2,
5456
kCprHistogramLast
5557
};
5658

@@ -62,6 +64,7 @@ struct ConfCpr : o2::framework::ConfigurableGroup {
6264
o2::framework::Configurable<bool> cutAnyRadius{"cutAnyRadius", false, "Apply CPR if the deta-dphistar is below the configured values at any radius"};
6365
o2::framework::Configurable<bool> plotAllRadii{"plotAllRadii", true, "Plot deta-dphi distribution at all radii"};
6466
o2::framework::Configurable<bool> plotAverage{"plotAverage", true, "Plot average deta dphi distribution"};
67+
o2::framework::Configurable<bool> plotAngluarCorrelation{"plotAngluarCorrelation", false, "Plot angular correlation of particles (eta1 vs eta2 & phi1 vs phi2"};
6568
o2::framework::Configurable<float> detaMax{"detaMax", 0.01f, "Maximium deta"};
6669
o2::framework::Configurable<float> dphistarMax{"dphistarMax", 0.01f, "Maximum dphistar"};
6770
o2::framework::Configurable<float> detaCenter{"detaCenter", 0.f, "Center of deta cut"};
@@ -70,6 +73,8 @@ struct ConfCpr : o2::framework::ConfigurableGroup {
7073
o2::framework::Configurable<float> kinematicMax{"kinematicMax", -1.f, "Maximum kstar/Q3 of pair/triplet for plotting (Set to negative value to turn off the cut)"};
7174
o2::framework::ConfigurableAxis binningDeta{"binningDeta", {{250, -0.5, 0.5}}, "deta"};
7275
o2::framework::ConfigurableAxis binningDphistar{"binningDphistar", {{250, -0.5, 0.5}}, "dphi"};
76+
o2::framework::ConfigurableAxis binningCorrelationPhi{"binningCorrelationPhi", {{720, 0, o2::constants::math::TwoPI}}, "Phi binning for correlation plot"};
77+
o2::framework::ConfigurableAxis binningCorrelationEta{"binningCorrelationEta", {{160, -0.8, 0.8}}, "Eta binning for correlation plot"};
7378
o2::framework::Configurable<int> seed{"seed", -1, "Seed to randomize particle 1 and particle 2. Set to negative value to deactivate. Set to 0 to generate unique seed in time."};
7479
};
7580

@@ -122,7 +127,9 @@ constexpr std::array<histmanager::HistInfo<CprHist>, kCprHistogramLast> HistTabl
122127
{kRadius5, o2::framework::kTH2F, "hRadius5", "Radius 5: #Delta #eta vs #Delta #phi*; #Delta #eta; #Delta #phi*"},
123128
{kRadius6, o2::framework::kTH2F, "hRadius6", "Radius 6: #Delta #eta vs #Delta #phi*; #Delta #eta; #Delta #phi*"},
124129
{kRadius7, o2::framework::kTH2F, "hRadius7", "Radius 7: #Delta #eta vs #Delta #phi*; #Delta #eta; #Delta #phi*"},
125-
{kRadius8, o2::framework::kTH2F, "hRadius8", "Radius 8: #Delta #eta vs #Delta #phi*; #Delta #eta; #Delta #phi*"}}};
130+
{kRadius8, o2::framework::kTH2F, "hRadius8", "Radius 8: #Delta #eta vs #Delta #phi*; #Delta #eta; #Delta #phi*"},
131+
{kPhi1VsPhi2, o2::framework::kTH2F, "hPhi1vsPhi2", "#phi_{1} vs #phi_{2}; #phi_{1}; #phi_{2}"},
132+
{kEta1VsEta2, o2::framework::kTH2F, "hEta1VsEta2", "#eta_{1} vs #eta_{2}; #eta_{1}; #eta_{2}"}}};
126133

127134
template <typename T>
128135
auto makeCprHistSpecMap(const T& confCpr)
@@ -137,7 +144,10 @@ auto makeCprHistSpecMap(const T& confCpr)
137144
{kRadius5, {confCpr.binningDeta, confCpr.binningDphistar}},
138145
{kRadius6, {confCpr.binningDeta, confCpr.binningDphistar}},
139146
{kRadius7, {confCpr.binningDeta, confCpr.binningDphistar}},
140-
{kRadius8, {confCpr.binningDeta, confCpr.binningDphistar}}};
147+
{kRadius8, {confCpr.binningDeta, confCpr.binningDphistar}},
148+
{kPhi1VsPhi2, {confCpr.binningCorrelationPhi, confCpr.binningCorrelationPhi}},
149+
{kEta1VsEta2, {confCpr.binningCorrelationEta, confCpr.binningCorrelationEta}},
150+
};
141151
};
142152

143153
template <const char* prefix>
@@ -177,6 +187,8 @@ class CloseTrackRejection
177187
mPlotAverage = confCpr.plotAverage.value;
178188
mPlotAllRadii = confCpr.plotAllRadii.value;
179189

190+
mPlotAngluarCorrelation = confCpr.plotAngluarCorrelation.value;
191+
180192
if (confCpr.seed.value >= 0) {
181193
uint64_t randomSeed;
182194
mRandomizeTracks = true;
@@ -207,6 +219,11 @@ class CloseTrackRejection
207219
mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius7, HistTable), getHistDesc(kRadius7, HistTable), getHistType(kRadius7, HistTable), {specs.at(kRadius7)});
208220
mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius8, HistTable), getHistDesc(kRadius8, HistTable), getHistType(kRadius8, HistTable), {specs.at(kRadius8)});
209221
}
222+
223+
if (mPlotAngluarCorrelation) {
224+
mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kPhi1VsPhi2, HistTable), getHistDesc(kPhi1VsPhi2, HistTable), getHistType(kPhi1VsPhi2, HistTable), {specs.at(kPhi1VsPhi2)});
225+
mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kEta1VsEta2, HistTable), getHistDesc(kEta1VsEta2, HistTable), getHistType(kEta1VsEta2, HistTable), {specs.at(kEta1VsEta2)});
226+
}
210227
}
211228

212229
void setMagField(float magField) { mMagField = magField; }
@@ -249,6 +266,13 @@ class CloseTrackRejection
249266
} else {
250267
mAverageDphistar = 0.f; // if computation at all radii fail, set it 0
251268
}
269+
270+
if (mPlotAngluarCorrelation) {
271+
mPhi1 = t1.phi();
272+
mPhi2 = t2.phi();
273+
mEta1 = t1.eta();
274+
mEta2 = t2.eta();
275+
}
252276
}
253277

254278
void fill(float kinematic)
@@ -265,6 +289,11 @@ class CloseTrackRejection
265289
return;
266290
}
267291

292+
if (mPlotAngluarCorrelation) {
293+
mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kPhi1VsPhi2, HistTable)), mPhi1, mPhi2);
294+
mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kEta1VsEta2, HistTable)), mEta1, mEta2);
295+
}
296+
268297
// fill average hist
269298
if (mPlotAverage) {
270299
mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kAverage, HistTable)), mDeta, mAverageDphistar);
@@ -343,6 +372,7 @@ class CloseTrackRejection
343372
o2::framework::HistogramRegistry* mHistogramRegistry = nullptr;
344373
bool mPlotAllRadii = false;
345374
bool mPlotAverage = false;
375+
bool mPlotAngluarCorrelation = false;
346376

347377
float mKinematicMin = -1.f;
348378
float mKinematicMax = -1.f;
@@ -362,6 +392,12 @@ class CloseTrackRejection
362392

363393
float mAverageDphistar = 0.f;
364394
float mDeta = 0.f;
395+
396+
float mPhi1 = 0.f;
397+
float mPhi2 = 0.f;
398+
float mEta1 = 0.f;
399+
float mEta2 = 0.f;
400+
365401
std::array<float, Nradii> mDphistar = {0.f};
366402
std::array<bool, Nradii> mDphistarMask = {false};
367403

0 commit comments

Comments
 (0)