Skip to content
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
19 changes: 11 additions & 8 deletions PWGEM/Dilepton/Core/DielectronCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class DielectronCut : public TNamed
return true;
}

template <typename TTrack1, typename TTrack2>
template <bool dont_require_rapidity = false, typename TTrack1, typename TTrack2>
bool IsSelectedPair(TTrack1 const& t1, TTrack2 const& t2, const float bz) const
{
ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), t1.phi(), o2::constants::physics::MassElectron);
Expand All @@ -122,7 +122,7 @@ class DielectronCut : public TNamed
return false;
}

if (v12.Rapidity() < mMinPairY || mMaxPairY < v12.Rapidity()) {
if (!dont_require_rapidity && (v12.Rapidity() < mMinPairY || mMaxPairY < v12.Rapidity())) {
return false;
}

Expand Down Expand Up @@ -160,19 +160,22 @@ class DielectronCut : public TNamed
return true;
}

template <bool isML = false, typename TTrack, typename TCollision = int>
template <bool dont_require_pteta = false, bool isML = false, typename TTrack, typename TCollision = int>
bool IsSelectedTrack(TTrack const& track, TCollision const& collision = 0) const
{
if (!track.hasITS() || !track.hasTPC()) { // track has to be ITS-TPC matched track
return false;
}

if (!IsSelectedTrack(track, DielectronCuts::kTrackPtRange)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTrackEtaRange)) {
return false;
if (!dont_require_pteta) {
if (!IsSelectedTrack(track, DielectronCuts::kTrackPtRange)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTrackEtaRange)) {
return false;
}
}

if (!IsSelectedTrack(track, DielectronCuts::kTrackPhiRange)) {
return false;
}
Expand Down
10 changes: 5 additions & 5 deletions PWGEM/Dilepton/Core/Dilepton.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ struct Dilepton {
fRegistry.add("Pair/same/uls/hsDeltaP", "difference of p between 2 tracks;|p_{T,1} - p_{T,2}|/|p_{T,1} + p_{T,2}|;#Delta#eta;#Delta#varphi (rad.);", kTHnSparseD, {{20, 0, 1}, {100, -0.5, +0.5}, {100, -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}, {500, 0.0f, 0.5f}}, true); // phiv is only for dielectron
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
fRegistry.add("Pair/same/uls/hMvsOpAng", "m_{ee} vs. angle between 2 tracks;#omega (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{100, 0, 2.0}, {20, 0.0f, 3.2}}, true);
}
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
Expand Down Expand Up @@ -792,11 +792,11 @@ struct Dilepton {
if constexpr (ev_id == 0) {
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
if (dielectroncuts.cfg_pid_scheme == static_cast<int>(DielectronCut::PIDSchemes::kPIDML)) {
if (!cut.template IsSelectedTrack<true>(t1, collision) || !cut.template IsSelectedTrack<true>(t2, collision)) {
if (!cut.template IsSelectedTrack<false, true>(t1, collision) || !cut.template IsSelectedTrack<false, true>(t2, collision)) {
return false;
}
} else { // cut-based
if (!cut.template IsSelectedTrack(t1) || !cut.template IsSelectedTrack(t2)) {
if (!cut.template IsSelectedTrack<false, false>(t1) || !cut.template IsSelectedTrack<false, false>(t2)) {
return false;
}
}
Expand Down Expand Up @@ -1298,11 +1298,11 @@ struct Dilepton {
{
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
if (dielectroncuts.cfg_pid_scheme == static_cast<int>(DielectronCut::PIDSchemes::kPIDML)) {
if (!cut.template IsSelectedTrack<true>(t1, collision) || !cut.template IsSelectedTrack<true>(t2, collision)) {
if (!cut.template IsSelectedTrack<false, true>(t1, collision) || !cut.template IsSelectedTrack<false, true>(t2, collision)) {
return false;
}
} else { // cut-based
if (!cut.template IsSelectedTrack(t1) || !cut.template IsSelectedTrack(t2)) {
if (!cut.template IsSelectedTrack<false, false>(t1) || !cut.template IsSelectedTrack<false, false>(t2)) {
return false;
}
}
Expand Down
Loading