]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCABaseTrackParam.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCABaseTrackParam.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTTPCCABaseTrackParam.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 ALIHLTTPCCABASETRACKPARAM_H
12 #define ALIHLTTPCCABASETRACKPARAM_H
13
14 #include "AliHLTTPCCADef.h"
15 MEM_CLASS_PRE() class AliHLTTPCCATrackParam;
16
17 /**
18  * @class AliHLTTPCCABaseTrackParam
19  *
20  * AliHLTTPCCABaseTrackParam class contains track parameters 
21  * used in output of the AliHLTTPCCATracker slice tracker.
22  * This class is used for transfer between tracker and merger and does not contain the covariance matrice
23  */
24 MEM_CLASS_PRE() class AliHLTTPCCABaseTrackParam
25 {
26   public:
27
28     GPUd() float X()      const { return fX;    }
29     GPUd() float Y()      const { return fP[0]; }
30     GPUd() float Z()      const { return fP[1]; }
31     GPUd() float SinPhi() const { return fP[2]; }
32     GPUd() float DzDs()   const { return fP[3]; }
33     GPUd() float QPt()    const { return fP[4]; }
34
35     GPUhd() float GetX()      const { return fX; }
36     GPUhd() float GetY()      const { return fP[0]; }
37     GPUhd() float GetZ()      const { return fP[1]; }
38     GPUhd() float GetSinPhi() const { return fP[2]; }
39     GPUhd() float GetDzDs()   const { return fP[3]; }
40     GPUhd() float GetQPt()    const { return fP[4]; }
41
42     GPUd() float GetKappa( float Bz ) const { return -fP[4]*Bz; }
43
44     GPUhd() MakeType(const float*) Par() const { return fP; }
45     GPUd() const MakeType(float*) GetPar() const { return fP; }
46         GPUd() float GetPar(int i) const { return(fP[i]); }
47
48     GPUhd() void SetPar( int i, float v ) { fP[i] = v; }
49
50     GPUd() void SetX( float v )     {  fX = v;    }
51     GPUd() void SetY( float v )     {  fP[0] = v; }
52     GPUd() void SetZ( float v )     {  fP[1] = v; }
53     GPUd() void SetSinPhi( float v ) {  fP[2] = v; }
54     GPUd() void SetDzDs( float v )  {  fP[3] = v; }
55     GPUd() void SetQPt( float v )   {  fP[4] = v; }
56
57   private:
58         //WARNING, Track Param Data is copied in the GPU Tracklet Constructor element by element instead of using copy constructor!!!
59         //This is neccessary for performance reasons!!!
60         //Changes to Elements of this class therefore must also be applied to TrackletConstructor!!!
61     float fX;      // x position
62     float fP[5];   // 'active' track parameters: Y, Z, SinPhi, DzDs, q/Pt
63 };
64
65 #endif