]>
Commit | Line | Data |
---|---|---|
d54804bf | 1 | //-*- Mode: C++ -*- |
ce565086 | 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 | //************************************************************************* | |
d54804bf | 8 | |
9 | #ifndef ALIHLTTPCCAGBTRACKER_H | |
10 | #define ALIHLTTPCCAGBTRACKER_H | |
11 | ||
00d07bcd | 12 | #include "AliHLTTPCCADef.h" |
693d2443 | 13 | #include "AliHLTTPCCATrackParam.h" |
16fc8dc8 | 14 | |
4687b8fc | 15 | #if !defined(HLTCA_GPUCODE) |
16 | #include <iostream> | |
16fc8dc8 | 17 | #endif |
d54804bf | 18 | |
19 | class AliHLTTPCCATracker; | |
20 | class AliHLTTPCCAGBTrack; | |
21 | class AliHLTTPCCAGBHit; | |
22 | class TParticle; | |
23 | class TProfile; | |
eb30eb49 | 24 | class AliHLTTPCCATrackParam; |
d54804bf | 25 | |
26 | /** | |
27 | * @class AliHLTTPCCAGBTracker | |
28 | * | |
29 | * Global Cellular Automaton-based HLT tracker for TPC detector | |
30 | * The class reconstructs tracks in the whole TPC | |
31 | * It calls the AliHLTTPCCATracker slice tracker and constructs | |
32 | * the global TPC tracks by merging the slice tracks | |
33 | * | |
34 | * The tracker is designed stand-alone. | |
35 | * It will be integrated to the HLT framework via AliHLTTPCCAGBTrackerComponent interface, | |
36 | * and to off-line framework via TPC/AliTPCtrackerCA class | |
37 | * The class is under construction. | |
38 | * | |
39 | */ | |
00d07bcd | 40 | class AliHLTTPCCAGBTracker |
d54804bf | 41 | { |
42 | ||
43 | public: | |
44 | ||
45 | AliHLTTPCCAGBTracker(); | |
46 | AliHLTTPCCAGBTracker(const AliHLTTPCCAGBTracker&); | |
ce565086 | 47 | const AliHLTTPCCAGBTracker &operator=(const AliHLTTPCCAGBTracker&) const; |
d54804bf | 48 | |
00d07bcd | 49 | ~AliHLTTPCCAGBTracker(); |
d54804bf | 50 | |
51 | void StartEvent(); | |
52 | void SetNSlices( Int_t N ); | |
53 | void SetNHits( Int_t nHits ); | |
54 | ||
eb30eb49 | 55 | void ReadHit( Float_t x, Float_t y, Float_t z, |
56 | Float_t ErrY, Float_t ErrZ, Float_t amp, | |
57 | Int_t ID, Int_t iSlice, Int_t iRow ); | |
d54804bf | 58 | |
59 | void FindTracks(); | |
4687b8fc | 60 | |
4687b8fc | 61 | |
693d2443 | 62 | void Refit(); |
63 | ||
64 | struct AliHLTTPCCABorderTrack{ | |
65 | AliHLTTPCCABorderTrack(): fParam(), fITrack(0), fIRow(0), fNHits(0), fX(0), fOK(0){}; | |
66 | AliHLTTPCCATrackParam fParam; // track parameters at the border | |
67 | Int_t fITrack; // track index | |
68 | Int_t fIRow; // row number of the closest cluster | |
69 | Int_t fNHits; // n hits | |
70 | Float_t fX; // X coordinate of the closest cluster | |
71 | Bool_t fOK; // is the trak rotated and extrapolated correctly | |
72 | }; | |
73 | ||
74 | void MakeBorderTracks( Int_t iSlice, Int_t iBorder, AliHLTTPCCABorderTrack B[], Int_t &nB); | |
75 | void SplitBorderTracks( Int_t iSlice1, AliHLTTPCCABorderTrack B1[], Int_t N1, | |
76 | Int_t iSlice2, AliHLTTPCCABorderTrack B2[], Int_t N2, | |
77 | Float_t Alpha =-1 ); | |
ce565086 | 78 | |
79 | static Float_t GetChi2( Float_t x1, Float_t y1, Float_t a00, Float_t a10, Float_t a11, | |
80 | Float_t x2, Float_t y2, Float_t b00, Float_t b10, Float_t b11 ); | |
693d2443 | 81 | |
d54804bf | 82 | void Merging(); |
63d8b79d | 83 | void Merging1(); |
693d2443 | 84 | |
ce565086 | 85 | AliHLTTPCCATracker *Slices() const { return fSlices; } |
86 | AliHLTTPCCAGBHit *Hits() const { return fHits; } | |
87 | Int_t Ext2IntHitID( Int_t i ) const { return fExt2IntHitID[i]; } | |
88 | ||
d54804bf | 89 | Int_t NHits() const { return fNHits; } |
90 | Int_t NSlices() const { return fNSlices; } | |
eb30eb49 | 91 | Double_t Time() const { return fTime; } |
d54804bf | 92 | Double_t StatTime( Int_t iTimer ) const { return fStatTime[iTimer]; } |
93 | Int_t StatNEvents() const { return fStatNEvents; } | |
94 | Int_t NTracks() const { return fNTracks; } | |
ce565086 | 95 | AliHLTTPCCAGBTrack *Tracks() const { return fTracks; } |
96 | Int_t *TrackHits() const { return fTrackHits; } | |
eb30eb49 | 97 | void GetErrors2( AliHLTTPCCAGBHit &h, AliHLTTPCCATrackParam &t, Float_t &Err2Y, Float_t &Err2Z ); |
98 | void GetErrors2( Int_t iSlice, Int_t iRow, AliHLTTPCCATrackParam &t, Float_t &Err2Y, Float_t &Err2Z ); | |
99 | ||
4687b8fc | 100 | void WriteSettings( std::ostream &out ) const; |
101 | void ReadSettings( std::istream &in ); | |
102 | void WriteEvent( std::ostream &out ) const; | |
103 | void ReadEvent( std::istream &in ); | |
104 | void WriteTracks( std::ostream &out ) const; | |
105 | void ReadTracks( std::istream &in ); | |
106 | ||
693d2443 | 107 | Double_t SliceTrackerTime() const { return fSliceTrackerTime; } |
108 | void SetSliceTrackerTime( Double_t v ){ fSliceTrackerTime = v; } | |
109 | const Int_t *FirstSliceHit() const { return fFirstSliceHit; } | |
ce565086 | 110 | |
693d2443 | 111 | Bool_t FitTrack( AliHLTTPCCATrackParam &T, AliHLTTPCCATrackParam t0, |
112 | Float_t &Alpha, Int_t hits[], Int_t &NHits, | |
113 | Float_t &DeDx, Bool_t dir=0 ); | |
d54804bf | 114 | |
115 | protected: | |
116 | ||
117 | AliHLTTPCCATracker *fSlices; //* array of slice trackers | |
118 | Int_t fNSlices; //* N slices | |
119 | AliHLTTPCCAGBHit *fHits; //* hit array | |
ce565086 | 120 | Int_t *fExt2IntHitID; //* array of internal hit indices |
d54804bf | 121 | Int_t fNHits; //* N hits in event |
122 | Int_t *fTrackHits; //* track->hits reference array | |
123 | AliHLTTPCCAGBTrack *fTracks; //* array of tracks | |
124 | Int_t fNTracks; //* N tracks | |
125 | ||
126 | struct AliHLTTPCCAGBSliceTrackInfo{ | |
127 | Int_t fPrevNeighbour; //* neighbour in the previous slide | |
128 | Int_t fNextNeighbour; //* neighbour in the next slide | |
129 | Bool_t fUsed; //* is the slice track used by global tracks | |
130 | }; | |
131 | ||
132 | AliHLTTPCCAGBSliceTrackInfo **fSliceTrackInfos; //* additional information for slice tracks | |
00d07bcd | 133 | Double_t fTime; //* total time |
eb30eb49 | 134 | Double_t fStatTime[20]; //* timers |
d54804bf | 135 | Int_t fStatNEvents; //* n events proceed |
00d07bcd | 136 | Int_t fFirstSliceHit[100]; // hit array |
d54804bf | 137 | |
4687b8fc | 138 | Double_t fSliceTrackerTime; // reco time of the slice tracker; |
139 | ||
d54804bf | 140 | }; |
141 | ||
142 | #endif |