Line data Source code
1 : // ************************************************************************
2 : // This file is property of and copyright by the ALICE HLT Project *
3 : // ALICE Experiment at CERN, All rights reserved. *
4 : // See cxx source for full Copyright notice *
5 : // *
6 : //*************************************************************************
7 :
8 :
9 : #ifndef ALIHLTTPCGMTRACKLINEARISATION_H
10 : #define ALIHLTTPCGMTRACKLINEARISATION_H
11 :
12 : #include "AliHLTTPCGMTrackParam.h"
13 :
14 :
15 : /**
16 : * @class AliHLTTPCGMTrackLinearisation
17 : *
18 : * AliHLTTPCGMTrackLinearisation class describes the parameters which are used
19 : * to linearise the transport equations for the track trajectory.
20 : *
21 : * The class is used during track (re)fit, when the AliHLTTPCTrackParam track is only
22 : * partially fitted, and there is some apriory knowledge about trajectory.
23 : * This apriory knowledge is used to linearise the transport equations.
24 : *
25 : * In case the track is fully fitted, the best linearisation point is
26 : * the track trajectory itself (AliHLTTPCGMTrackLinearisation = AliHLTTPCGMTrackParam ).
27 : *
28 : */
29 : class AliHLTTPCGMTrackLinearisation
30 : {
31 :
32 : public:
33 :
34 : GPUd() AliHLTTPCGMTrackLinearisation()
35 : : fSinPhi( 0. ), fCosPhi( 1. ), fSecPhi( 1. ), fDzDs( 0. ), fDlDs( 0.), fQPt( 0. ) {}
36 :
37 : GPUd() AliHLTTPCGMTrackLinearisation( float SinPhi1, float CosPhi1, float SecPhi1, float DzDs1, float DlDs1, float QPt1 )
38 : : fSinPhi( SinPhi1 ), fCosPhi( CosPhi1 ), fSecPhi( SecPhi1 ), fDzDs( DzDs1 ), fDlDs( DlDs1), fQPt( QPt1 ) {}
39 :
40 : GPUd() AliHLTTPCGMTrackLinearisation( const AliHLTTPCGMTrackParam &t );
41 :
42 : GPUd() void Set( float SinPhi1, float CosPhi1, float SecPhi1, float DzDs1, float DlDs1, float QPt1 );
43 :
44 :
45 0 : GPUd() float& SinPhi() { return fSinPhi; }
46 0 : GPUd() float& CosPhi() { return fCosPhi; }
47 0 : GPUd() float& SecPhi() { return fSecPhi; }
48 0 : GPUd() float& DzDs() { return fDzDs; }
49 0 : GPUd() float& DlDs() { return fDlDs; }
50 0 : GPUd() float& QPt() { return fQPt; }
51 :
52 :
53 : private:
54 : float fSinPhi; // SinPhi
55 : float fCosPhi; // CosPhi
56 : float fSecPhi; // 1/cos(phi)
57 : float fDzDs; // DzDs
58 : float fDlDs; // DlDs
59 : float fQPt; // QPt
60 : };
61 :
62 :
63 : GPUd() inline AliHLTTPCGMTrackLinearisation::AliHLTTPCGMTrackLinearisation( const AliHLTTPCGMTrackParam &t )
64 0 : : fSinPhi( t.GetSinPhi() ), fCosPhi( 0. ), fSecPhi( 0. ), fDzDs( t.GetDzDs() ), fDlDs( 0. ), fQPt( t.GetQPt() )
65 0 : {
66 0 : fSinPhi = AliHLTTPCCAMath::Min( fSinPhi, .999f );
67 0 : fSinPhi = AliHLTTPCCAMath::Max( fSinPhi, -.999f );
68 0 : fCosPhi = sqrt( 1. - fSinPhi * fSinPhi );
69 0 : fSecPhi = 1./fCosPhi; //reciprocal(fCosPhi);
70 0 : fDlDs = sqrt(1.+fDzDs*fDzDs);
71 0 : }
72 :
73 :
74 : GPUd() inline void AliHLTTPCGMTrackLinearisation::Set( float SinPhi1, float CosPhi1, float SecPhi1,
75 : float DzDs1, float DlDs1, float QPt1 )
76 : {
77 : fSinPhi = SinPhi1 ;
78 : fCosPhi = CosPhi1 ;
79 : fSecPhi = SecPhi1 ;
80 : fDzDs = DzDs1;
81 : fDlDs = DlDs1;
82 : fQPt = QPt1;
83 : }
84 :
85 :
86 : #endif //ALIHLTTPCGMTRACKLINEARISATION_H
|