@@ -134,14 +134,18 @@ struct JEPFlowAnalysis {
134134 Configurable<std::string> cfgShiftPath{" cfgShiftPath" , " Users/j/junlee/Qvector/QvecCalib/Shift" , " Path for Shift" };
135135 Configurable<float > cfgVertexZ{" cfgVertexZ" , 10.0 , " Maximum vertex Z selection" };
136136
137- Configurable<bool > cfgq2analysis{" cfgq2analysis" , false , " ese analysis flag " };
137+ Configurable<int > cfgq2analysis{" cfgq2analysis" , 0 , " ese analysis selection mode " };
138138 Configurable<std::vector<float >> cfgMultq2SelBin{" cfgMultq2SelBin" , {0 , 5 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 100 }, " " };
139139 Configurable<std::vector<float >> cfgMultq2high{" cfgMultq2high" , {}, " " };
140140 Configurable<std::vector<float >> cfgMultq2low{" cfgMultq2low" , {}, " " };
141+ Configurable<float > cfgQ2SelFrac{" cfgQ2SelFrac" , 0.5 , " ese analysis q2 selection with cfgq2analysis=2" };
141142
142143 Configurable<int > cfgJetSubEvtSel{" cfgJetSubEvtSel" , 0 , " 0: none, 1: Ratio, 2: relative ratio" };
143144 Configurable<std::vector<float >> cfgJetSubEvlSelVar{" cfgJetSubEvlSelVar" , {}, " " };
144145
146+ Configurable<std::string> cfgQselHistPath{" cfgQselHistPath" , " " , " CCDB path for q2 histogram" };
147+ Configurable<bool > cfgEventQAonly{" cfgEventQAonly" , false , " event loop only" };
148+
145149 Configurable<std::string> cfgDetName{" cfgDetName" , " FT0C" , " The name of detector to be analyzed" };
146150 Configurable<std::string> cfgRefAName{" cfgRefAName" , " TPCPos" , " The name of detector for reference A" };
147151 Configurable<std::string> cfgRefBName{" cfgRefBName" , " TPCNeg" , " The name of detector for reference B" };
@@ -187,6 +191,9 @@ struct JEPFlowAnalysis {
187191 std::string fullCCDBShiftCorrPath;
188192
189193 THn* effMap = nullptr ;
194+ TH3F * q2Map = nullptr ;
195+ float q2selHigh = 100 .;
196+ float q2selLow = 0 .;
190197
191198 std::vector<float > ft0RelGainConst{};
192199 std::vector<float > fv0RelGainConst{};
@@ -399,6 +406,11 @@ struct JEPFlowAnalysis {
399406
400407 q2Mag = std::sqrt (std::pow (qx_shifted[0 ], 2 ) + std::pow (qy_shifted[0 ], 2 ));
401408
409+ if (cfgq2analysis == 2 ) {
410+ q2selHigh = q2Map->GetBinContent (q2Map->GetXaxis ()->FindBin (i + 2 ), q2Map->GetYaxis ()->FindBin (cent), q2Map->GetZaxis ()->FindBin (cfgQ2SelFrac));
411+ q2selLow = q2Map->GetBinContent (q2Map->GetXaxis ()->FindBin (i + 2 ), q2Map->GetYaxis ()->FindBin (cent), q2Map->GetZaxis ()->FindBin (1 . - cfgQ2SelFrac));
412+ }
413+
402414 epFlowHistograms.fill (HIST (" EpDet" ), i + 2 , cent, eps[0 ]);
403415 epFlowHistograms.fill (HIST (" EpRefA" ), i + 2 , cent, eps[1 ]);
404416 epFlowHistograms.fill (HIST (" EpRefB" ), i + 2 , cent, eps[2 ]);
@@ -419,10 +431,10 @@ struct JEPFlowAnalysis {
419431 if (cfgJetSubEvtSel) {
420432 epFlowHistograms.fill (HIST (" EpResQvecEvslDetRefAxx" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[1 ] + qy_shifted[0 ] * qy_shifted[1 ]);
421433 epFlowHistograms.fill (HIST (" EpResQvecEvslDetRefBxx" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
422- epFlowHistograms.fill (HIST (" EpResQvecEvslRefARefBxy " ), i + 2 , cent, qx_shifted[2 ] * qy_shifted[ 1 ] - qx_shifted [1 ] * qy_shifted[2 ]);
434+ epFlowHistograms.fill (HIST (" EpResQvecEvslRefARefBxx " ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[ 2 ] + qy_shifted [1 ] * qy_shifted[2 ]);
423435 }
424436
425- if (cfgq2analysis) {
437+ if (cfgq2analysis == 1 ) {
426438 if (q2sel (q2Mag, true )) {
427439 epFlowHistograms.fill (HIST (" EpResQvecDetRefAxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[1 ] + qy_shifted[0 ] * qy_shifted[1 ]);
428440 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
@@ -432,6 +444,20 @@ struct JEPFlowAnalysis {
432444 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2low" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
433445 epFlowHistograms.fill (HIST (" EpResQvecRefARefBxx_q2low" ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
434446 }
447+ } else if (cfgq2analysis == 2 ) {
448+ if (q2Mag > q2selHigh) {
449+ epFlowHistograms.fill (HIST (" EpResQvecDetRefAxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[1 ] + qy_shifted[0 ] * qy_shifted[1 ]);
450+ epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
451+ epFlowHistograms.fill (HIST (" EpResQvecRefARefBxx_q2high" ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
452+ } else if (q2Mag < q2selLow) {
453+ epFlowHistograms.fill (HIST (" EpResQvecDetRefAxx_q2low" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[1 ] + qy_shifted[0 ] * qy_shifted[1 ]);
454+ epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2low" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
455+ epFlowHistograms.fill (HIST (" EpResQvecRefARefBxx_q2low" ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
456+ }
457+ }
458+
459+ if (cfgEventQAonly) {
460+ continue ;
435461 }
436462
437463 highestPt = 0.0 ;
@@ -458,12 +484,18 @@ struct JEPFlowAnalysis {
458484 epFlowHistograms.fill (HIST (" SPvnxx" ), i + 2 , cent, track.pt (), track.eta (), (std::cos (track.phi () * static_cast <float >(i + 2 )) * qx_shifted[0 ] + std::sin (track.phi () * static_cast <float >(i + 2 )) * qy_shifted[0 ]), weight);
459485 epFlowHistograms.fill (HIST (" SPvnxy" ), i + 2 , cent, track.pt (), track.eta (), (std::sin (track.phi () * static_cast <float >(i + 2 )) * qx_shifted[0 ] - std::cos (track.phi () * static_cast <float >(i + 2 )) * qy_shifted[0 ]), weight);
460486
461- if (cfgq2analysis) {
487+ if (cfgq2analysis == 1 ) {
462488 if (q2sel (q2Mag, true )) {
463489 epFlowHistograms.fill (HIST (" SPvnxx_q2high" ), i + 2 , cent, track.pt (), track.eta (), (std::cos (track.phi () * static_cast <float >(i + 2 )) * qx_shifted[0 ] + std::sin (track.phi () * static_cast <float >(i + 2 )) * qy_shifted[0 ]), weight);
464490 } else if (q2sel (q2Mag, false )) {
465491 epFlowHistograms.fill (HIST (" SPvnxx_q2low" ), i + 2 , cent, track.pt (), track.eta (), (std::cos (track.phi () * static_cast <float >(i + 2 )) * qx_shifted[0 ] + std::sin (track.phi () * static_cast <float >(i + 2 )) * qy_shifted[0 ]), weight);
466492 }
493+ } else if (cfgq2analysis == 2 ) {
494+ if (q2Mag > q2selHigh) {
495+ epFlowHistograms.fill (HIST (" SPvnxx_q2high" ), i + 2 , cent, track.pt (), track.eta (), (std::cos (track.phi () * static_cast <float >(i + 2 )) * qx_shifted[0 ] + std::sin (track.phi () * static_cast <float >(i + 2 )) * qy_shifted[0 ]), weight);
496+ } else if (q2Mag < q2selLow) {
497+ epFlowHistograms.fill (HIST (" SPvnxx_q2low" ), i + 2 , cent, track.pt (), track.eta (), (std::cos (track.phi () * static_cast <float >(i + 2 )) * qx_shifted[0 ] + std::sin (track.phi () * static_cast <float >(i + 2 )) * qy_shifted[0 ]), weight);
498+ }
467499 }
468500 }
469501 if (i == 0 ) { // second harmonic only
@@ -642,6 +674,16 @@ struct JEPFlowAnalysis {
642674 }
643675 }
644676
677+ if (cfgq2analysis == 2 ) {
678+ auto bc = coll.bc_as <aod::BCsWithTimestamps>();
679+ currentRunNumber = bc.runNumber ();
680+ if (currentRunNumber != lastRunNumber) {
681+ std::string fullPath;
682+ fullPath = cfgQselHistPath;
683+ q2Map = ccdb->getForTimeStamp <TH3F >(cfgQselHistPath, bc.timestamp ());
684+ }
685+ }
686+
645687 cent = coll.cent ();
646688 epFlowHistograms.fill (HIST (" hCentrality" ), cent);
647689 epFlowHistograms.fill (HIST (" hVertex" ), coll.posZ ());
0 commit comments