Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GPUTPCBaseTrackParam.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GPUTPCBaseTrackParam.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 GPUTPCBASETRACKPARAM_H
15 #define GPUTPCBASETRACKPARAM_H
16 
17 constexpr double GPUCA_MAX_SIN_PHI = 0.99;
18 
19 class GPUTPCTrackParam;
20 
29 {
30  public:
31  double X() const { return mX; }
32  double Y() const { return mP[0]; }
33  double Z() const { return mP[1]; }
34  double SinPhi() const { return mP[2]; }
35  double DzDs() const { return mP[3]; }
36  double QPt() const { return mP[4]; }
37  double ZOffset() const { return mZOffset; }
38 
39  double GetX() const { return mX; }
40  double GetY() const { return mP[0]; }
41  double GetZ() const { return mP[1]; }
42  double GetSinPhi() const { return mP[2]; }
43  double GetDzDs() const { return mP[3]; }
44  double GetQPt() const { return mP[4]; }
45  double GetZOffset() const { return mZOffset; }
46 
47  double GetKappa(double Bz) const { return -mP[4] * Bz; }
48 
49  const double* Par() const { return mP; }
50  const double* GetPar() const { return mP; }
51  double GetPar(int i) const { return (mP[i]); }
52 
53  void SetPar(int i, double v) { mP[i] = v; }
54 
55  void SetX(double v) { mX = v; }
56  void SetY(double v) { mP[0] = v; }
57  void SetZ(double v) { mP[1] = v; }
58  void SetSinPhi(double v) { mP[2] = v; }
59  void SetDzDs(double v) { mP[3] = v; }
60  void SetQPt(double v) { mP[4] = v; }
61  void SetZOffset(double v) { mZOffset = v; }
62 
63  private:
64  // WARNING, Track Param Data is copied in the GPU Tracklet Constructor element by element instead of using copy constructor!!!
65  // This is neccessary for performance reasons!!!
66  // Changes to Elements of this class therefore must also be applied to TrackletConstructor!!!
67  double mX; // x position
68  double mZOffset;
69  double mP[5]; // 'active' track parameters: Y, Z, SinPhi, DzDs, q/Pt
70 };
71 
72 #endif