Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:23

0001 // Copyright CERN and copyright holders of ALICE O2. This software is
0002 // distributed under the terms of the GNU General Public License v3 (GPL
0003 // Version 3), copied verbatim in the file "COPYING".
0004 //
0005 // See http://alice-o2.web.cern.ch/license for full licensing information.
0006 //
0007 // In applying this license CERN does not waive the privileges and immunities
0008 // granted to it by virtue of its status as an Intergovernmental Organization
0009 // or submit itself to any jurisdiction.
0010 
0011 /// \file GPUTPCBaseTrackParam.h
0012 /// \author David Rohr, Sergey Gorbunov
0013 
0014 #ifndef GPUTPCBASETRACKPARAM_H
0015 #define GPUTPCBASETRACKPARAM_H
0016 
0017 constexpr double GPUCA_MAX_SIN_PHI = 1.0;
0018 
0019 class GPUTPCTrackParam;
0020 
0021 /**
0022  * @class GPUTPCBaseTrackParam
0023  *
0024  * GPUTPCBaseTrackParam class contains track parameters
0025  * used in output of the GPUTPCTracker slice tracker.
0026  * This class is used for transfer between tracker and merger and does not contain the covariance matrice
0027  */
0028 class GPUTPCBaseTrackParam
0029 {
0030  public:
0031   double X() const { return mX; }
0032   double Y() const { return mP[0]; }
0033   double Z() const { return mP[1]; }
0034   double SinPhi() const { return mP[2]; }
0035   double DzDs() const { return mP[3]; }
0036   double QPt() const { return mP[4]; }
0037   double ZOffset() const { return mZOffset; }
0038 
0039   double GetX() const { return mX; }
0040   double GetY() const { return mP[0]; }
0041   double GetZ() const { return mP[1]; }
0042   double GetSinPhi() const { return mP[2]; }
0043   double GetDzDs() const { return mP[3]; }
0044   double GetQPt() const { return mP[4]; }
0045   double GetZOffset() const { return mZOffset; }
0046 
0047   double GetKappa(double Bz) const { return -mP[4] * Bz; }
0048 
0049   const double* Par() const { return mP; }
0050   const double* GetPar() const { return mP; }
0051   double GetPar(int i) const { return (mP[i]); }
0052 
0053   void SetPar(int i, double v) { mP[i] = v; }
0054 
0055   void SetX(double v) { mX = v; }
0056   void SetY(double v) { mP[0] = v; }
0057   void SetZ(double v) { mP[1] = v; }
0058   void SetSinPhi(double v) { mP[2] = v; }
0059   void SetDzDs(double v) { mP[3] = v; }
0060   void SetQPt(double v) { mP[4] = v; }
0061   void SetZOffset(double v) { mZOffset = v; }
0062 
0063  private:
0064   // WARNING, Track Param Data is copied in the GPU Tracklet Constructor element by element instead of using copy constructor!!!
0065   // This is neccessary for performance reasons!!!
0066   // Changes to Elements of this class therefore must also be applied to TrackletConstructor!!!
0067   double mX; // x position
0068   double mZOffset;
0069   double mP[5]; // 'active' track parameters: Y, Z, SinPhi, DzDs, q/Pt
0070 };
0071 
0072 #endif