]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAGBTracker.h
changes from Matthias
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAGBTracker.h
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 #ifndef ALIHLTTPCCAGBTRACKER_H
10 #define ALIHLTTPCCAGBTRACKER_H
11
12 #include "AliHLTTPCCADef.h"
13 #include "AliHLTTPCCATrackParam.h"
14 #include "AliHLTTPCCATracker.h"
15 #include "AliHLTTPCCAGBHit.h"
16 #include "AliHLTTPCCAGBTrack.h"
17
18 #if !defined(HLTCA_GPUCODE)
19 #include <iostream>
20 #endif
21
22 class TParticle;
23 class TProfile;
24 class AliHLTTPCCATrackParam;
25 class  AliHLTTPCCAMerger;
26
27 /**
28  * @class AliHLTTPCCAGBTracker
29  *
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
34  *
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.
39  *
40  */
41 class AliHLTTPCCAGBTracker
42 {
43
44   public:
45
46     AliHLTTPCCAGBTracker();
47     AliHLTTPCCAGBTracker( const AliHLTTPCCAGBTracker& );
48     const AliHLTTPCCAGBTracker &operator=( const AliHLTTPCCAGBTracker& ) const;
49
50     ~AliHLTTPCCAGBTracker();
51
52     void StartEvent();
53     void SetNSlices( int N );
54     void SetNHits( int nHits );
55
56     void ReadHit( float x, float y, float z,
57                   float ErrY, float ErrZ, float amp,
58                   int ID, int iSlice, int iRow );
59
60     void FindTracks();
61
62     void Merge();
63
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]; }
79
80     bool FitTrack( AliHLTTPCCATrackParam &T, AliHLTTPCCATrackParam t0,
81                    float &Alpha, int hits[], int &NTrackHits,
82                    bool dir );
83
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 );
90
91     double SliceTrackerTime() const { return fSliceTrackerTime; }
92     void SetSliceTrackerTime( double v ) { fSliceTrackerTime = v; }
93     const int *FirstSliceHit() const { return fFirstSliceHit; }
94
95
96   protected:
97
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
107
108     double fTime; //* total time
109     double fStatTime[20]; //* timers
110     int fStatNEvents;    //* n events proceed
111     int fFirstSliceHit[100]; // hit array
112
113     double fSliceTrackerTime; // reco time of the slice tracker;
114
115 };
116
117 #endif