@@ -91,6 +91,7 @@ GFWRegions regions;
9191GFWCorrConfigs configs;
9292GFWCorrConfigs configsV02;
9393GFWCorrConfigs configsV0;
94+ std::vector<std::pair<double , double >> etagapsPtPt;
9495std::vector<double > multGlobalCorrCutPars;
9596std::vector<double > multPVCorrCutPars;
9697std::vector<double > multGlobalPVCorrCutPars;
@@ -122,6 +123,7 @@ auto readMatrix(Array2D<T> const& mat, P& array)
122123
123124static constexpr float LongArrayFloat[3 ][20 ] = {{1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 }, {2.1 , 2.2 , 2.3 , -2.1 , -2.2 , -2.3 , 1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 }, {3.1 , 3.2 , 3.3 , -3.1 , -3.2 , -3.3 , 1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 , 1.3 , -1.1 , -1.2 , -1.3 , 1.1 , 1.2 }};
124125static constexpr int LongArrayInt[3 ][20 ] = {{1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 }, {2 , 2 , 2 , -2 , -2 , -2 , 1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 }, {3 , 3 , 3 , -3 , -3 , -3 , 1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 , 1 , -1 , -1 , -1 , 1 , 1 }};
126+ static constexpr double LongArrayDouble[4 ][2 ] = {{-0.8 , -0.5 }, {0.5 , 0.8 }, {-2 , -2 }, {-2 , -2 }};
125127
126128struct FlowGenericFramework {
127129
@@ -145,6 +147,8 @@ struct FlowGenericFramework {
145147 O2_DEFINE_CONFIGURABLE (cfgEta, float , 0.8 , " eta cut" );
146148 O2_DEFINE_CONFIGURABLE (cfgEtaPtPt, float , 0.4 , " eta cut for pt-pt correlations" );
147149 O2_DEFINE_CONFIGURABLE (cfgEtaNch, float , 0.4 , " eta cut for nch selection" );
150+ O2_DEFINE_CONFIGURABLE (cfgEtaV0Daughters, float , 0.5 , " eta cut on V0 daughter particles" );
151+ Configurable<LabeledArray<double >> cfgPtPtGaps{" cfgPtPtGaps" , {LongArrayDouble[0 ], 4 , 2 , {" subevent 1" , " subevent 2" , " subevent 3" , " subevent 4" }, {" etamin" , " etamax" }}, " {etamin,etamax} for all ptpt-subevents" };
148152 O2_DEFINE_CONFIGURABLE (cfgUsePIDTotal, bool , false , " use fraction of PID total" );
149153 O2_DEFINE_CONFIGURABLE (cfgVtxZ, float , 10 , " vertex cut (cm)" );
150154 struct : ConfigurableGroup {
@@ -360,7 +364,7 @@ struct FlowGenericFramework {
360364 kUseV0Radius
361365 };
362366 enum V0Selection {
363- kFillCandidate = 0 ,
367+ kFillCandidate = 1 ,
364368 kFillDaughterPt ,
365369 kFillMassCut ,
366370 kFillRapidityCut ,
@@ -469,6 +473,16 @@ struct FlowGenericFramework {
469473 readMatrix (cfgPIDCuts.resonanceSwitches ->getData (), resoSwitchVals);
470474 printResoCuts ();
471475
476+ for (int i = 0 ; i < 4 ; ++i) { // o2-linter: disable=magic-number (maximum of 4 subevents)
477+ if (cfgPtPtGaps->getData ()[i][0 ] < -1 . || cfgPtPtGaps->getData ()[i][1 ] < -1 .)
478+ continue ;
479+ o2::analysis::gfw::etagapsPtPt.push_back (std::make_pair (cfgPtPtGaps->getData ()[i][0 ], cfgPtPtGaps->getData ()[i][1 ]));
480+ }
481+
482+ for (const auto & [etamin, etamax] : o2::analysis::gfw::etagapsPtPt) {
483+ LOGF (info, " pt-pt subevent: {%.1f,%.1f}" , etamin, etamax);
484+ }
485+
472486 AxisSpec phiAxis = {o2::analysis::gfw::phibins, o2::analysis::gfw::philow, o2::analysis::gfw::phiup, " #phi" };
473487 AxisSpec phiModAxis = {100 , 0 , constants::math::PI / 9 , " fmod(#varphi,#pi/9)" };
474488 AxisSpec etaAxis = {o2::analysis::gfw::etabins, -cfgEta, cfgEta, " #eta" };
@@ -681,6 +695,7 @@ struct FlowGenericFramework {
681695 fFCpt ->setUseCentralMoments (cfgUseCentralMoments);
682696 fFCpt ->setUseGapMethod (cfgUseGapMethod);
683697 fFCpt ->initialise (multAxis, cfgMpar, o2::analysis::gfw::configs, cfgNbootstrap);
698+ fFCpt ->initialiseSubevent (multAxis, cfgMpar, o2::analysis::gfw::etagapsPtPt.size (), cfgNbootstrap);
684699
685700 // Multiplicity correlation cuts
686701 if (cfgMultCut) {
@@ -1229,8 +1244,11 @@ struct FlowGenericFramework {
12291244 void fillOutputContainers (const float & centmult, const double & rndm, AcceptedTracks acceptedtracks)
12301245 {
12311246 fFCpt ->calculateCorrelations ();
1247+ fFCpt ->calculateSubeventCorrelations ();
12321248 fFCpt ->fillPtProfiles (centmult, rndm);
1249+ fFCpt ->fillSubeventPtProfiles (centmult, rndm);
12331250 fFCpt ->fillCMProfiles (centmult, rndm);
1251+ fFCpt ->fillCMSubeventProfiles (centmult, rndm);
12341252 if (!cfgUseGapMethod)
12351253 fFCpt ->fillVnPtStdProfiles (centmult, rndm);
12361254
@@ -1307,10 +1325,14 @@ struct FlowGenericFramework {
13071325
13081326 if (corrconfigsV0.size () < SPECIESCOUNT)
13091327 return ;
1310- if (fFCpt ->corrDen [0 ] == 0 .)
1328+ if (fFCpt ->corrDenSub [0 ][1 ] == 0 . || fFCpt ->corrDenSub [1 ][1 ] == 0 .)
1329+ return ;
1330+ double mpt_sub1 = fFCpt ->corrNumSub [0 ][1 ] / fFCpt ->corrDenSub [0 ][1 ];
1331+ double mpt_sub2 = fFCpt ->corrNumSub [1 ][1 ] / fFCpt ->corrDenSub [1 ][1 ];
1332+ double mpt = 0.5 * (mpt_sub1 + mpt_sub2);
1333+ if (std::isnan (mpt))
13111334 return ;
13121335 for (uint l_ind = 0 ; l_ind < SPECIESCOUNT; ++l_ind) {
1313- double mpt = fFCpt ->corrNum [1 ] / fFCpt ->corrDen [1 ];
13141336 for (int i = 1 ; i <= fPtAxis ->GetNbins (); i++) {
13151337 (dt == kGen ) ? fFCgen ->FillProfile (Form (" %s_pt_%i" , corrconfigsV0.at (l_ind).Head .c_str (), i), centmult, mpt * fractions[l_ind][i - 1 ], 1 ., rndm) : fFC ->FillProfile (Form (" %s_pt_%i" , corrconfigsV0.at (l_ind).Head .c_str (), i), centmult, mpt * fractions[l_ind][i - 1 ], 1 ., rndm);
13161338 }
@@ -1473,11 +1495,17 @@ struct FlowGenericFramework {
14731495 (dt == kGen ) ? fFCgen ->FillProfile (Form (" %s_pt_%i" , corrconfigsV02.at (l_ind).Head .c_str (), i), centrality, val * fractions_resonances[l_ind - 4 ][i - 1 ], dnx, lRandom) : fFC ->FillProfile (Form (" %s_pt_%i" , corrconfigsV02.at (l_ind).Head .c_str (), i), centrality, val * fractions_resonances[l_ind - 4 ][i - 1 ], dnx, lRandom);
14741496 }
14751497 }
1498+
1499+ if (fFCpt ->corrDenSub [0 ][1 ] == 0 . || fFCpt ->corrDenSub [1 ][1 ] == 0 .)
1500+ return ;
1501+
1502+ double mpt_sub1 = fFCpt ->corrNumSub [0 ][1 ] / fFCpt ->corrDenSub [0 ][1 ];
1503+ double mpt_sub2 = fFCpt ->corrNumSub [1 ][1 ] / fFCpt ->corrDenSub [1 ][1 ];
1504+ double mpt = 0.5 * (mpt_sub1 + mpt_sub2);
1505+ if (std::isnan (mpt))
1506+ return ;
1507+
14761508 for (uint l_ind = 4 ; l_ind < corrconfigsV0.size (); ++l_ind) {
1477- double dn = fFCpt ->corrDen [1 ];
1478- if (dn == 0 .)
1479- continue ;
1480- double mpt = fFCpt ->corrNum [1 ] / dn;
14811509 for (int i = 1 ; i <= fPtAxis ->GetNbins (); i++) {
14821510 (dt == kGen ) ? fFCgen ->FillProfile (Form (" %s_pt_%i" , corrconfigsV0.at (l_ind).Head .c_str (), i), centrality, mpt * fractions_resonances[l_ind - 4 ][i - 1 ], 1.0 , lRandom) : fFC ->FillProfile (Form (" %s_pt_%i" , corrconfigsV0.at (l_ind).Head .c_str (), i), centrality, mpt * fractions_resonances[l_ind - 4 ][i - 1 ], 1.0 , lRandom);
14831511 }
@@ -1685,6 +1713,10 @@ struct FlowGenericFramework {
16851713 return false ;
16861714 }
16871715
1716+ // Eta cuts on daughter particles to remove self-correlations with correlated observables
1717+ if (std::abs (track.eta ()) > cfgEtaV0Daughters)
1718+ return false ;
1719+
16881720 return true ;
16891721 }
16901722
@@ -1864,8 +1896,19 @@ struct FlowGenericFramework {
18641896 double weff = (dt == kGen ) ? 1 . : getEfficiency (track);
18651897 if (weff < 0 )
18661898 return ;
1899+
1900+ // Fill the nominal sums
18671901 if (std::abs (track.eta ()) < cfgEtaPtPt)
18681902 fFCpt ->fill (weff, track.pt ());
1903+
1904+ // Fill the subevent sums
1905+ std::size_t index = 0 ;
1906+ for (const auto & [etamin, etamax] : o2::analysis::gfw::etagapsPtPt) {
1907+ if (etamin < track.eta () && track.eta () < etamax) {
1908+ fFCpt ->fillSub (weff, track.pt (), index);
1909+ }
1910+ ++index;
1911+ }
18691912 if (!cfgUseGapMethod) {
18701913 std::complex <double > q2p = {weff * wacc * std::cos (2 * track.phi ()), weff * wacc * std::sin (2 * track.phi ())};
18711914 std::complex <double > q2n = {weff * wacc * std::cos (-2 * track.phi ()), weff * wacc * std::sin (-2 * track.phi ())};
0 commit comments