Skip to content

Commit 7a5c61c

Browse files
authored
[PWGCF] separate max eta range for full region and subevent region (#13888)
1 parent 8a56966 commit 7a5c61c

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

PWGCF/Flow/Tasks/flowTask.cxx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ struct FlowTask {
7373
O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "Maximal pT for all tracks")
7474
O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks")
7575
O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta range for pt-pt correlations")
76-
O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPt, float, 0.2, "eta gap for pt-pt correlations, cfgEtaGapPtPt<|eta|<cfgEtaPtPt")
76+
O2_DEFINE_CONFIGURABLE(cfgEtaSubPtPt, float, 0.8, "eta range for subevent pt-pt correlations")
77+
O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPt, float, 0.2, "eta gap for pt-pt correlations, cfgEtaGapPtPt<|eta|<cfgEtaSubPtPt")
7778
O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPtEnabled, bool, false, "switch of subevent pt-pt correlations")
7879
O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, "max chi2 per TPC clusters")
7980
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum TPC clusters")
@@ -217,6 +218,7 @@ struct FlowTask {
217218
std::vector<GFW::CorrConfig> corrconfigsPtVn;
218219
TAxis* fPtAxis;
219220
TRandom3* fRndm = new TRandom3(0);
221+
std::vector<std::vector<std::shared_ptr<TProfile>>> bootstrapArray;
220222
int lastRunNumber = -1;
221223
std::vector<int> runNumbers;
222224
std::map<int, std::shared_ptr<TH3>> th3sPerRun; // map of TH3 histograms for all runs
@@ -237,6 +239,10 @@ struct FlowTask {
237239
kLowDptCut = 1,
238240
kHighDptCut = 2
239241
};
242+
enum BootstrapHist {
243+
kMeanPtWithinGap08 = 0,
244+
kCount_BootstrapHist
245+
};
240246
int mRunNumber{-1};
241247
uint64_t mSOR{0};
242248
double mMinSeconds{-1.};
@@ -333,6 +339,14 @@ struct FlowTask {
333339
registry.add("hTrackCorrection2d", "Correlation table for number of tracks table; uncorrected track; corrected track", {HistType::kTH2D, {axisNch, axisNch}});
334340
registry.add("hMeanPt", "", {HistType::kTProfile, {axisIndependent}});
335341
registry.add("hMeanPtWithinGap08", "", {HistType::kTProfile, {axisIndependent}});
342+
// initial array
343+
bootstrapArray.resize(cfgNbootstrap);
344+
for (int i = 0; i < cfgNbootstrap; i++) {
345+
bootstrapArray[i].resize(kCount_BootstrapHist);
346+
}
347+
for (auto i = 0; i < cfgNbootstrap; i++) {
348+
bootstrapArray[i][kMeanPtWithinGap08] = registry.add<TProfile>(Form("BootstrapContainer_%d/hMeanPtWithinGap08", i), "", {HistType::kTProfile, {axisIndependent}});
349+
}
336350
registry.add("c22_gap08_Weff", "", {HistType::kTProfile, {axisIndependent}});
337351
registry.add("c22_gap08_trackMeanPt", "", {HistType::kTProfile, {axisIndependent}});
338352
registry.add("PtVariance_partA_WithinGap08", "", {HistType::kTProfile, {axisIndependent}});
@@ -656,6 +670,8 @@ struct FlowTask {
656670
{
657671
if (std::abs(track.eta()) < cfgEtaPtPt) {
658672
(dt == kGen) ? fFCptgen->fill(1., track.pt()) : fFCpt->fill(weff, track.pt());
673+
}
674+
if (std::abs(track.eta()) < cfgEtaSubPtPt) {
659675
if (cfgEtaGapPtPtEnabled) {
660676
if (track.eta() < -1. * cfgEtaGapPtPt) {
661677
(dt == kGen) ? fFCptgen->fillSub1(1., track.pt()) : fFCpt->fillSub1(weff, track.pt());
@@ -1154,7 +1170,10 @@ struct FlowTask {
11541170
registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent);
11551171
}
11561172
if (weffEventWithinGap08)
1157-
registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, weffEventWithinGap08);
1173+
registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, 1.0);
1174+
int sampleIndex = static_cast<int>(cfgNbootstrap * lRandom);
1175+
if (weffEventWithinGap08)
1176+
bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, 1.0);
11581177
// c22_gap8 * pt_withGap8
11591178
if (weffEventWithinGap08)
11601179
fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent);

0 commit comments

Comments
 (0)