Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWGEM/Dilepton: bug fix after #8100 and #8146 #8170

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions PWGEM/Dilepton/Core/DielectronCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,11 @@ void DielectronCut::SetMeeRange(float min, float max)
mMaxMee = max;
LOG(info) << "Dielectron Cut, set mee range: " << mMinMee << " - " << mMaxMee;
}
void DielectronCut::SetPairDeltaEta(float minDeltaEta, float maxDeltaEta)
{
mMinDeltaEta = minDeltaEta;
mMaxDeltaEta = maxDeltaEta;
LOG(info) << "Dielectron Cut, set pair delta eta range: " << mMinDeltaEta << " - " << mMaxDeltaEta;
}
void DielectronCut::SetPairDeltaPhi(float minDeltaPhi, float maxDeltaPhi)
{
mMinDeltaPhi = minDeltaPhi;
mMaxDeltaPhi = maxDeltaPhi;
LOG(info) << "Dielectron Cut, set pair delta phi range: " << mMinDeltaEta << " - " << mMaxDeltaEta;
}
void DielectronCut::SetPairOpAng(float minOpAng, float maxOpAng)
{
mMinOpAng = minOpAng;
mMaxOpAng = maxOpAng;
LOG(info) << "Dielectron Cut, set pair opening angle range: " << mMinDeltaEta << " - " << mMaxDeltaEta;
LOG(info) << "Dielectron Cut, set pair opening angle range: " << mMinOpAng << " - " << mMaxOpAng;
}
void DielectronCut::SetMaxPhivPairMeeDep(std::function<float(float)> meeDepCut)
{
Expand Down
13 changes: 2 additions & 11 deletions PWGEM/Dilepton/Core/DielectronCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,6 @@ class DielectronCut : public TNamed
o2::math_utils::bringToPMPi(dphi);
if (mApplydEtadPhi && std::pow(deta / mMinDeltaEta, 2) + std::pow(dphi / mMinDeltaPhi, 2) < 1.f) {
return false;
} else {
if (deta < mMinDeltaEta || deta > mMaxDeltaEta) {
return false;
}
if (deta < mMinDeltaPhi || deta > mMaxDeltaPhi) {
return false;
}
}

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

// kinematic cuts
Expand Down
12 changes: 4 additions & 8 deletions PWGEM/Dilepton/Core/Dilepton.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,8 @@ struct Dilepton {
Configurable<float> cfg_phiv_slope{"cfg_phiv_slope", 0.0185, "slope for m vs. phiv"};
Configurable<float> cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"};
Configurable<bool> cfg_apply_detadphi{"cfg_apply_detadphi", false, "flag to apply deta-dphi elliptic cut"};
Configurable<float> cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (also for elliptic cut)"};
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.02, "min dphi between 2 electrons (also for elliptic cut)"};
Configurable<float> cfg_max_deta{"cfg_max_deta", 3.2, "max deta between 2 electrons"};
Configurable<float> cfg_max_dphi{"cfg_max_dphi", 3.2, "max dphi between 2 electrons"};
Configurable<float> cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (elliptic cut)"};
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.2, "min dphi between 2 electrons (elliptic cut)"};
Configurable<float> cfg_min_opang{"cfg_min_opang", 0.0, "min opening angle"};
Configurable<float> cfg_max_opang{"cfg_max_opang", 6.4, "max opening angle"};

