]>
Commit | Line | Data |
---|---|---|
326c2d4b | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id$ | |
ce565086 | 3 | // ************************************************************************ |
fbb9b71b | 4 | // This file is property of and copyright by the ALICE HLT Project * |
ce565086 | 5 | // ALICE Experiment at CERN, All rights reserved. * |
6 | // See cxx source for full Copyright notice * | |
7 | // * | |
8 | //************************************************************************* | |
326c2d4b | 9 | |
10 | #ifndef ALIHLTTPCCAPARAM_H | |
11 | #define ALIHLTTPCCAPARAM_H | |
12 | ||
00d07bcd | 13 | #include "AliHLTTPCCADef.h" |
15d2e9cf | 14 | #include "AliHLTTPCCAMath.h" |
15 | #include "AliHLTTPCCATrackParam.h" | |
16fc8dc8 | 16 | |
4687b8fc | 17 | #include <iostream> |
00d07bcd | 18 | |
326c2d4b | 19 | |
20 | /** | |
21 | * @class ALIHLTTPCCAParam | |
d54804bf | 22 | * parameters of the AliHLTTPCCATracker, including geometry information |
326c2d4b | 23 | * and some reconstructon constants. |
dc4788ec | 24 | * |
25 | * The class is under construction. | |
26 | * | |
326c2d4b | 27 | */ |
28 | class AliHLTTPCCAParam | |
29 | { | |
fbb9b71b | 30 | public: |
326c2d4b | 31 | |
fbb9b71b | 32 | #if !defined(HLTCA_GPUCODE) |
33 | GPUd() AliHLTTPCCAParam(); | |
00d07bcd | 34 | |
fbb9b71b | 35 | ~AliHLTTPCCAParam() {;} |
36 | ||
7be9b0d7 | 37 | void Initialize( int iSlice, int nRows, float rowX[], |
fbb9b71b | 38 | float alpha, float dAlpha, |
39 | float rMin, float rMax, float zMin, float zMax, | |
40 | float padPitch, float zSigma, float bz ); | |
7be9b0d7 | 41 | void Update(); |
42 | ||
43 | #endif | |
fbb9b71b | 44 | |
7be9b0d7 | 45 | GPUd() void Slice2Global( float x, float y, float z, |
fbb9b71b | 46 | float *X, float *Y, float *Z ) const; |
47 | ||
48 | GPUd() void Global2Slice( float x, float y, float z, | |
49 | float *X, float *Y, float *Z ) const; | |
50 | ||
51 | ||
52 | GPUhd() int ISlice() const { return fISlice;} | |
53 | GPUhd() int NRows() const { return fNRows;} | |
54 | ||
55 | GPUhd() float RowX( int iRow ) const { return fRowX[iRow]; } | |
56 | ||
57 | GPUd() float Alpha() const { return fAlpha;} | |
58 | GPUd() float Alpha( int iSlice ) const { return 0.174533 + DAlpha()*iSlice;} | |
59 | GPUd() float DAlpha() const { return fDAlpha;} | |
60 | GPUd() float CosAlpha() const { return fCosAlpha;} | |
61 | GPUd() float SinAlpha() const { return fSinAlpha;} | |
62 | GPUd() float AngleMin() const { return fAngleMin;} | |
63 | GPUd() float AngleMax() const { return fAngleMax;} | |
64 | GPUd() float RMin() const { return fRMin;} | |
65 | GPUd() float RMax() const { return fRMax;} | |
66 | GPUd() float ZMin() const { return fZMin;} | |
67 | GPUd() float ZMax() const { return fZMax;} | |
68 | GPUd() float ErrZ() const { return fErrZ;} | |
69 | GPUd() float ErrX() const { return fErrX;} | |
70 | GPUd() float ErrY() const { return fErrY;} | |
91794c67 | 71 | GPUd() float BzkG() const { return fBzkG;} |
72 | GPUd() float ConstBz() const { return fConstBz;} | |
fbb9b71b | 73 | |
74 | GPUd() float TrackConnectionFactor() const { return fTrackConnectionFactor; } | |
75 | GPUd() float TrackChiCut() const { return fTrackChiCut; } | |
76 | GPUd() float TrackChi2Cut() const { return fTrackChi2Cut; } | |
77 | GPUd() int MaxTrackMatchDRow() const { return fMaxTrackMatchDRow; } | |
78 | GPUd() float HitPickUpFactor() const { return fHitPickUpFactor; } | |
79 | ||
80 | ||
81 | ||
82 | GPUhd() void SetISlice( int v ) { fISlice = v;} | |
83 | GPUhd() void SetNRows( int v ) { fNRows = v;} | |
84 | GPUhd() void SetRowX( int iRow, float v ) { fRowX[iRow] = v; } | |
85 | GPUd() void SetAlpha( float v ) { fAlpha = v;} | |
86 | GPUd() void SetDAlpha( float v ) { fDAlpha = v;} | |
87 | GPUd() void SetCosAlpha( float v ) { fCosAlpha = v;} | |
88 | GPUd() void SetSinAlpha( float v ) { fSinAlpha = v;} | |
89 | GPUd() void SetAngleMin( float v ) { fAngleMin = v;} | |
90 | GPUd() void SetAngleMax( float v ) { fAngleMax = v;} | |
91 | GPUd() void SetRMin( float v ) { fRMin = v;} | |
92 | GPUd() void SetRMax( float v ) { fRMax = v;} | |
93 | GPUd() void SetZMin( float v ) { fZMin = v;} | |
94 | GPUd() void SetZMax( float v ) { fZMax = v;} | |
95 | GPUd() void SetErrZ( float v ) { fErrZ = v;} | |
96 | GPUd() void SetErrX( float v ) { fErrX = v;} | |
97 | GPUd() void SetErrY( float v ) { fErrY = v;} | |
91794c67 | 98 | GPUd() void SetBzkG( float v ) { fBzkG = v;} |
fbb9b71b | 99 | GPUd() void SetTrackConnectionFactor( float v ) { fTrackConnectionFactor = v;} |
100 | GPUd() void SetTrackChiCut( float v ) { fTrackChiCut = v; } | |
101 | GPUd() void SetTrackChi2Cut( float v ) { fTrackChi2Cut = v; } | |
102 | GPUd() void SetMaxTrackMatchDRow( int v ) { fMaxTrackMatchDRow = v; } | |
103 | GPUd() void SetHitPickUpFactor( float v ) { fHitPickUpFactor = v; } | |
104 | ||
105 | ||
106 | GPUd() float GetClusterError2( int yz, int type, float z, float angle ) const; | |
107 | GPUd() void GetClusterErrors2( int iRow, float z, float sinPhi, float cosPhi, float DzDs, float &Err2Y, float &Err2Z ) const; | |
108 | ||
109 | void WriteSettings( std::ostream &out ) const; | |
110 | void ReadSettings( std::istream &in ); | |
111 | ||
112 | GPUd() void SetParamS0Par( int i, int j, int k, float val ) { | |
113 | fParamS0Par[i][j][k] = val; | |
114 | } | |
115 | ||
91794c67 | 116 | GPUd() float GetBzkG() const { return fBzkG;} |
117 | GPUd() float GetConstBz() const { return fConstBz;} | |
fbb9b71b | 118 | GPUd() float GetBz( float x, float y, float z ) const; |
119 | GPUd() float GetBz( const AliHLTTPCCATrackParam &t ) const; | |
15d2e9cf | 120 | |
7be9b0d7 | 121 | #ifndef CUDA_DEVICE_EMULATION |
00d07bcd | 122 | protected: |
7be9b0d7 | 123 | #endif |
326c2d4b | 124 | |
fbb9b71b | 125 | int fISlice; // slice number |
126 | int fNRows; // number of rows | |
d54804bf | 127 | |
fbb9b71b | 128 | float fAlpha, fDAlpha; // slice angle and angular size |
129 | float fCosAlpha, fSinAlpha;// sign and cosine of the slice angle | |
130 | float fAngleMin, fAngleMax; // minimal and maximal angle | |
131 | float fRMin, fRMax;// slice R range | |
132 | float fZMin, fZMax;// slice Z range | |
133 | float fErrX, fErrY, fErrZ;// default cluster errors | |
134 | float fPadPitch; // pad pitch | |
91794c67 | 135 | float fBzkG; // constant magnetic field value in kG |
136 | float fConstBz; // constant magnetic field value in kG*clight | |
eb30eb49 | 137 | |
fbb9b71b | 138 | float fHitPickUpFactor;// multiplier for the chi2 window for hit pick up procedure |
eb30eb49 | 139 | |
fbb9b71b | 140 | int fMaxTrackMatchDRow;// maximal jump in TPC row for connecting track segments |
141 | float fTrackConnectionFactor; // allowed distance in Chi^2/3.5 for neighbouring tracks | |
142 | float fTrackChiCut; // cut for track Sqrt(Chi2/NDF); | |
143 | float fTrackChi2Cut;// cut for track Chi^2/NDF | |
eb30eb49 | 144 | |
fbb9b71b | 145 | float fRowX[200];// X-coordinate of rows |
146 | float fParamS0Par[2][3][7]; // cluster error parameterization coeficients | |
147 | float fPolinomialFieldBz[6]; // field coefficients | |
dc4788ec | 148 | |
326c2d4b | 149 | }; |
150 | ||
151 | ||
15d2e9cf | 152 | |
fbb9b71b | 153 | GPUd() inline float AliHLTTPCCAParam::GetBz( float x, float y, float z ) const |
15d2e9cf | 154 | { |
fbb9b71b | 155 | float r2 = x * x + y * y; |
15d2e9cf | 156 | float r = CAMath::Sqrt( r2 ); |
157 | const float *c = fPolinomialFieldBz; | |
158 | return ( c[0] + c[1]*z + c[2]*r + c[3]*z*z + c[4]*z*r + c[5]*r2 ); | |
159 | } | |
160 | ||
fbb9b71b | 161 | GPUd() inline float AliHLTTPCCAParam::GetBz( const AliHLTTPCCATrackParam &t ) const |
15d2e9cf | 162 | { |
163 | return GetBz( t.X(), t.Y(), t.Z() ); | |
164 | } | |
165 | ||
326c2d4b | 166 | #endif |