]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.h
completely re-worked TPC CA tracking code (Sergey/Ivan)
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATracker.h
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 ALIHLTTPCCATRACKER_H
9 #define ALIHLTTPCCATRACKER_H
10
11
12 #include "Rtypes.h"
13 #include "AliHLTTPCCAParam.h"
14 #include "AliHLTTPCCARow.h"
15 #include "AliHLTTPCCATrack.h"
16
17 class AliHLTTPCCAHit;
18 class AliHLTTPCCACell;
19 class AliHLTTPCCAOutTrack;
20
21
22 /**
23  * @class AliHLTTPCCATracker
24  */
25 class AliHLTTPCCATracker
26 {
27  public:
28
29   AliHLTTPCCATracker();
30   AliHLTTPCCATracker( const AliHLTTPCCATracker& );
31   AliHLTTPCCATracker &operator=( const AliHLTTPCCATracker& );
32   virtual ~AliHLTTPCCATracker();
33
34   void Initialize( AliHLTTPCCAParam &param );
35
36   void StartEvent();
37   void ReadHit( Int_t iRow, Int_t index, Double_t x, Double_t y, Double_t z, 
38                  Double_t ErrY, Double_t ErrZ  ) const {;}
39
40   void ReadHitRow( Int_t iRow, AliHLTTPCCAHit *Row, Int_t NHits );
41
42   void Reconstruct();
43
44   void FindCells();
45   void FindTracks();
46   void FitTrack( AliHLTTPCCATrack &track, Int_t nIter=2 );
47
48   AliHLTTPCCAParam &Param(){ return fParam; }
49   AliHLTTPCCARow *Rows(){ return fRows; }
50
51   Int_t *OutTrackHits(){ return  fOutTrackHits; }
52   Int_t NOutTrackHits() const { return  fNOutTrackHits; }
53   AliHLTTPCCAOutTrack *OutTracks(){ return  fOutTracks; }
54   Int_t NOutTracks() const { return  fNOutTracks; }
55
56   AliHLTTPCCATrack *Tracks(){ return  fTracks; }
57   Int_t NTracks() const { return fNTracks; }
58
59   Int_t *TrackCells(){ return  fTrackCells; }
60
61   AliHLTTPCCACell &GetTrackCell( AliHLTTPCCATrack &t, Int_t i ) const {
62     Int_t ind = fTrackCells[t.IFirstCell()+i];
63     AliHLTTPCCARow &row = fRows[ind%256];
64     return row.Cells()[ind>>8];
65   }
66   AliHLTTPCCARow &GetTrackCellRow( AliHLTTPCCATrack &t, Int_t i ) const {
67     Int_t ind = fTrackCells[t.IFirstCell()+i];
68     return fRows[ind%256];    
69   }
70   Int_t GetTrackCellIRow( AliHLTTPCCATrack &t, Int_t i ) const {
71     Int_t ind = fTrackCells[t.IFirstCell()+i];
72     return ind%256;    
73   }
74  
75  protected:
76   
77   AliHLTTPCCAParam fParam; // parameters
78
79   AliHLTTPCCARow *fRows;// array of hit rows
80
81   Int_t *fOutTrackHits;  // output array of ID's of the reconstructed hits
82   Int_t fNOutTrackHits;  // number of hits in fOutTrackHits array
83   AliHLTTPCCAOutTrack *fOutTracks; // output array of the reconstructed tracks
84   Int_t fNOutTracks; // number of tracks in fOutTracks array
85   Int_t *fTrackCells; // indices of cells for reconstructed tracks
86   Int_t fNHitsTotal;// total number of hits in event
87   AliHLTTPCCATrack *fTracks;   // reconstructed tracks
88   Int_t fNTracks;// number of reconstructed tracks
89
90   ClassDef(AliHLTTPCCATracker,1);
91 };
92
93 #endif