Expand Down Expand Up @@ -505,7 +503,7 @@ struct Dilepton {
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);
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
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
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);
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);
}
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
Expand Down Expand Up @@ -569,7 +567,7 @@ struct Dilepton {
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
fRegistry.addClone("Pair/same/", "Pair/mix/");
} else if (cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kHFll)) {
const AxisSpec axis_dphi_ee{36, M_PI / 2., 3. / .2 * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
const AxisSpec axis_dphi_ee{36, -M_PI / 2., 3. / 2. * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
const AxisSpec axis_deta_ee{40, -2., 2., "#Delta#eta = #eta_{l1} - #eta_{l2}"};
fRegistry.add("Pair/same/uls/hs", "dilepton", kTHnSparseD, {axis_mass, axis_pt, axis_dca, axis_dphi_ee, axis_deta_ee}, true);
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
Expand Down Expand Up @@ -623,8 +621,6 @@ struct Dilepton {
fDielectronCut.ApplyPhiV(dielectroncuts.cfg_apply_phiv);
fDielectronCut.ApplyPrefilter(dielectroncuts.cfg_apply_pf);
fDielectronCut.SetMindEtadPhi(dielectroncuts.cfg_apply_detadphi, dielectroncuts.cfg_min_deta, dielectroncuts.cfg_min_dphi);
fDielectronCut.SetPairDeltaEta(dielectroncuts.cfg_min_deta, dielectroncuts.cfg_max_deta);
fDielectronCut.SetPairDeltaPhi(dielectroncuts.cfg_min_dphi, dielectroncuts.cfg_max_dphi);
fDielectronCut.SetPairOpAng(dielectroncuts.cfg_min_opang, dielectroncuts.cfg_max_opang);

// for track
Expand Down
19 changes: 11 additions & 8 deletions PWGEM/Dilepton/Core/DileptonMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ struct DileptonMC {
Configurable<float> cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"};
Configurable<bool> cfg_apply_detadphi{"cfg_apply_detadphi", false, "flag to apply deta-dphi elliptic cut"};
Configurable<float> cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (elliptic cut)"};
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.02, "min dphi between 2 electrons (elliptic cut)"};
Configurable<float> cfg_min_dphi{"cfg_min_dphi", 0.2, "min dphi between 2 electrons (elliptic cut)"};
Configurable<float> cfg_min_opang{"cfg_min_opang", 0.0, "min opening angle"};
Configurable<float> cfg_max_opang{"cfg_max_opang", 6.4, "max opening angle"};

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

const AxisSpec axis_dphi_ee{36, M_PI / 2., 3. / .2 * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
const AxisSpec axis_deta_ee{40, -2., 2., "#Delta#eta = #eta_{l1} - #eta_{l2}"}; // for kHFll
const AxisSpec axis_cos_theta_cs{10, 0.f, 1.f, "|cos(#theta_{CS})|"}; // for kPolarization, kUPC
const AxisSpec axis_phi_cs{18, 0.f, M_PI, "|#varphi_{CS}| (rad.)"}; // for kPolarization
const AxisSpec axis_aco{10, 0, 1.f, "#alpha = 1 - #frac{|#varphi_{l^{+}} - #varphi_{l^{-}}|}{#pi}"}; // for kUPC
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
const AxisSpec axis_dphi_e_ee{18, 0, M_PI, "#Delta#varphi = #varphi_{l} - #varphi_{ll} (rad.)"}; // for kUPC
const AxisSpec axis_dphi_ee{36, -M_PI / 2., 3. / 2. * M_PI, "#Delta#varphi = #varphi_{l1} - #varphi_{l2} (rad.)"}; // for kHFll
const AxisSpec axis_deta_ee{40, -2., 2., "#Delta#eta = #eta_{l1} - #eta_{l2}"}; // for kHFll
const AxisSpec axis_cos_theta_cs{10, 0.f, 1.f, "|cos(#theta_{CS})|"}; // for kPolarization, kUPC
const AxisSpec axis_phi_cs{18, 0.f, M_PI, "|#varphi_{CS}| (rad.)"}; // for kPolarization
const AxisSpec axis_aco{10, 0, 1.f, "#alpha = 1 - #frac{|#varphi_{l^{+}} - #varphi_{l^{-}}|}{#pi}"}; // for kUPC
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
const AxisSpec axis_dphi_e_ee{18, 0, M_PI, "#Delta#varphi = #varphi_{l} - #varphi_{ll} (rad.)"}; // for kUPC

// generated info
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);
Expand Down Expand Up @@ -502,6 +504,7 @@ struct DileptonMC {
fDielectronCut.ApplyPhiV(dielectroncuts.cfg_apply_phiv);
fDielectronCut.ApplyPrefilter(dielectroncuts.cfg_apply_pf);
fDielectronCut.SetMindEtadPhi(dielectroncuts.cfg_apply_detadphi, dielectroncuts.cfg_min_deta, dielectroncuts.cfg_min_dphi);
fDielectronCut.SetPairOpAng(dielectroncuts.cfg_min_opang, dielectroncuts.cfg_max_opang);

// for track
fDielectronCut.SetTrackPtRange(dielectroncuts.cfg_min_pt_track, 1e+10f);
Expand Down
Loading