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