Skip to content

Commit d8270ec

Browse files
authored
PWGEM/Dilepton: bug fix after #8100 and #8146 (#8170)
1 parent 94ea5af commit d8270ec

4 files changed

Lines changed: 18 additions & 40 deletions

File tree

PWGEM/Dilepton/Core/DielectronCut.cxx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,11 @@ void DielectronCut::SetMeeRange(float min, float max)
4545
mMaxMee = max;
4646
LOG(info) << "Dielectron Cut, set mee range: " << mMinMee << " - " << mMaxMee;
4747
}
48-
void DielectronCut::SetPairDeltaEta(float minDeltaEta, float maxDeltaEta)
49-
{
50-
mMinDeltaEta = minDeltaEta;
51-
mMaxDeltaEta = maxDeltaEta;
52-
LOG(info) << "Dielectron Cut, set pair delta eta range: " << mMinDeltaEta << " - " << mMaxDeltaEta;
53-
}
54-
void DielectronCut::SetPairDeltaPhi(float minDeltaPhi, float maxDeltaPhi)
55-
{
56-
mMinDeltaPhi = minDeltaPhi;
57-
mMaxDeltaPhi = maxDeltaPhi;
58-
LOG(info) << "Dielectron Cut, set pair delta phi range: " << mMinDeltaEta << " - " << mMaxDeltaEta;
59-
}
6048
void DielectronCut::SetPairOpAng(float minOpAng, float maxOpAng)
6149
{
6250
mMinOpAng = minOpAng;
6351
mMaxOpAng = maxOpAng;
64-
LOG(info) << "Dielectron Cut, set pair opening angle range: " << mMinDeltaEta << " - " << mMaxDeltaEta;
52+
LOG(info) << "Dielectron Cut, set pair opening angle range: " << mMinOpAng << " - " << mMaxOpAng;
6553
}
6654
void DielectronCut::SetMaxPhivPairMeeDep(std::function<float(float)> meeDepCut)
6755
{

PWGEM/Dilepton/Core/DielectronCut.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@ class DielectronCut : public TNamed
142142
o2::math_utils::bringToPMPi(dphi);
143143
if (mApplydEtadPhi && std::pow(deta / mMinDeltaEta, 2) + std::pow(dphi / mMinDeltaPhi, 2) < 1.f) {
144144
return false;
145-
} else {
146-
if (deta < mMinDeltaEta || deta > mMaxDeltaEta) {
147-
return false;
148-
}
149-
if (deta < mMinDeltaPhi || deta > mMaxDeltaPhi) {
150-
return false;
151-
}
152145
}
153146

154147
return true;
@@ -389,8 +382,6 @@ class DielectronCut : public TNamed
389382
void SetPairYRange(float minY = -1e10f, float maxY = 1e10f);
390383
void SetPairDCARange(float min = 0.f, float max = 1e10f); // 3D DCA in sigma
391384
void SetMeeRange(float min = 0.f, float max = 0.5);
392-
void SetPairDeltaEta(float minDeltaEta = 0.f, float maxDeltaEta = 1e10f);
393-
void SetPairDeltaPhi(float minDeltaPhi = 0.f, float maxDeltaPhi = 1e10f);
394385
void SetPairOpAng(float minOpAng = 0.f, float maxOpAng = 1e10f);
395386
void SetMaxPhivPairMeeDep(std::function<float(float)> meeDepCut);
396387
void SetPhivPairRange(float min, float max);
@@ -455,8 +446,8 @@ class DielectronCut : public TNamed
455446
std::function<float(float)> mMaxPhivPairMeeDep{}; // max phiv as a function of mee
456447
bool mSelectPC{false}; // flag to select photon conversion used in mMaxPhivPairMeeDep
457448
bool mApplydEtadPhi{false}; // flag to apply deta, dphi cut between 2 tracks
458-
float mMinDeltaEta{-1e10f}, mMaxDeltaEta{1e10f};
459-
float mMinDeltaPhi{-1e10f}, mMaxDeltaPhi{1e10f};
449+
float mMinDeltaEta{0.f};
450+
float mMinDeltaPhi{0.f};
460451
float mMinOpAng{0.f}, mMaxOpAng{1e10f};
461452

462453
// kinematic cuts

PWGEM/Dilepton/Core/Dilepton.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,8 @@ struct Dilepton {
158158
Configurable<float> cfg_phiv_slope{"cfg_phiv_slope", 0.0185, "slope for m vs. phiv"};
159159
Configurable<float> cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"};
160160
Configurable<bool> cfg_apply_detadphi{"cfg_apply_detadphi", false, "flag to apply deta-dphi elliptic cut"};
161-
Configurable<float> cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (also for elliptic cut)"};
162-
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.02, "min dphi between 2 electrons (also for elliptic cut)"};
163-
Configurable<float> cfg_max_deta{"cfg_max_deta", 3.2, "max deta between 2 electrons"};
164-
Configurable<float> cfg_max_dphi{"cfg_max_dphi", 3.2, "max dphi between 2 electrons"};
161+
Configurable<float> cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (elliptic cut)"};
162+
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.2, "min dphi between 2 electrons (elliptic cut)"};
165163
Configurable<float> cfg_min_opang{"cfg_min_opang", 0.0, "min opening angle"};
166164
Configurable<float> cfg_max_opang{"cfg_max_opang", 6.4, "max opening angle"};
167165

