]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCATrackLinearisation.h
bug fix: reconstruction crash when the output buffer size exceed
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATrackLinearisation.h
CommitLineData
15d2e9cf 1// ************************************************************************
fbb9b71b 2// This file is property of and copyright by the ALICE HLT Project *
15d2e9cf 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 *
fbb9b71b 18 * AliHLTTPCCATrackLinearisation class describes the parameters which are used
15d2e9cf 19 * to linearise the transport equations for the track trajectory.
20 *
fbb9b71b 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.
15d2e9cf 24 *
fbb9b71b 25 * In case the track is fully fitted, the best linearisation point is
15d2e9cf 26 * the track trajectory itself (AliHLTTPCCATrackLinearisation = AliHLTTPCTrackParam ).
27 *
28 */
29class AliHLTTPCCATrackLinearisation
30{
7be9b0d7 31
fbb9b71b 32 public:
15d2e9cf 33
fbb9b71b 34 AliHLTTPCCATrackLinearisation()
35 : fSinPhi( 0 ), fCosPhi( 1 ), fDzDs( 0 ), fQPt( 0 ) {}
15d2e9cf 36
fbb9b71b 37 AliHLTTPCCATrackLinearisation( float SinPhi1, float CosPhi1, float DzDs1, float QPt1 )
38 : fSinPhi( SinPhi1 ), fCosPhi( CosPhi1 ), fDzDs( DzDs1 ), fQPt( QPt1 ) {}
15d2e9cf 39
fbb9b71b 40 AliHLTTPCCATrackLinearisation( const AliHLTTPCCATrackParam &t );
15d2e9cf 41
fbb9b71b 42 GPUd() void Set( float SinPhi1, float CosPhi1, float DzDs1, float QPt1 );
15d2e9cf 43
15d2e9cf 44
fbb9b71b 45 GPUd() float SinPhi()const { return fSinPhi; }
46 GPUd() float CosPhi()const { return fCosPhi; }
47 GPUd() float DzDs() const { return fDzDs; }
48 GPUd() float QPt() const { return fQPt; }
15d2e9cf 49
fbb9b71b 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; }
15d2e9cf 54
fbb9b71b 55 GPUd() void SetSinPhi( float v ) { fSinPhi = v; }
56 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:
fbb9b71b 61 float fSinPhi; // SinPhi
62 float fCosPhi; // CosPhi
63 float fDzDs; // DzDs
64 float fQPt; // QPt
15d2e9cf 65};
66
67
7be9b0d7 68GPUd() inline AliHLTTPCCATrackLinearisation::AliHLTTPCCATrackLinearisation( const AliHLTTPCCATrackParam &t )
fbb9b71b 69 : fSinPhi( t.SinPhi() ), fCosPhi( 0 ), fDzDs( t.DzDs() ), fQPt( t.QPt() )
15d2e9cf 70{
fbb9b71b 71 if ( fSinPhi > .999 ) fSinPhi = .999;
72 else if ( fSinPhi < -.999 ) fSinPhi = -.999;
73 fCosPhi = CAMath::Sqrt( 1 - fSinPhi * fSinPhi );
74 if ( t.SignCosPhi() < 0 ) fCosPhi = -fCosPhi;
15d2e9cf 75}
15d2e9cf 76
fbb9b71b 77
78GPUd() inline void AliHLTTPCCATrackLinearisation::Set( float SinPhi1, float CosPhi1,
79 float DzDs1, float QPt1 )
15d2e9cf 80{
fbb9b71b 81 SetSinPhi( SinPhi1 );
82 SetCosPhi( CosPhi1 );
83 SetDzDs( DzDs1 );
15d2e9cf 84 SetQPt( QPt1 );
85}
86
31649d4b 87#endif //ALIHLTTPCCATRACKLINEARISATION_H