ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GPUTPCTrackLinearisation.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GPUTPCTrackLinearisation.h
1 // Copyright CERN and copyright holders of ALICE O2. This software is
2 // distributed under the terms of the GNU General Public License v3 (GPL
3 // Version 3), copied verbatim in the file "COPYING".
4 //
5 // See http://alice-o2.web.cern.ch/license for full licensing information.
6 //
7 // In applying this license CERN does not waive the privileges and immunities
8 // granted to it by virtue of its status as an Intergovernmental Organization
9 // or submit itself to any jurisdiction.
10 
13 
14 #ifndef GPUTPCTRACKLINEARISATION_H
15 #define GPUTPCTRACKLINEARISATION_H
16 
17 #include "GPUTPCTrackParam.h"
18 
34 {
35  public:
37  GPUTPCTrackLinearisation(double SinPhi1, double CosPhi1, double DzDs1, double QPt1) : mSinPhi(SinPhi1), mCosPhi(CosPhi1), mDzDs(DzDs1), mQPt(QPt1) {}
38 
40 
41  void Set(double SinPhi1, double CosPhi1, double DzDs1, double QPt1);
42 
43  double SinPhi() const { return mSinPhi; }
44  double CosPhi() const { return mCosPhi; }
45  double DzDs() const { return mDzDs; }
46  double QPt() const { return mQPt; }
47 
48  double GetSinPhi() const { return mSinPhi; }
49  double GetCosPhi() const { return mCosPhi; }
50  double GetDzDs() const { return mDzDs; }
51  double GetQPt() const { return mQPt; }
52 
53  void SetSinPhi(double v) { mSinPhi = v; }
54  void SetCosPhi(double v) { mCosPhi = v; }
55  void SetDzDs(double v) { mDzDs = v; }
56  void SetQPt(double v) { mQPt = v; }
57 
58  private:
59  double mSinPhi; // SinPhi
60  double mCosPhi; // CosPhi
61  double mDzDs; // DzDs
62  double mQPt; // QPt
63 };
64 
65 inline GPUTPCTrackLinearisation::GPUTPCTrackLinearisation(const GPUTPCTrackParam& t) : mSinPhi(t.SinPhi()), mCosPhi(0), mDzDs(t.DzDs()), mQPt(t.QPt())
66 {
67  if (mSinPhi > GPUCA_MAX_SIN_PHI) {
69  } else if (mSinPhi < -GPUCA_MAX_SIN_PHI) {
71  }
72  mCosPhi = sqrt(1 - mSinPhi * mSinPhi);
73  if (t.SignCosPhi() < 0) {
74  mCosPhi = -mCosPhi;
75  }
76 }
77 
78 inline void GPUTPCTrackLinearisation::Set(double SinPhi1, double CosPhi1, double DzDs1, double QPt1)
79 {
80  SetSinPhi(SinPhi1);
81  SetCosPhi(CosPhi1);
82  SetDzDs(DzDs1);
83  SetQPt(QPt1);
84 }
85 
86 #endif // GPUTPCTRACKLINEARISATION_H