@@ -128,14 +128,8 @@ class DielectronCut : public TNamed
128128 }
129129
130130 if (mApplyPhiV ) {
131- if (mMaxPhivPairMeeDep ) {
132- if ((phiv < mMinPhivPair || mMaxPhivPairMeeDep (v12.M ()) < phiv) ^ mSelectPC ) {
133- return false ;
134- }
135- } else {
136- if ((!(mMinPhivPair < phiv && phiv < mMaxPhivPair ) && !(mMinMeeForPhivPair < v12.M () && v12.M () < mMaxMeeForPhivPair )) ^ mSelectPC ) {
137- return false ;
138- }
131+ if (((mMinPhivPair < phiv && phiv < mMaxPhivPair ) && v12.M () < mMaxMeePhiVDep (phiv)) ^ mSelectPC ) {
132+ return false ;
139133 }
140134 }
141135
@@ -161,70 +155,6 @@ class DielectronCut : public TNamed
161155 return true ;
162156 }
163157
164- template <typename TTrack1, typename TTrack2>
165- bool IsSelectedPair_PrefilterULS (TTrack1 const & t1, TTrack2 const & t2, const float bz) const
166- {
167- // don't move this function into IsSelectedPair.
168- if (!IsSelectedPair_PrefilterULS_Mee (t1, t2, bz)) {
169- return false ;
170- }
171- if (!IsSelectedPair_PrefilterULS_PhiV (t1, t2, bz)) {
172- return false ;
173- }
174- return true ;
175- }
176-
177- template <typename TTrack1, typename TTrack2>
178- bool IsSelectedPair_PrefilterULS_Mee (TTrack1 const & t1, TTrack2 const & t2, const float /* bz*/ ) const
179- {
180- // don't move this function into IsSelectedPair.
181- ROOT::Math::PtEtaPhiMVector v1 (t1.pt (), t1.eta (), t1.phi (), o2::constants::physics::MassElectron);
182- ROOT::Math::PtEtaPhiMVector v2 (t2.pt (), t2.eta (), t2.phi (), o2::constants::physics::MassElectron);
183- ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
184- if (mMinMee_uls < v12.M () && v12.M () < mMaxMee_uls ) {
185- return false ;
186- }
187- return true ;
188- }
189-
190- template <typename TTrack1, typename TTrack2>
191- bool IsSelectedPair_PrefilterULS_PhiV (TTrack1 const & t1, TTrack2 const & t2, const float bz) const
192- {
193- // don't move this function into IsSelectedPair.
194- ROOT::Math::PtEtaPhiMVector v1 (t1.pt (), t1.eta (), t1.phi (), o2::constants::physics::MassElectron);
195- ROOT::Math::PtEtaPhiMVector v2 (t2.pt (), t2.eta (), t2.phi (), o2::constants::physics::MassElectron);
196- ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
197- float phiv = getPhivPair (t1.px (), t1.py (), t1.pz (), t2.px (), t2.py (), t2.pz (), t1.sign (), t2.sign (), bz);
198- if (v12.M () < mMaxMee_phiv_uls && mMaxPhiV_uls < phiv) {
199- return false ;
200- }
201- return true ;
202- }
203-
204- template <typename TTrack1, typename TTrack2>
205- bool IsSelectedPair_PrefilterLS (TTrack1 const & t1, TTrack2 const & t2, const float bz) const
206- {
207- // don't move this function into IsSelectedPair.
208- if (!IsSelectedPair_PrefilterLS_PhiV (t1, t2, bz)) {
209- return false ;
210- }
211- return true ;
212- }
213-
214- template <typename TTrack1, typename TTrack2>
215- bool IsSelectedPair_PrefilterLS_PhiV (TTrack1 const & t1, TTrack2 const & t2, const float bz) const
216- {
217- // don't move this function into IsSelectedPair.
218- ROOT::Math::PtEtaPhiMVector v1 (t1.pt (), t1.eta (), t1.phi (), o2::constants::physics::MassElectron);
219- ROOT::Math::PtEtaPhiMVector v2 (t2.pt (), t2.eta (), t2.phi (), o2::constants::physics::MassElectron);
220- ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
221- float phiv = getPhivPair (t1.px (), t1.py (), t1.pz (), t2.px (), t2.py (), t2.pz (), t1.sign (), t2.sign (), bz);
222- if (v12.M () < phiv * mSlope_phiv_ls + mIntercept_phiv_ls || v12.M () < (M_PI - phiv) * mSlope_phiv_ls + mIntercept_phiv_ls ) {
223- return false ;
224- }
225- return true ;
226- }
227-
228158 template <bool dont_require_pteta = false , bool isML = false , typename TTrack, typename TCollision = int >
229159 bool IsSelectedTrack (TTrack const & track, TCollision const & collision = 0 ) const
230160 {
@@ -472,13 +402,10 @@ class DielectronCut : public TNamed
472402 void SetPairDCARange (float min = 0 .f, float max = 1e10f); // 3D DCA in sigma
473403 void SetMeeRange (float min = 0 .f, float max = 0.5 );
474404 void SetPairOpAng (float minOpAng = 0 .f, float maxOpAng = 1e10f);
475- void SetMaxPhivPairMeeDep (std::function<float (float )> meeDepCut);
476- void SetPhivPairRange (float min_phiv, float max_phiv, float min_mee, float max_mee);
405+ void SetMaxMeePhiVDep (std::function<float (float )> phivDepCut, float min_phiv, float max_phiv);
477406 void SelectPhotonConversion (bool flag);
478407 void SetMindEtadPhi (bool flag, float min_deta, float min_dphi);
479408 void SetRequireDifferentSides (bool flag);
480- void SetPrefilterPhiV (float max_mee_uls, float max_phiv_uls, float max_mee_ls, float max_phiv_ls);
481- void SetPrefilterMee (float min_mee_uls, float max_mee_uls);
482409
483410 void SetTrackPtRange (float minPt = 0 .f, float maxPt = 1e10f);
484411 void SetTrackEtaRange (float minEta = -1e10f, float maxEta = 1e10f);
@@ -537,20 +464,14 @@ class DielectronCut : public TNamed
537464 float mMinPairY {-1e10f}, mMaxPairY {1e10f}; // range in rapidity
538465 float mMinPairDCA3D {0 .f }, mMaxPairDCA3D {1e10f}; // range in 3D DCA in sigma
539466 float mMinPhivPair {0 .f }, mMaxPhivPair {+3.2 };
540- float mMinMeeForPhivPair {0 .f }, mMaxMeeForPhivPair {1e10f};
541- std::function<float (float )> mMaxPhivPairMeeDep {}; // max phiv as a function of mee
542- bool mSelectPC {false }; // flag to select photon conversion used in mMaxPhivPairMeeDep
543- bool mApplydEtadPhi {false }; // flag to apply deta, dphi cut between 2 tracks
467+ std::function<float (float )> mMaxMeePhiVDep {}; // max mee as a function of phiv
468+ bool mSelectPC {false }; // flag to select photon conversion used in mMaxPhivPairMeeDep
469+ bool mApplydEtadPhi {false }; // flag to apply deta, dphi cut between 2 tracks
544470 float mMinDeltaEta {0 .f };
545471 float mMinDeltaPhi {0 .f };
546472 float mMinOpAng {0 .f }, mMaxOpAng {1e10f};
547473 bool mRequireDiffSides {false }; // flag to require 2 tracks to be from different sides. (A-C combination). If one wants 2 tracks to be in the same side (A-A or C-C), one can simply use track eta cut.
548474
549- // only for prefilter
550- float mMinMee_uls {0 .f }, mMaxMee_uls {0 .f };
551- float mMaxMee_phiv_uls {0 .f }, mMaxPhiV_uls {0 .f }; // rectangle
552- float mSlope_phiv_ls {0 .f }, mIntercept_phiv_ls {0 .f }; // mee > phiv * slope + intercept
553-
554475 // kinematic cuts
555476 float mMinTrackPt {0 .f }, mMaxTrackPt {1e10f}; // range in pT
556477 float mMinTrackEta {-1e10f}, mMaxTrackEta {1e10f}; // range in eta
0 commit comments