]>
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 | // AliHLT3DTrackParam class is under development and currently not in use * | |
9 | // * | |
10 | //**************************************************************************** | |
326c2d4b | 11 | |
12 | #ifndef ALIHLT3DTRACKPARAM_H | |
13 | #define ALIHLT3DTRACKPARAM_H | |
14 | ||
d54804bf | 15 | #include "TObject.h" |
326c2d4b | 16 | |
17 | /** | |
18 | * @class AliHLT3DTrackParam | |
19 | */ | |
fbb9b71b | 20 | class AliHLT3DTrackParam : public TObject |
d54804bf | 21 | { |
fbb9b71b | 22 | public: |
23 | ||
24 | //* | |
25 | //* INITIALIZATION | |
26 | //* | |
27 | ||
28 | //* Constructor | |
29 | ||
30 | AliHLT3DTrackParam(): fChi2( 0 ), fNDF( 0 ), fSignQ( 0 ) {} | |
31 | ||
32 | //* Destructor (empty) | |
33 | ||
34 | virtual ~AliHLT3DTrackParam() {} | |
35 | ||
36 | //* | |
37 | //* ACCESSORS | |
38 | //* | |
39 | ||
40 | ||
41 | //* Simple accessors | |
42 | ||
43 | double GetX() const { return fParam[0]; } | |
44 | double GetY() const { return fParam[1]; } | |
45 | double GetZ() const { return fParam[2]; } | |
46 | double GetPx() const { return fParam[3]; } | |
47 | double GetPy() const { return fParam[4]; } | |
48 | double GetPz() const { return fParam[5]; } | |
49 | double GetChi2() const { return fChi2; } | |
50 | int GetNDF() const { return fNDF; } | |
51 | int GetCharge() const { return fSignQ; } | |
52 | ||
53 | double GetParameter ( int i ) const { return fParam[i]; } | |
54 | double GetCovariance( int i ) const { return fCov[i]; } | |
55 | double GetCovariance( int i, int j ) const { return fCov[( j<=i ) ? i*( i+1 )/2+j :j*( j+1 )/2+i]; } | |
56 | ||
57 | //* | |
58 | //* Accessors | |
59 | //* | |
60 | ||
61 | const double *Param() const { return fParam; } | |
62 | const double *Cov() const { return fCov; } | |
63 | double X() const { return fParam[0]; } | |
64 | double Y() const { return fParam[1]; } | |
65 | double Z() const { return fParam[2]; } | |
66 | double Px() const { return fParam[3]; } | |
67 | double Py() const { return fParam[4]; } | |
68 | double Pz() const { return fParam[5]; } | |
69 | double Chi2() const { return fChi2; } | |
70 | int NDF() const { return fNDF; } | |
71 | int Charge() const { return fSignQ; } | |
72 | ||
73 | //* Accessors with calculations( &value, &estimated sigma ) | |
74 | //* error flag returned (0 means no error during calculations) | |
75 | ||
76 | ||
77 | //* | |
78 | //* MODIFIERS | |
79 | //* | |
80 | ||
81 | void SetParam( int i, double v ) { fParam[i] = v; } | |
82 | void SetCov( int i, double v ) { fCov[i] = v; } | |
83 | void SetX( double v ) { fParam[0] = v; } | |
84 | void SetY( double v ) { fParam[1] = v; } | |
85 | void SetZ( double v ) { fParam[2] = v; } | |
86 | void SetPx( double v ) { fParam[3] = v; } | |
87 | void SetPy( double v ) { fParam[4] = v; } | |
88 | void SetPz( double v ) { fParam[5] = v; } | |
89 | void SetChi2( double v ) { fChi2 = v; } | |
90 | void SetNDF( int v ) { fNDF = v; } | |
91 | void SetCharge( int v ) { fSignQ = v; } | |
92 | ||
93 | ||
94 | //* | |
95 | //* UTILITIES | |
96 | //* | |
97 | ||
98 | //* Transport utilities | |
99 | ||
100 | double GetDStoPoint( double Bz, const double xyz[3], const double *T0 = 0 ) const; | |
101 | ||
102 | void TransportToDS( double Bz, double DS, double *T0 = 0 ); | |
103 | ||
104 | void TransportToPoint( double Bz, const double xyz[3], double *T0 = 0 ) { | |
105 | TransportToDS( Bz, GetDStoPoint( Bz, xyz, T0 ), T0 ) ; | |
326c2d4b | 106 | } |
107 | ||
fbb9b71b | 108 | void TransportToPoint( double Bz, double x, double y, double z, const double *T0 = 0 ) { |
109 | double xyz[3] = {x, y, z}; | |
326c2d4b | 110 | TransportToPoint( Bz, xyz, T0 ); |
111 | } | |
112 | ||
fbb9b71b | 113 | //* Fit utilities |
326c2d4b | 114 | |
fbb9b71b | 115 | void InitializeCovarianceMatrix(); |
326c2d4b | 116 | |
fbb9b71b | 117 | void GetGlueMatrix( const double p[3], double G[6], const double *T0 = 0 ) const ; |
326c2d4b | 118 | |
fbb9b71b | 119 | void Filter( const double m[3], const double V[6], const double G[6] ); |
326c2d4b | 120 | |
fbb9b71b | 121 | //* Other utilities |
326c2d4b | 122 | |
fbb9b71b | 123 | void SetDirection( double Direction[3] ); |
326c2d4b | 124 | |
fbb9b71b | 125 | void RotateCoordinateSystem( double alpha ); |
326c2d4b | 126 | |
fbb9b71b | 127 | void Get5Parameters( double alpha, double T[6], double C[15] ) const; |
326c2d4b | 128 | |
fbb9b71b | 129 | protected: |
326c2d4b | 130 | |
fbb9b71b | 131 | double fParam[6]; // Parameters ( x, y, z, px, py, pz ): 3-position and 3-momentum |
132 | double fCov[21]; // Covariance matrix | |
133 | double fChi2; // Chi^2 | |
134 | int fNDF; // Number of Degrees of Freedom | |
135 | int fSignQ; // Charge | |
326c2d4b | 136 | |
fbb9b71b | 137 | ClassDef( AliHLT3DTrackParam, 1 ); |
326c2d4b | 138 | |
139 | }; | |
140 | ||
141 | ||
142 | #endif |