@@ -114,9 +114,10 @@ struct Dilepton {
114114 o2::framework::Configurable<std::string> spresoPath{" spresoPath" , " Users/d/dsekihat/PWGEM/dilepton/Qvector/resolution/LHC23zzh/pass3/test" , " Path to SP resolution file" };
115115 o2::framework::Configurable<std::string> spresoHistName{" spresoHistName" , " h1_R2_FT0M_BPos_BNeg" , " histogram name of SP resolution file" };
116116
117- o2::framework::Configurable<int > cfgAnalysisType{" cfgAnalysisType" , static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kQC ), " kQC:0, kUPC:1, kFlowV2 :2, kFlowV3 :3, kPolarization:4, kHFll:5, kBootstrapv2:6" };
117+ o2::framework::Configurable<int > cfgAnalysisType{" cfgAnalysisType" , static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kQC ), " kQC:0, kUPC:1, kFlowV2SP :2, kFlowV3SP :3, kPolarization:4, kHFll:5, kBootstrapv2:6, kFlowV2EP:7, kFlowV3EP:8 " };
118118 o2::framework::Configurable<int > cfgEP2Estimator_for_Mix{" cfgEP2Estimator_for_Mix" , 3 , " FT0M:0, FT0A:1, FT0C:2, BTot:3, BPos:4, BNeg:5, FV0A:6" };
119119 o2::framework::Configurable<int > cfgQvecEstimator{" cfgQvecEstimator" , 2 , " FT0M:0, FT0A:1, FT0C:2, BTot:3, BPos:4, BNeg:5, FV0A:6" };
120+ o2::framework::Configurable<int > cfgEPEstimator{" cfgEPEstimator" , 2 , " FT0M:0, FT0A:1, FT0C:2, BTot:3, BPos:4, BNeg:5, FV0A:6" };
120121 o2::framework::Configurable<int > cfgCentEstimator{" cfgCentEstimator" , 2 , " FT0M:0, FT0A:1, FT0C:2" };
121122 o2::framework::Configurable<int > cfgOccupancyEstimator{" cfgOccupancyEstimator" , 0 , " FT0C:0, Track:1" };
122123 o2::framework::Configurable<bool > cfgDoMix{" cfgDoMix" , true , " flag for event mixing" };
@@ -619,7 +620,7 @@ struct Dilepton {
619620 } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kUPC )) {
620621 const o2::framework::AxisSpec axis_aco{10 , 0 , 1 .f , " #alpha = 1 - #frac{|#varphi_{l^{+}} - #varphi_{l^{-}}|}{#pi}" };
621622 const o2::framework::AxisSpec axis_asym_pt{10 , 0 , 1 .f , " A = #frac{|p_{T,l^{+}} - p_{T,l^{-}}|}{|p_{T,l^{+}} + p_{T,l^{-}}|}" };
622- const o2::framework::AxisSpec axis_dphi_e_ee {18 , 0 , M_PI, " #Delta#varphi = #varphi_{l} - #varphi_{ll} (rad.)" };
623+ const o2::framework::AxisSpec axis_dphi_l_ll {18 , 0 , M_PI, " #Delta#varphi = #varphi_{l} - #varphi_{ll} (rad.)" };
623624
624625 std::string frameName = " CS" ;
625626 if (cfgPolarizationFrame == 0 ) {
@@ -630,14 +631,14 @@ struct Dilepton {
630631 LOG (fatal) << " set 0 or 1 to cfgPolarizationFrame!" ;
631632 }
632633 const o2::framework::AxisSpec axis_cos_theta{ConfPolarizationCosThetaBins, Form (" cos(#theta^{%s})" , frameName.data ())};
633- fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y, axis_aco, axis_asym_pt, axis_dphi_e_ee , axis_cos_theta}, true );
634+ fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y, axis_aco, axis_asym_pt, axis_dphi_l_ll , axis_cos_theta}, true );
634635 fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lspp/" );
635636 fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lsmm/" );
636637 fRegistry .addClone (" Pair/same/" , " Pair/mix/" );
637- } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2 ) || cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3 )) {
638- if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2 )) {
638+ } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2SP ) || cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3SP )) {
639+ if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2SP )) {
639640 nmod = 2 ;
640- } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3 )) {
641+ } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3SP )) {
641642 nmod = 3 ;
642643 }
643644
@@ -670,9 +671,9 @@ struct Dilepton {
670671 fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lsmm/" );
671672 fRegistry .addClone (" Pair/same/" , " Pair/mix/" );
672673 } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kHFll )) {
673- const o2::framework::AxisSpec axis_dphi_ee {36 , -M_PI / 2 ., 3 . / 2 . * M_PI, " #Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)" }; // for kHFll
674- const o2::framework::AxisSpec axis_deta_ee {40 , -2 ., 2 ., " #Delta#eta = #eta_{l1} - #eta_{l2}" };
675- fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y, axis_dphi_ee, axis_deta_ee }, true );
674+ const o2::framework::AxisSpec axis_dphi_ll {36 , -M_PI / 2 ., 3 . / 2 . * M_PI, " #Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)" }; // for kHFll
675+ const o2::framework::AxisSpec axis_deta_ll {40 , -2 ., 2 ., " #Delta#eta = #eta_{l1} - #eta_{l2}" };
676+ fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y, axis_dphi_ll, axis_deta_ll }, true );
676677 fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lspp/" );
677678 fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lsmm/" );
678679 fRegistry .addClone (" Pair/same/" , " Pair/mix/" );
@@ -687,6 +688,23 @@ struct Dilepton {
687688 fRegistry .addClone (" Pair/mix/uls/" , " Pair/mix/lspp/" );
688689 fRegistry .addClone (" Pair/mix/uls/" , " Pair/mix/lsmm/" );
689690 o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistogramsBootstrap (&fRegistry , cfgNumBootstrapSamples);
691+ } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2EP ) || cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3EP )) {
692+ if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2EP )) {
693+ nmod = 2 ;
694+ } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3EP )) {
695+ nmod = 3 ;
696+ }
697+
698+ // similar to Eq.1 in PRL 126, 162001 (2021)
699+ const o2::framework::AxisSpec axis_ep{4 , 0 , 2 * M_PI / nmod, Form (" #varphi_{ll} #minus #Psi_{%d}^{%s}" , nmod, qvec_det_names[cfgQvecEstimator].data ())};
700+
701+ fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y, axis_ep}, true );
702+ fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lspp/" );
703+ fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lsmm/" );
704+
705+ fRegistry .add (" Pair/mix/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y}, true );
706+ fRegistry .addClone (" Pair/mix/uls/" , " Pair/mix/lspp/" );
707+ fRegistry .addClone (" Pair/mix/uls/" , " Pair/mix/lsmm/" );
690708 } else { // same as kQC to avoid seg. fault
691709 fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y}, true );
692710 fRegistry .addClone (" Pair/same/uls/" , " Pair/same/lspp/" );
@@ -984,8 +1002,8 @@ struct Dilepton {
9841002 o2::math_utils::bringToPMPi (dphi);
9851003 float aco = 1 .f - std::fabs (dphi) / M_PI;
9861004 float asym = std::fabs (v1.Pt () - v2.Pt ()) / (v1.Pt () + v2.Pt ());
987- float dphi_e_ee = v1.Phi () - v12.Phi ();
988- o2::math_utils::bringToPMPi (dphi_e_ee );
1005+ float dphi_l_ll = v1.Phi () - v12.Phi ();
1006+ o2::math_utils::bringToPMPi (dphi_l_ll );
9891007
9901008 float cos_thetaPol = 999 , phiPol = 999 .f ;
9911009 auto arrM = std::array<float , 4 >{static_cast <float >(v12.Px ()), static_cast <float >(v12.Py ()), static_cast <float >(v12.Pz ()), static_cast <float >(v12.M ())};
@@ -1000,13 +1018,13 @@ struct Dilepton {
10001018 o2::math_utils::bringToPMPi (phiPol);
10011019
10021020 if (t1.sign () * t2.sign () < 0 ) { // ULS
1003- fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), aco, asym, std::fabs (dphi_e_ee ), cos_thetaPol, weight);
1021+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), aco, asym, std::fabs (dphi_l_ll ), cos_thetaPol, weight);
10041022 } else if (t1.sign () > 0 && t2.sign () > 0 ) { // LS++
1005- fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), aco, asym, std::fabs (dphi_e_ee ), cos_thetaPol, weight);
1023+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), aco, asym, std::fabs (dphi_l_ll ), cos_thetaPol, weight);
10061024 } else if (t1.sign () < 0 && t2.sign () < 0 ) { // LS--
1007- fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), aco, asym, std::fabs (dphi_e_ee ), cos_thetaPol, weight);
1025+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), aco, asym, std::fabs (dphi_l_ll ), cos_thetaPol, weight);
10081026 }
1009- } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2 ) || cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3 )) {
1027+ } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2SP ) || cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3SP )) {
10101028 std::array<float , 2 > q2ft0m = {collision.q2xft0m (), collision.q2yft0m ()};
10111029 std::array<float , 2 > q2ft0a = {collision.q2xft0a (), collision.q2yft0a ()};
10121030 std::array<float , 2 > q2ft0c = {collision.q2xft0c (), collision.q2yft0c ()};
@@ -1129,6 +1147,35 @@ struct Dilepton {
11291147 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
11301148 }
11311149 }
1150+ } else if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV2EP ) || cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kFlowV3EP )) {
1151+ if constexpr (ev_id == 0 ) {
1152+ std::vector<std::vector<float >> eventplanes = {
1153+ {0 .f , 0 .f , 0 .f , 0 .f , 0 .f , 0 .f , 0 .f }, // 0th harmonics
1154+ {0 .f , 0 .f , 0 .f , 0 .f , 0 .f , 0 .f , 0 .f }, // 1st harmonics
1155+ {collision.ep2ft0m (), collision.ep2ft0a (), collision.ep2ft0c (), collision.ep2btot (), collision.ep2bpos (), collision.ep2bneg (), collision.ep2fv0a ()}, // 2nd harmonics
1156+ {collision.ep3ft0m (), collision.ep3ft0a (), collision.ep3ft0c (), collision.ep3btot (), collision.ep3bpos (), collision.ep3bneg (), collision.ep3fv0a ()}, // 3rd harmonics
1157+ };
1158+
1159+ float ep = RecoDecay::constrainAngle (eventplanes[nmod][cfgEPEstimator], -o2::constants::math::PI / nmod, static_cast <uint>(nmod));
1160+ float phi_ll = RecoDecay::constrainAngle (v12.Phi (), -o2::constants::math::PI / nmod, 1U );
1161+ float dphi_ll_ep = std::fabs (RecoDecay::constrainAngle (phi_ll - ep, 0 .f , static_cast <uint>(nmod)));
1162+
1163+ if (t1.sign () * t2.sign () < 0 ) { // ULS
1164+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), dphi_ll_ep, weight);
1165+ } else if (t1.sign () > 0 && t2.sign () > 0 ) { // LS++
1166+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), dphi_ll_ep, weight);
1167+ } else if (t1.sign () < 0 && t2.sign () < 0 ) { // LS--
1168+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), dphi_ll_ep, weight);
1169+ }
1170+ } else if constexpr (ev_id == 1 ) {
1171+ if (t1.sign () * t2.sign () < 0 ) { // ULS
1172+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
1173+ } else if (t1.sign () > 0 && t2.sign () > 0 ) { // LS++
1174+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
1175+ } else if (t1.sign () < 0 && t2.sign () < 0 ) { // LS--
1176+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
1177+ }
1178+ }
11321179 } else { // same as kQC to avoid seg. fault
11331180 if (t1.sign () * t2.sign () < 0 ) { // ULS
11341181 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
0 commit comments