@@ -155,6 +155,13 @@ struct FlowTask {
155155 O2_DEFINE_CONFIGURABLE (cfgTPCPhiCutPtMin, float , 2 .0f , " start point of phi-pt cut" )
156156 TF1* fPhiCutLow = nullptr ;
157157 TF1* fPhiCutHigh = nullptr ;
158+ // for deltaPt/<pT> vs c22 vs centrality
159+ O2_DEFINE_CONFIGURABLE (cfgDptDisEnable, bool , false , " Produce deltaPt/meanPt vs c22 vs centrality" )
160+ O2_DEFINE_CONFIGURABLE (cfgDptDisCorrConfigIndex, int , 7 , " Index in CorrConfig, this decide which correlation is filled" )
161+ TH1D* hEvAvgMeanPt = nullptr ;
162+ O2_DEFINE_CONFIGURABLE (cfgDptDishEvAvgMeanPt, std::string, " " , " CCDB path to hMeanPt object" )
163+ ConfigurableAxis cfgDptDisAxisCorr{" cfgDptDisAxisCorr" , {50 , 0 ., 0.005 }, " pt axis for histograms" };
164+ ConfigurableAxis cfgDptDisAxisNormal{" cfgDptDisAxisNormal" , {200 , -1 ., 1 .}, " normalized axis" };
158165 } cfgFuncParas;
159166
160167 ConfigurableAxis axisPtHist{" axisPtHist" , {100 , 0 ., 10 .}, " pt axis for histograms" };
@@ -316,6 +323,9 @@ struct FlowTask {
316323 registry.add (" c22_gap08_trackMeanPt" , " " , {HistType::kTProfile , {axisIndependent}});
317324 registry.add (" PtVariance_partA_WithinGap08" , " " , {HistType::kTProfile , {axisIndependent}});
318325 registry.add (" PtVariance_partB_WithinGap08" , " " , {HistType::kTProfile , {axisIndependent}});
326+ if (cfgFuncParas.cfgDptDisEnable ) {
327+ registry.add (" hNormDeltaPt_Corr_X" , " #delta p_{T}/[p_{T}]; Corr; X" , {HistType::kTH3D , {cfgFuncParas.cfgDptDisAxisNormal , cfgFuncParas.cfgDptDisAxisCorr , axisIndependent}});
328+ }
319329 if (doprocessMCGen) {
320330 registry.add (" MCGen/MChPhi" , " #phi distribution" , {HistType::kTH1D , {axisPhi}});
321331 registry.add (" MCGen/MChEta" , " #eta distribution" , {HistType::kTH1D , {axisEta}});
@@ -593,6 +603,25 @@ struct FlowTask {
593603 return ;
594604 }
595605
606+ template <char ... chars>
607+ void fillDeltaPtvsCorr (const GFW::CorrConfig& corrconf, const double & sum_pt, const double & WeffEvent, const ConstStr<chars...>& histo, const double & cent)
608+ {
609+ double dnx, val;
610+ dnx = fGFW ->Calculate (corrconf, 0 , kTRUE ).real ();
611+ if (dnx == 0 )
612+ return ;
613+ if (!corrconf.pTDif ) {
614+ val = fGFW ->Calculate (corrconf, 0 , kFALSE ).real () / dnx;
615+ if (std::fabs (val) < 1 ) {
616+ double meanPt = sum_pt / WeffEvent;
617+ double deltaPt = meanPt - cfgFuncParas.hEvAvgMeanPt ->GetBinContent (cfgFuncParas.hEvAvgMeanPt ->FindBin (cent));
618+ registry.fill (histo, deltaPt / meanPt, val, cent, dnx * WeffEvent);
619+ }
620+ return ;
621+ }
622+ return ;
623+ }
624+
596625 template <DataType dt>
597626 void fillFC (const GFW::CorrConfig& corrconf, const double & cent, const double & rndm)
598627 {
@@ -666,6 +695,13 @@ struct FlowTask {
666695 }
667696 LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgEfficiency.value .c_str (), (void *)mEfficiency );
668697 }
698+ if (cfgFuncParas.cfgDptDisEnable && cfgFuncParas.cfgDptDishEvAvgMeanPt .value .empty () == false ) {
699+ cfgFuncParas.hEvAvgMeanPt = ccdb->getForTimeStamp <TH1D>(cfgFuncParas.cfgDptDishEvAvgMeanPt , timestamp);
700+ if (cfgFuncParas.hEvAvgMeanPt == nullptr ) {
701+ LOGF (fatal, " Could not load mean pT histogram from %s" , cfgFuncParas.cfgDptDishEvAvgMeanPt .value .c_str ());
702+ }
703+ LOGF (info, " Loaded mean pT histogram from %s (%p)" , cfgFuncParas.cfgDptDishEvAvgMeanPt .value .c_str (), (void *)cfgFuncParas.hEvAvgMeanPt );
704+ }
669705 correctionsLoaded = true ;
670706 }
671707
@@ -1064,6 +1100,10 @@ struct FlowTask {
10641100 }
10651101 registry.fill (HIST (" hTrackCorrection2d" ), tracks.size (), nTracksCorrected);
10661102
1103+ if (cfgFuncParas.cfgDptDisEnable ) {
1104+ fillDeltaPtvsCorr (corrconfigs.at (cfgFuncParas.cfgDptDisCorrConfigIndex ), ptSum, weffEvent, HIST (" hNormDeltaPt_Corr_X" ), independent);
1105+ }
1106+
10671107 double weffEventDiffWithGap08 = weffEventWithinGap08 * weffEventWithinGap08 - weffEventSquareWithinGap08;
10681108 // MeanPt
10691109 if (weffEvent) {
0 commit comments