@@ -2072,9 +2072,6 @@ void castStringIntoArray(int afo)
20722072
20732073 if (tc.fVerbose) {
20742074 LOGF(info, "\033[1;32m%s\033[0m", __FUNCTION__);
2075- }
2076-
2077- if (tc.fVerbose) {
20782075 LOGF(info, "\033[1;32m Casting a string %s into TArrayD .... \033[0m", res.fResultsProVariableLengthBinsString[afo].Data());
20792076 }
20802077
@@ -3728,6 +3725,7 @@ void bookQAHistograms()
37283725
37293726 if (tc.fVerbose) {
37303727 startFunction(__FUNCTION__);
3728+ LOGF(info, "\033[1;33m%s: !!!! WARNING !!!! With too many 2D histograms with double precision, the code will crash in terminate (\"... shmem: could not create a message of size ...\") . Locally, you can circumvent this while testing by calling Bailout() explicitly. !!!! WARNING !!!! \033[0m", __FUNCTION__);
37313729 }
37323730
37333731 // *) Print the warning message, because with too many 2D histograms with double precision, the code crashes in terminate, due to:
@@ -3739,10 +3737,6 @@ void bookQAHistograms()
37393737 // [1450742:multiparticle-correlations-a-b]: Backtrace by DPL:
37403738 //
37413739
3742- if (tc.fVerbose) {
3743- LOGF(info, "\033[1;33m%s: !!!! WARNING !!!! With too many 2D histograms with double precision, the code will crash in terminate (\"... shmem: could not create a message of size ...\") . Locally, you can circumvent this while testing by calling Bailout() explicitly. !!!! WARNING !!!! \033[0m", __FUNCTION__);
3744- }
3745-
37463740 // a) Book the profile holding flags:
37473741 qa.fQAHistogramsPro = new TProfile("fQAHistogramsPro", "flags for QA histograms", 7, 0., 7.);
37483742 qa.fQAHistogramsPro->SetStats(false);
@@ -9860,7 +9854,7 @@ bool eventCuts(T1 const& collision, T2 const& tracks, EnCutModus cutModus)
98609854
98619855//============================================================
98629856
9863- bool eventCut(int rs, int eventCut , EnCutModus cutModus)
9857+ bool eventCut(int rs, int iEventCut , EnCutModus cutModus)
98649858{
98659859 // Helper function to reduce code bloat in eventCuts(). It's meant to be used only in eventCuts().
98669860 // It can be used also in exceptional cases outside of eventCuts(), like for eMultiplicity, but use with care.
@@ -9873,35 +9867,31 @@ bool eventCut(int rs, int eventCut, EnCutModus cutModus)
98739867 if (!(0 == rs || 1 == rs)) {
98749868 LOGF(fatal, "\033[1;31m%s at line %d : 'rs' must be generic Rec or Sim index, rs = %d \033[0m", __FUNCTION__, __LINE__, rs);
98759869 }
9876- if (eventCut >= eEventCuts_N) {
9877- LOGF(fatal, "\033[1;31m%s at line %d : eventCut >= eEventCuts_N, eventCut = %d , eEventCuts_N = %d \033[0m", __FUNCTION__, __LINE__, eventCut , static_cast<int>(eEventCuts_N));
9870+ if (iEventCut >= eEventCuts_N) {
9871+ LOGF(fatal, "\033[1;31m%s at line %d : iEventCut >= eEventCuts_N, iEventCut = %d , eEventCuts_N = %d \033[0m", __FUNCTION__, __LINE__, iEventCut , static_cast<int>(eEventCuts_N));
98789872 }
98799873
98809874 // *) Do the thing:
98819875 switch (cutModus) {
98829876 case eCut: {
98839877 if (tc.fVerboseEventCut) {
9884- LOGF(info, "\033[1;31mEvent didn't survive the cut: %s\033[0m", ec.fEventCutName[eventCut ].Data());
9878+ LOGF(info, "\033[1;31mEvent didn't survive the cut: %s\033[0m", ec.fEventCutName[iEventCut ].Data());
98859879 }
98869880 return false;
9887- break;
98889881 }
98899882 case eCutCounterBinning: {
9890- ec.fEventCutCounterMap[rs]->Add(ec.fEventCutCounterBinNumber[rs], eventCut );
9891- ec.fEventCutCounterMapInverse[rs]->Add(eventCut , ec.fEventCutCounterBinNumber[rs]);
9883+ ec.fEventCutCounterMap[rs]->Add(ec.fEventCutCounterBinNumber[rs], iEventCut );
9884+ ec.fEventCutCounterMapInverse[rs]->Add(iEventCut , ec.fEventCutCounterBinNumber[rs]);
98929885 ec.fEventCutCounterBinNumber[rs]++; // yes
98939886 return true;
9894- break;
98959887 }
98969888 case eCutCounterAbsolute: {
9897- ec.fEventCutCounterHist[rs][eAbsolute]->Fill(ec.fEventCutCounterMapInverse[rs]->GetValue(eventCut ));
9889+ ec.fEventCutCounterHist[rs][eAbsolute]->Fill(ec.fEventCutCounterMapInverse[rs]->GetValue(iEventCut ));
98989890 return true; // yes, so that I can proceed with another cut in eventCuts
9899- break;
99009891 }
99019892 case eCutCounterSequential: {
9902- ec.fEventCutCounterHist[rs][eSequential]->Fill(ec.fEventCutCounterMapInverse[rs]->GetValue(eventCut ));
9893+ ec.fEventCutCounterHist[rs][eSequential]->Fill(ec.fEventCutCounterMapInverse[rs]->GetValue(iEventCut ));
99039894 return false; // yes, so that I bail out from eventCuts
9904- break;
99059895 }
99069896 default: {
99079897 LOGF(fatal, "\033[1;31m%s at line %d : This cutModus = %d is not supported yet. \033[0m", __FUNCTION__, __LINE__, static_cast<int>(cutModus));
@@ -9911,7 +9901,7 @@ bool eventCut(int rs, int eventCut, EnCutModus cutModus)
99119901
99129902 return false; // obsolete, but it suppresses the warning...
99139903
9914- } // bool eventCut(int rs, int eventCut , EnCutModus cutModus)
9904+ } // bool eventCut(int rs, int iEventCut , EnCutModus cutModus)
99159905
99169906//============================================================
99179907
@@ -10675,7 +10665,7 @@ bool centralityCorrelationCut()
1067510665 LOGF(info, "\033[1;33m%s at line %d : ec.fsEventCuts[eCentralityCorrelationsCut] = %s \033[0m", __FUNCTION__, __LINE__, ec.fsEventCuts[eCentralityCorrelationsCut].Data());
1067610666 }
1067710667
10678- bool alright = true; // this local variable holds the return value for this function
10668+ bool bAlright = true; // this local variable holds the return value for this function
1067910669
1068010670 // Algorithm: I extract e.g. from "CentFT0C_CentFT0M" that the first estimator is "CentFT0C" and second "CentFT0M", and for each estimator I fetch the corresponding centrality percentile:
1068110671 if (!ec.fsEventCuts[eCentralityCorrelationsCut].Contains("_")) {
@@ -10698,29 +10688,29 @@ bool centralityCorrelationCut()
1069810688 delete oa; // yes
1069910689
1070010690 // Okay, do the thing:
10701- // *) "Relative" <=> |(firstEstimator-secondEstimator)/(firstEstimator+secondEstimator)| > treshold => reject the event => alright = false
10702- // *) "Absolute" <=> |firstEstimator-secondEstimator| > treshold => reject the event => alright = false
10691+ // *) "Relative" <=> |(firstEstimator-secondEstimator)/(firstEstimator+secondEstimator)| > treshold => reject the event => bAlright = false
10692+ // *) "Absolute" <=> |firstEstimator-secondEstimator| > treshold => reject the event => bAlright = false
1070310693 // *) ...
1070410694 if (ec.fCentralityValues[0] > 0. && ec.fCentralityValues[1] > 0.) {
1070510695 if (ec.fCentralityCorrelationsCutVersion.EqualTo("Relative")) {
1070610696 if (std::abs((ec.fCentralityValues[0] - ec.fCentralityValues[1]) / (ec.fCentralityValues[0] + ec.fCentralityValues[1])) > ec.fCentralityCorrelationsCutTreshold) {
10707- alright = false;
10697+ bAlright = false;
1070810698 }
1070910699 } else if (ec.fCentralityCorrelationsCutVersion.EqualTo("Absolute")) {
1071010700 if (std::abs((ec.fCentralityValues[0] - ec.fCentralityValues[1])) > ec.fCentralityCorrelationsCutTreshold) {
10711- alright = false;
10701+ bAlright = false;
1071210702 }
1071310703 } else {
1071410704 LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__);
1071510705 }
1071610706 } // if(ec.fCentralityValues[0] > 0. && ec.fCentralityValues[1] > 0.)
1071710707
1071810708 if (tc.fVerbose) {
10719- LOGF(info, "\033[1;33m%s at line %d : %f, %f, %f, %d \033[0m", __FUNCTION__, __LINE__, ec.fCentralityValues[0], ec.fCentralityValues[1], ec.fCentralityCorrelationsCutTreshold, static_cast<int>(alright ));
10709+ LOGF(info, "\033[1;33m%s at line %d : %f, %f, %f, %d \033[0m", __FUNCTION__, __LINE__, ec.fCentralityValues[0], ec.fCentralityValues[1], ec.fCentralityCorrelationsCutTreshold, static_cast<int>(bAlright ));
1072010710 exitFunction(__FUNCTION__);
1072110711 }
1072210712
10723- return alright ;
10713+ return bAlright ;
1072410714
1072510715} // bool centralityCorrelationCut()
1072610716
@@ -11485,7 +11475,7 @@ bool particleCuts(T const& track, EnCutModus cutModus)
1148511475
1148611476//============================================================
1148711477
11488- bool particleCut(int rs, int particleCut , EnCutModus cutModus)
11478+ bool particleCut(int rs, int iParticleCut , EnCutModus cutModus)
1148911479{
1149011480 // Helper function to reduce code bloat in particleCuts(). It's meant to be used only in particleCuts().
1149111481
@@ -11494,27 +11484,23 @@ bool particleCut(int rs, int particleCut, EnCutModus cutModus)
1149411484 switch (cutModus) {
1149511485 case eCut: {
1149611486 if (tc.fVerboseForEachParticle) {
11497- LOGF(info, "\033[1;31mParticle didn't pass the cut: %s\033[0m", pc.fParticleCutName[particleCut ].Data());
11487+ LOGF(info, "\033[1;31mParticle didn't pass the cut: %s\033[0m", pc.fParticleCutName[iParticleCut ].Data());
1149811488 }
1149911489 return false;
11500- break;
1150111490 }
1150211491 case eCutCounterBinning: {
11503- pc.fParticleCutCounterMap[rs]->Add(pc.fParticleCutCounterBinNumber[rs], particleCut );
11504- pc.fParticleCutCounterMapInverse[rs]->Add(particleCut , pc.fParticleCutCounterBinNumber[rs]);
11492+ pc.fParticleCutCounterMap[rs]->Add(pc.fParticleCutCounterBinNumber[rs], iParticleCut );
11493+ pc.fParticleCutCounterMapInverse[rs]->Add(iParticleCut , pc.fParticleCutCounterBinNumber[rs]);
1150511494 pc.fParticleCutCounterBinNumber[rs]++; // yes
1150611495 return true;
11507- break;
1150811496 }
1150911497 case eCutCounterAbsolute: {
11510- pc.fParticleCutCounterHist[rs][eAbsolute]->Fill(pc.fParticleCutCounterMapInverse[rs]->GetValue(particleCut ));
11498+ pc.fParticleCutCounterHist[rs][eAbsolute]->Fill(pc.fParticleCutCounterMapInverse[rs]->GetValue(iParticleCut ));
1151111499 return true; // yes, so that I can proceed with another cut in particleCuts
11512- break;
1151311500 }
1151411501 case eCutCounterSequential: {
11515- pc.fParticleCutCounterHist[rs][eSequential]->Fill(pc.fParticleCutCounterMapInverse[rs]->GetValue(particleCut ));
11502+ pc.fParticleCutCounterHist[rs][eSequential]->Fill(pc.fParticleCutCounterMapInverse[rs]->GetValue(iParticleCut ));
1151611503 return false; // yes, so that I bail out from particleCuts
11517- break;
1151811504 }
1151911505 default: {
1152011506 LOGF(fatal, "\033[1;31m%s at line %d : This cutModus = %d is not supported yet. \033[0m", __FUNCTION__, __LINE__, static_cast<int>(cutModus));
@@ -11524,7 +11510,7 @@ bool particleCut(int rs, int particleCut, EnCutModus cutModus)
1152411510
1152511511 return false; // obsolete, but it suppresses the warning...
1152611512
11527- } // bool particleCut(int rs, int particleCut , EnCutModus cutModus)
11513+ } // bool particleCut(int rs, int iParticleCut , EnCutModus cutModus)
1152811514
1152911515//============================================================
1153011516
@@ -13467,10 +13453,6 @@ void calculateKineEtaSeparationsNdim(EnqvectorKine kineVarChoice, int Ndim)
1346713453{
1346813454 // Calculate analytically N-dimensional kine eta separations from differential q-vectors.
1346913455
13470- if (tc.fVerbose) {
13471- startFunction(__FUNCTION__);
13472- }
13473-
1347413456 // This is a replacement for the legacy function CalculateKineEtaSeparations(...), which is as of 20250620 deemed obsolete.
1347513457 // Remember that here I changed design, and pass enum EnqvectorKine as an argument, not any longer enum EnAsFunctionOf.
1347613458
@@ -13626,7 +13608,7 @@ void fillNestedLoopsContainers(const int& particleIndex)
1362613608
1362713609 // *) Fill container for weights:
1362813610 if (nl.ftaNestedLoops[1]) {
13629- // TBI 20240501 there is a bit of efficiency loss here, because I access weight () again here.
13611+ // TBI 20240501 there is a bit of efficiency loss here, because I access particleWeight () again here.
1363013612 // But it doesn't matter really, in any case I evaluate nested loops only for small M during debugging.
1363113613 // Otherwise, just promote weights to data members, and initialize them only once for a given particle.
1363213614 double wPhi = 1.;
@@ -13651,15 +13633,15 @@ void fillNestedLoopsContainers(const int& particleIndex)
1365113633 }
1365213634
1365313635 if (pw.fUseWeights[wPHI]) { // TBI 20260216 obsolete, remove eventually
13654- wPhi = weight (pbyp.fPhi, wPHI);
13636+ wPhi = particleWeight (pbyp.fPhi, wPHI);
1365513637 }
1365613638
1365713639 if (pw.fUseWeights[wPT]) { // TBI 20260216 obsolete, remove eventually
13658- wPt = weight (pbyp.fPt, wPT);
13640+ wPt = particleWeight (pbyp.fPt, wPT);
1365913641 }
1366013642
1366113643 if (pw.fUseWeights[wETA]) { // TBI 20260216 obsolete, remove eventually
13662- wEta = weight (pbyp.fEta, wETA);
13644+ wEta = particleWeight (pbyp.fEta, wETA);
1366313645 }
1366413646
1366513647 nl.ftaNestedLoops[1]->AddAt(wPhi * wPt * wEta * wCharge, particleIndex); // remember that the 2nd argument here must start from 0
@@ -14674,7 +14656,7 @@ TH1D* getHistogramWithWeights(const char* filePath, const char* runNumber, const
1467414656
1467514657 if (bFileIsInAliEn) {
1467614658 // d) Handle the AliEn case:
14677- TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
14659+ const TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
1467814660 if (!alien) {
1467914661 LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__);
1468014662 }
@@ -14778,7 +14760,7 @@ TH1D* getHistogramWithWeights(const char* filePath, const char* runNumber, const
1477814760 } // else {
1477914761
1478014762 // g) The final touch on histogram with weights:
14781- TString histName = "" ;
14763+ TString histName;
1478214764 if (-1 == bin) {
1478314765 // Integrated weights:
1478414766 if (!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))) {
@@ -14964,7 +14946,7 @@ THnSparseF* getSparseHistogramWithWeights(const char* filePath, const char* runN
1496414946
1496514947 if (bFileIsInAliEn) {
1496614948 // d) Handle the AliEn case:
14967- TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
14949+ const TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
1496814950 if (!alien) {
1496914951 LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__);
1497014952 }
@@ -15067,7 +15049,7 @@ THnSparseF* getSparseHistogramWithWeights(const char* filePath, const char* runN
1506715049 } // else {
1506815050
1506915051 // g) The final touch on sparse histogram with weights:
15070- TString sparseHistName = "" ;
15052+ TString sparseHistName;
1507115053 if (TString(whichDimensions).EqualTo("")) {
1507215054 sparseHistName = TString::Format("%s_multiparticle-correlations-a-b", whichCategory);
1507315055 } else if (TString(whichDimensions).BeginsWith("_")) { // TBI 20250215 alternativelly, I can remove leading "_" before calling this function
@@ -15224,7 +15206,7 @@ TH1D* getHistogramWithCentralityWeights(const char* filePath, const char* runNum
1522415206
1522515207 if (bFileIsInAliEn) {
1522615208 // d) Handle the AliEn case:
15227- TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
15209+ const TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
1522815210 if (!alien) {
1522915211 LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__);
1523015212 }
@@ -15326,7 +15308,7 @@ TH1D* getHistogramWithCentralityWeights(const char* filePath, const char* runNum
1532615308 } // else {
1532715309
1532815310 // g) The final touch on histogram with centrality weights:
15329- TString histName = "" ;
15311+ TString histName;
1533015312
1533115313 // fetch histogram directly from this list:
1533215314 // Remark: histName must be formated as e.g. "FT0C_multiparticle-correlations-a-b" for default analysis, or "FT0C_multiparticle-correlations-a-b_someCut"
@@ -15715,7 +15697,7 @@ TObjArray* getObjArrayWithLabels(const char* filePath)
1571515697 TFile* oaFile = NULL; // file holding TObjArray with all labels
1571615698 if (bFileIsInAliEn) {
1571715699 // c) Handle the AliEn case:
15718- TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
15700+ const TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
1571915701 if (!alien) {
1572015702 LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__);
1572115703 }
@@ -15874,7 +15856,7 @@ void getHistogramWithCustomNUA(const char* filePath, EnNUAPDF variable)
1587415856
1587515857 if (bFileIsInAliEn) {
1587615858 // d) Handle the AliEn case:
15877- TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
15859+ const TGrid* alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "", "");
1587815860 if (!alien) {
1587915861 LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__);
1588015862 }
@@ -16115,7 +16097,7 @@ TObject* getObjectFromList(TList* list, const char* objectName) // Last update:
1611516097
1611616098//============================================================
1611716099
16118- double weight (const double& value, EnWeights whichWeight) // value, integrated [phi,pt,eta] weight
16100+ double particleWeight (const double& value, EnWeights whichWeight) // value, integrated [phi,pt,eta] weight
1611916101{
1612016102 // Determine particle weight.
1612116103
@@ -16144,7 +16126,7 @@ double weight(const double& value, EnWeights whichWeight) // value, integrated [
1614416126
1614516127 return weight;
1614616128
16147- } // weight (const double &value, EnWeights whichWeight) // value, integrated [phi,pt,eta] weight
16129+ } // particleWeight (const double &value, EnWeights whichWeight) // value, integrated [phi,pt,eta] weight
1614816130
1614916131//============================================================
1615016132
@@ -18521,23 +18503,23 @@ void fillQvector(const double& dPhi, const double& dPt, const double& dEta)
1852118503 double wToPowerP = 1.; // weight raised to power p
1852218504
1852318505 if (pw.fUseWeights[wPHI]) {
18524- wPhi = weight (dPhi, wPHI);
18506+ wPhi = particleWeight (dPhi, wPHI);
1852518507 if (!(wPhi > 0.)) {
1852618508 LOGF(error, "\033[1;33m%s wPhi is not positive\033[0m", __FUNCTION__);
1852718509 LOGF(fatal, "dPhi = %f\nwPhi = %f", dPhi, wPhi);
1852818510 }
1852918511 } // if(pw.fUseWeights[wPHI])
1853018512
1853118513 if (pw.fUseWeights[wPT]) {
18532- wPt = weight (dPt, wPT); // corresponding pt weight
18514+ wPt = particleWeight (dPt, wPT); // corresponding pt weight
1853318515 if (!(wPt > 0.)) {
1853418516 LOGF(error, "\033[1;33m%s wPt is not positive\033[0m", __FUNCTION__);
1853518517 LOGF(fatal, "dPt = %f\nwPt = %f", dPt, wPt);
1853618518 }
1853718519 } // if(pw.fUseWeights[wPT])
1853818520
1853918521 if (pw.fUseWeights[wETA]) {
18540- wEta = weight (dEta, wETA); // corresponding eta weight
18522+ wEta = particleWeight (dEta, wETA); // corresponding eta weight
1854118523 if (!(wEta > 0.)) {
1854218524 LOGF(error, "\033[1;33m%s wEta is not positive\033[0m", __FUNCTION__);
1854318525 LOGF(fatal, "dEta = %f\nwEta = %f", dEta, wEta);
@@ -18844,7 +18826,7 @@ void fillqvector(const double& dPhi, const double& kineVarValue, EnqvectorKine k
1884418826 double wToPowerP = 1.; // weight raised to power p
1884518827 double kineVarWeight = 1.; // e.g. this can be integrated pT or eta weight
1884618828 if (pw.fUseWeights[afoWeight]) {
18847- kineVarWeight = weight (kineVarValue, afoWeight); // corresponding e.g. pt or eta weight
18829+ kineVarWeight = particleWeight (kineVarValue, afoWeight); // corresponding e.g. pt or eta weight
1884818830 if (!(kineVarWeight > 0.)) {
1884918831 LOGF(fatal, "\033[1;31m%s at line %d : kineVarWeight is not positive \033[0m", __FUNCTION__, __LINE__);
1885018832 // TBI 20240212 or could I just skip this particle?
@@ -20013,15 +19995,12 @@ void steer(T1 const& collision, T2 const& bcs, T3 const& tracks)
2001319995
2001419996 if (tc.fVerbose) {
2001519997 startFunction(__FUNCTION__);
19998+ // *) Print environment:
19999+ printEnvironment();
2001620000 }
2001720001
2001820002 // memStatus: ~50K (without differential q-vectors and eta separations)
2001920003
20020- // *) Print environment:
20021- if (tc.fVerbose) {
20022- printEnvironment();
20023- }
20024-
2002520004 // *) Dry run:
2002620005 if (tc.fDryRun) {
2002720006 eventCounterForDryRun(eFill);
@@ -20159,12 +20138,9 @@ void steer(T1 const& collision, T2 const& bcs, T3 const& tracks)
2015920138 tc.fTimer[eGlobal]->Continue(); // yes
2016020139 }
2016120140
20162- // *) Print environment:
2016320141 if (tc.fVerbose) {
20142+ // *) Print environment:
2016420143 printEnvironment();
20165- }
20166-
20167- if (tc.fVerbose) {
2016820144 exitFunction(__FUNCTION__);
2016920145 }
2017020146
0 commit comments