@@ -155,12 +155,15 @@ 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
158+ // for deltaPt/<pT> vs centrality
159159 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 " )
160+ O2_DEFINE_CONFIGURABLE (cfgDptDisSelectionSwitch , int , 0 , " 0: disable, 1: use low cut, 2:use high cut " )
161161 TH1D* hEvAvgMeanPt = nullptr ;
162+ TH1D* fDptDisCutLow = nullptr ;
163+ TH1D* fDptDisCutHigh = nullptr ;
162164 O2_DEFINE_CONFIGURABLE (cfgDptDishEvAvgMeanPt, std::string, " " , " CCDB path to hMeanPt object" )
163- ConfigurableAxis cfgDptDisAxisCorr{" cfgDptDisAxisCorr" , {50 , 0 ., 0.005 }, " pt axis for histograms" };
165+ O2_DEFINE_CONFIGURABLE (cfgDptDisCutLow, std::string, " " , " CCDB path to dpt lower boundary" )
166+ O2_DEFINE_CONFIGURABLE (cfgDptDisCutHigh, std::string, " " , " CCDB path to dpt higher boundary" )
164167 ConfigurableAxis cfgDptDisAxisNormal{" cfgDptDisAxisNormal" , {200 , -1 ., 1 .}, " normalized axis" };
165168 } cfgFuncParas;
166169
@@ -324,7 +327,7 @@ struct FlowTask {
324327 registry.add (" PtVariance_partA_WithinGap08" , " " , {HistType::kTProfile , {axisIndependent}});
325328 registry.add (" PtVariance_partB_WithinGap08" , " " , {HistType::kTProfile , {axisIndependent}});
326329 if (cfgFuncParas.cfgDptDisEnable ) {
327- registry.add (" hNormDeltaPt_Corr_X " , " #delta p_{T}/[p_{T}]; Corr; X" , {HistType::kTH3D , {cfgFuncParas.cfgDptDisAxisNormal , cfgFuncParas. cfgDptDisAxisCorr , axisIndependent}});
330+ registry.add (" hNormDeltaPt_X " , " ; #delta p_{T}/[p_{T}]; X" , {HistType::kTH2D , {cfgFuncParas.cfgDptDisAxisNormal , axisIndependent}});
328331 }
329332 if (doprocessMCGen) {
330333 registry.add (" MCGen/MChPhi" , " #phi distribution" , {HistType::kTH1D , {axisPhi}});
@@ -603,25 +606,6 @@ struct FlowTask {
603606 return ;
604607 }
605608
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-
625609 template <DataType dt>
626610 void fillFC (const GFW::CorrConfig& corrconf, const double & cent, const double & rndm)
627611 {
@@ -702,6 +686,22 @@ struct FlowTask {
702686 }
703687 LOGF (info, " Loaded mean pT histogram from %s (%p)" , cfgFuncParas.cfgDptDishEvAvgMeanPt .value .c_str (), (void *)cfgFuncParas.hEvAvgMeanPt );
704688 }
689+ if (cfgFuncParas.cfgDptDisEnable && cfgFuncParas.cfgDptDisSelectionSwitch > 0 ) {
690+ if (cfgFuncParas.cfgDptDisCutLow .value .empty () == false ) {
691+ cfgFuncParas.fDptDisCutLow = ccdb->getForTimeStamp <TH1D>(cfgFuncParas.cfgDptDisCutLow , timestamp);
692+ if (cfgFuncParas.fDptDisCutLow == nullptr ) {
693+ LOGF (fatal, " Could not load dptDis low cut histogram from %s" , cfgFuncParas.cfgDptDisCutLow .value .c_str ());
694+ }
695+ LOGF (info, " Loaded dptDis low cut histogram from %s (%p)" , cfgFuncParas.cfgDptDisCutLow .value .c_str (), (void *)cfgFuncParas.fDptDisCutLow );
696+ }
697+ if (cfgFuncParas.cfgDptDisCutHigh .value .empty () == false ) {
698+ cfgFuncParas.fDptDisCutHigh = ccdb->getForTimeStamp <TH1D>(cfgFuncParas.cfgDptDisCutHigh , timestamp);
699+ if (cfgFuncParas.fDptDisCutHigh == nullptr ) {
700+ LOGF (fatal, " Could not load dptDis high cut histogram from %s" , cfgFuncParas.cfgDptDisCutHigh .value .c_str ());
701+ }
702+ LOGF (info, " Loaded dptDis high cut histogram from %s (%p)" , cfgFuncParas.cfgDptDisCutHigh .value .c_str (), (void *)cfgFuncParas.fDptDisCutHigh );
703+ }
704+ }
705705 correctionsLoaded = true ;
706706 }
707707
@@ -1101,7 +1101,16 @@ struct FlowTask {
11011101 registry.fill (HIST (" hTrackCorrection2d" ), tracks.size (), nTracksCorrected);
11021102
11031103 if (cfgFuncParas.cfgDptDisEnable ) {
1104- fillDeltaPtvsCorr (corrconfigs.at (cfgFuncParas.cfgDptDisCorrConfigIndex ), ptSum, weffEvent, HIST (" hNormDeltaPt_Corr_X" ), independent);
1104+ double meanPt = ptSum / weffEvent;
1105+ double deltaPt = meanPt - cfgFuncParas.hEvAvgMeanPt ->GetBinContent (cfgFuncParas.hEvAvgMeanPt ->FindBin (independent));
1106+ registry.fill (HIST (" hNormDeltaPt_X" ), meanPt, independent, weffEvent);
1107+ if (cfgFuncParas.cfgDptDisSelectionSwitch == 1 && deltaPt > cfgFuncParas.fDptDisCutLow ->GetBinContent (cfgFuncParas.fDptDisCutLow ->FindBin (independent))) {
1108+ // only keep low 10% dpt event
1109+ return ;
1110+ } else if (cfgFuncParas.cfgDptDisSelectionSwitch == 2 && deltaPt < cfgFuncParas.fDptDisCutHigh ->GetBinContent (cfgFuncParas.fDptDisCutHigh ->FindBin (independent))) {
1111+ // only keep high 10% dpt event
1112+ return ;
1113+ }
11051114 }
11061115
11071116 double weffEventDiffWithGap08 = weffEventWithinGap08 * weffEventWithinGap08 - weffEventSquareWithinGap08;
0 commit comments