@@ -505,7 +503,7 @@ struct Dilepton {
505503
fRegistry.add("Pair/same/uls/hDeltaEtaDeltaPhi", "distance between 2 tracks in #eta-#varphi plane;#Delta#varphi (rad.);#Delta#eta", kTH2D, {{200, -0.5, +0.5}, {200, -0.5, 0.5}}, true);
506504
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
507505
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, 0.1f}}, true); // phiv is only for dielectron
508-
fRegistry.add("Pair/same/uls/hMVsOpAng", "m_{ee} vs. angle between 2 tracks;#omega (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{200, 0, 4.0}, {100, 0.0f, 3.2}}, true);
506+
fRegistry.add("Pair/same/uls/hMvsOpAng", "m_{ee} vs. angle between 2 tracks;#omega (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{200, 0, 4.0}, {100, 0.0f, 3.2}}, true);
509507
}
510508
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
511509
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
@@ -569,7 +567,7 @@ struct Dilepton {
569567
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
570568
fRegistry.addClone("Pair/same/", "Pair/mix/");
571569
} else if (cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kHFll)) {
572-
const AxisSpec axis_dphi_ee{36, M_PI / 2., 3. / .2 * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
570+
const AxisSpec axis_dphi_ee{36, -M_PI / 2., 3. / 2. * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
573571
const AxisSpec axis_deta_ee{40, -2., 2., "#Delta#eta = #eta_{l1} - #eta_{l2}"};
574572
fRegistry.add("Pair/same/uls/hs", "dilepton", kTHnSparseD, {axis_mass, axis_pt, axis_dca, axis_dphi_ee, axis_deta_ee}, true);
575573
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
@@ -623,8 +621,6 @@ struct Dilepton {
623621
fDielectronCut.ApplyPhiV(dielectroncuts.cfg_apply_phiv);
624622
fDielectronCut.ApplyPrefilter(dielectroncuts.cfg_apply_pf);
625623
fDielectronCut.SetMindEtadPhi(dielectroncuts.cfg_apply_detadphi, dielectroncuts.cfg_min_deta, dielectroncuts.cfg_min_dphi);
626-
fDielectronCut.SetPairDeltaEta(dielectroncuts.cfg_min_deta, dielectroncuts.cfg_max_deta);
627-
fDielectronCut.SetPairDeltaPhi(dielectroncuts.cfg_min_dphi, dielectroncuts.cfg_max_dphi);
628624
fDielectronCut.SetPairOpAng(dielectroncuts.cfg_min_opang, dielectroncuts.cfg_max_opang);
629625

630626
// for track

PWGEM/Dilepton/Core/DileptonMC.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ struct DileptonMC {
140140
Configurable<float> cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"};
141141
Configurable<bool> cfg_apply_detadphi{"cfg_apply_detadphi", false, "flag to apply deta-dphi elliptic cut"};
142142
Configurable<float> cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (elliptic cut)"};
143-
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.02, "min dphi between 2 electrons (elliptic cut)"};
143+
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.2, "min dphi between 2 electrons (elliptic cut)"};
144+
Configurable<float> cfg_min_opang{"cfg_min_opang", 0.0, "min opening angle"};
145+
Configurable<float> cfg_max_opang{"cfg_max_opang", 6.4, "max opening angle"};
144146

145147
Configurable<float> cfg_min_pt_track{"cfg_min_pt_track", 0.2, "min pT for single track"};
146148
Configurable<float> cfg_min_eta_track{"cfg_min_eta_track", -0.8, "max eta for single track"};
@@ -284,13 +286,13 @@ struct DileptonMC {
284286
const AxisSpec axis_pt_meson{ConfPtllBins, "p_{T} (GeV/c)"}; // for omega, phi meson pT spectra
285287
const AxisSpec axis_y_meson{nbin_y, min_y, max_y, "y"}; // rapidity of meson
286288

287-
const AxisSpec axis_dphi_ee{36, M_PI / 2., 3. / .2 * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
288-
const AxisSpec axis_deta_ee{40, -2., 2., "#Delta#eta = #eta_{l1} - #eta_{l2}"}; // for kHFll
289-
const AxisSpec axis_cos_theta_cs{10, 0.f, 1.f, "|cos(#theta_{CS})|"}; // for kPolarization, kUPC
290-
const AxisSpec axis_phi_cs{18, 0.f, M_PI, "|#varphi_{CS}| (rad.)"}; // for kPolarization
291-
const AxisSpec axis_aco{10, 0, 1.f, "#alpha = 1 - #frac{|#varphi_{l^{+}} - #varphi_{l^{-}}|}{#pi}"}; // for kUPC
292-
const AxisSpec axis_asym_pt{10, 0, 1.f, "A = #frac{|p_{T,l^{+}} - p_{T,l^{-}}|}{|p_{T,l^{+}} + p_{T,l^{-}}|}"}; // for kUPC
293-
const AxisSpec axis_dphi_e_ee{18, 0, M_PI, "#Delta#varphi = #varphi_{l} - #varphi_{ll} (rad.)"}; // for kUPC
289+
const AxisSpec axis_dphi_ee{36, -M_PI / 2., 3. / 2. * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
290+
const AxisSpec axis_deta_ee{40, -2., 2., "#Delta#eta = #eta_{l1} - #eta_{l2}"}; // for kHFll
291+
const AxisSpec axis_cos_theta_cs{10, 0.f, 1.f, "|cos(#theta_{CS})|"}; // for kPolarization, kUPC
292+
const AxisSpec axis_phi_cs{18, 0.f, M_PI, "|#varphi_{CS}| (rad.)"}; // for kPolarization
293+
const AxisSpec axis_aco{10, 0, 1.f, "#alpha = 1 - #frac{|#varphi_{l^{+}} - #varphi_{l^{-}}|}{#pi}"}; // for kUPC
294+
const AxisSpec axis_asym_pt{10, 0, 1.f, "A = #frac{|p_{T,l^{+}} - p_{T,l^{-}}|}{|p_{T,l^{+}} + p_{T,l^{-}}|}"}; // for kUPC
295+
const AxisSpec axis_dphi_e_ee{18, 0, M_PI, "#Delta#varphi = #varphi_{l} - #varphi_{ll} (rad.)"}; // for kUPC
294296

295297
// generated info
296298
fRegistry.add("Generated/sm/Pi0/hs", "gen. dilepton signal", kTHnSparseD, {axis_mass, axis_pt, axis_y, axis_dphi_ee, axis_deta_ee, axis_cos_theta_cs, axis_phi_cs, axis_aco, axis_asym_pt, axis_dphi_e_ee}, true);
@@ -502,6 +504,7 @@ struct DileptonMC {
502504
fDielectronCut.ApplyPhiV(dielectroncuts.cfg_apply_phiv);
503505
fDielectronCut.ApplyPrefilter(dielectroncuts.cfg_apply_pf);
504506
fDielectronCut.SetMindEtadPhi(dielectroncuts.cfg_apply_detadphi, dielectroncuts.cfg_min_deta, dielectroncuts.cfg_min_dphi);
507+
fDielectronCut.SetPairOpAng(dielectroncuts.cfg_min_opang, dielectroncuts.cfg_max_opang);
505508

506509
// for track
507510
fDielectronCut.SetTrackPtRange(dielectroncuts.cfg_min_pt_track, 1e+10f);

0 commit comments

Comments
 (0)