@@ -234,7 +234,7 @@ struct ConfPairBinning : o2::framework::ConfigurableGroup {
234234 o2::framework::Configurable<bool > shUseCent{" shUseCent" , false , " SH: bin by centrality instead of multiplicity" };
235235 o2::framework::ConfigurableAxis shCentBins{" shCentBins" , {o2::framework::VARIABLE_WIDTH , 0 .0f , 200 .0f }, " SH: multiplicity/centrality bin edges (like FemtoUniverse confMultKstarBins)" };
236236 o2::framework::ConfigurableAxis shKtBins{" shKtBins" , {o2::framework::VARIABLE_WIDTH , 0 .1f , 0 .2f , 0 .3f , 0 .4f }, " SH: kT bin edges (like FemtoUniverse confKtKstarBins)" };
237- o2::framework::Configurable<bool > shPlot1D{" shPlot1D" , false , " (SH) Also fill 1D qinv/k* numerator/denominator (h1D) per (mult,kT) bin" };
237+ o2::framework::Configurable<bool > shPlot1D{" shPlot1D" , false , " (SH) Also fill the 1D qinv/k* distribution (h1D) and the bin occupancy (BinCount ) per (mult,kT) bin" };
238238};
239239
240240struct ConfPairCuts : o2::framework::ConfigurableGroup {
@@ -586,6 +586,8 @@ class PairHistManager
586586 // copy bin edges, stripping the leading VARIABLE_WIDTH (0) marker
587587 mShCentEdges .assign (ConfPairBinning.shCentBins .value .begin () + 1 , ConfPairBinning.shCentBins .value .end ());
588588 mShKtEdges .assign (ConfPairBinning.shKtBins .value .begin () + 1 , ConfPairBinning.shKtBins .value .end ());
589+ mShCentSpec = {ConfPairBinning.shCentBins , mShUseCent ? " centrality (%)" : " multiplicity" };
590+ mShKtSpec = {ConfPairBinning.shKtBins , " k_{T} (GeV/#it{c})" };
589591 }
590592
591593 // transverse mass type
@@ -1029,80 +1031,80 @@ class PairHistManager
10291031 const int nKt = static_cast <int >(mShKtEdges .size ()) - 1 ;
10301032 mShYlmBuffer .assign (nJM, {});
10311033
1032- mShReal .resize (nCent );
1033- mShImag .resize (nCent );
1034+ mShReal .resize (nJM );
1035+ mShImag .resize (nJM );
10341036 mShCov .resize (nCent);
10351037 mSh1D .resize (nCent);
10361038 mShBinCount .resize (nCent);
1039+
1040+ const std::string dir = std::string (prefix) + std::string (AnalysisDir) + " SH/" ;
1041+ int ihist = 0 ;
1042+ for (int l = 0 ; l <= mShLMax ; ++l) {
1043+ for (int m = -l; m <= l; ++m) {
1044+ std::string lm = std::to_string (l);
1045+ lm += (m < 0 ) ? std::to_string (l - m) : std::to_string (m);
1046+ std::string nameRe = dir;
1047+ nameRe += " ReYlm" ;
1048+ nameRe += lm;
1049+ std::string nameIm = dir;
1050+ nameIm += " ImYlm" ;
1051+ nameIm += lm;
1052+ // shared "Y_{l}^{m}" suffix for both titles
1053+ std::string ylmLabel = " Y_{" ;
1054+ ylmLabel += std::to_string (l);
1055+ ylmLabel += " }^{" ;
1056+ ylmLabel += std::to_string (m);
1057+ ylmLabel += " }" ;
1058+ std::string titleRe = " Re " ;
1059+ titleRe += ylmLabel;
1060+ titleRe += " ; k* (GeV/#it{c}); mult/cent; k_{T} (GeV/#it{c})" ;
1061+ std::string titleIm = " Im " ;
1062+ titleIm += ylmLabel;
1063+ titleIm += " ; k* (GeV/#it{c}); mult/cent; k_{T} (GeV/#it{c})" ;
1064+ mShReal [ihist] = mHistogramRegistry ->add <TH3 >(nameRe.c_str (), titleRe.c_str (), o2::framework::kTH3D , {mShKstarSpec , mShCentSpec , mShKtSpec });
1065+ mShImag [ihist] = mHistogramRegistry ->add <TH3 >(nameIm.c_str (), titleIm.c_str (), o2::framework::kTH3D , {mShKstarSpec , mShCentSpec , mShKtSpec });
1066+ mShReal [ihist]->Sumw2 ();
1067+ mShImag [ihist]->Sumw2 ();
1068+ ++ihist;
1069+ }
1070+ }
1071+
1072+ const int nAxisLM = 2 * nJM;
1073+ const o2::framework::AxisSpec covLmAxis{nAxisLM, -0.5 , static_cast <double >(nAxisLM) - 0.5 , " l,m #times (re,im)" };
1074+
10371075 for (int iCent = 0 ; iCent < nCent; ++iCent) {
1038- mShReal [iCent].resize (nKt);
1039- mShImag [iCent].resize (nKt);
10401076 mShCov [iCent].resize (nKt);
10411077 mSh1D [iCent].resize (nKt);
10421078 mShBinCount [iCent].resize (nKt);
1043- // folder name: mult_{low}_{high}
1044- const std::string centFolder = " mult_" + std::to_string (static_cast <int >(mShCentEdges [iCent])) +
1045- " _" + std::to_string (static_cast <int >(mShCentEdges [iCent + 1 ]));
1079+ // name suffix: mult_{low}_{high}
1080+ std::string centSuffix = " _mult_" ;
1081+ centSuffix += std::to_string (static_cast <int >(mShCentEdges [iCent]));
1082+ centSuffix += " _" ;
1083+ centSuffix += std::to_string (static_cast <int >(mShCentEdges [iCent + 1 ]));
10461084 for (int iKt = 0 ; iKt < nKt; ++iKt) {
1047- mShReal [iCent][iKt].resize (nJM);
1048- mShImag [iCent][iKt].resize (nJM);
1049- // folder name: kT_{low*100}_{high*100}
1050- std::string ktFolder = " kT_" ;
1051- ktFolder += std::to_string (static_cast <int >(mShKtEdges [iKt] * 100.0 ));
1052- ktFolder += " _" ;
1053- ktFolder += std::to_string (static_cast <int >(mShKtEdges [iKt + 1 ] * 100.0 ));
1054- std::string dir = std::string (prefix) + std::string (AnalysisDir) + " SH/" ;
1055- dir += centFolder;
1056- dir += " /" ;
1057- dir += ktFolder;
1058- dir += " /" ;
1059-
1060- int ihist = 0 ;
1061- for (int l = 0 ; l <= mShLMax ; ++l) {
1062- for (int m = -l; m <= l; ++m) {
1063- std::string lm = std::to_string (l);
1064- lm += (m < 0 ) ? std::to_string (l - m) : std::to_string (m);
1065- std::string nameRe = dir;
1066- nameRe += " ReYlm" ;
1067- nameRe += lm;
1068- std::string nameIm = dir;
1069- nameIm += " ImYlm" ;
1070- nameIm += lm;
1071- // shared "Y_{l}^{m}" suffix for both titles
1072- std::string ylmLabel = " Y_{" ;
1073- ylmLabel += std::to_string (l);
1074- ylmLabel += " }^{" ;
1075- ylmLabel += std::to_string (m);
1076- ylmLabel += " }" ;
1077- std::string titleRe = " Re " ;
1078- titleRe += ylmLabel;
1079- titleRe += " ; k* (GeV/#it{c}); Re[A_{l}^{m}]" ;
1080- std::string titleIm = " Im " ;
1081- titleIm += ylmLabel;
1082- titleIm += " ; k* (GeV/#it{c}); Im[A_{l}^{m}]" ;
1083- mShReal [iCent][iKt][ihist] = mHistogramRegistry ->add <TH1 >(nameRe.c_str (), titleRe.c_str (), o2::framework::kTH1D , {mShKstarSpec });
1084- mShImag [iCent][iKt][ihist] = mHistogramRegistry ->add <TH1 >(nameIm.c_str (), titleIm.c_str (), o2::framework::kTH1D , {mShKstarSpec });
1085- mShReal [iCent][iKt][ihist]->Sumw2 ();
1086- mShImag [iCent][iKt][ihist]->Sumw2 ();
1087- ++ihist;
1088- }
1089- }
1085+ // name suffix: _mult_{low}_{high}_kT_{low*100}_{high*100}
1086+ std::string cellSuffix = centSuffix;
1087+ cellSuffix += " _kT_" ;
1088+ cellSuffix += std::to_string (static_cast <int >(mShKtEdges [iKt] * 100.0 ));
1089+ cellSuffix += " _" ;
1090+ cellSuffix += std::to_string (static_cast <int >(mShKtEdges [iKt + 1 ] * 100.0 ));
10901091
10911092 // SH covariance TH3D
1092- const int nAxisLM = 2 * nJM;
1093- const o2::framework::AxisSpec covLmAxis{nAxisLM, -0.5 , static_cast <double >(nAxisLM) - 0.5 , " l,m #times (re,im)" };
10941093 std::string nameCov = dir;
10951094 nameCov += " Cov" ;
1095+ nameCov += cellSuffix;
10961096 mShCov [iCent][iKt] = mHistogramRegistry ->add <TH3 >(nameCov.c_str (), " SH covariance; k* (GeV/#it{c}); l,m; l,m" , o2::framework::kTH3D , {mShKstarSpec , covLmAxis, covLmAxis});
10971097 mShCov [iCent][iKt]->Sumw2 ();
10981098
1099- std::string nameBinCount = dir;
1100- nameBinCount += " BinCount" ;
1101- mShBinCount [iCent][iKt] = mHistogramRegistry ->add <TH1 >(nameBinCount.c_str (), " SH bin occupancy; k* (GeV/#it{c}); Entries" , o2::framework::kTH1D , {mShKstarSpec });
1102-
11031099 if (mShPlot1D ) {
1100+ std::string nameBinCount = dir;
1101+ nameBinCount += " BinCount" ;
1102+ nameBinCount += cellSuffix;
1103+ mShBinCount [iCent][iKt] = mHistogramRegistry ->add <TH1 >(nameBinCount.c_str (), " SH bin occupancy; k* (GeV/#it{c}); Entries" , o2::framework::kTH1D , {mShKstarSpec });
1104+
11041105 std::string name1D = dir;
11051106 name1D += " h1D" ;
1107+ name1D += cellSuffix;
11061108 mSh1D [iCent][iKt] = mHistogramRegistry ->add <TH1 >(name1D.c_str (), " 1D distribution; k* (GeV/#it{c}); Entries" , o2::framework::kTH1D , {mShKstarSpec });
11071109 mSh1D [iCent][iKt]->Sumw2 ();
11081110 }
@@ -1304,13 +1306,14 @@ class PairHistManager
13041306 mHistogramRegistry ->fill (HIST (prefix) + HIST (AnalysisDir) + HIST (getHistName (kQoutQsideQlong , HistTable)), mQout , mQside , mQlong );
13051307 }
13061308 if (mPlotSH ) {
1307- const int iCent = findShBin (mShUseCent ? mCent : mMult , mShCentEdges );
1309+ const float shCentValue = mShUseCent ? mCent : mMult ;
1310+ const int iCent = findShBin (shCentValue, mShCentEdges );
13081311 const int iKt = findShBin (mKt , mShKtEdges );
13091312 if (iCent >= 0 && iKt >= 0 ) {
13101313 mYlm .doYlmUpToL (mShLMax , mShOut , mShSide , mShLong , mShYlmBuffer .data ());
13111314 for (std::size_t i = 0 ; i < mShYlmBuffer .size (); ++i) {
1312- mShReal [iCent][iKt][ i]->Fill (mShKv , std::real (mShYlmBuffer [i]));
1313- mShImag [iCent][iKt][ i]->Fill (mShKv , -std::imag (mShYlmBuffer [i]));
1315+ mShReal [i]->Fill (mShKv , shCentValue, mKt , std::real (mShYlmBuffer [i]));
1316+ mShImag [i]->Fill (mShKv , shCentValue, mKt , -std::imag (mShYlmBuffer [i]));
13141317 }
13151318 // covariance: outer product of the (re, -im) Ylm vector packed on 2*nJM axes
13161319 // (each Ylm contributes two consecutive axis bins: even = real, odd = -imag)
@@ -1324,8 +1327,8 @@ class PairHistManager
13241327 }
13251328 }
13261329
1327- mShBinCount [iCent][iKt]->Fill (mShKv , 1.0 );
13281330 if (mShPlot1D ) {
1331+ mShBinCount [iCent][iKt]->Fill (mShKv , 1.0 );
13291332 // FemtoUniverse h1D = f3d[0]: qinv (=2k*) for identical-LCMS, else k*.
13301333 const float sh1DValue = (mShFrame == ShFrameLcmsIdentical) ? (2 .0f * mKstar ) : mKstar ;
13311334 mSh1D [iCent][iKt]->Fill (sh1DValue);
@@ -1693,16 +1696,18 @@ class PairHistManager
16931696 static constexpr int ShFramePrf = 2 ;
16941697
16951698 o2::framework::AxisSpec mShKstarSpec {{60 , 0 .0f , 0 .3f }, " k* (GeV/#it{c})" }; // set in init()
1699+ o2::framework::AxisSpec mShCentSpec {{1 , 0 .0f , 200 .0f }, " mult/cent" };
1700+ o2::framework::AxisSpec mShKtSpec {{3 , 0 .1f , 0 .4f }, " k_{T} (GeV/#it{c})" };
16961701
16971702 // kinematics computed in setPair(): axis value + 3 components feeding Ylm
16981703 float mShKv = 0 .f; // kstar (non-identical) or qinv (identical)
16991704 float mShOut = 0 .f;
17001705 float mShSide = 0 .f;
17011706 float mShLong = 0 .f;
17021707
1703- // SH histograms binned in [iCent][iKt][ ihist]; ihist = l*(l+1)+m
1704- std::vector<std::vector<std::vector<std:: shared_ptr<TH1 >> >> mShReal ;
1705- std::vector<std::vector<std::vector<std:: shared_ptr<TH1 >> >> mShImag ;
1708+ // SH histograms per [ ihist] ( ihist = l*(l+1)+m); TH3: k* on X, mult/cent on Y, kT on Z
1709+ std::vector<std::shared_ptr<TH3 >> mShReal ;
1710+ std::vector<std::shared_ptr<TH3 >> mShImag ;
17061711 // SH covariance matrix per [iCent][iKt]; TH3d: k* on X, 2*nJM (l,m x re/im)
17071712 std::vector<std::vector<std::shared_ptr<TH3 >>> mShCov ;
17081713 bool mShPlot1D = false ;
0 commit comments