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