]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h
Coding violations
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAParam.h
... / ...
CommitLineData
1//-*- Mode: C++ -*-
2// @(#) $Id$
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#ifndef ALIHLTTPCCAPARAM_H
11#define ALIHLTTPCCAPARAM_H
12
13#include "AliHLTTPCCADef.h"
14#include "AliHLTTPCCAMath.h"
15#include "AliHLTTPCCATrackParam.h"
16
17#include <iostream>
18
19
20/**
21 * @class ALIHLTTPCCAParam
22 * parameters of the AliHLTTPCCATracker, including geometry information
23 * and some reconstructon constants.
24 *
25 * The class is under construction.
26 *
27 */
28class AliHLTTPCCAParam
29{
30 public:
31 AliHLTTPCCAParam();
32 ~AliHLTTPCCAParam() {}
33
34#if !defined(HLTCA_GPUCODE)
35 void Initialize( int iSlice, int nRows, float rowX[],
36 float alpha, float dAlpha,
37 float rMin, float rMax, float zMin, float zMax,
38 float padPitch, float zSigma, float bz );
39 void Update();
40#endif //!HLTCA_GPUCODE
41
42 GPUd() void Slice2Global( float x, float y, float z,
43 float *X, float *Y, float *Z ) const;
44
45 GPUd() void Global2Slice( float x, float y, float z,
46 float *X, float *Y, float *Z ) const;
47
48
49 GPUhd() int ISlice() const { return fISlice;}
50 GPUhd() int NRows() const { return fNRows;}
51
52 GPUhd() float RowX( int iRow ) const { return fRowX[iRow]; }
53
54 GPUd() float Alpha() const { return fAlpha;}
55 GPUd() float Alpha( int iSlice ) const { return 0.174533 + DAlpha()*iSlice;}
56 GPUd() float DAlpha() const { return fDAlpha;}
57 GPUd() float CosAlpha() const { return fCosAlpha;}
58 GPUd() float SinAlpha() const { return fSinAlpha;}
59 GPUd() float AngleMin() const { return fAngleMin;}
60 GPUd() float AngleMax() const { return fAngleMax;}
61 GPUd() float RMin() const { return fRMin;}
62 GPUd() float RMax() const { return fRMax;}
63 GPUd() float ZMin() const { return fZMin;}
64 GPUd() float ZMax() const { return fZMax;}
65 GPUd() float ErrZ() const { return fErrZ;}
66 GPUd() float ErrX() const { return fErrX;}
67 GPUd() float ErrY() const { return fErrY;}
68 GPUd() float BzkG() const { return fBzkG;}
69 GPUd() float ConstBz() const { return fConstBz;}
70
71 GPUd() float NeighboursSearchArea() const { return fNeighboursSearchArea; }
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; }
77 GPUd() float ClusterError2CorrectionY() const { return fClusterError2CorrectionY; }
78 GPUd() float ClusterError2CorrectionZ() const { return fClusterError2CorrectionZ; }
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;}
98 GPUd() void SetBzkG( float v ) { fBzkG = v;}
99
100 GPUd() void SetNeighboursSearchArea( float v ) { fNeighboursSearchArea = v;}
101 GPUd() void SetTrackConnectionFactor( float v ) { fTrackConnectionFactor = v;}
102 GPUd() void SetTrackChiCut( float v ) { fTrackChiCut = v; }
103 GPUd() void SetTrackChi2Cut( float v ) { fTrackChi2Cut = v; }
104 GPUd() void SetMaxTrackMatchDRow( int v ) { fMaxTrackMatchDRow = v; }
105 GPUd() void SetHitPickUpFactor( float v ) { fHitPickUpFactor = v; }
106 GPUd() void SetClusterError2CorrectionY( float v ) { fClusterError2CorrectionY = v; }
107 GPUd() void SetClusterError2CorrectionZ( float v ) { fClusterError2CorrectionZ = v; }
108
109
110 GPUd() float GetClusterError2( int yz, int type, float z, float angle ) const;
111 GPUd() void GetClusterErrors2( int iRow, float z, float sinPhi, float cosPhi, float DzDs, float &Err2Y, float &Err2Z ) const;
112
113 void WriteSettings( std::ostream &out ) const;
114 void ReadSettings( std::istream &in );
115
116 GPUd() void SetParamS0Par( int i, int j, int k, float val ) {
117 fParamS0Par[i][j][k] = val;
118 }
119
120 GPUd() float GetBzkG() const { return fBzkG;}
121 GPUd() float GetConstBz() const { return fConstBz;}
122 GPUd() float GetBz( float x, float y, float z ) const;
123 GPUd() float GetBz( const AliHLTTPCCATrackParam &t ) const;
124
125 protected:
126 int fISlice; // slice number
127 int fNRows; // number of rows
128
129 float fAlpha, fDAlpha; // slice angle and angular size
130 float fCosAlpha, fSinAlpha;// sign and cosine of the slice angle
131 float fAngleMin, fAngleMax; // minimal and maximal angle
132 float fRMin, fRMax;// slice R range
133 float fZMin, fZMax;// slice Z range
134 float fErrX, fErrY, fErrZ;// default cluster errors
135 float fPadPitch; // pad pitch
136 float fBzkG; // constant magnetic field value in kG
137 float fConstBz; // constant magnetic field value in kG*clight
138
139 float fHitPickUpFactor;// multiplier for the chi2 window for hit pick up procedure
140
141 int fMaxTrackMatchDRow;// maximal jump in TPC row for connecting track segments
142
143 float fNeighboursSearchArea; // area in cm for the search of neighbours
144
145 float fTrackConnectionFactor; // allowed distance in Chi^2/3.5 for neighbouring tracks
146 float fTrackChiCut; // cut for track Sqrt(Chi2/NDF);
147 float fTrackChi2Cut;// cut for track Chi^2/NDF
148 float fClusterError2CorrectionY; // correction for the squared cluster error during tracking
149 float fClusterError2CorrectionZ; // correction for the squared cluster error during tracking
150 float fRowX[200];// X-coordinate of rows
151 float fParamS0Par[2][3][7]; // cluster error parameterization coeficients
152 float fPolinomialFieldBz[6]; // field coefficients
153
154};
155
156
157
158GPUd() inline float AliHLTTPCCAParam::GetBz( float x, float y, float z ) const
159{
160 float r2 = x * x + y * y;
161 float r = CAMath::Sqrt( r2 );
162 const float *c = fPolinomialFieldBz;
163 return ( c[0] + c[1]*z + c[2]*r + c[3]*z*z + c[4]*z*r + c[5]*r2 );
164}
165
166GPUd() inline float AliHLTTPCCAParam::GetBz( const AliHLTTPCCATrackParam &t ) const
167{
168 return GetBz( t.X(), t.Y(), t.Z() );
169}
170
171#endif //ALIHLTTPCCAPARAM_H