]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/hough/AliL3HoughBaseTransformer.h
Coding violation fixes.
[u/mrichter/AliRoot.git] / HLT / hough / AliL3HoughBaseTransformer.h
1 // @(#) $Id$
2
3 #ifndef ALIL3HOUGHBASETRANSFORMER_H
4 #define ALIL3HOUGHBASETRANSFORMER_H
5
6 //-------------------------------------------------------------------------
7 //                Class AliL3HoughBaseTransformer
8 //   This is the base class for all the Hough Transformer tracking
9 //   algorithms for HLT. 
10 //-------------------------------------------------------------------------
11
12 #include "AliL3RootTypes.h"
13
14 #ifdef do_mc
15 const UInt_t MaxTrack=120;
16 struct AliL3TrackIndex {
17   Int_t fLabel[MaxTrack];//MC label
18   UChar_t fNHits[MaxTrack];//Number of different mc labels
19   UChar_t fCurrentRow[MaxTrack];//Index of the current row while filling Hough space
20 };
21 typedef struct AliL3TrackIndex AliL3TrackIndex;
22 #endif
23
24 class AliL3DigitRowData;
25 class AliL3Histogram;
26
27 #include "AliTPCRawStream.h"
28
29 class AliL3HoughBaseTransformer {
30
31  public:
32
33   AliL3HoughBaseTransformer(); 
34   AliL3HoughBaseTransformer(Int_t slice,Int_t patch,Int_t netasegments,Float_t zvertex=0.0);
35   virtual ~AliL3HoughBaseTransformer();
36   
37   void SetInputData(UInt_t /*ndigits*/,AliL3DigitRowData *ptr) {fDigitRowData = ptr;}
38   
39   //this is for adaptave histograms
40   virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/)
41     {STDCERR<<"Adaptive histograms are not supported  for this Transformer!"<<STDENDL;}
42
43   virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0;
44   virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0;
45
46   virtual void Reset() = 0;
47   virtual void TransformCircle()
48     {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
49   virtual void TransformCircle(Int_t */*row_range*/,Int_t /*every*/)
50     {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
51   virtual void TransformCircleC(Int_t */*row_range*/,Int_t /*every*/)
52     {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;}
53   virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0)
54     {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;}
55   virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/)
56       {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;}
57
58   //Getters
59   Int_t GetSlice() const {return fSlice;}
60   Int_t GetPatch() const {return fPatch;}
61   Int_t GetLastPatch() const {return fLastPatch;}
62   AliL3HoughBaseTransformer *GetLastTransfromer() const {return fLastTransformer;}
63   Int_t GetNEtaSegments() const {return fNEtaSegments;}
64   Int_t GetLowerThreshold() const {return fLowerThreshold;}
65   Int_t GetUpperThreshold() const {return fUpperThreshold;}
66   Double_t GetEtaMin() const {return fEtaMin;}
67   Double_t GetEtaMax() const {return fEtaMax;}
68   Float_t GetZVertex() const {return fZVertex;}
69
70   AliL3DigitRowData *GetDataPointer() {return fDigitRowData;}
71  
72   virtual Int_t GetEtaIndex(Double_t eta) const = 0;
73   virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const
74     {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;}
75   virtual AliL3Histogram *GetHistogram(Int_t etaindex) = 0;
76   virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0;
77
78   virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const {
79     STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL; 
80     return -1;
81   }
82   
83   //setters
84   virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1);
85   void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
86   void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
87   void SetLastPatch(Int_t i) {fLastPatch = i;}
88   void SetLastTransformer(AliL3HoughBaseTransformer *transformer) {fLastTransformer = transformer;}
89
90   virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){};
91
92   virtual void Print(){};
93
94  protected:
95
96   AliL3HoughBaseTransformer *fLastTransformer;//Pointer to the previous hough transformer
97   
98  private:
99
100   Int_t fSlice;//Index of the current slice being processed
101   Int_t fPatch;//Index of the current patch being processed
102   Int_t fLastPatch;//Index of the last processed patch
103   Int_t fNEtaSegments;//Number of eta slices
104   Double_t fEtaMin;//Minimum allowed eta
105   Double_t fEtaMax;//Maximum allowed eta
106   Int_t fLowerThreshold;//Lower threshold for digits amplitude 
107   Int_t fUpperThreshold;//Upper threshold for digits amplitude
108   
109   AliL3DigitRowData *fDigitRowData; //!
110
111   Float_t fZVertex;//Z position of the primary vertex
112
113   ClassDef(AliL3HoughBaseTransformer,1) //Hough transformation base class
114
115 };
116
117
118 #endif
119