@@ -113,6 +113,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
113113 Configurable<std::string> cfMult{" cfMult" , " TPC" , " multiplicity" };
114114 Configurable<bool > cfQA{" cfQA" , true , " quality assurance" };
115115 Configurable<bool > cfInitsim{" cfInitsim" , false , " init histograms of sim" };
116+ Configurable<bool > cfUseWeights{" cfUseWeights" , true , " use weights" };
116117
117118 Configurable<std::vector<float >> cfVertexZ{" cfVertexZ" , {-10 , 10 .}, " vertex z position range: {min, max}[cm], with convention: min <= Vz < max" };
118119 Configurable<std::vector<float >> cfPt{" cfPt" , {0.2 , 5.0 }, " transverse momentum range" };
@@ -484,9 +485,10 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
484485 pc.fHistTracksdcaXY [eRec]->Fill (track.dcaXY ());
485486 pc.fHistTracksdcaZ [eRec]->Fill (track.dcaZ ());
486487
487- if (histweight != pc.weightsmap .end ()) {
488+ if (cfUseWeights && histweight != pc.weightsmap .end ())
488489 weight = histweight->second ->GetBinContent (histweight->second ->FindBin (phi));
489- }
490+ else
491+ weight = 1 ;
490492
491493 // ... and corresponding MC truth simulated:
492494 // See https://github.com/AliceO2Group/O2Physics/blob/master/Tutorials/src/mcHistograms.cxx
@@ -746,9 +748,9 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
746748 qa.fQA = new TH2F (" QA_centr" , " quality assurance of centrality" , nBinscentr, mincentr, maxcentr, nBinscentr, mincentr, maxcentr);
747749 qa.fQAM_NC = new TH2F (" QAM_NC" , " quality assurance of mult vs. NContributors" , nBinsmult, minmult, maxmult, nBinsncontr, minncontr, maxncontr);
748750 if (cfQA) {
749- qa.fQAList ->Add (qa.fQA );
750751 if (cfInitsim)
751- qa.fQAList ->Add (qa.fQAM_NC );
752+ qa.fQAList ->Add (qa.fQA );
753+ qa.fQAList ->Add (qa.fQAM_NC );
752754 }
753755
754756 // float quantiles[10] = {0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};
0 commit comments