5555#include < limits>
5656#include < memory>
5757#include < string>
58- #include < tuple>
5958#include < utility>
6059#include < vector>
6160
@@ -71,15 +70,8 @@ struct RadialFlowDecorr {
7170 static constexpr int KIntM = 4 ; // pT-moment order used in the sums (need m up to 3 for c3)
7271 static constexpr int KIntK = 4 ; // weight-power order used in the sums (need k up to 3 for c3)
7372
74- // KNEtaMax caps every fixed-length eta array. The *active* count nEta is set in
75- // init() from the effective bin width: nEta = 2*(cfgCutEta/width) + 1 (narrow bins
76- // + the index-0 full-range reference bin). DATA uses width 0.1 and MC 0.2, so 0.1
77- // is the finer of the two and sets the bound; for the widest supported |eta|
78- // acceptance KMaxAbsEtaCut that gives KNEtaMax = 2*(0.8/0.1)+1 = 17 (9 at 0.2, 5 at
79- // 0.4). init() fatals if a chosen (cfgCutEta, width) would need more than KNEtaMax.
80- static constexpr float KFinestEtaBinWidth = 0 .1f ; // finest narrow-bin width (DATA); MC uses 0.2
81- static constexpr float KMaxAbsEtaCut = 0 .8f ; // widest |eta| the fixed-length arrays are sized for
82- static constexpr int KNEtaMax = 2 * static_cast <int >(KMaxAbsEtaCut / KFinestEtaBinWidth + 0 .5f ) + 1 ;
73+ static constexpr int KNEtaHalfBinsMax = 8 ; // 0.8 / 0.1: finest (DATA) bins per side
74+ static constexpr int KNEtaMax = 2 * KNEtaHalfBinsMax + 1 ; // + index-0 full-range reference bin
8375
8476 static constexpr float KFloatEpsilon = 1e-6f ;
8577 static constexpr float KEtaEdgeTolerance = 1e-3f ; // slack for cfgCutEta being an integer multiple of the bin width
@@ -2227,22 +2219,28 @@ struct RadialFlowDecorr {
22272219 }
22282220 }
22292221 auto fillBS1D = [&](std::array<std::shared_ptr<TProfile>, KMaxBoot>& arr, double x, double val) {
2230- if (!doBoot)
2222+ if (!doBoot) {
22312223 return ;
2232- for (int s = 0 ; s < nBoot; ++s)
2224+ }
2225+ for (int s = 0 ; s < nBoot; ++s) {
22332226 arr[s]->Fill (x, val, poisW[s]);
2227+ }
22342228 };
22352229 auto fillBS2D = [&](std::array<std::shared_ptr<TProfile2D>, KMaxBoot>& arr, double x, double y, double val) {
2236- if (!doBoot)
2230+ if (!doBoot) {
22372231 return ;
2238- for (int s = 0 ; s < nBoot; ++s)
2232+ }
2233+ for (int s = 0 ; s < nBoot; ++s) {
22392234 arr[s]->Fill (x, y, val, poisW[s]);
2235+ }
22402236 };
22412237 auto fillBS3D = [&](std::array<std::shared_ptr<TProfile3D>, KMaxBoot>& arr, double x, double y, double z, double val) {
2242- if (!doBoot)
2238+ if (!doBoot) {
22432239 return ;
2244- for (int s = 0 ; s < nBoot; ++s)
2240+ }
2241+ for (int s = 0 ; s < nBoot; ++s) {
22452242 arr[s]->Fill (x, y, z, val, poisW[s]);
2243+ }
22462244 };
22472245
22482246 float vz = coll.posZ ();
0 commit comments