]>
Commit | Line | Data |
---|---|---|
5a31e9df | 1 | // @(#) $Id$ |
2 | ||
917e711b | 3 | #ifndef ALIL3HOUGHTRANSFORMERROW_H |
4 | #define ALIL3HOUGHTRANSFORMERROW_H | |
5a31e9df | 5 | |
4aa41877 | 6 | #include "AliHLTRootTypes.h" |
7 | #include "AliHLTHoughBaseTransformer.h" | |
5a31e9df | 8 | |
a8ffd46b | 9 | #define MAX_N_GAPS 5 |
de3c3890 | 10 | #define MIN_TRACK_LENGTH 70 |
de3c3890 | 11 | |
4aa41877 | 12 | struct AliHLTEtaRow { |
a8ffd46b | 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 | ||
4aa41877 | 21 | struct AliHLTPadHoughParams { |
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 | ||
4aa41877 | 31 | class AliHLTDigitData; |
32 | class AliHLTHistogram; | |
5a31e9df | 33 | |
4aa41877 | 34 | class AliHLTHoughTransformerRow : public AliHLTHoughBaseTransformer { |
de3c3890 | 35 | |
5a31e9df | 36 | public: |
4aa41877 | 37 | AliHLTHoughTransformerRow(); |
38 | AliHLTHoughTransformerRow(Int_t slice,Int_t patch,Int_t netasegments,Bool_t DoMC=kFALSE,Float_t zvertex=0.0); | |
39 | virtual ~AliHLTHoughTransformerRow(); | |
5a31e9df | 40 | |
298edb8a | 41 | void CreateHistograms(Float_t ptmin,Float_t ptmax,Float_t pres,Int_t nybin,Float_t psi) { |
4aa41877 | 42 | AliHLTHoughBaseTransformer::CreateHistograms(ptmin,ptmax,pres,nybin,psi); |
298edb8a | 43 | } |
b6ee34bf | 44 | void CreateHistograms(Int_t /*nxbin*/,Float_t /*ptmin*/,Int_t /*nybin*/,Float_t /*phimin*/,Float_t /*phimax*/) |
e81040b7 | 45 | {STDCERR<<"This method for creation of parameter space histograms is not supported for this Transformer!"<<STDENDL;} |
5a31e9df | 46 | void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax, |
47 | Int_t nybin,Float_t ymin,Float_t ymax); | |
48 | void Reset(); | |
49 | void TransformCircle(); | |
298edb8a | 50 | void TransformCircle(Int_t *row_range,Int_t every) { |
4aa41877 | 51 | AliHLTHoughBaseTransformer::TransformCircle(row_range,every); |
298edb8a | 52 | } |
5a31e9df | 53 | |
bd2f8772 | 54 | Int_t GetEtaIndex(Double_t eta) const; |
4aa41877 | 55 | AliHLTHistogram *GetHistogram(Int_t etaindex); |
974fb714 | 56 | Double_t GetEta(Int_t etaindex,Int_t slice) const; |
e81040b7 | 57 | Int_t GetTrackID(Int_t etaindex,Double_t alpha1,Double_t alpha2) const; |
f644512a | 58 | Int_t GetTrackLength(Double_t alpha1,Double_t alpha2,Int_t *rows) const; |
ce4c28d5 | 59 | UChar_t *GetGapCount(Int_t etaindex) const { return fGapCount[etaindex]; } |
60 | UChar_t *GetCurrentRowCount(Int_t etaindex) const { return fCurrentRowCount[etaindex]; } | |
61 | UChar_t *GetPrevBin(Int_t etaindex) const { return fPrevBin[etaindex]; } | |
62 | UChar_t *GetNextBin(Int_t etaindex) const { return fNextBin[etaindex]; } | |
63 | UChar_t *GetNextRow(Int_t etaindex) const { return fNextRow[etaindex]; } | |
64 | UChar_t *GetTrackNRows() const { return fTrackNRows; } | |
65 | UChar_t *GetTrackFirstRow() const { return fTrackFirstRow; } | |
66 | UChar_t *GetTrackLastRow() const { return fTrackLastRow; } | |
917e711b | 67 | static Float_t GetBeta1() {return fgBeta1;} |
68 | static Float_t GetBeta2() {return fgBeta2;} | |
f644512a | 69 | static Float_t GetDAlpha() {return fgDAlpha;} |
70 | static Float_t GetDEta() {return fgDEta;} | |
71 | static Double_t GetEtaCalcParam1() {return fgEtaCalcParam1;} | |
72 | static Double_t GetEtaCalcParam2() {return fgEtaCalcParam2;} | |
73 | static Double_t GetEtaCalcParam3() {return fgEtaCalcParam3;} | |
917e711b | 74 | |
a8ffd46b | 75 | void SetTPCRawStream(AliTPCRawStream *rawstream) {fTPCRawStream=rawstream;} |
917e711b | 76 | |
ce4c28d5 | 77 | private: |
78 | ||
a8ffd46b | 79 | UChar_t **fGapCount; //! |
80 | UChar_t **fCurrentRowCount; //! | |
917e711b | 81 | #ifdef do_mc |
4aa41877 | 82 | AliHLTTrackIndex **fTrackID; //! |
917e711b | 83 | #endif |
917e711b | 84 | |
a8ffd46b | 85 | UChar_t *fTrackNRows; //! |
86 | UChar_t *fTrackFirstRow; //! | |
87 | UChar_t *fTrackLastRow; //! | |
88 | UChar_t *fInitialGapCount; //! | |
917e711b | 89 | |
a8ffd46b | 90 | UChar_t **fPrevBin; //! |
91 | UChar_t **fNextBin; //! | |
92 | UChar_t **fNextRow; //! | |
917e711b | 93 | |
4aa41877 | 94 | AliHLTPadHoughParams **fStartPadParams; //! |
95 | AliHLTPadHoughParams **fEndPadParams; //! | |
f644512a | 96 | Float_t **fLUTr; //! |
917e711b | 97 | |
98 | Float_t *fLUTforwardZ; //! | |
917e711b | 99 | Float_t *fLUTbackwardZ; //! |
917e711b | 100 | |
4aa41877 | 101 | AliHLTHistogram **fParamSpace; //! |
a8ffd46b | 102 | |
103 | void TransformCircleFromDigitArray(); | |
104 | void TransformCircleFromRawStream(); | |
105 | ||
106 | void DeleteHistograms(); //Method to clean up the histograms containing Hough space | |
107 | ||
108 | inline void FillClusterRow(UChar_t i,Int_t binx1,Int_t binx2,UChar_t *ngaps2,UChar_t *currentrow2,UChar_t *lastrow2 | |
109 | #ifdef do_mc | |
4aa41877 | 110 | ,AliHLTEtaRow etaclust,AliHLTTrackIndex *trackid |
a8ffd46b | 111 | #endif |
112 | ); | |
4aa41877 | 113 | inline void FillCluster(UChar_t i,Int_t etaindex,AliHLTEtaRow *etaclust,Int_t ilastpatch,Int_t firstbinx,Int_t lastbinx,Int_t nbinx,Int_t firstbiny); |
a8ffd46b | 114 | #ifdef do_mc |
4aa41877 | 115 | inline void FillClusterMCLabels(AliHLTDigitData digpt,AliHLTEtaRow *etaclust); |
a8ffd46b | 116 | #endif |
117 | ||
4aa41877 | 118 | void SetTransformerArrays(AliHLTHoughTransformerRow *tr); |
ce4c28d5 | 119 | |
917e711b | 120 | static Float_t fgBeta1,fgBeta2; // Two curves which define the Hough space |
f644512a | 121 | static Float_t fgDAlpha, fgDEta; // Correlation factor between Hough space bin size and resolution |
122 | static Double_t fgEtaCalcParam1, fgEtaCalcParam2; // Parameters used for fast calculation of eta during the binning of Hough space | |
123 | static Double_t fgEtaCalcParam3; // Parameter used during the eta binning of the Hough Space in order to account for finite track radii | |
5a31e9df | 124 | |
ce4c28d5 | 125 | AliTPCRawStream *fTPCRawStream; // Pointer to the raw stream in case of fast reading of the raw data (fast_raw flag) |
a8ffd46b | 126 | |
4aa41877 | 127 | ClassDef(AliHLTHoughTransformerRow,1) //TPC Rows Hough transformation class |
5a31e9df | 128 | |
129 | }; | |
130 | ||
4aa41877 | 131 | typedef AliHLTHoughTransformerRow AliL3HoughTransformerRow; // for backward compatibility |
132 | ||
5a31e9df | 133 | #endif |
134 | ||
135 | ||
136 | ||
137 |