@@ -183,6 +183,7 @@ struct Dilepton {
183183 Configurable<float > cfg_min_phiv{" cfg_min_phiv" , 0.0 , " min phiv (constant)" };
184184 Configurable<float > cfg_max_phiv{" cfg_max_phiv" , 3.2 , " max phiv (constant)" };
185185 Configurable<bool > cfg_apply_detadphi{" cfg_apply_detadphi" , false , " flag to apply deta-dphi elliptic cut at PV" };
186+ Configurable<bool > cfg_apply_detadphiposition{" cfg_apply_detadphiposition" , false , " flag to apply deta-dphi elliptic cut at certain radius" };
186187 Configurable<float > cfg_min_deta{" cfg_min_deta" , 0.02 , " min deta between 2 electrons (elliptic cut)" };
187188 Configurable<float > cfg_min_dphi{" cfg_min_dphi" , 0.2 , " min dphi between 2 electrons (elliptic cut)" };
188189 Configurable<float > cfg_min_opang{" cfg_min_opang" , 0.0 , " min opening angle" };
@@ -218,6 +219,7 @@ struct Dilepton {
218219 Configurable<float > cfg_max_its_cluster_size{" cfg_max_its_cluster_size" , 16 .f , " max ITS cluster size" };
219220 Configurable<float > cfg_min_rel_diff_pin{" cfg_min_rel_diff_pin" , -1e+10 , " min rel. diff. between pin and ppv" };
220221 Configurable<float > cfg_max_rel_diff_pin{" cfg_max_rel_diff_pin" , +1e+10 , " max rel. diff. between pin and ppv" };
222+ Configurable<float > cfgRefR{" cfgRefR" , 1.2 , " reference R (in m) for extrapolation" }; // https://cds.cern.ch/record/1419204
221223
222224 Configurable<int > cfg_pid_scheme{" cfg_pid_scheme" , static_cast <int >(DielectronCut::PIDSchemes::kTPChadrejORTOFreq ), " pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif : 4, kPIDML : 5, kTPChadrejORTOFreq_woTOFif : 6]" };
223225 Configurable<float > cfg_min_TPCNsigmaEl{" cfg_min_TPCNsigmaEl" , -2.0 , " min. TPC n sigma for electron inclusion" };
@@ -304,7 +306,7 @@ struct Dilepton {
304306 o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE;
305307
306308 HistogramRegistry fRegistry {" output" , {}, OutputObjHandlingPolicy::AnalysisObject, false , false };
307- // static constexpr std::string_view event_cut_types[2] = {"before/", "after/"};
309+ static constexpr std::string_view event_cut_types[2 ] = {" before/" , " after/" };
308310 static constexpr std::string_view event_pair_types[2 ] = {" same/" , " mix/" };
309311
310312 std::vector<float > cent_bin_edges;
@@ -556,6 +558,7 @@ struct Dilepton {
556558 if (cfgAnalysisType == static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kQC )) {
557559 fRegistry .add (" Pair/same/uls/hs" , " dilepton" , kTHnSparseD , {axis_mass, axis_pt, axis_dca, axis_y}, true );
558560 fRegistry .add (" Pair/same/uls/hDeltaEtaDeltaPhi" , " #Delta#eta-#Delta#varphi between 2 tracks;#Delta#varphi (rad.);#Delta#eta;" , kTH2D , {{180 , -M_PI, M_PI}, {400 , -2 , +2 }}, true );
561+ fRegistry .add (" Pair/same/uls/hDeltaEtaDeltaPhiPosition" , " #Delta#eta-#Delta#varphi^{*} between 2 tracks;#Delta#varphi^{*} (rad.);#Delta#eta;" , kTH2D , {{180 , -M_PI, M_PI}, {400 , -2 , +2 }}, true );
559562
560563 if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron ) {
561564 fRegistry .add (" Pair/same/uls/hMvsPhiV" , " m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})" , kTH2D , {{90 , 0 , M_PI}, {100 , 0 .0f , 1 .0f }}, true ); // phiv is only for dielectron
@@ -676,7 +679,7 @@ struct Dilepton {
676679 fDielectronCut .SetPairDCARange (dielectroncuts.cfg_min_pair_dca3d , dielectroncuts.cfg_max_pair_dca3d ); // in sigma
677680 fDielectronCut .SetMaxMeePhiVDep ([&](float phiv) { return dielectroncuts.cfg_phiv_intercept + phiv * dielectroncuts.cfg_phiv_slope ; }, dielectroncuts.cfg_min_phiv , dielectroncuts.cfg_max_phiv );
678681 fDielectronCut .ApplyPhiV (dielectroncuts.cfg_apply_phiv );
679- fDielectronCut .SetMindEtadPhi (dielectroncuts.cfg_apply_detadphi , false , dielectroncuts.cfg_min_deta , dielectroncuts.cfg_min_dphi );
682+ fDielectronCut .SetMindEtadPhi (dielectroncuts.cfg_apply_detadphi , dielectroncuts. cfg_apply_detadphiposition , dielectroncuts.cfg_min_deta , dielectroncuts.cfg_min_dphi );
680683 fDielectronCut .SetPairOpAng (dielectroncuts.cfg_min_opang , dielectroncuts.cfg_max_opang );
681684 fDielectronCut .SetRequireDifferentSides (dielectroncuts.cfg_require_diff_sides );
682685
@@ -873,7 +876,7 @@ struct Dilepton {
873876 }
874877
875878 if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron ) {
876- if (!cut.IsSelectedPair (t1, t2, d_bz, 0 . f )) {
879+ if (!cut.IsSelectedPair (t1, t2, d_bz, dielectroncuts. cfgRefR )) {
877880 return false ;
878881 }
879882 } else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon ) {
@@ -925,12 +928,21 @@ struct Dilepton {
925928 float dphi = t1.sign () * v1.Pt () > t2.sign () * v2.Pt () ? v1.Phi () - v2.Phi () : v2.Phi () - v1.Phi ();
926929 o2::math_utils::bringToPMPi (dphi);
927930
931+ float phiPosition1 = t1.phi () + std::asin (t1.sign () * 0.30282 * (d_bz * 0.1 ) * dielectroncuts.cfgRefR / (2 .f * t1.pt ()));
932+ float phiPosition2 = t2.phi () + std::asin (t2.sign () * 0.30282 * (d_bz * 0.1 ) * dielectroncuts.cfgRefR / (2 .f * t2.pt ()));
933+
934+ phiPosition1 = RecoDecay::constrainAngle (phiPosition1, 0 , 1 ); // 0-2pi
935+ phiPosition2 = RecoDecay::constrainAngle (phiPosition2, 0 , 1 ); // 0-2pi
936+ float dphiPosition = t1.sign () * v1.Pt () > t2.sign () * v2.Pt () ? phiPosition1 - phiPosition2 : phiPosition2 - phiPosition1;
937+ o2::math_utils::bringToPMPi (dphiPosition);
938+
928939 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (t1.px (), t1.py (), t1.pz (), t2.px (), t2.py (), t2.pz (), t1.sign (), t2.sign (), d_bz);
929940 float opAng = o2::aod::pwgem::dilepton::utils::pairutil::getOpeningAngle (t1.px (), t1.py (), t1.pz (), t2.px (), t2.py (), t2.pz ());
930941
931942 if (t1.sign () * t2.sign () < 0 ) { // ULS
932943 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
933944 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hDeltaEtaDeltaPhi" ), dphi, deta, weight);
945+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hDeltaEtaDeltaPhiPosition" ), dphiPosition, deta, weight);
934946 if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron ) {
935947 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hMvsPhiV" ), phiv, v12.M (), weight);
936948 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hMvsOpAng" ), opAng, v12.M (), weight);
@@ -943,6 +955,7 @@ struct Dilepton {
943955 } else if (t1.sign () > 0 && t2.sign () > 0 ) { // LS++
944956 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
945957 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hDeltaEtaDeltaPhi" ), dphi, deta, weight);
958+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hDeltaEtaDeltaPhiPosition" ), dphiPosition, deta, weight);
946959 if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron ) {
947960 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hMvsPhiV" ), phiv, v12.M (), weight);
948961 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lspp/hMvsOpAng" ), opAng, v12.M (), weight);
@@ -955,6 +968,7 @@ struct Dilepton {
955968 } else if (t1.sign () < 0 && t2.sign () < 0 ) { // LS--
956969 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hs" ), v12.M (), v12.Pt (), pair_dca, v12.Rapidity (), weight);
957970 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hDeltaEtaDeltaPhi" ), dphi, deta, weight);
971+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hDeltaEtaDeltaPhiPosition" ), dphiPosition, deta, weight);
958972 if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron ) {
959973 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hMvsPhiV" ), phiv, v12.M (), weight);
960974 fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" lsmm/hMvsOpAng" ), opAng, v12.M (), weight);
@@ -1407,7 +1421,7 @@ struct Dilepton {
14071421 }
14081422
14091423 if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron ) {
1410- if (!cut.IsSelectedPair (t1, t2, d_bz, 0.0 )) {
1424+ if (!cut.IsSelectedPair (t1, t2, d_bz, dielectroncuts. cfgRefR )) {
14111425 return false ;
14121426 }
14131427 } else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon ) {
0 commit comments