]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/hough/AliL3HoughTransformerRow.h
Change needed by Root v4-01-03
[u/mrichter/AliRoot.git] / HLT / hough / AliL3HoughTransformerRow.h
1 // @(#) $Id$
2
3 #ifndef ALIL3HOUGHTRANSFORMERROW_H
4 #define ALIL3HOUGHTRANSFORMERROW_H
5
6 #include "AliL3RootTypes.h"
7 #include "AliL3HoughBaseTransformer.h"
8
9 #define MAX_N_GAPS 5
10 #define MAX_GAP_SIZE 4
11 #define MIN_TRACK_LENGTH 70
12 #define MAX_MISS_ROWS 2
13
14 struct AliL3EtaRow {
15   UChar_t fStartPad; //First pad in the cluster
16   UChar_t fEndPad; //Last pad in the cluster
17   Bool_t fIsFound; //Is the cluster already found
18   Float_t fStartY; //Y position of the first pad in the cluster
19 #ifdef do_mc
20   Int_t fMcLabels[MaxTrack]; //Array to store mc labels inside cluster
21 #endif
22 };
23
24 struct AliL3PadHoughParams {
25   // Parameters which represent given pad in the hough space
26   // Used in order to avoid as much as possible floating
27   // point operations during the hough transform
28   Float_t fAlpha; // Starting value for the hough parameter alpha1
29   Float_t fDeltaAlpha; // Slope of alpha1
30   Int_t fFirstBin; // First alpha2 bin to be filled 
31   Int_t fLastBin; // Last alpha2 bin to be filled
32 };
33
34 class AliL3DigitData;
35 class AliL3Histogram;
36
37 class AliL3HoughTransformerRow : public AliL3HoughBaseTransformer {
38
39  public:
40   AliL3HoughTransformerRow(); 
41   AliL3HoughTransformerRow(Int_t slice,Int_t patch,Int_t netasegments,Bool_t DoMC=kFALSE,Float_t zvertex=0.0);
42   virtual ~AliL3HoughTransformerRow();
43
44   //void CreateHistograms(Float_t ptmin,Float_t ptmax,Float_t ptres,Int_t nybin,Float_t psi);
45   void CreateHistograms(Int_t /*nxbin*/,Float_t /*ptmin*/,Int_t /*nybin*/,Float_t /*phimin*/,Float_t /*phimax*/)
46   {STDCERR<<"This method for creation of parameter space histograms is not supported for this Transformer!"<<STDENDL;}
47   void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,
48                         Int_t nybin,Float_t ymin,Float_t ymax);
49   void Reset();
50   void TransformCircle();
51
52   Int_t GetEtaIndex(Double_t eta) const;
53   AliL3Histogram *GetHistogram(Int_t etaindex);
54   Double_t GetEta(Int_t etaindex,Int_t slice) const;
55   Int_t GetTrackID(Int_t etaindex,Double_t alpha1,Double_t alpha2) const;
56   UChar_t *GetGapCount(Int_t etaindex) const { return fGapCount[etaindex]; }
57   UChar_t *GetCurrentRowCount(Int_t etaindex) const { return fCurrentRowCount[etaindex]; }
58   UChar_t *GetPrevBin(Int_t etaindex) const { return fPrevBin[etaindex]; }
59   UChar_t *GetNextBin(Int_t etaindex) const { return fNextBin[etaindex]; }
60   UChar_t *GetNextRow(Int_t etaindex) const { return fNextRow[etaindex]; }
61   UChar_t *GetTrackNRows() const { return fTrackNRows; }
62   UChar_t *GetTrackFirstRow() const { return fTrackFirstRow; }
63   UChar_t *GetTrackLastRow() const { return fTrackLastRow; }
64   static Float_t GetBeta1() {return fgBeta1;}
65   static Float_t GetBeta2() {return fgBeta2;}
66
67   void SetTPCRawStream(AliTPCRawStream *rawstream) {fTPCRawStream=rawstream;}
68
69  private:
70
71   UChar_t **fGapCount; //!
72   UChar_t **fCurrentRowCount; //!
73 #ifdef do_mc
74   AliL3TrackIndex **fTrackID; //!
75 #endif
76
77   UChar_t *fTrackNRows; //!
78   UChar_t *fTrackFirstRow; //!
79   UChar_t *fTrackLastRow; //!
80   UChar_t *fInitialGapCount; //!
81
82   UChar_t **fPrevBin; //!
83   UChar_t **fNextBin; //!
84   UChar_t **fNextRow; //!
85
86   AliL3PadHoughParams **fStartPadParams; //!
87   AliL3PadHoughParams **fEndPadParams; //!
88   Float_t **fLUTr2; //!
89
90   Float_t *fLUTforwardZ; //!
91   Float_t *fLUTforwardZ2; //!
92   Float_t *fLUTbackwardZ; //!
93   Float_t *fLUTbackwardZ2; //!
94
95   AliL3Histogram **fParamSpace; //!
96
97   void TransformCircleFromDigitArray();
98   void TransformCircleFromRawStream();
99
100   void DeleteHistograms(); //Method to clean up the histograms containing Hough space
101
102   inline void FillClusterRow(UChar_t i,Int_t binx1,Int_t binx2,UChar_t *ngaps2,UChar_t *currentrow2,UChar_t *lastrow2
103 #ifdef do_mc
104                              ,AliL3EtaRow etaclust,AliL3TrackIndex *trackid
105 #endif
106                              );
107   inline void FillCluster(UChar_t i,Int_t etaindex,AliL3EtaRow *etaclust,Int_t ilastpatch,Int_t firstbinx,Int_t lastbinx,Int_t nbinx,Int_t firstbiny);
108 #ifdef do_mc
109   inline void FillClusterMCLabels(AliL3DigitData digpt,AliL3EtaRow *etaclust);
110 #endif
111
112   void SetTransformerArrays(AliL3HoughTransformerRow *tr);
113
114   static Float_t fgBeta1,fgBeta2; // Two curves which define the Hough space
115
116   AliTPCRawStream *fTPCRawStream; // Pointer to the raw stream in case of fast reading of the raw data (fast_raw flag)
117
118   ClassDef(AliL3HoughTransformerRow,1) //TPC Rows Hough transformation class
119
120 };
121
122 #endif
123
124
125
126