@@ -67,6 +67,8 @@ bool ptorder = false;
6767PairCuts fPairCuts ; // pair suppression engine
6868bool fUseConversionCuts = false ; // suppress resonances and conversions
6969bool fUseTwoTrackCut = false ; // suppress too close tracks
70+
71+ std::vector<std::string> tname = {" O" , " T" }; // /< the track names
7072} // namespace correlationstask
7173
7274// Task for building <dpt,dpt> correlations
@@ -108,17 +110,6 @@ struct DptDptCorrelationsTask {
108110 std::vector<std::vector<TProfile*>> fhSum2PtPtnw_vsC{nch, {nch, nullptr }}; // !<! un-weighted accumulated \f${p_T}_1 {p_T}_2\f$ distribution vs event centrality/multiplicity 1-1,1-2,2-1,2-2, combinations
109111 std::vector<std::vector<TProfile*>> fhSum2DptDptnw_vsC{nch, {nch, nullptr }}; // !<! un-weighted accumulated \f$\sum ({p_T}_1- <{p_T}_1>) ({p_T}_2 - <{p_T}_2>) \f$ distribution vs \f$\Delta\eta,\;\Delta\phi\f$ distribution vs event centrality/multiplicity 1-1,1-2,2-1,2-2, combinations
110112
111- // / \enum TrackPairs
112- // / \brief The track combinations hadled by the class
113- typedef enum {
114- kOO = 0 , // /< one-one pairs
115- kOT , // /< one-two pairs
116- kTO , // /< two-one pairs
117- kTT , // /< two-two pairs
118- nTrackPairs // /< the number of track pairs
119- } trackpairs;
120-
121- std::vector<std::string> tname = {" O" , " T" }; // /< the external track names, one and two, for histogram creation
122113 std::vector<std::vector<std::string>> trackPairsNames = {{" OO" , " OT" }, {" TO" , " TT" }};
123114 bool ccdbstored = false ;
124115
@@ -916,40 +907,38 @@ struct DptDptCorrelationsTask {
916907 if (!(ixDCE < 0 )) {
917908 if (ccdblst != nullptr && !(dataCEME[ixDCE]->isCCDBstored ())) {
918909 if constexpr (gen) {
919- dataCEME[ixDCE]->storePtAverages (
920- std::vector<TH2 *>{reinterpret_cast <TH2 *>(ccdblst->FindObject (
921- TString::Format (" trueptavgetaphi_%02d-%02d_p" ,
922- static_cast <int >(fCentMultMin [ixDCE]),
923- static_cast <int >(fCentMultMax [ixDCE]))
924- .Data ())),
925- reinterpret_cast <TH2 *>(ccdblst->FindObject (
926- TString::Format (" trueptavgetaphi_%02d-%02d_m" ,
927- static_cast <int >(fCentMultMin [ixDCE]),
928- static_cast <int >(fCentMultMax [ixDCE]))
929- .Data ()))});
910+ std::vector<TH2 *> ptavgs{tname.size (), nullptr };
911+ for (auto sp : tname) {
912+ ptavgs.push_back (reinterpret_cast <TH2 *>(ccdblst->FindObject (
913+ TString::Format (" trueptavgetaphi_%02d-%02d_%s" ,
914+ static_cast <int >(fCentMultMin [ixDCE]),
915+ static_cast <int >(fCentMultMax [ixDCE]),
916+ sp.c_str ())
917+ .Data ())));
918+ }
919+ dataCEME[ixDCE]->storePtAverages (ptavgs);
930920 } else {
931- dataCEME[ixDCE]->storeTrackCorrections (
932- std::vector<TH3 *>{reinterpret_cast <TH3 *>(ccdblst->FindObject (
933- TString::Format (" correction_%02d-%02d_p1" ,
934- static_cast <int >(fCentMultMin [ixDCE]),
935- static_cast <int >(fCentMultMax [ixDCE]))
936- .Data ())),
937- reinterpret_cast <TH3 *>(ccdblst->FindObject (
938- TString::Format (" correction_%02d-%02d_m1" ,
939- static_cast <int >(fCentMultMin [ixDCE]),
940- static_cast <int >(fCentMultMax [ixDCE]))
941- .Data ()))});
942- dataCEME[ixDCE]->storePtAverages (
943- std::vector<TH2 *>{reinterpret_cast <TH2 *>(ccdblst->FindObject (
944- TString::Format (" ptavgetaphi_%02d-%02d_p" ,
945- static_cast <int >(fCentMultMin [ixDCE]),
946- static_cast <int >(fCentMultMax [ixDCE]))
947- .Data ())),
948- reinterpret_cast <TH2 *>(ccdblst->FindObject (
949- TString::Format (" ptavgetaphi_%02d-%02d_m" ,
950- static_cast <int >(fCentMultMin [ixDCE]),
951- static_cast <int >(fCentMultMax [ixDCE]))
952- .Data ()))});
921+ std::vector<TH3 *> corrs{tname.size (), nullptr };
922+ for (auto sp : tname) {
923+ corrs.push_back (reinterpret_cast <TH3 *>(ccdblst->FindObject (
924+ TString::Format (" correction_%02d-%02d_%s" ,
925+ static_cast <int >(fCentMultMin [ixDCE]),
926+ static_cast <int >(fCentMultMax [ixDCE]),
927+ sp.c_str ())
928+ .Data ())));
929+ }
930+ dataCEME[ixDCE]->storeTrackCorrections (corrs);
931+
932+ std::vector<TH2 *> ptavgs{tname.size (), nullptr };
933+ for (auto sp : tname) {
934+ ptavgs.push_back (reinterpret_cast <TH2 *>(ccdblst->FindObject (
935+ TString::Format (" ptavgetaphi_%02d-%02d_%s" ,
936+ static_cast <int >(fCentMultMin [ixDCE]),
937+ static_cast <int >(fCentMultMax [ixDCE]),
938+ sp.c_str ())
939+ .Data ())));
940+ }
941+ dataCEME[ixDCE]->storePtAverages (ptavgs);
953942 }
954943 }
955944
0 commit comments