Line data Source code
1 : //-*- Mode: C++ -*-
2 : // ************************************************************************
3 : // This file is property of and copyright by the ALICE HLT Project *
4 : // ALICE Experiment at CERN, All rights reserved. *
5 : // See cxx source for full Copyright notice *
6 : // *
7 : //*************************************************************************
8 :
9 :
10 : #ifndef ALIHLTTPCGMSLICETRACK_H
11 : #define ALIHLTTPCGMSLICETRACK_H
12 :
13 : #include "AliHLTTPCCAMath.h"
14 : #include "AliHLTTPCGMTrackParam.h"
15 : #include "AliHLTTPCCASliceOutTrack.h"
16 :
17 : /**
18 : * @class AliHLTTPCGMSliceTrack
19 : *
20 : * The class describes TPC slice tracks used in AliHLTTPCGMMerger
21 : */
22 : class AliHLTTPCGMSliceTrack
23 : {
24 :
25 : public:
26 :
27 0 : float Alpha() const { return fAlpha; }
28 0 : int NClusters() const { return fNClusters; }
29 0 : int PrevNeighbour() const { return fPrevNeighbour; }
30 0 : int NextNeighbour() const { return fNextNeighbour; }
31 0 : int SliceNeighbour() const { return fSliceNeighbour; }
32 0 : int Used() const { return fUsed; }
33 0 : const AliHLTTPCCASliceOutTrack* OrigTrack() const { return fOrigTrack; }
34 0 : float X() const { return fX; }
35 0 : float Y() const { return fY; }
36 0 : float Z() const { return fZ; }
37 0 : float SinPhi() const { return fSinPhi; }
38 0 : float CosPhi() const { return fCosPhi; }
39 0 : float SecPhi() const { return fSecPhi; }
40 0 : float DzDs() const { return fDzDs; }
41 0 : float QPt() const { return fQPt; }
42 :
43 0 : int LocalTrackId() const { return fLocalTrackId; }
44 0 : void SetLocalTrackId( int v ) { fLocalTrackId = v; }
45 0 : int GlobalTrackId(int n) const { return fGlobalTrackIds[n]; }
46 0 : void SetGlobalTrackId( int n, int v ) { fGlobalTrackIds[n] = v; }
47 :
48 :
49 : void Set( const AliHLTTPCCASliceOutTrack *sliceTr, float alpha ){
50 0 : const AliHLTTPCCABaseTrackParam &t = sliceTr->Param();
51 0 : fOrigTrack = sliceTr;
52 0 : fX = t.GetX();
53 0 : fY = t.GetY();
54 0 : fZ = t.GetZ();
55 0 : fDzDs = t.GetDzDs();
56 0 : fSinPhi = t.GetSinPhi();
57 0 : fQPt = t.GetQPt();
58 0 : fCosPhi = sqrt(1.f - fSinPhi*fSinPhi);
59 0 : fSecPhi = 1.f / fCosPhi;
60 0 : fAlpha = alpha;
61 0 : fNClusters = sliceTr->NClusters();
62 0 : }
63 :
64 0 : void SetNClusters ( int v ) { fNClusters = v; }
65 0 : void SetPrevNeighbour( int v ) { fPrevNeighbour = v; }
66 0 : void SetNextNeighbour( int v ) { fNextNeighbour = v; }
67 0 : void SetUsed( int v ) { fUsed = v; }
68 0 : void SetSliceNeighbour( int v ) { fSliceNeighbour = v; }
69 :
70 :
71 : void CopyParamFrom( const AliHLTTPCGMSliceTrack &t ){
72 0 : fX=t.fX; fY=t.fY; fZ=t.fZ;
73 0 : fSinPhi=t.fSinPhi; fDzDs=t.fDzDs; fQPt=t.fQPt; fCosPhi=t.fCosPhi, fSecPhi=t.fSecPhi;
74 0 : fAlpha = t.fAlpha;
75 0 : }
76 :
77 : bool FilterErrors( AliHLTTPCCAParam ¶m, float maxSinPhi =.999 );
78 :
79 : bool TransportToX( float x, float Bz, AliHLTTPCGMBorderTrack &b, float maxSinPhi ) const ;
80 :
81 : bool TransportToXAlpha( float x, float sinAlpha, float cosAlpha, float Bz, AliHLTTPCGMBorderTrack &b, float maxSinPhi ) const ;
82 :
83 : private:
84 :
85 : const AliHLTTPCCASliceOutTrack *fOrigTrack; // pointer to original slice track
86 : float fX, fY, fZ, fSinPhi, fDzDs, fQPt, fCosPhi, fSecPhi; // parameters
87 : float fC0, fC2, fC3, fC5, fC7, fC9, fC10, fC12, fC14; // covariances
88 : float fAlpha; // alpha angle
89 : int fNClusters; // N clusters
90 : int fPrevNeighbour; // neighbour in the previous slise
91 : int fNextNeighbour; // neighbour in the next slise
92 : int fSliceNeighbour; // next neighbour withing the same slice;
93 : int fUsed; // is the slice track already merged
94 : int fLocalTrackId; // Corrected local track id in terms of GMSliceTracks array
95 : int fGlobalTrackIds[2]; // IDs of associated global tracks
96 : };
97 :
98 : #endif
|