@@ -72,6 +72,11 @@ using MyCollisionsMC = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, a
7272using MyTracksMC = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::McTrackLabels>;
7373
7474struct JEPFlowAnalysis {
75+ enum Q2selMethod {
76+ kNosel = 0 ,
77+ kHsel ,
78+ kHistsel
79+ };
7580
7681 Service<o2::framework::O2DatabasePDG> pdg;
7782
@@ -146,6 +151,9 @@ struct JEPFlowAnalysis {
146151 Configurable<std::string> cfgQselHistPath{" cfgQselHistPath" , " " , " CCDB path for q2 histogram" };
147152 Configurable<bool > cfgEventQAonly{" cfgEventQAonly" , false , " event loop only" };
148153
154+ Configurable<bool > cfgSelEvtTwoHP{" cfgSelEvtTwoHP" , false , " event selection with two high pT" };
155+ Configurable<float > cfgHighPtSel{" cfgHighPtSel" , 5.0 , " pT threshold with cfgSelEvtTwoHP" };
156+
149157 Configurable<std::string> cfgDetName{" cfgDetName" , " FT0C" , " The name of detector to be analyzed" };
150158 Configurable<std::string> cfgRefAName{" cfgRefAName" , " TPCPos" , " The name of detector for reference A" };
151159 Configurable<std::string> cfgRefBName{" cfgRefBName" , " TPCNeg" , " The name of detector for reference B" };
@@ -195,6 +203,9 @@ struct JEPFlowAnalysis {
195203 float q2selHigh = 100 .;
196204 float q2selLow = 0 .;
197205
206+ int nHighPt = 0 ;
207+ int minnHighPt = 2 ;
208+
198209 std::vector<float > ft0RelGainConst{};
199210 std::vector<float > fv0RelGainConst{};
200211
@@ -406,11 +417,25 @@ struct JEPFlowAnalysis {
406417
407418 q2Mag = std::sqrt (std::pow (qx_shifted[0 ], 2 ) + std::pow (qy_shifted[0 ], 2 ));
408419
409- if (cfgq2analysis == 2 ) {
420+ if (cfgq2analysis == kHistsel ) {
410421 q2selHigh = q2Map->GetBinContent (q2Map->GetXaxis ()->FindBin (i + 2 ), q2Map->GetYaxis ()->FindBin (cent), q2Map->GetZaxis ()->FindBin (cfgQ2SelFrac));
411422 q2selLow = q2Map->GetBinContent (q2Map->GetXaxis ()->FindBin (i + 2 ), q2Map->GetYaxis ()->FindBin (cent), q2Map->GetZaxis ()->FindBin (1 . - cfgQ2SelFrac));
412423 }
413424
425+ if (cfgSelEvtTwoHP && i == 0 ) {
426+ nHighPt = 0 ;
427+ for (const auto & track : tracks) {
428+ if (cfgTrkSelFlag && trackSel (track))
429+ continue ;
430+
431+ if (track.pt () > cfgHighPtSel)
432+ nHighPt++;
433+ }
434+ }
435+
436+ if (cfgSelEvtTwoHP && nHighPt < minnHighPt)
437+ continue ;
438+
414439 epFlowHistograms.fill (HIST (" EpDet" ), i + 2 , cent, eps[0 ]);
415440 epFlowHistograms.fill (HIST (" EpRefA" ), i + 2 , cent, eps[1 ]);
416441 epFlowHistograms.fill (HIST (" EpRefB" ), i + 2 , cent, eps[2 ]);
@@ -434,7 +459,7 @@ struct JEPFlowAnalysis {
434459 epFlowHistograms.fill (HIST (" EpResQvecEvslRefARefBxx" ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
435460 }
436461
437- if (cfgq2analysis == 1 ) {
462+ if (cfgq2analysis == kHsel ) {
438463 if (q2sel (q2Mag, true )) {
439464 epFlowHistograms.fill (HIST (" EpResQvecDetRefAxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[1 ] + qy_shifted[0 ] * qy_shifted[1 ]);
440465 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
@@ -444,7 +469,7 @@ struct JEPFlowAnalysis {
444469 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2low" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
445470 epFlowHistograms.fill (HIST (" EpResQvecRefARefBxx_q2low" ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
446471 }
447- } else if (cfgq2analysis == 2 ) {
472+ } else if (cfgq2analysis == kHistsel ) {
448473 if (q2Mag > q2selHigh) {
449474 epFlowHistograms.fill (HIST (" EpResQvecDetRefAxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[1 ] + qy_shifted[0 ] * qy_shifted[1 ]);
450475 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx_q2high" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
@@ -484,13 +509,13 @@ struct JEPFlowAnalysis {
484509 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);
485510 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);
486511
487- if (cfgq2analysis == 1 ) {
512+ if (cfgq2analysis == kHsel ) {
488513 if (q2sel (q2Mag, true )) {
489514 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);
490515 } else if (q2sel (q2Mag, false )) {
491516 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);
492517 }
493- } else if (cfgq2analysis == 2 ) {
518+ } else if (cfgq2analysis == kHistsel ) {
494519 if (q2Mag > q2selHigh) {
495520 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);
496521 } else if (q2Mag < q2selLow) {
@@ -674,7 +699,7 @@ struct JEPFlowAnalysis {
674699 }
675700 }
676701
677- if (cfgq2analysis == 2 ) {
702+ if (cfgq2analysis == kHistsel ) {
678703 auto bc = coll.bc_as <aod::BCsWithTimestamps>();
679704 currentRunNumber = bc.runNumber ();
680705 if (currentRunNumber != lastRunNumber) {
0 commit comments