@@ -95,8 +95,8 @@ struct FlowQa {
9595 O2_DEFINE_CONFIGURABLE (cfgCutOccupancyHigh, int , 500 , " High cut on TPC occupancy" )
9696 O2_DEFINE_CONFIGURABLE (cfgCutOccupancyLow, int , 0 , " Low cut on TPC occupancy" )
9797 O2_DEFINE_CONFIGURABLE (cfgUseSmallMemory, bool , false , " Use small memory mode" )
98- O2_DEFINE_CONFIGURABLE (cfgUseEPcorrection , bool , false , " Use event plane efficiency correction" )
99- O2_DEFINE_CONFIGURABLE (cfgUseEPEffSlopeFactor , float , 1 .0f , " A factor to scale the EP efficiency slope" )
98+ O2_DEFINE_CONFIGURABLE (cfgTrackDensityCorrUse , bool , false , " Use track density efficiency correction" )
99+ O2_DEFINE_CONFIGURABLE (cfgTrackDensityCorrSlopeFactor , float , 1 .0f , " A factor to scale the track density efficiency slope" )
100100 Configurable<std::vector<std::string>> cfgUserDefineGFWCorr{" cfgUserDefineGFWCorr" , std::vector<std::string>{" refN02 {2} refP02 {-2}" , " refN12 {2} refP12 {-2}" }, " User defined GFW CorrelatorConfig" };
101101 Configurable<std::vector<std::string>> cfgUserDefineGFWName{" cfgUserDefineGFWName" , std::vector<std::string>{" Ch02Gap22" , " Ch12Gap22" }, " User defined GFW Name" };
102102 Configurable<std::vector<int >> cfgRunRemoveList{" cfgRunRemoveList" , std::vector<int >{-1 }, " excluded run numbers" };
@@ -237,6 +237,7 @@ struct FlowQa {
237237 // Track QA
238238 registry.add (" hPhi" , " #phi distribution" , {HistType::kTH1D , {axisPhi}});
239239 registry.add (" hPhiWeighted" , " corrected #phi distribution" , {HistType::kTH1D , {axisPhi}});
240+ registry.add (" hPhiWeightedTrDen" , " corrected #phi distribution, considering track density" , {HistType::kTH1D , {axisPhi}});
240241 registry.add (" hEta" , " #eta distribution" , {HistType::kTH1D , {axisEta}});
241242 registry.add (" hPt" , " p_{T} distribution before cut" , {HistType::kTH1D , {axisPtHist}});
242243 registry.add (" hPtRef" , " p_{T} distribution after cut" , {HistType::kTH1D , {axisPtHist}});
@@ -364,23 +365,16 @@ struct FlowQa {
364365 }
365366 fGFW ->CreateRegions ();
366367
367- if (cfgUseEPcorrection) {
368- hFindPtBin = new TH1D (" hFindPtBin" , " hFindPtBin" , 7 , 0.2 , 3.0 );
369- funcEff.resize (7 );
370- funcEff[0 ] = new TF1 (" funcEff0" , " [0]+[1]*x" , 0 , 3000 );
371- funcEff[0 ]->SetParameters (0.736274 , -2.26721e-05 * cfgUseEPEffSlopeFactor);
372- funcEff[1 ] = new TF1 (" funcEff1" , " [0]+[1]*x" , 0 , 3000 );
373- funcEff[1 ]->SetParameters (0.773396 , -2.79496e-05 * cfgUseEPEffSlopeFactor);
374- funcEff[2 ] = new TF1 (" funcEff2" , " [0]+[1]*x" , 0 , 3000 );
375- funcEff[2 ]->SetParameters (0.792831 , -2.69748e-05 * cfgUseEPEffSlopeFactor);
376- funcEff[3 ] = new TF1 (" funcEff3" , " [0]+[1]*x" , 0 , 3000 );
377- funcEff[3 ]->SetParameters (0.808402 , -2.48438e-05 * cfgUseEPEffSlopeFactor);
378- funcEff[4 ] = new TF1 (" funcEff4" , " [0]+[1]*x" , 0 , 3000 );
379- funcEff[4 ]->SetParameters (0.817907 , -2.31138e-05 * cfgUseEPEffSlopeFactor);
380- funcEff[5 ] = new TF1 (" funcEff5" , " [0]+[1]*x" , 0 , 3000 );
381- funcEff[5 ]->SetParameters (0.82473 , -2.20517e-05 * cfgUseEPEffSlopeFactor);
382- funcEff[6 ] = new TF1 (" funcEff6" , " [0]+[1]*x" , 0 , 3000 );
383- funcEff[6 ]->SetParameters (0.829151 , -2.0758e-05 * cfgUseEPEffSlopeFactor);
368+ if (cfgTrackDensityCorrUse) {
369+ std::vector<double > pTEffBins = {0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.4 , 1.8 , 2.2 , 2.6 , 3.0 };
370+ hFindPtBin = new TH1D (" hFindPtBin" , " hFindPtBin" , pTEffBins.size () - 1 , &pTEffBins[0 ]);
371+ funcEff.resize (pTEffBins.size () - 1 );
372+ std::vector<double > f1p0 = {0.713412 , 0.73259 , 0.749925 , 0.760693 , 0.767321 , 0.772874 , 0.777889 , 0.782172 , 0.792831 , 0.808402 , 0.817907 , 0.82473 , 0.829151 };
373+ std::vector<double > f1p1 = {-2.15831e-05 , -2.19538e-05 , -2.2958e-05 , -2.55123e-05 , -2.75207e-05 , -2.81486e-05 , -2.839e-05 , -2.83713e-05 , -2.69748e-05 , -2.48438e-05 , -2.31138e-05 , -2.20517e-05 , -2.0758e-05 };
374+ for (uint ifunc = 0 ; ifunc < pTEffBins.size () - 1 ; ifunc++) {
375+ funcEff[ifunc] = new TF1 (Form (" funcEff%i" , ifunc), " [0]+[1]*x" , 0 , 3000 );
376+ funcEff[ifunc]->SetParameters (f1p0[ifunc], f1p1[ifunc] * cfgTrackDensityCorrSlopeFactor);
377+ }
384378 funcV2 = new TF1 (" funcV2" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 100 );
385379 funcV2->SetParameters (0.0186111 , 0.00351907 , -4.38264e-05 , 1.35383e-07 , -3.96266e-10 );
386380 funcV3 = new TF1 (" funcV3" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 100 );
@@ -706,7 +700,7 @@ struct FlowQa {
706700 double psi2Est = 0 , psi3Est = 0 , psi4Est = 0 ;
707701 float wEPeff = 1 ;
708702 double v2 = 0 , v3 = 0 , v4 = 0 ;
709- if (cfgUseEPcorrection ) {
703+ if (cfgTrackDensityCorrUse ) {
710704 double q2x = 0 , q2y = 0 ;
711705 double q3x = 0 , q3y = 0 ;
712706 double q4x = 0 , q4y = 0 ;
@@ -744,15 +738,16 @@ struct FlowQa {
744738 }
745739 if (!setCurrentParticleWeights (weff, wacc, track.phi (), track.eta (), track.pt (), vtxz))
746740 continue ;
747- if (cfgUseEPcorrection && withinPtRef) {
741+ if (cfgTrackDensityCorrUse && withinPtRef) {
748742 double fphi = v2 * std::cos (2 * (track.phi () - psi2Est)) + v3 * std::cos (3 * (track.phi () - psi3Est)) + v4 * std::cos (4 * (track.phi () - psi4Est));
749743 fphi = (1 + 2 * fphi);
750744 int pTBinForEff = hFindPtBin->FindBin (track.pt ());
751- if (pTBinForEff >= 1 && pTBinForEff <= 7 ) {
745+ if (pTBinForEff >= 1 && pTBinForEff <= hFindPtBin-> GetNbinsX () ) {
752746 wEPeff = funcEff[pTBinForEff - 1 ]->Eval (fphi * tracks.size ());
753747 if (wEPeff > 0 .) {
754748 wEPeff = 1 . / wEPeff;
755749 weff *= wEPeff;
750+ registry.fill (HIST (" hPhiWeightedTrDen" ), track.phi (), wacc * wEPeff);
756751 }
757752 }
758753 }
0 commit comments