Skip to content

Commit

Permalink
Add theta calculation to Fwd track
Browse files Browse the repository at this point in the history
  • Loading branch information
pnwkw authored and shahor02 committed Apr 14, 2022
1 parent 8752499 commit 2fce676
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ class TrackParFwd
Double_t getInvQPt() const { return mParameters(4); } // return Inverse charged pt
Double_t getPt() const { return TMath::Abs(1.f / mParameters(4)); }
Double_t getInvPt() const { return TMath::Abs(mParameters(4)); }
Double_t getPx() const { return TMath::Cos(getPhi()) * getPt(); } // return px
Double_t getPy() const { return TMath::Sin(getPhi()) * getPt(); } // return py
Double_t getPz() const { return getTanl() * getPt(); } // return pz
Double_t getPx() const { return TMath::Cos(getPhi()) * getPt(); } // return px
Double_t getPy() const { return TMath::Sin(getPhi()) * getPt(); } // return py
Double_t getPz() const { return getTanl() * getPt(); } // return pz
Double_t getP() const { return getPt() * TMath::Sqrt(1. + getTanl() * getTanl()); } // return total momentum
Double_t getInverseMomentum() const { return 1.f / getP(); }

Double_t getEta() const { return -TMath::Log(TMath::Tan((TMath::PiOver2() - TMath::ATan(getTanl())) / 2)); } // return total momentum
Double_t getTheta() const { return TMath::PiOver2() - TMath::ATan(getTanl()); }
Double_t getEta() const { return -TMath::Log(TMath::Tan(getTheta() / 2)); } // return total momentum

Double_t getCurvature(double b) const
{
Expand Down Expand Up @@ -178,6 +179,6 @@ class TrackParCovFwd : public TrackParFwd
ClassDefNV(TrackParCovFwd, 1);
};

} // namespace o2
} // namespace o2::track

#endif

0 comments on commit 2fce676

Please sign in to comment.