]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCATrackParam.h
cosmetical changes
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATrackParam.h
CommitLineData
d54804bf 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//*************************************************************************
d54804bf 9
10
11#ifndef ALIHLTTPCCATRACKPARAM_H
12#define ALIHLTTPCCATRACKPARAM_H
13
00d07bcd 14#include "AliHLTTPCCADef.h"
15d2e9cf 15#include "AliHLTTPCCAMath.h"
d54804bf 16
15d2e9cf 17class AliHLTTPCCATrackLinearisation;
eb30eb49 18
d54804bf 19/**
20 * @class AliHLTTPCCATrackParam
21 *
22 * AliHLTTPCCATrackParam class describes the track parametrisation
23 * which is used by the AliHLTTPCCATracker slice tracker.
24 *
25 */
d54804bf 26class AliHLTTPCCATrackParam
27{
fbb9b71b 28 public:
d54804bf 29
fbb9b71b 30 struct AliHLTTPCCATrackFitParam {
31 float fBethe, fE, fTheta2, fEP2, fSigmadE2, fK22, fK33, fK43, fK44;// parameters
32 };
00d07bcd 33
fbb9b71b 34 GPUd() float X() const { return fX; }
35 GPUd() float Y() const { return fP[0]; }
36 GPUd() float Z() const { return fP[1]; }
37 GPUd() float SinPhi() const { return fP[2]; }
38 GPUd() float DzDs() const { return fP[3]; }
39 GPUd() float QPt() const { return fP[4]; }
40 GPUd() float SignCosPhi() const { return fSignCosPhi; }
41 GPUd() float Chi2() const { return fChi2; }
42 GPUd() int NDF() const { return fNDF; }
693d2443 43
fbb9b71b 44 float Err2Y() const { return fC[0]; }
45 float Err2Z() const { return fC[2]; }
46 float Err2SinPhi() const { return fC[5]; }
47 float Err2DzDs() const { return fC[9]; }
48 float Err2QPt() const { return fC[14]; }
d54804bf 49
fbb9b71b 50 GPUd() float GetX() const { return fX; }
51 GPUd() float GetY() const { return fP[0]; }
52 GPUd() float GetZ() const { return fP[1]; }
53 GPUd() float GetSinPhi() const { return fP[2]; }
54 GPUd() float GetDzDs() const { return fP[3]; }
55 GPUd() float GetQPt() const { return fP[4]; }
56 GPUd() float GetSignCosPhi() const { return fSignCosPhi; }
57 GPUd() float GetChi2() const { return fChi2; }
58 GPUd() int GetNDF() const { return fNDF; }
00d07bcd 59
fbb9b71b 60 GPUd() float GetKappa( float Bz ) const { return fP[4]*Bz; }
61 GPUd() float GetCosPhi() const { return fSignCosPhi*CAMath::Sqrt( 1 - SinPhi()*SinPhi() ); }
15d2e9cf 62
fbb9b71b 63 GPUd() float GetErr2Y() const { return fC[0]; }
64 GPUd() float GetErr2Z() const { return fC[2]; }
65 GPUd() float GetErr2SinPhi() const { return fC[5]; }
66 GPUd() float GetErr2DzDs() const { return fC[9]; }
67 GPUd() float GetErr2QPt() const { return fC[14]; }
00d07bcd 68
fbb9b71b 69 GPUhd() const float *Par() const { return fP; }
70 GPUhd() const float *Cov() const { return fC; }
d54804bf 71
fbb9b71b 72 const float *GetPar() const { return fP; }
73 const float *GetCov() const { return fC; }
eb30eb49 74
fbb9b71b 75 GPUhd() void SetPar( int i, float v ) { fP[i] = v; }
76 GPUhd() void SetCov( int i, float v ) { fC[i] = v; }
693d2443 77
fbb9b71b 78 GPUd() void SetX( float v ) { fX = v; }
79 GPUd() void SetY( float v ) { fP[0] = v; }
80 GPUd() void SetZ( float v ) { fP[1] = v; }
81 GPUd() void SetSinPhi( float v ) { fP[2] = v; }
82 GPUd() void SetDzDs( float v ) { fP[3] = v; }
83 GPUd() void SetQPt( float v ) { fP[4] = v; }
84 GPUd() void SetSignCosPhi( float v ) { fSignCosPhi = v; }
85 GPUd() void SetChi2( float v ) { fChi2 = v; }
86 GPUd() void SetNDF( int v ) { fNDF = v; }
693d2443 87
88
fbb9b71b 89 GPUd() float GetDist2( const AliHLTTPCCATrackParam &t ) const;
90 GPUd() float GetDistXZ2( const AliHLTTPCCATrackParam &t ) const;
693d2443 91
d54804bf 92
fbb9b71b 93 GPUd() float GetS( float x, float y, float Bz ) const;
d54804bf 94
fbb9b71b 95 GPUd() void GetDCAPoint( float x, float y, float z,
96 float &px, float &py, float &pz, float Bz ) const;
15d2e9cf 97
15d2e9cf 98
fbb9b71b 99 GPUd() bool TransportToX( float x, float Bz, float maxSinPhi = .999 );
100 GPUd() bool TransportToXWithMaterial( float x, float Bz, float maxSinPhi = .999 );
15d2e9cf 101
fbb9b71b 102 GPUd() bool TransportToX( float x, AliHLTTPCCATrackLinearisation &t0,
103 float Bz, float maxSinPhi = .999, float *DL = 0 );
693d2443 104
fbb9b71b 105 GPUd() bool TransportToX( float x, float sinPhi0, float cosPhi0, float Bz, float maxSinPhi = .999 );
d54804bf 106
4687b8fc 107
fbb9b71b 108 GPUd() bool TransportToXWithMaterial( float x, AliHLTTPCCATrackLinearisation &t0,
109 AliHLTTPCCATrackFitParam &par, float Bz, float maxSinPhi = .999 );
4687b8fc 110
fbb9b71b 111 GPUd() bool TransportToXWithMaterial( float x,
112 AliHLTTPCCATrackFitParam &par, float Bz, float maxSinPhi = .999 );
eb30eb49 113
15d2e9cf 114
115
fbb9b71b 116 GPUd() static float ApproximateBetheBloch( float beta2 );
117 GPUd() static float BetheBlochGeant( float bg,
118 float kp0 = 2.33,
119 float kp1 = 0.20,
120 float kp2 = 3.00,
121 float kp3 = 173e-9,
122 float kp4 = 0.49848
123 );
124 GPUd() static float BetheBlochSolid( float bg );
125 GPUd() static float BetheBlochGas( float bg );
15d2e9cf 126
15d2e9cf 127
fbb9b71b 128 GPUd() void CalculateFitParameters( AliHLTTPCCATrackFitParam &par, float mass = 0.13957 );
129 GPUd() bool CorrectForMeanMaterial( float xOverX0, float xTimesRho, const AliHLTTPCCATrackFitParam &par );
15d2e9cf 130
fbb9b71b 131 GPUd() bool Rotate( float alpha, float maxSinPhi = .999 );
132 GPUd() bool Rotate( float alpha, AliHLTTPCCATrackLinearisation &t0, float maxSinPhi = .999 );
133 GPUd() bool Filter( float y, float z, float err2Y, float err2Z, float maxSinPhi = .999 );
d54804bf 134
d54804bf 135
fbb9b71b 136 GPUd() void Print() const;
137
138 private:
139
140 float fX; // x position
141 float fSignCosPhi; // sign of cosPhi
142 float fP[5]; // 'active' track parameters: Y, Z, SinPhi, DzDs, q/Pt
143 float fC[15]; // the covariance matrix for Y,Z,SinPhi,..
144 float fChi2; // the chi^2 value
145 int fNDF; // the Number of Degrees of Freedom
d54804bf 146};
147
d54804bf 148#endif