Skip to content

Commit a518cff

Browse files
committed
add requests from Vit and Victor
1 parent 30537de commit a518cff

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

PWGCF/Flow/Tasks/flowGfwEse.cxx

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct FlowGfwEse {
9090

9191
O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 10, "Number of subsamples")
9292
O2_DEFINE_CONFIGURABLE(cfgMpar, int, 4, "Highest order of pt-pt correlations")
93-
O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FT0A")
93+
O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FV0A, 4:NTPV, 5:NGlobals, 6:MFT")
9494
O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Do correlations as function of Nch")
9595
O2_DEFINE_CONFIGURABLE(cfgFillWeights, bool, false, "Fill NUA weights")
9696
O2_DEFINE_CONFIGURABLE(cfgRunByRun, bool, false, "Fill histograms on a run-by-run basis")
@@ -262,7 +262,7 @@ struct FlowGfwEse {
262262
TF1* fPtDepDCAxy = nullptr;
263263

264264
o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
265-
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::itsChi2NCl < cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgDCAz;
265+
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::itsChi2NCl < cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgDCAz;
266266

267267
Preslice<aod::Tracks> perCollision = aod::track::collisionId;
268268
o2::framework::expressions::Filter mcCollFilter = nabs(aod::mccollision::posZ) < cfgVtxZ;
@@ -326,7 +326,7 @@ struct FlowGfwEse {
326326
{kCentNGlobal, "NGlobals"},
327327
{kCentMFT, "MFT"}};
328328

329-
sCentralityEstimator = centEstimatorMap.count(cfgCentEstimator) ? centEstimatorMap[cfgCentEstimator] : "FT0C";
329+
sCentralityEstimator = centEstimatorMap.at(cfgCentEstimator);
330330
sCentralityEstimator += " centrality (%)";
331331
AxisSpec centAxis = {o2::analysis::gfwflowese::centbinning, sCentralityEstimator.c_str()};
332332
std::vector<double> nchbinning;
@@ -515,30 +515,16 @@ struct FlowGfwEse {
515515
funcV4->SetParameters(0.008845, 0.000259668, -3.24435e-06, 4.54837e-08, -6.01825e-10);
516516
}
517517
if (cfgConsistentEventFlag) {
518-
posRegionIndex = [&]() {
518+
auto findRegionIndex = [&](const std::string& name) {
519519
auto begin = cfgRegions->GetNames().begin();
520520
auto end = cfgRegions->GetNames().end();
521-
auto it = std::find(begin, end, "refP");
521+
auto it = std::find(begin, end, name);
522522
return (it != end) ? std::distance(begin, it) : -1;
523-
}();
524-
negRegionIndex = [&]() {
525-
auto begin = cfgRegions->GetNames().begin();
526-
auto end = cfgRegions->GetNames().end();
527-
auto it = std::find(begin, end, "refN");
528-
return (it != end) ? std::distance(begin, it) : -1;
529-
}();
530-
fullRegionIndex = [&]() {
531-
auto begin = cfgRegions->GetNames().begin();
532-
auto end = cfgRegions->GetNames().end();
533-
auto it = std::find(begin, end, "refFull");
534-
return (it != end) ? std::distance(begin, it) : -1;
535-
}();
536-
midRegionIndex = [&]() {
537-
auto begin = cfgRegions->GetNames().begin();
538-
auto end = cfgRegions->GetNames().end();
539-
auto it = std::find(begin, end, "refMid");
540-
return (it != end) ? std::distance(begin, it) : -1;
541-
}();
523+
};
524+
posRegionIndex = findRegionIndex("refP");
525+
negRegionIndex = findRegionIndex("refN");
526+
fullRegionIndex = findRegionIndex("refFull");
527+
midRegionIndex = findRegionIndex("refMid");
542528
}
543529
}
544530

0 commit comments

Comments
 (0)