From c911445bd5c68de2b75f6c0efa6ff925bdc997df Mon Sep 17 00:00:00 2001 From: pnwkw <90510234+pnwkw@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:37:25 +0200 Subject: [PATCH] Add theta calculation to Fwd track --- .../include/ReconstructionDataFormats/TrackFwd.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackFwd.h b/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackFwd.h index 9793eb62a14bc..01c873496b5a6 100644 --- a/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackFwd.h +++ b/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackFwd.h @@ -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 { @@ -178,6 +179,6 @@ class TrackParCovFwd : public TrackParFwd ClassDefNV(TrackParCovFwd, 1); }; -} // namespace o2 +} // namespace o2::track #endif