]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCATrackParam2.h
bug fix: reconstruction crash when the output buffer size exceed
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATrackParam2.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTTPCCATrackParam2.h 35151 2009-10-01 13:35:10Z sgorbuno $
3 // ************************************************************************
4 // This file is property of and copyright by the ALICE HLT Project        *
5 // ALICE Experiment at CERN, All rights reserved.                         *
6 // See cxx source for full Copyright notice                               *
7 //                                                                        *
8 //*************************************************************************
9
10
11 #ifndef ALIHLTTPCCATRACKPARAM2_H
12 #define ALIHLTTPCCATRACKPARAM2_H
13
14 #include "AliHLTTPCCADef.h"
15
16 class AliHLTTPCCATrackLinearisation;
17
18 /**
19  * @class AliHLTTPCCATrackParam
20  *
21  * AliHLTTPCCATrackParam class describes the track parametrisation
22  * which is used by the AliHLTTPCCATracker slice tracker.
23  * This class is used for transfer between tracker and merger and does not contain the covariance matrice
24  */
25 class AliHLTTPCCATrackParam2
26 {
27   public:
28
29     GPUd() float X()      const { return fX;    }
30     GPUd() float Y()      const { return fP[0]; }
31     GPUd() float Z()      const { return fP[1]; }
32     GPUd() float SinPhi() const { return fP[2]; }
33     GPUd() float DzDs()   const { return fP[3]; }
34     GPUd() float QPt()    const { return fP[4]; }
35
36     GPUd() float GetX()      const { return fX; }
37     GPUd() float GetY()      const { return fP[0]; }
38     GPUd() float GetZ()      const { return fP[1]; }
39     GPUd() float GetSinPhi() const { return fP[2]; }
40     GPUd() float GetDzDs()   const { return fP[3]; }
41     GPUd() float GetQPt()    const { return fP[4]; }
42
43     GPUd() float GetKappa( float Bz ) const { return -fP[4]*Bz; }
44
45     GPUhd() const float *Par() const { return fP; }
46     GPUd() const float *GetPar() const { return fP; }
47         GPUd() float GetPar(int i) const { return(fP[i]); }
48
49     GPUhd() void SetPar( int i, float v ) { fP[i] = v; }
50
51     GPUd() void SetX( float v )     {  fX = v;    }
52     GPUd() void SetY( float v )     {  fP[0] = v; }
53     GPUd() void SetZ( float v )     {  fP[1] = v; }
54     GPUd() void SetSinPhi( float v ) {  fP[2] = v; }
55     GPUd() void SetDzDs( float v )  {  fP[3] = v; }
56     GPUd() void SetQPt( float v )   {  fP[4] = v; }
57
58   private:
59         //WARNING, Track Param Data is copied in the GPU Tracklet Constructor element by element instead of using copy constructor!!!
60         //This is neccessary for performance reasons!!!
61         //Changes to Elements of this class therefore must also be applied to TrackletConstructor!!!
62     float fX;      // x position
63     float fP[5];   // 'active' track parameters: Y, Z, SinPhi, DzDs, q/Pt
64 };
65
66 #endif //ALIHLTTPCCATRACKPARAM2_H