@@ -105,8 +105,7 @@ static constexpr std::array<const char*, eEventHistograms_N> EventHistNames = {
105105 " VertexX" ,
106106 " VertexY" ,
107107 " VertexZ" ,
108- " NumContrib"
109- };
108+ " NumContrib" };
110109
111110enum EnParticleHistograms {
112111 ePt,
@@ -116,8 +115,7 @@ enum EnParticleHistograms {
116115
117116static constexpr std::array<const char *, eParticleHistograms_N> ParticleHistNames = {
118117 " Pt" ,
119- " Phi"
120- };
118+ " Phi" };
121119
122120enum EnQAHistograms {
123121 eQACent,
@@ -133,8 +131,7 @@ enum EnCorrHistograms {
133131
134132static constexpr std::array<const char *, eCorrHistograms_N> CorrHistNames = {
135133 " Centrality" ,
136- " Multiplicity"
137- };
134+ " Multiplicity" };
138135
139136enum EnCentEstm {
140137 eCentFT0C,
@@ -146,8 +143,7 @@ enum EnCentEstm {
146143static constexpr std::array<const char *, eCentEstm_N> CentEstmNames = {
147144 " FT0C" ,
148145 " FT0M" ,
149- " FV0A"
150- };
146+ " FV0A" };
151147
152148enum EnMultEstm {
153149 eMultFT0C,
@@ -159,8 +155,7 @@ enum EnMultEstm {
159155static constexpr std::array<const char *, eMultEstm_N> MultEstmNames = {
160156 " FT0C" ,
161157 " FT0M" ,
162- " FV0A"
163- };
158+ " FV0A" };
164159
165160enum EnEstmCorr {
166161 eFT0CFT0M,
@@ -184,8 +179,7 @@ static constexpr std::array<const char*, eBeforeAfter_N * 2> BeforeAfterNames =
184179 " before" ,
185180 " after" ,
186181 " Before" ,
187- " After"
188- };
182+ " After" };
189183
190184static constexpr int NumHarmonics = 3 ;
191185
@@ -341,7 +335,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
341335 struct CorrHistograms {
342336 TList* fCorrHistogramsList = nullptr ;
343337 std::array<std::array<std::array<std::array<TH2F *, eBeforeAfter_N>, eMultEstm_N>, eMultEstm_N>, eCorrHistograms_N> fCorrHistograms {}; // [mult/cent][type][type][before/after cut]
344- std::array<std::array<TF1 *, 2 >, eCorrHistograms_N + 2 > fCorrBounds {}; // [cent/multAB/multAC/multBC][upper/lower]
338+ std::array<std::array<TF1 *, 2 >, eCorrHistograms_N + 2 > fCorrBounds {}; // [cent/multAB/multAC/multBC][upper/lower]
345339 } cr;
346340
347341 struct WeightHistograms {
@@ -371,7 +365,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
371365 int h8 = 0 ;
372366 // Book Q-vector components:
373367 static constexpr int MaxCorrelator = 4 ; // <<m>>
374- static constexpr int MaxFlowHarmonic = NumHarmonics + 1 ; // n=4 as we need v2, v3, v4
375368 static constexpr int MaxHarmonic = 17 ; // need 4 + 2 + 2 + 4 + 1 at least for SC(4,2)
376369 static constexpr int MaxPower = MaxCorrelator + 1 ;
377370 std::array<std::array<TComplex, MaxPower>, MaxHarmonic> fQvectorBefore ;
@@ -386,7 +379,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
386379 std::map<int , TList*> fMultiparticleCorrelationByRunMap ;
387380 std::array<TProfile*, eBeforeAfter_N> fTwoParticleCorrelationProfiles {}; // [cut]
388381 std::array<TProfile*, eBeforeAfter_N> fFourParticleCorrelationProfiles {};
389- std::array<std::array<std::array<TH1D *, NumHarmonics>, eBeforeAfter_N>, eBeforeAfter_N> fTwoParticleCorrelationHistograms {}; // [cut][event weight][n]
382+ std::array<std::array<std::array<TH1D *, NumHarmonics>, eBeforeAfter_N>, eBeforeAfter_N> fTwoParticleCorrelationHistograms {}; // [cut][event weight][n]
390383 std::array<std::array<std::array<TH1D *, NumHarmonics>, eBeforeAfter_N>, eBeforeAfter_N> fFourParticleCorrelationHistograms {};
391384 std::array<TH1D *, NumHarmonics> fTwoParticleCorrelationGapHistograms {};
392385 } mc;
@@ -402,7 +395,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
402395 std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fTwoParticleCorrelationEbye {}; // <2> [before, after][v2^2, v3^2, v4^2]
403396 std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fTwoParticleCorrelationMinEbye {};
404397 std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fTwoParticleCorrelationMaxEbye {};
405- std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fFourParticleCorrelationEbye {}; // <4> [before, after][v2^4, v3^2 v2^2, v4^2 v2^2]
398+ std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fFourParticleCorrelationEbye {}; // <4> [before, after][v2^4, v3^2 v2^2, v4^2 v2^2]
406399 std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fFourParticleCorrelationMinEbye {};
407400 std::array<std::array<float , NumHarmonics>, eBeforeAfter_N> fFourParticleCorrelationMaxEbye {};
408401 } ebye;
@@ -572,37 +565,33 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
572565 TComplex mccQ (int n, int p, EnBeforeAfter eba, int egap)
573566 {
574567 // Using the fact that Q{-n,p} = Q{n,p}^*.
575-
576568 if (eba == eBefore) {
577569 // Q-vector before cut:
578570 if (n >= 0 ) {
579571 return mcc.fQvectorBefore [n][p];
580- } else {
581- return TComplex::Conjugate (mcc.fQvectorBefore [-n][p]);
582572 }
583- } else {
584- if (egap == 0 ) {
585- // Q-vector after cut:
586- if (n >= 0 ) {
587- return mcc.fQvectorAfter [n][p];
588- } else {
589- return TComplex::Conjugate (mcc.fQvectorAfter [-n][p]);
590- }
591- } else if (egap == 1 ) {
592- // Q-vector after cut, eta < gap:
593- if (n >= 0 ) {
594- return mcc.fQvectorAfterA [n][p];
595- } else {
596- return TComplex::Conjugate (mcc.fQvectorAfterA [-n][p]);
597- }
598- } else {
599- // Q-vector after cut, eta > gap:
600- if (n >= 0 ) {
601- return mcc.fQvectorAfterB [n][p];
602- } else {
603- return TComplex::Conjugate (mcc.fQvectorAfterB [-n][p]);
604- }
573+ return TComplex::Conjugate (mcc.fQvectorBefore [-n][p]);
574+ }
575+ if (egap == 0 ) {
576+ // Q-vector after cut:
577+ if (n >= 0 ) {
578+ return mcc.fQvectorAfter [n][p];
579+ }
580+ return TComplex::Conjugate (mcc.fQvectorAfter [-n][p]);
581+ }
582+ if (egap == 1 ) {
583+ // Q-vector after cut, eta < gap:
584+ if (n >= 0 ) {
585+ return mcc.fQvectorAfterA [n][p];
586+ }
587+ return TComplex::Conjugate (mcc.fQvectorAfterA [-n][p]);
588+ }
589+ if (egap == 2 ) {
590+ // Q-vector after cut, eta > gap:
591+ if (n >= 0 ) {
592+ return mcc.fQvectorAfterB [n][p];
605593 }
594+ return TComplex::Conjugate (mcc.fQvectorAfterB [-n][p]);
606595 }
607596 }
608597
@@ -941,9 +930,9 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
941930 mc.fFourParticleCorrelationProfiles [i] = nullptr ;
942931
943932 for (int j = 0 ; j < eBeforeAfter_N; j++) { // before/after weight
944- mc.fTwoParticleCorrelationHistograms [i][j].fill (nullptr );
945- mc.fFourParticleCorrelationHistograms [i][j].fill (nullptr );
946- }
933+ mc.fTwoParticleCorrelationHistograms [i][j].fill (nullptr );
934+ mc.fFourParticleCorrelationHistograms [i][j].fill (nullptr );
935+ }
947936 }
948937
949938 for (int i = 0 ; i < eBeforeAfter_N; i++) { // before/after cut
@@ -1377,11 +1366,11 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
13771366 }
13781367
13791368 // After cut, with gap:
1380- TComplex qa = mcc.fQvectorAfterA [mcc.h2 ][0 ];
1381- TComplex qb = mcc.fQvectorAfterB [mcc.h2 ][0 ];
1369+ TComplex qva = mcc.fQvectorAfterA [mcc.h2 ][0 ];
1370+ TComplex qvb = mcc.fQvectorAfterB [mcc.h2 ][0 ];
13821371 double gap = 0 .;
13831372 if (nTracksAfterA * nTracksAfterB > 0 ) {
1384- gap = (qa * TComplex::Conjugate (qb )).Re () / (nTracksAfterA * nTracksAfterB);
1373+ gap = (qva * TComplex::Conjugate (qvb )).Re () / (nTracksAfterA * nTracksAfterB);
13851374 mc.fTwoParticleCorrelationGapHistograms [i]->Fill (gap, nTracksAfterA * nTracksAfterB);
13861375 } else {
13871376 LOGF (warning, " cent=%f, nTracksAfterA = %d, nTracksAfterB = %d" , rlCollisionCent, nTracksAfterA, nTracksAfterB);
@@ -1395,7 +1384,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
13951384 // if(mccTwo(0, 0, eBefore, 0).Re() < 0. || wTwoRecursionBefore < 0. || diff > 0.01) {
13961385 // LOGF(warning, "Compare <2>: cent=%f, n=%d, direct=%e, recursion=%e, diff=%e, denDirect=%e, denRec=%e", rlCollisionCent, mcc.h2, direct, recur, diff, mccTwo(0, 0, eBefore, 0).Re(), wTwoRecursionBefore);
13971386 // }
1398-
13991387 }
14001388
14011389 for (int i = 0 ; i < NumHarmonics; i++) {
@@ -1593,24 +1581,23 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
15931581 cr.fCorrBounds [histType][0 ]->SetTitle (Form (" %s upper bound" , CorrHistNames[histType]));
15941582 cr.fCorrBounds [histType][1 ]->SetTitle (Form (" %s lower bound" , CorrHistNames[histType]));
15951583 } else if constexpr (histType == eCorrMult) {
1596- for (int i = 0 ; i < eEstmCorr_N; i++) {
1597- cr.fCorrBounds [histType + i][0 ] = new TF1 (Form (" fCorrUpperBound%s%s" , EstmCorrName[i], CorrHistNames[histType]), " [0] * x + [1]" );
1598- cr.fCorrBounds [histType + i][1 ] = new TF1 (Form (" fCorrLowerBound%s%s" , EstmCorrName[i], CorrHistNames[histType]), " [0] * x + [1]" );
1599- cr.fCorrBounds [histType + i][0 ]->SetTitle (Form (" %s %s upper bound" , EstmCorrName[i], CorrHistNames[histType]));
1600- cr.fCorrBounds [histType + i][1 ]->SetTitle (Form (" %s %s lower bound" , EstmCorrName[i], CorrHistNames[histType]));
1584+ for (int i = 0 ; i < eEstmCorr_N; i++) {
1585+ cr.fCorrBounds [histType + i][0 ] = new TF1 (Form (" fCorrUpperBound%s%s" , EstmCorrName[i], CorrHistNames[histType]), " [0] * x + [1]" );
1586+ cr.fCorrBounds [histType + i][1 ] = new TF1 (Form (" fCorrLowerBound%s%s" , EstmCorrName[i], CorrHistNames[histType]), " [0] * x + [1]" );
1587+ cr.fCorrBounds [histType + i][0 ]->SetTitle (Form (" %s %s upper bound" , EstmCorrName[i], CorrHistNames[histType]));
1588+ cr.fCorrBounds [histType + i][1 ]->SetTitle (Form (" %s %s lower bound" , EstmCorrName[i], CorrHistNames[histType]));
16011589 }
16021590 }
16031591
1604- int nBinsCent;
1605- float minCent;
1606- float maxCent;
1607-
1608- int nBinsXMult;
1609- float minXMult;
1610- float maxXMult;
1611- int nBinsYMult;
1612- float minYMult;
1613- float maxYMult;
1592+ int nBinsCent = 0 ;
1593+ float minCent = 0 .;
1594+ float maxCent = 0 .;
1595+ int nBinsXMult = 0 ;
1596+ float minXMult = 0 .;
1597+ float maxXMult = 0 .;
1598+ int nBinsYMult = 0 ;
1599+ float minYMult = 0 .;
1600+ float maxYMult = 0 .;
16141601
16151602 if constexpr (histType == eCorrCent) {
16161603
0 commit comments