]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking/AliHLTTPCHoughTransformer.h
- overload function FillTracksChecked in AliHLTTPCTrackArray.* to make it work with...
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking / AliHLTTPCHoughTransformer.h
1 // @(#) $Id$
2 // origin hough/AliL3HoughBaseTransformer.h,v 1.22 Tue Mar 22 13:11:58 2005 UTC by cvetan
3
4 #ifndef ALIHLTTPCHOUGHBASETRANSFORMER_H
5 #define ALIHLTTPCHOUGHBASETRANSFORMER_H
6
7 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
8  * See cxx source for full Copyright notice                               */
9
10 /** @file   AliHLTTPCHoughTransformer.h
11     @author Anders Vestbo
12     @date   
13     @brief  Base class for TPC hough tracking algorithms
14                                                                           */
15
16 //-------------------------------------------------------------------------
17 //                Class AliHLTTPCHoughTransformer
18 //   This is the base class for all the Hough Transformer tracking
19 //   algorithms for HLT.
20 //-------------------------------------------------------------------------
21
22 #include "AliHLTStdIncludes.h"
23 #include "AliHLTTPCRootTypes.h"
24
25 #ifdef do_mc
26 const UInt_t MaxTrack=120;
27 struct AliHLTTrackIndex {
28   Int_t fLabel[MaxTrack];//MC label
29   UChar_t fNHits[MaxTrack];//Number of different mc labels
30   UChar_t fCurrentRow[MaxTrack];//Index of the current row while filling Hough space
31 };
32 typedef struct AliHLTTrackIndex AliHLTTrackIndex;
33 #endif
34
35 class AliHLTTPCDigitRowData;
36 class AliHLTTPCHistogram;
37 class AliTPCRawStream;
38
39 /**
40  * @class AliHLTTPCHoughTransformer
41  * Base class for TPC hough tracking transfomers.
42  */
43 class AliHLTTPCHoughTransformer {
44
45  public:
46
47   /** standard constructor */
48   AliHLTTPCHoughTransformer();
49   /** constructor */
50   AliHLTTPCHoughTransformer(Int_t slice,Int_t patch,Int_t netasegments,Float_t zvertex=0.0);
51   /** standard destructor */
52   virtual ~AliHLTTPCHoughTransformer();
53   
54   void SetInputData(UInt_t /*ndigits*/,AliHLTTPCDigitRowData *ptr) {fDigitRowData = ptr;}
55   
56   //this is for adaptave histograms
57   virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/)
58     {STDCERR<<"Adaptive histograms are not supported  for this Transformer!"<<STDENDL;}
59
60   virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0;
61   virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0;
62
63   virtual void Reset() = 0;
64   virtual void TransformCircle()
65     {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
66   virtual void TransformCircle(Int_t */*rowRange*/,Int_t /*every*/)
67     {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
68   virtual void TransformCircleC(Int_t */*rowRange*/,Int_t /*every*/)
69     {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;}
70   virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0)
71     {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;}
72   virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/)
73       {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;}
74
75   //Getters
76   Int_t GetSlice() const {return fSlice;}
77   Int_t GetPatch() const {return fPatch;}
78   Int_t GetLastPatch() const {return fLastPatch;}
79   AliHLTTPCHoughTransformer *GetLastTransfromer() const {return fLastTransformer;}
80   Int_t GetNEtaSegments() const {return fNEtaSegments;}
81   Int_t GetLowerThreshold() const {return fLowerThreshold;}
82   Int_t GetUpperThreshold() const {return fUpperThreshold;}
83   Double_t GetEtaMin() const {return fEtaMin;}
84   Double_t GetEtaMax() const {return fEtaMax;}
85   Float_t GetZVertex() const {return fZVertex;}
86
87   AliHLTTPCDigitRowData *GetDataPointer() {return fDigitRowData;}
88  
89   virtual Int_t GetEtaIndex(Double_t eta) const = 0;
90   virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const
91     {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;}
92   virtual AliHLTTPCHistogram *GetHistogram(Int_t etaindex) = 0;
93   virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0;
94
95   virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const {
96     STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL; 
97     return -1;
98   }
99   
100   //setters
101   virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1);
102   void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
103   void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
104   void SetLastPatch(Int_t i) {fLastPatch = i;}
105   void SetLastTransformer(AliHLTTPCHoughTransformer *transformer) {fLastTransformer = transformer;}
106
107   virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){};
108
109   virtual void Print(){};
110
111  protected:
112
113   AliHLTTPCHoughTransformer *fLastTransformer;//Pointer to the previous hough transformer
114   
115  private:
116   /** copy constructor prohibited */
117   AliHLTTPCHoughTransformer(const AliHLTTPCHoughTransformer&);
118   /** assignment operator prohibited */
119   AliHLTTPCHoughTransformer& operator=(const AliHLTTPCHoughTransformer&);
120
121   Int_t fSlice;//Index of the current slice being processed
122   Int_t fPatch;//Index of the current patch being processed
123   Int_t fLastPatch;//Index of the last processed patch
124   Int_t fNEtaSegments;//Number of eta slices
125   Double_t fEtaMin;//Minimum allowed eta
126   Double_t fEtaMax;//Maximum allowed eta
127   Int_t fLowerThreshold;//Lower threshold for digits amplitude 
128   Int_t fUpperThreshold;//Upper threshold for digits amplitude
129   
130   AliHLTTPCDigitRowData *fDigitRowData; //!
131
132   Float_t fZVertex;//Z position of the primary vertex
133
134   ClassDef(AliHLTTPCHoughTransformer,1) //Hough transformation base class
135
136 };
137
138 #endif
139