9#include "TwoTrackDphiDetaCut.h"
16 TwoTrackDphiDetaCut::TwoTrackDphiDetaCut() : TwoTrackCut(2) {
17 SetUnitName(
"#Delta#phi", 0);
18 SetUnitName(
"#Delta#eta", 1);
21 Bool_t TwoTrackDphiDetaCut::Pass(
TwoTrack* pair) {
26 SetValue(TMath::ATan2(py1, px1) - TMath::ATan2(py2, px2));
28 return AntiValidate();
31 TwoTrackDphiDetaCut::~TwoTrackDphiDetaCut() {}
33 TwoTrackDphistarDetaCut::TwoTrackDphistarDetaCut() :
41 fMagConst(0.150200415) {
55 Double_t ptv1 = TMath::Sqrt(px1 * px1 + py1 * py1);
56 Double_t ptv2 = TMath::Sqrt(px2 * px2 + py2 * py2);
57 Double_t phi1 = TMath::ATan2(py1, px1);
58 Double_t phi2 = TMath::ATan2(py2, px2);
61 Double_t rad = fMinRad;
63 Double_t afsi0b = fMagScale * chg1 * rad / ptv1;
64 Double_t afsi1b = fMagScale * chg2 * rad / ptv2;
71 Double_t phistar = phi2 - phi1 + TMath::ASin(afsi1b) - TMath::ASin(afsi0b);
72 phistar = TVector2::Phi_mpi_pi(phistar);
80 fPDG = TDatabasePDG::Instance();
81 fMagScale = fMagConst * fMagField * fMagSign;
93 TwoTrackDphistarDetaCut::~TwoTrackDphistarDetaCut() {}
virtual Bool_t Init(Int_t=0)
void SetValue(Double_t val, Int_t i=0)
void SetUnitName(TString name, Int_t i=0)
void AddObject(TObject *object)
const TLorentzVector & GetMomentum() const
Double_t GetCharge() const
virtual Package * Report() const
virtual Bool_t Pass(TwoTrack *pair)
void SetMagField(Double_t field)
virtual Package * Report() const
virtual Bool_t Init(Int_t task_id=0)
void SetMagSing(Double_t sign)
Track * GetTrack1() const
Track * GetTrack2() const