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