24 Bool_t TwoTrackRadialDistanceCut::Pass(
TwoTrack* pair) {
29 Double_t ptv1 = TMath::Sqrt(px1 * px1 + py1 * py1);
30 Double_t ptv2 = TMath::Sqrt(px2 * px2 + py2 * py2);
31 Double_t phi1 = TMath::ATan2(py1, px1);
32 Double_t phi2 = TMath::ATan2(py2, px2);
35 Double_t rad = fMinRad;
37 Double_t phistar_min = 10E+6;
40 for (rad = fMinRad; rad < fMaxRad; rad += 0.01) {
41 Double_t dps = (phi2 - phi1 + (TMath::ASin(-0.075 * chg2 * fMagSign * rad / ptv2))
42 - (TMath::ASin(-0.075 * chg1 * fMagSign * rad / ptv1)));
46 S1 = TMath::Min(s1, s2);
48 S2 = TMath::Min(s1, s2);
49 TVector3 pos1 = hel1.
EvalPos(S1);
50 TVector3 pos2 = hel2.
EvalPos(S2);
51 Double_t dps2 = pos1.Phi() - pos2.Phi();
52 dps2 = TVector2::Phi_mpi_pi(dps2) / TMath::DegToRad();
53 dps = TVector2::Phi_mpi_pi(dps) / TMath::DegToRad();
54 if (TMath::Abs(dps) < TMath::Abs(phistar_min)) { phistar_min = dps; }
56 SetValue(phistar_min);
57 if (phistar_min <= GetMin(0) || phistar_min >= GetMax(0)) {