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 *
8 //*************************************************************************
10 #ifndef ALIHLTTPCCAPARAM_H
11 #define ALIHLTTPCCAPARAM_H
13 #include "AliHLTTPCCADef.h"
14 #include "AliHLTTPCCAMath.h"
15 #include "AliHLTTPCCATrackParam.h"
21 * @class ALIHLTTPCCAParam
22 * parameters of the AliHLTTPCCATracker, including geometry information
23 * and some reconstructon constants.
25 * The class is under construction.
28 class AliHLTTPCCAParam
32 #if !defined(HLTCA_GPUCODE)
33 GPUd() AliHLTTPCCAParam();
36 ~AliHLTTPCCAParam() {;}
38 GPUd() void Initialize( int iSlice, int nRows, float rowX[],
39 float alpha, float dAlpha,
40 float rMin, float rMax, float zMin, float zMax,
41 float padPitch, float zSigma, float bz );
44 GPUd() void Slice2Global( float x, float y, float z,
45 float *X, float *Y, float *Z ) const;
47 GPUd() void Global2Slice( float x, float y, float z,
48 float *X, float *Y, float *Z ) const;
51 GPUhd() int ISlice() const { return fISlice;}
52 GPUhd() int NRows() const { return fNRows;}
54 GPUhd() float RowX( int iRow ) const { return fRowX[iRow]; }
56 GPUd() float Alpha() const { return fAlpha;}
57 GPUd() float Alpha( int iSlice ) const { return 0.174533 + DAlpha()*iSlice;}
58 GPUd() float DAlpha() const { return fDAlpha;}
59 GPUd() float CosAlpha() const { return fCosAlpha;}
60 GPUd() float SinAlpha() const { return fSinAlpha;}
61 GPUd() float AngleMin() const { return fAngleMin;}
62 GPUd() float AngleMax() const { return fAngleMax;}
63 GPUd() float RMin() const { return fRMin;}
64 GPUd() float RMax() const { return fRMax;}
65 GPUd() float ZMin() const { return fZMin;}
66 GPUd() float ZMax() const { return fZMax;}
67 GPUd() float ErrZ() const { return fErrZ;}
68 GPUd() float ErrX() const { return fErrX;}
69 GPUd() float ErrY() const { return fErrY;}
70 GPUd() float Bz() const { return fBz;}
72 GPUd() float TrackConnectionFactor() const { return fTrackConnectionFactor; }
73 GPUd() float TrackChiCut() const { return fTrackChiCut; }
74 GPUd() float TrackChi2Cut() const { return fTrackChi2Cut; }
75 GPUd() int MaxTrackMatchDRow() const { return fMaxTrackMatchDRow; }
76 GPUd() float HitPickUpFactor() const { return fHitPickUpFactor; }
80 GPUhd() void SetISlice( int v ) { fISlice = v;}
81 GPUhd() void SetNRows( int v ) { fNRows = v;}
82 GPUhd() void SetRowX( int iRow, float v ) { fRowX[iRow] = v; }
83 GPUd() void SetAlpha( float v ) { fAlpha = v;}
84 GPUd() void SetDAlpha( float v ) { fDAlpha = v;}
85 GPUd() void SetCosAlpha( float v ) { fCosAlpha = v;}
86 GPUd() void SetSinAlpha( float v ) { fSinAlpha = v;}
87 GPUd() void SetAngleMin( float v ) { fAngleMin = v;}
88 GPUd() void SetAngleMax( float v ) { fAngleMax = v;}
89 GPUd() void SetRMin( float v ) { fRMin = v;}
90 GPUd() void SetRMax( float v ) { fRMax = v;}
91 GPUd() void SetZMin( float v ) { fZMin = v;}
92 GPUd() void SetZMax( float v ) { fZMax = v;}
93 GPUd() void SetErrZ( float v ) { fErrZ = v;}
94 GPUd() void SetErrX( float v ) { fErrX = v;}
95 GPUd() void SetErrY( float v ) { fErrY = v;}
96 GPUd() void SetBz( float v ) { fBz = v;}
97 GPUd() void SetTrackConnectionFactor( float v ) { fTrackConnectionFactor = v;}
98 GPUd() void SetTrackChiCut( float v ) { fTrackChiCut = v; }
99 GPUd() void SetTrackChi2Cut( float v ) { fTrackChi2Cut = v; }
100 GPUd() void SetMaxTrackMatchDRow( int v ) { fMaxTrackMatchDRow = v; }
101 GPUd() void SetHitPickUpFactor( float v ) { fHitPickUpFactor = v; }
104 GPUd() float GetClusterError2( int yz, int type, float z, float angle ) const;
105 GPUd() void GetClusterErrors2( int iRow, float z, float sinPhi, float cosPhi, float DzDs, float &Err2Y, float &Err2Z ) const;
107 void WriteSettings( std::ostream &out ) const;
108 void ReadSettings( std::istream &in );
110 GPUd() void SetParamS0Par( int i, int j, int k, float val ) {
111 fParamS0Par[i][j][k] = val;
114 GPUd() float GetBz() const { return fBz;}
115 GPUd() float GetBz( float x, float y, float z ) const;
116 GPUd() float GetBz( const AliHLTTPCCATrackParam &t ) const;
120 int fISlice; // slice number
121 int fNRows; // number of rows
123 float fAlpha, fDAlpha; // slice angle and angular size
124 float fCosAlpha, fSinAlpha;// sign and cosine of the slice angle
125 float fAngleMin, fAngleMax; // minimal and maximal angle
126 float fRMin, fRMax;// slice R range
127 float fZMin, fZMax;// slice Z range
128 float fErrX, fErrY, fErrZ;// default cluster errors
129 float fPadPitch; // pad pitch
130 float fBz; // magnetic field value (only constant field can be used)
132 float fHitPickUpFactor;// multiplier for the chi2 window for hit pick up procedure
134 int fMaxTrackMatchDRow;// maximal jump in TPC row for connecting track segments
135 float fTrackConnectionFactor; // allowed distance in Chi^2/3.5 for neighbouring tracks
136 float fTrackChiCut; // cut for track Sqrt(Chi2/NDF);
137 float fTrackChi2Cut;// cut for track Chi^2/NDF
139 float fRowX[200];// X-coordinate of rows
140 float fParamS0Par[2][3][7]; // cluster error parameterization coeficients
141 float fPolinomialFieldBz[6]; // field coefficients
147 GPUd() inline float AliHLTTPCCAParam::GetBz( float x, float y, float z ) const
149 float r2 = x * x + y * y;
150 float r = CAMath::Sqrt( r2 );
151 const float *c = fPolinomialFieldBz;
152 return ( c[0] + c[1]*z + c[2]*r + c[3]*z*z + c[4]*z*r + c[5]*r2 );
155 GPUd() inline float AliHLTTPCCAParam::GetBz( const AliHLTTPCCATrackParam &t ) const
157 return GetBz( t.X(), t.Y(), t.Z() );