Skip to content

Commit 7d61cbe

Browse files
authored
validation for new version flowPtContainer
1 parent 9b9a7ab commit 7d61cbe

1 file changed

Lines changed: 61 additions & 9 deletions

File tree

‎PWGCF/Flow/Tasks/flowTask.cxx‎

Lines changed: 61 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,13 @@ struct FlowTask {
244244
std::vector<std::shared_ptr<TProfile2D>> listNptV2;
245245
std::vector<std::shared_ptr<TH2>> listPtX;
246246
O2_DEFINE_CONFIGURABLE(cfgManualCk, bool, false, "Produce pt-pt variance")
247+
O2_DEFINE_CONFIGURABLE(cfgNewPtContainer, bool, false, "Switch to new version of flowPtContainer. This switch will be removed after validation of new container.")
248+
Configurable<GFWRegions> cfgNpcRegions{"cfgNpcRegions", {{"refN", "refP", "refMid", "refFull"}, {-0.8, 0.4, -0.4, -0.8},{-0.4, 0.8, 0.4, 0.8},{0, 0, 0, 0},{1, 1, 1, 1}}, "Configurations for GFW regions"};
249+
Configurable<GFWCorrConfigs> cfgNpcPtVnCorrConfig{"cfgNpcPtVnCorrConfig", {{"refP {pt} refN {pt}", "refP {2} refMid {pt} refN {-2}", "refP {2} refMid {pt pt} refN {-2}", "refFull {pt}", "refFull {pt pt}", "refFull {pt pt pt}", "refFull {pt pt pt pt}", "refP {pt} refMid {pt} refN {pt}"}, {"ChGapPtPt", "ChGap22pt", "ChGap22ptpt", "ChFullPt", "ChFullPtPt", "ChFullPtPtPt", "ChFullPtPtPtPt", "ChGapPtPtPtABC"},{0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0}}, "Configurations for vn-pt correlations based on new version flowPtContainer"};
250+
Configurable<std::vector<std::string>> cfgNpcGFWCorr{"cfgNpcGFWCorr", std::vector<std::string>{"refN {2} refP {-2}", "refN {3} refP {-3}"}, "GFW corrconfig for new version flowPtContainer"};
251+
GFWRegions npcRegions;
252+
GFWCorrConfigs npcPtVnCorrConfig;
253+
GFW npcGfw;
247254
} cfgAdditionObs;
248255

