@@ -116,6 +116,9 @@ struct FlowFlucGfwPp {
116116 static constexpr int kMinTracksPerEtaSideForGapCorrelation = 2 ;
117117 static constexpr int kMinTracksPerEtaRegionForThreeSubevents = 2 ;
118118
119+ static constexpr int EllipticQVectorHarmonic = 2 ;
120+ static constexpr int TriangularQVectorHarmonic = 3 ;
121+
119122 O2_DEFINE_CONFIGURABLE (cfgNbootstrap, int , 10 , " Number of subsamples" )
120123 O2_DEFINE_CONFIGURABLE (cfgIsMC, bool , false , " Is MC event" )
121124 O2_DEFINE_CONFIGURABLE (cfgCentEstimator, int , 0 , " 0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FV0A, 4:NTPV, 5:NGlobals, 6:MFT" )
@@ -165,7 +168,10 @@ struct FlowFlucGfwPp {
165168 O2_DEFINE_CONFIGURABLE (cfgNumQnBins, int , 10 , " Number of qn bins" );
166169 O2_DEFINE_CONFIGURABLE (cfgCentMax, float , 100 , " Maximum of centrality or multiplicity" );
167170 O2_DEFINE_CONFIGURABLE (cfgEvtSelCent, bool , true , " Choose event selector as centrality(true) or multicplity(false)" );
168- O2_DEFINE_CONFIGURABLE (cfgUseNegativeEtaHalfForq2, bool , true , " If true, use -eta half for q2 selection; otherwise use +eta half" );
171+ O2_DEFINE_CONFIGURABLE (cfgUseNegativeEtaHalfForq2, bool , true , " If true, use -eta half for qn selection; otherwise use +eta half" );
172+ O2_DEFINE_CONFIGURABLE (cfgQnSelectionHarmonic, int , 2 , " Harmonic n used to build the reduced q_n vector for event shape selection, use 2 for q2 and 3 for q3" );
173+ O2_DEFINE_CONFIGURABLE (cfgQnHistMax, float , 6 ., " Upper range for q_n calibration histograms" );
174+ O2_DEFINE_CONFIGURABLE (cfgBypassQnSelection, bool , false , " Bypass q_n event shape selection and fill one integral q-bin" );
169175 O2_DEFINE_CONFIGURABLE (cfgMinPtOnTPC, float , 0.2 , " minimum transverse momentum selection for TPC tracks participating in Q-vector reconstruction" );
170176 O2_DEFINE_CONFIGURABLE (cfgMaxPtOnTPC, float , 5 ., " maximum transverse momentum selection for TPC tracks participating in Q-vector reconstruction" );
171177 O2_DEFINE_CONFIGURABLE (cfgEtaMax, float , 0.8 , " Maximum pseudorapidiy for charged track" );
@@ -304,6 +310,11 @@ struct FlowFlucGfwPp {
304310 return " ese" ;
305311 }
306312
313+ int getNQnOutputBins ()
314+ {
315+ return static_cast <bool >(cfgBypassQnSelection) ? 1 : static_cast <int >(cfgNumQnBins);
316+ }
317+
307318 // region indices for consistency flag
308319 int posRegionIndex = -1 ;
309320 int negRegionIndex = -1 ;
@@ -447,6 +458,17 @@ struct FlowFlucGfwPp {
447458 int ptbins = o2::analysis::gfwflowflucpp::ptbinning.size () - 1 ;
448459 fSecondAxis = (cfgTimeDependent) ? new TAxis (timeAxis.binEdges .size () - 1 , &(timeAxis.binEdges [0 ])) : new TAxis (ptbins, &o2::analysis::gfwflowflucpp::ptbinning[0 ]);
449460
461+ if (static_cast <bool >(cfgBypassQnSelection)) {
462+ LOGF (info, " Bypassing q_n event shape selection, all accepted events will be filled into the integral bin ese_0" );
463+ if (static_cast <int >(cfgNumQnBins) != 1 ) {
464+ LOGF (warning, " cfgBypassQnSelection is on, cfgNumQnBins=%d will be ignored and only one output q-bin will be made" , static_cast <int >(cfgNumQnBins));
465+ }
466+ } else {
467+ LOGF (info, " Event-shape selector uses q_%d from the %s eta half" ,
468+ static_cast <int >(cfgQnSelectionHarmonic),
469+ static_cast <bool >(cfgUseNegativeEtaHalfForq2) ? " negative" : " positive" );
470+ }
471+
450472 if (cfgQvecQA && (doprocessData || doprocessq2)) {
451473 // qVectorsTable-equivalent TPC-track QA for the in-task raw TPC Q-vector loop.
452474 AxisSpec qVecAxisPt = {40 , 0.0 , 4.0 };
@@ -461,11 +483,24 @@ struct FlowFlucGfwPp {
461483 }
462484
463485 if (doprocessq2) {
464- registry.add (" mq2/eventcounter" , " " , HistType::kTH1F , {{10 , 0 , 10 }});
465- registry.add (" mq2/h2_cent_q2_etapos" , " ;Centrality;#it{q}_{2}^{#eta pos};" , HistType::kTH2D , {{100 , 0 , 100 }, {600 , 0 , 6 }});
466- registry.add (" mq2/h2_cent_q2_etaneg" , " ;Centrality;#it{q}_{2}^{#eta neg};" , HistType::kTH2D , {{100 , 0 , 100 }, {600 , 0 , 6 }});
467- registry.add (" mq2/h2_mult_q2_etapos" , " ;Multiplicity;#it{q}_{2}^{#eta pos};" , HistType::kTH2D , {{150 , 0 , 150 }, {600 , 0 , 6 }});
468- registry.add (" mq2/h2_mult_q2_etaneg" , " ;Multiplicity;#it{q}_{2}^{#eta neg};" , HistType::kTH2D , {{150 , 0 , 150 }, {600 , 0 , 6 }});
486+ const int qnHarmonic = static_cast <int >(cfgQnSelectionHarmonic);
487+ const double qnHistMax = static_cast <double >(cfgQnHistMax);
488+
489+ if (qnHarmonic == EllipticQVectorHarmonic) {
490+ registry.add (" mq2/eventcounter" , " " , HistType::kTH1F , {{10 , 0 , 10 }});
491+ registry.add (" mq2/h2_cent_q2_etapos" , " ;Centrality;#it{q}_{2}^{#eta pos};" , HistType::kTH2D , {{100 , 0 , 100 }, {600 , 0 , qnHistMax}});
492+ registry.add (" mq2/h2_cent_q2_etaneg" , " ;Centrality;#it{q}_{2}^{#eta neg};" , HistType::kTH2D , {{100 , 0 , 100 }, {600 , 0 , qnHistMax}});
493+ registry.add (" mq2/h2_mult_q2_etapos" , " ;Multiplicity;#it{q}_{2}^{#eta pos};" , HistType::kTH2D , {{150 , 0 , 150 }, {600 , 0 , qnHistMax}});
494+ registry.add (" mq2/h2_mult_q2_etaneg" , " ;Multiplicity;#it{q}_{2}^{#eta neg};" , HistType::kTH2D , {{150 , 0 , 150 }, {600 , 0 , qnHistMax}});
495+ }
496+
497+ if (qnHarmonic == TriangularQVectorHarmonic) {
498+ registry.add (" mq3/eventcounter" , " " , HistType::kTH1F , {{10 , 0 , 10 }});
499+ registry.add (" mq3/h2_cent_q3_etapos" , " ;Centrality;#it{q}_{3}^{#eta pos};" , HistType::kTH2D , {{100 , 0 , 100 }, {600 , 0 , qnHistMax}});
500+ registry.add (" mq3/h2_cent_q3_etaneg" , " ;Centrality;#it{q}_{3}^{#eta neg};" , HistType::kTH2D , {{100 , 0 , 100 }, {600 , 0 , qnHistMax}});
501+ registry.add (" mq3/h2_mult_q3_etapos" , " ;Multiplicity;#it{q}_{3}^{#eta pos};" , HistType::kTH2D , {{150 , 0 , 150 }, {600 , 0 , qnHistMax}});
502+ registry.add (" mq3/h2_mult_q3_etaneg" , " ;Multiplicity;#it{q}_{3}^{#eta neg};" , HistType::kTH2D , {{150 , 0 , 150 }, {600 , 0 , qnHistMax}});
503+ }
469504 }
470505
471506 if (doprocessData) {
@@ -857,8 +892,9 @@ struct FlowFlucGfwPp {
857892 void addConfigObjectsToObjArray (TObjArray* oba, const std::vector<GFW::CorrConfig>& configs)
858893 {
859894 const auto shapeSel = getShapeSel ();
895+ const int nQnOutputBins = getNQnOutputBins ();
860896 for (auto it = configs.begin (); it != configs.end (); ++it) {
861- for (int jese = 0 ; jese < cfgNumQnBins ; ++jese) {
897+ for (int jese = 0 ; jese < nQnOutputBins ; ++jese) {
862898 std::string name = Form (" %s_%d_%s" , shapeSel.c_str (), jese, it->Head .c_str ());
863899 std::string title = it->Head + std::string (" _ese" );
864900 oba->Add (new TNamed (name.c_str (), title.c_str ()));
@@ -1340,6 +1376,34 @@ struct FlowFlucGfwPp {
13401376 return static_cast <double >(diff) / 3600000.0 ;
13411377 }
13421378
1379+ void fillQnEventCounter (float count)
1380+ {
1381+ const int qnHarmonic = static_cast <int >(cfgQnSelectionHarmonic);
1382+
1383+ if (qnHarmonic == EllipticQVectorHarmonic) {
1384+ registry.fill (HIST (" mq2/eventcounter" ), count);
1385+ } else if (qnHarmonic == TriangularQVectorHarmonic) {
1386+ registry.fill (HIST (" mq3/eventcounter" ), count);
1387+ }
1388+ }
1389+
1390+ void fillQnCalibrationHistograms (float centrality, float multiplicity, float qnPos, float qnNeg)
1391+ {
1392+ const int qnHarmonic = static_cast <int >(cfgQnSelectionHarmonic);
1393+
1394+ if (qnHarmonic == EllipticQVectorHarmonic) {
1395+ registry.fill (HIST (" mq2/h2_cent_q2_etapos" ), centrality, qnPos);
1396+ registry.fill (HIST (" mq2/h2_cent_q2_etaneg" ), centrality, qnNeg);
1397+ registry.fill (HIST (" mq2/h2_mult_q2_etapos" ), multiplicity, qnPos);
1398+ registry.fill (HIST (" mq2/h2_mult_q2_etaneg" ), multiplicity, qnNeg);
1399+ } else if (qnHarmonic == TriangularQVectorHarmonic) {
1400+ registry.fill (HIST (" mq3/h2_cent_q3_etapos" ), centrality, qnPos);
1401+ registry.fill (HIST (" mq3/h2_cent_q3_etaneg" ), centrality, qnNeg);
1402+ registry.fill (HIST (" mq3/h2_mult_q3_etapos" ), multiplicity, qnPos);
1403+ registry.fill (HIST (" mq3/h2_mult_q3_etaneg" ), multiplicity, qnNeg);
1404+ }
1405+ }
1406+
13431407 void processData (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults,
13441408 aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms,
13451409 aod::CentFV0As, aod::CentNTPVs, aod::CentNGlobals,
@@ -1406,15 +1470,18 @@ struct FlowFlucGfwPp {
14061470 if (cfgFillQA)
14071471 fillEventQA<kAfter >(collision, xaxis);
14081472
1409- const auto qvecTPC = calcQVec (2 , tracks, collision);
1410- float qn = computeqnVec (qvecTPC, cfgUseNegativeEtaHalfForq2);
1411- if (qn < 0 )
1412- return ;
1473+ int qPtmp = 0 ;
1474+ if (!static_cast <bool >(cfgBypassQnSelection)) {
1475+ const auto qvecTPC = calcQVec (static_cast <int >(cfgQnSelectionHarmonic), tracks, collision);
1476+ float qn = computeqnVec (qvecTPC, cfgUseNegativeEtaHalfForq2);
1477+ if (qn < 0 )
1478+ return ;
14131479
1414- int qPtmp = myqnBin (cfgEvtSelCent ? xaxis.centrality : xaxis.multiplicity ,
1415- cfgCentMax, qn, qnBinSeparator, cfgNumQnBins);
1416- if (qPtmp < 0 )
1417- return ;
1480+ qPtmp = myqnBin (cfgEvtSelCent ? xaxis.centrality : xaxis.multiplicity ,
1481+ cfgCentMax, qn, qnBinSeparator, cfgNumQnBins);
1482+ if (qPtmp < 0 )
1483+ return ;
1484+ }
14181485
14191486 processCollision<kReco >(collision, tracks, xaxis, run, qPtmp);
14201487 }
@@ -1423,40 +1490,37 @@ struct FlowFlucGfwPp {
14231490 void processq2 (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNTPVs, aod::CentNGlobals, aod::CentMFTs>>::iterator const & collision, aod::BCsWithTimestamps const &, GFWTracks const & tracks)
14241491 {
14251492 float count{0.5 };
1426- registry. fill ( HIST ( " mq2/eventcounter " ), count++);
1493+ fillQnEventCounter ( count++);
14271494 if (!collision.sel8 ()) {
14281495 return ;
14291496 }
1430- registry. fill ( HIST ( " mq2/eventcounter " ), count++);
1497+ fillQnEventCounter ( count++);
14311498 if (cfgDoOccupancySel) {
14321499 int occupancy = collision.trackOccupancyInTimeRange ();
14331500 if (occupancy < 0 || occupancy > cfgOccupancySelection) {
14341501 return ;
14351502 }
14361503 }
1437- registry. fill ( HIST ( " mq2/eventcounter " ), count++);
1504+ fillQnEventCounter ( count++);
14381505
14391506 const XAxis xaxis{getCentrality (collision), collision.multNTracksPV (), -1.0 };
14401507 if (!eventSelected (collision, xaxis.multiplicity , xaxis.centrality , -1 ))
14411508 return ;
14421509
14431510 const auto centr = xaxis.centrality ;
14441511 const auto multi = xaxis.multiplicity ;
1445- const auto qvecTPC = calcQVec (2 , tracks, collision);
1512+ const auto qvecTPC = calcQVec (static_cast < int >(cfgQnSelectionHarmonic) , tracks, collision);
14461513 const auto qvecPos = computeqnVec (qvecTPC, false );
14471514 const auto qvecNeg = computeqnVec (qvecTPC, true );
14481515
14491516 if (!std::isfinite (qvecPos) || !std::isfinite (qvecNeg) || qvecPos < 0 || qvecNeg < 0 ) {
14501517 return ;
14511518 }
14521519
1453- registry.fill (HIST (" mq2/eventcounter" ), count++);
1454- registry.fill (HIST (" mq2/h2_cent_q2_etapos" ), centr, qvecPos);
1455- registry.fill (HIST (" mq2/h2_cent_q2_etaneg" ), centr, qvecNeg);
1456- registry.fill (HIST (" mq2/h2_mult_q2_etapos" ), multi, qvecPos);
1457- registry.fill (HIST (" mq2/h2_mult_q2_etaneg" ), multi, qvecNeg);
1520+ fillQnEventCounter (count++);
1521+ fillQnCalibrationHistograms (centr, multi, qvecPos, qvecNeg);
14581522 }
1459- PROCESS_SWITCH (FlowFlucGfwPp, processq2, " Process analysis for filling q-vectors " , true );
1523+ PROCESS_SWITCH (FlowFlucGfwPp, processq2, " Process analysis for filling q_n-vector calibration histograms " , true );
14601524};
14611525
14621526WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments