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 *
7 //*************************************************************************
9 #ifndef ALIHLTTPCCAGBTRACKER_H
10 #define ALIHLTTPCCAGBTRACKER_H
12 #include "AliHLTTPCCADef.h"
13 #include "AliHLTTPCCATrackParam.h"
14 #include "AliHLTTPCCATracker.h"
15 #include "AliHLTTPCCAGBHit.h"
16 #include "AliHLTTPCCAGBTrack.h"
18 #if !defined(HLTCA_GPUCODE)
24 class AliHLTTPCCATrackParam;
25 class AliHLTTPCCAMerger;
28 * @class AliHLTTPCCAGBTracker
30 * Global Cellular Automaton-based HLT tracker for TPC detector
31 * The class reconstructs tracks in the whole TPC
32 * It calls the AliHLTTPCCATracker slice tracker and constructs
33 * the global TPC tracks by merging the slice tracks
35 * The tracker is designed stand-alone.
36 * It will be integrated to the HLT framework via AliHLTTPCCAGBTrackerComponent interface,
37 * and to off-line framework via TPC/AliTPCtrackerCA class
38 * The class is under construction.
41 class AliHLTTPCCAGBTracker
46 AliHLTTPCCAGBTracker();
47 AliHLTTPCCAGBTracker( const AliHLTTPCCAGBTracker& );
48 const AliHLTTPCCAGBTracker &operator=( const AliHLTTPCCAGBTracker& ) const;
50 ~AliHLTTPCCAGBTracker();
53 void SetNSlices( int N );
54 void SetNHits( int nHits );
56 void ReadHit( float x, float y, float z,
57 float ErrY, float ErrZ, float amp,
58 int ID, int iSlice, int iRow );
64 AliHLTTPCCATracker *Slices() const { return fSlices; }
65 const AliHLTTPCCATracker &Slice( int index ) const { return fSlices[index]; }
66 const AliHLTTPCCAGBHit *Hits() const { return fHits; }
67 const AliHLTTPCCAGBHit &Hit( int index ) const { return fHits[index]; }
68 int Ext2IntHitID( int i ) const { return fExt2IntHitID[i]; }
69 int NHits() const { return fNHits; }
70 int NSlices() const { return fNSlices; }
71 double Time() const { return fTime; }
72 double StatTime( int iTimer ) const { return fStatTime[iTimer]; }
73 int StatNEvents() const { return fStatNEvents; }
74 int NTracks() const { return fNTracks; }
75 AliHLTTPCCAGBTrack *Tracks() { return fTracks; }
76 const AliHLTTPCCAGBTrack &Track( int i ) const { return fTracks[i]; }
77 int *TrackHits() { return fTrackHits; }
78 int TrackHit( int i ) const { return fTrackHits[i]; }
80 bool FitTrack( AliHLTTPCCATrackParam &T, AliHLTTPCCATrackParam t0,
81 float &Alpha, int hits[], int &NTrackHits,
84 void WriteSettings( std::ostream &out ) const;
85 void ReadSettings( std::istream &in );
86 void WriteEvent( std::ostream &out ) const;
87 void ReadEvent( std::istream &in );
88 void WriteTracks( std::ostream &out ) const;
89 void ReadTracks( std::istream &in );
91 double SliceTrackerTime() const { return fSliceTrackerTime; }
92 void SetSliceTrackerTime( double v ) { fSliceTrackerTime = v; }
93 const int *FirstSliceHit() const { return fFirstSliceHit; }
98 AliHLTTPCCATracker *fSlices; //* array of slice trackers
99 int fNSlices; //* N slices
100 AliHLTTPCCAGBHit *fHits; //* hit array
101 int *fExt2IntHitID; //* array of internal hit indices
102 int fNHits; //* N hits in event
103 int *fTrackHits; //* track->hits reference array
104 AliHLTTPCCAGBTrack *fTracks; //* array of tracks
105 int fNTracks; //* N tracks
106 AliHLTTPCCAMerger *fMerger; //* global merger
108 double fTime; //* total time
109 double fStatTime[20]; //* timers
110 int fStatNEvents; //* n events proceed
111 int fFirstSliceHit[100]; // hit array
113 double fSliceTrackerTime; // reco time of the slice tracker;