249256
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}, "pt axis for histograms"};
@@ -667,14 +674,42 @@ struct FlowTask {
667674
// Mask 1: vn-[pT], 3: vn-[pT^2], 7: vn-[pT^3], 15: vn-[pT^4]
668675
gfwConfigs.SetpTCorrMasks(cfgUserPtVnCorrConfig->GetpTCorrMasks());
669676
gfwConfigs.Print();
670-
fFCpt->setUseCentralMoments(cfgUseCentralMoments);
671-
fFCpt->setUseGapMethod(true);
672677
if (!cfgUserIO.cfgUserPtVnEvWeightEnabled)
673678
fFCpt->setEventWeight(EventWeight::UnityWeight);
674679
else
675680
fFCpt->setEventWeight(EventWeight::TupleWeight);
676-
fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap);
677-
if (cfgEtaGapPtPtEnabled) {
681+
if (cfgAdditionObs.cfgNewPtContainer) {
682+
cfgAdditionObs.npcRegions.SetNames(cfgAdditionObs.cfgNpcRegions->GetNames());
683+
cfgAdditionObs.npcRegions.SetEtaMin(cfgAdditionObs.cfgNpcRegions->GetEtaMin());
684+
cfgAdditionObs.npcRegions.SetEtaMax(cfgAdditionObs.cfgNpcRegions->GetEtaMax());
685+
cfgAdditionObs.npcRegions.SetpTDifs(cfgAdditionObs.cfgNpcRegions->GetpTDifs());
686+
cfgAdditionObs.npcRegions.SetBitmasks(cfgAdditionObs.cfgNpcRegions->GetBitmasks());
687+
cfgAdditionObs.npcPtVnCorrConfig.SetCorrs(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetCorrs());
688+
cfgAdditionObs.npcPtVnCorrConfig.SetHeads(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetHeads());
689+
cfgAdditionObs.npcPtVnCorrConfig.SetpTDifs(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetpTDifs());
690+
cfgAdditionObs.npcPtVnCorrConfig.SetpTCorrMasks(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetpTCorrMasks());
691+
cfgAdditionObs.npcRegions.Print();
692+
cfgAdditionObs.npcPtVnCorrConfig.Print();
693+
fFCpt->initialise(axisIndependent, cfgAdditionObs.npcRegions, cfgAdditionObs.npcPtVnCorrConfig, cfgNbootstrap);
694+
695+
for (int region = 0; region < cfgAdditionObs.npcRegions.GetSize(); ++region) {
696+
cfgAdditionObs.npcGfw.AddRegion(cfgAdditionObs.npcRegions.GetNames()[region], cfgAdditionObs.npcRegions.GetEtaMin()[region],
697+
cfgAdditionObs.npcRegions.GetEtaMax()[region], 1,
698+
cfgAdditionObs.npcRegions.GetBitmasks()[region]);
699+
}
700+
std::vector<std::string> npcGFWCorr = cfgAdditionObs.cfgNpcGFWCorr;
701+
if (!npcGFWCorr.empty()) {
702+
for (uint i = 0; i < npcGFWCorr.size(); i++) {
703+
cfgAdditionObs.npcGfw.GetCorrelatorConfig(npcGFWCorr.at(i).c_str());
704+
}
705+
}
706+
cfgAdditionObs.npcGfw.CreateRegions();
707+
} else {
708+
fFCpt->setUseCentralMoments(cfgUseCentralMoments);
709+
fFCpt->setUseGapMethod(true);
710+
fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap);
711+
}
712+
if (!cfgAdditionObs.cfgNewPtContainer && cfgEtaGapPtPtEnabled) {
678713
for (int i = 0; i < 4; ++i) { // o2-linter: disable=magic-number (maximum of 4 subevents)
679714
if (cfgPtPtGaps->getData()[i][0] < -1. || cfgPtPtGaps->getData()[i][1] < -1.)
680715
continue;
@@ -1264,6 +1299,9 @@ struct FlowTask {
12641299
fGFW->Clear();
12651300
fFCpt->clearVector();
12661301
cfgAdditionObs.nPt.clear();
1302+
if (cfgAdditionObs.cfgNewPtContainer) {
1303+
cfgAdditionObs.npcGfw.Clear();
1304+
}
12671305
if (cfgGetInteractionRate) {
12681306
initHadronicRate(bc);
12691307
double hadronicRate = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; //
@@ -1443,10 +1481,20 @@ struct FlowTask {
14431481
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 2);
14441482
if (withinPtPOI && withinPtRef)
14451483
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 4);
1446-
if (cfgUsePtRef && withinPtRef)
1447-
fillPtSums<kReco>(track, weff);
1448-
if (!cfgUsePtRef && withinPtPOI)
1449-
fillPtSums<kReco>(track, weff);
1484+
if (cfgAdditionObs.cfgNewPtContainer) {
1485+
fFCpt->fill(track.eta(), weff, track.pt(), 1);
1486+
if (withinPtRef)
1487+
cfgAdditionObs.npcGfw.Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
1488+
if (withinPtPOI)
1489+
cfgAdditionObs.npcGfw.Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 2);
1490+
if (withinPtPOI && withinPtRef)
1491+
cfgAdditionObs.npcGfw.Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 4);
1492+
} else {
1493+
if (cfgUsePtRef && withinPtRef)
1494+
fillPtSums<kReco>(track, weff);
1495+
if (!cfgUsePtRef && withinPtPOI)
1496+
fillPtSums<kReco>(track, weff);
1497+
}
14501498
}
14511499
registry.fill(HIST("hTrackCorrection2d"), nTracksUncorrected, nTracksCorrected);
14521500
if (cfgUseNch && cfgUseNchCorrected) {
@@ -1548,7 +1596,11 @@ struct FlowTask {
15481596
fillFC<kReco>(corrconfigs.at(l_ind), independent, lRandom);
15491597
}
15501598
// Filling pt Container
1551-
fillPtContainers<kReco>(independent, lRandom);
1599+
if (cfgAdditionObs.cfgNewPtContainer) {
1600+
fFCpt->fillPtProfiles(cfgAdditionObs.npcGfw, independent, lRandom);
1601+
} else {
1602+
fillPtContainers<kReco>(independent, lRandom);
1603+
}
15521604
}
15531605
PROCESS_SWITCH(FlowTask, processData, "Process analysis for non-derived data", true);
15541606

0 commit comments

Comments
 (0)