Major update of the HLT Hough transform and ITS tracking code. Hough transform tracks...
[u/mrichter/AliRoot.git] / HLT / hough / AliL3HoughTransformerRow.h
CommitLineData
5a31e9df 1// @(#) $Id$
2
917e711b 3#ifndef ALIL3HOUGHTRANSFORMERROW_H
4#define ALIL3HOUGHTRANSFORMERROW_H
5a31e9df 5
6#include "AliL3RootTypes.h"
7#include "AliL3HoughBaseTransformer.h"
8
a8ffd46b 9#define MAX_N_GAPS 5
de3c3890 10#define MIN_TRACK_LENGTH 70
de3c3890 11
a8ffd46b 12struct 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
a8ffd46b 16#ifdef do_mc
17 Int_t fMcLabels[MaxTrack]; //Array to store mc labels inside cluster
18#endif
19};
20
21struct AliL3PadHoughParams {
ce4c28d5 22 // Parameters which represent given pad in the hough space
23 // Used in order to avoid as much as possible floating
24 // point operations during the hough transform
25 Float_t fAlpha; // Starting value for the hough parameter alpha1
26 Float_t fDeltaAlpha; // Slope of alpha1
27 Int_t fFirstBin; // First alpha2 bin to be filled
28 Int_t fLastBin; // Last alpha2 bin to be filled
a8ffd46b 29};
30
31class AliL3DigitData;
5a31e9df 32class AliL3Histogram;
33
0bd0c1ef 34class AliL3HoughTransformerRow : public AliL3HoughBaseTransformer {
de3c3890 35
5a31e9df 36 public:
0bd0c1ef 37 AliL3HoughTransformerRow();
917e711b 38 AliL3HoughTransformerRow(Int_t slice,Int_t patch,Int_t netasegments,Bool_t DoMC=kFALSE,Float_t zvertex=0.0);
0bd0c1ef 39 virtual ~AliL3HoughTransformerRow();
5a31e9df 40
41 //void CreateHistograms(Float_t ptmin,Float_t ptmax,Float_t ptres,Int_t nybin,Float_t psi);
b6ee34bf 42 void CreateHistograms(Int_t /*nxbin*/,Float_t /*ptmin*/,Int_t /*nybin*/,Float_t /*phimin*/,Float_t /*phimax*/)
e81040b7 43 {STDCERR<<"This method for creation of parameter space histograms is not supported for this Transformer!"<<STDENDL;}
5a31e9df 44 void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,
45 Int_t nybin,Float_t ymin,Float_t ymax);
46 void Reset();
47 void TransformCircle();
48
bd2f8772 49 Int_t GetEtaIndex(Double_t eta) const;
917e711b 50 AliL3Histogram *GetHistogram(Int_t etaindex);
974fb714 51 Double_t GetEta(Int_t etaindex,Int_t slice) const;
e81040b7 52 Int_t GetTrackID(Int_t etaindex,Double_t alpha1,Double_t alpha2) const;
f644512a 53 Int_t GetTrackLength(Double_t alpha1,Double_t alpha2,Int_t *rows) const;
ce4c28d5 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; }
917e711b 62 static Float_t GetBeta1() {return fgBeta1;}
63 static Float_t GetBeta2() {return fgBeta2;}
f644512a 64 static Float_t GetDAlpha() {return fgDAlpha;}
65 static Float_t GetDEta() {return fgDEta;}
66 static Double_t GetEtaCalcParam1() {return fgEtaCalcParam1;}
67 static Double_t GetEtaCalcParam2() {return fgEtaCalcParam2;}
68 static Double_t GetEtaCalcParam3() {return fgEtaCalcParam3;}
917e711b 69
a8ffd46b 70 void SetTPCRawStream(AliTPCRawStream *rawstream) {fTPCRawStream=rawstream;}
917e711b 71
ce4c28d5 72 private:
73
a8ffd46b 74 UChar_t **fGapCount; //!
75 UChar_t **fCurrentRowCount; //!
917e711b 76#ifdef do_mc
a8ffd46b 77 AliL3TrackIndex **fTrackID; //!
917e711b 78#endif
917e711b 79
a8ffd46b 80 UChar_t *fTrackNRows; //!
81 UChar_t *fTrackFirstRow; //!
82 UChar_t *fTrackLastRow; //!
83 UChar_t *fInitialGapCount; //!
917e711b 84
a8ffd46b 85 UChar_t **fPrevBin; //!
86 UChar_t **fNextBin; //!
87 UChar_t **fNextRow; //!
917e711b 88
a8ffd46b 89 AliL3PadHoughParams **fStartPadParams; //!
90 AliL3PadHoughParams **fEndPadParams; //!
f644512a 91 Float_t **fLUTr; //!
917e711b 92
93 Float_t *fLUTforwardZ; //!
917e711b 94 Float_t *fLUTbackwardZ; //!
917e711b 95
a8ffd46b 96 AliL3Histogram **fParamSpace; //!
97
98 void TransformCircleFromDigitArray();
99 void TransformCircleFromRawStream();
100
101 void DeleteHistograms(); //Method to clean up the histograms containing Hough space
102
103 inline void FillClusterRow(UChar_t i,Int_t binx1,Int_t binx2,UChar_t *ngaps2,UChar_t *currentrow2,UChar_t *lastrow2
104#ifdef do_mc
105 ,AliL3EtaRow etaclust,AliL3TrackIndex *trackid
106#endif
107 );
108 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);
109#ifdef do_mc
8cc2b1a5 110 inline void FillClusterMCLabels(AliL3DigitData digpt,AliL3EtaRow *etaclust);
a8ffd46b 111#endif
112
ce4c28d5 113 void SetTransformerArrays(AliL3HoughTransformerRow *tr);
114
917e711b 115 static Float_t fgBeta1,fgBeta2; // Two curves which define the Hough space
f644512a 116 static Float_t fgDAlpha, fgDEta; // Correlation factor between Hough space bin size and resolution
117 static Double_t fgEtaCalcParam1, fgEtaCalcParam2; // Parameters used for fast calculation of eta during the binning of Hough space
118 static Double_t fgEtaCalcParam3; // Parameter used during the eta binning of the Hough Space in order to account for finite track radii
5a31e9df 119
ce4c28d5 120 AliTPCRawStream *fTPCRawStream; // Pointer to the raw stream in case of fast reading of the raw data (fast_raw flag)
a8ffd46b 121
0bd0c1ef 122 ClassDef(AliL3HoughTransformerRow,1) //TPC Rows Hough transformation class
5a31e9df 123
124};
125
126#endif
127
128
129
130