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 ALIHLTTPCCATRACKLINEARISATION_H
10 : #define ALIHLTTPCCATRACKLINEARISATION_H
11 :
12 : #include "AliHLTTPCCATrackParam.h"
13 :
14 :
15 : /**
16 : * @class AliHLTTPCCATrackLinearisation
17 : *
18 : * AliHLTTPCCATrackLinearisation 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 (AliHLTTPCCATrackLinearisation = AliHLTTPCTrackParam ).
27 : *
28 : */
29 : class AliHLTTPCCATrackLinearisation
30 : {
31 :
32 : public:
33 :
34 : AliHLTTPCCATrackLinearisation()
35 : : fSinPhi( 0 ), fCosPhi( 1 ), fDzDs( 0 ), fQPt( 0 ) {}
36 :
37 : AliHLTTPCCATrackLinearisation( float SinPhi1, float CosPhi1, float DzDs1, float QPt1 )
38 : : fSinPhi( SinPhi1 ), fCosPhi( CosPhi1 ), fDzDs( DzDs1 ), fQPt( QPt1 ) {}
39 :
40 : GPUd() MEM_CLASS_PRE2() AliHLTTPCCATrackLinearisation( const MEM_LG2(AliHLTTPCCATrackParam) &t );
41 :
42 : GPUd() void Set( float SinPhi1, float CosPhi1, float DzDs1, float QPt1 );
43 :
44 :
45 0 : GPUd() float SinPhi()const { return fSinPhi; }
46 0 : GPUd() float CosPhi()const { return fCosPhi; }
47 0 : GPUd() float DzDs() const { return fDzDs; }
48 0 : GPUd() float QPt() const { return fQPt; }
49 :
50 : GPUd() float GetSinPhi()const { return fSinPhi; }
51 : GPUd() float GetCosPhi()const { return fCosPhi; }
52 : GPUd() float GetDzDs() const { return fDzDs; }
53 : GPUd() float GetQPt() const { return fQPt; }
54 :
55 0 : GPUd() void SetSinPhi( float v ) { fSinPhi = v; }
56 0 : GPUd() void SetCosPhi( float v ) { fCosPhi = v; }
57 : GPUd() void SetDzDs( float v ) { fDzDs = v; }
58 : GPUd() void SetQPt( float v ) { fQPt = v; }
59 :
60 : private:
61 : float fSinPhi; // SinPhi
62 : float fCosPhi; // CosPhi
63 : float fDzDs; // DzDs
64 : float fQPt; // QPt
65 : };
66 :
67 :
68 : GPUd() MEM_CLASS_PRE2() inline AliHLTTPCCATrackLinearisation::AliHLTTPCCATrackLinearisation( const MEM_LG2(AliHLTTPCCATrackParam) &t )
69 0 : : fSinPhi( t.SinPhi() ), fCosPhi( 0 ), fDzDs( t.DzDs() ), fQPt( t.QPt() )
70 0 : {
71 0 : if ( fSinPhi > .999 ) fSinPhi = .999;
72 0 : else if ( fSinPhi < -.999 ) fSinPhi = -.999;
73 0 : fCosPhi = CAMath::Sqrt( 1 - fSinPhi * fSinPhi );
74 0 : if ( t.SignCosPhi() < 0 ) fCosPhi = -fCosPhi;
75 0 : }
76 :
77 :
78 : GPUd() inline void AliHLTTPCCATrackLinearisation::Set( float SinPhi1, float CosPhi1,
79 : float DzDs1, float QPt1 )
80 : {
81 : SetSinPhi( SinPhi1 );
82 : SetCosPhi( CosPhi1 );
83 : SetDzDs( DzDs1 );
84 : SetQPt( QPt1 );
85 : }
86 :
87 : #endif //ALIHLTTPCCATRACKLINEARISATION_H
|