]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h
added saving of result in alien
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAParam.h
CommitLineData
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 */
28class AliHLTTPCCAParam
29{
fbb9b71b 30 public:
326c2d4b 31
fbb9b71b 32#if !defined(HLTCA_GPUCODE)
33 GPUd() AliHLTTPCCAParam();
00d07bcd 34#endif
35
fbb9b71b 36 ~AliHLTTPCCAParam() {;}
37
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 );
42 GPUd() void Update();
43
44 GPUd() void Slice2Global( float x, float y, float z,
45 float *X, float *Y, float *Z ) const;
46
47 GPUd() void Global2Slice( float x, float y, float z,
48 float *X, float *Y, float *Z ) const;
49
50
51 GPUhd() int ISlice() const { return fISlice;}
52 GPUhd() int NRows() const { return fNRows;}
53
54 GPUhd() float RowX( int iRow ) const { return fRowX[iRow]; }
55
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;}
91794c67 70 GPUd() float BzkG() const { return fBzkG;}
71 GPUd() float ConstBz() const { return fConstBz;}
fbb9b71b 72
73 GPUd() float TrackConnectionFactor() const { return fTrackConnectionFactor; }
74 GPUd() float TrackChiCut() const { return fTrackChiCut; }
75 GPUd() float TrackChi2Cut() const { return fTrackChi2Cut; }
76 GPUd() int MaxTrackMatchDRow() const { return fMaxTrackMatchDRow; }
77 GPUd() float HitPickUpFactor() const { return fHitPickUpFactor; }
78
79
80
81 GPUhd() void SetISlice( int v ) { fISlice = v;}
82 GPUhd() void SetNRows( int v ) { fNRows = v;}
83 GPUhd() void SetRowX( int iRow, float v ) { fRowX[iRow] = v; }
84 GPUd() void SetAlpha( float v ) { fAlpha = v;}
85 GPUd() void SetDAlpha( float v ) { fDAlpha = v;}
86 GPUd() void SetCosAlpha( float v ) { fCosAlpha = v;}
87 GPUd() void SetSinAlpha( float v ) { fSinAlpha = v;}
88 GPUd() void SetAngleMin( float v ) { fAngleMin = v;}
89 GPUd() void SetAngleMax( float v ) { fAngleMax = v;}
90 GPUd() void SetRMin( float v ) { fRMin = v;}
91 GPUd() void SetRMax( float v ) { fRMax = v;}
92 GPUd() void SetZMin( float v ) { fZMin = v;}
93 GPUd() void SetZMax( float v ) { fZMax = v;}
94 GPUd() void SetErrZ( float v ) { fErrZ = v;}
95 GPUd() void SetErrX( float v ) { fErrX = v;}
96 GPUd() void SetErrY( float v ) { fErrY = v;}
91794c67 97 GPUd() void SetBzkG( float v ) { fBzkG = v;}
fbb9b71b 98 GPUd() void SetTrackConnectionFactor( float v ) { fTrackConnectionFactor = v;}
99 GPUd() void SetTrackChiCut( float v ) { fTrackChiCut = v; }
100 GPUd() void SetTrackChi2Cut( float v ) { fTrackChi2Cut = v; }
101 GPUd() void SetMaxTrackMatchDRow( int v ) { fMaxTrackMatchDRow = v; }
102 GPUd() void SetHitPickUpFactor( float v ) { fHitPickUpFactor = v; }
103
104
105 GPUd() float GetClusterError2( int yz, int type, float z, float angle ) const;
106 GPUd() void GetClusterErrors2( int iRow, float z, float sinPhi, float cosPhi, float DzDs, float &Err2Y, float &Err2Z ) const;
107
108 void WriteSettings( std::ostream &out ) const;
109 void ReadSettings( std::istream &in );
110
111 GPUd() void SetParamS0Par( int i, int j, int k, float val ) {
112 fParamS0Par[i][j][k] = val;
113 }
114
91794c67 115 GPUd() float GetBzkG() const { return fBzkG;}
116 GPUd() float GetConstBz() const { return fConstBz;}
fbb9b71b 117 GPUd() float GetBz( float x, float y, float z ) const;
118 GPUd() float GetBz( const AliHLTTPCCATrackParam &t ) const;
15d2e9cf 119
00d07bcd 120 protected:
326c2d4b 121
fbb9b71b 122 int fISlice; // slice number
123 int fNRows; // number of rows
d54804bf 124
fbb9b71b 125 float fAlpha, fDAlpha; // slice angle and angular size
126 float fCosAlpha, fSinAlpha;// sign and cosine of the slice angle
127 float fAngleMin, fAngleMax; // minimal and maximal angle
128 float fRMin, fRMax;// slice R range
129 float fZMin, fZMax;// slice Z range
130 float fErrX, fErrY, fErrZ;// default cluster errors
131 float fPadPitch; // pad pitch
91794c67 132 float fBzkG; // constant magnetic field value in kG
133 float fConstBz; // constant magnetic field value in kG*clight
eb30eb49 134
fbb9b71b 135 float fHitPickUpFactor;// multiplier for the chi2 window for hit pick up procedure
eb30eb49 136
fbb9b71b 137 int fMaxTrackMatchDRow;// maximal jump in TPC row for connecting track segments
138 float fTrackConnectionFactor; // allowed distance in Chi^2/3.5 for neighbouring tracks
139 float fTrackChiCut; // cut for track Sqrt(Chi2/NDF);
140 float fTrackChi2Cut;// cut for track Chi^2/NDF
eb30eb49 141
fbb9b71b 142 float fRowX[200];// X-coordinate of rows
143 float fParamS0Par[2][3][7]; // cluster error parameterization coeficients
144 float fPolinomialFieldBz[6]; // field coefficients
dc4788ec 145
326c2d4b 146};
147
148
15d2e9cf 149
fbb9b71b 150GPUd() inline float AliHLTTPCCAParam::GetBz( float x, float y, float z ) const
15d2e9cf 151{
fbb9b71b 152 float r2 = x * x + y * y;
15d2e9cf 153 float r = CAMath::Sqrt( r2 );
154 const float *c = fPolinomialFieldBz;
155 return ( c[0] + c[1]*z + c[2]*r + c[3]*z*z + c[4]*z*r + c[5]*r2 );
156}
157
fbb9b71b 158GPUd() inline float AliHLTTPCCAParam::GetBz( const AliHLTTPCCATrackParam &t ) const
15d2e9cf 159{
160 return GetBz( t.X(), t.Y(), t.Z() );
161}
162
326c2d4b 163#endif