3 #ifndef ALIL3HOUGHTRANSFORMERROW_H
4 #define ALIL3HOUGHTRANSFORMERROW_H
6 #include "AliL3RootTypes.h"
7 #include "AliL3HoughBaseTransformer.h"
10 #define MIN_TRACK_LENGTH 70
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
17 Int_t fMcLabels[MaxTrack]; //Array to store mc labels inside cluster
21 struct AliL3PadHoughParams {
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
34 class AliL3HoughTransformerRow : public AliL3HoughBaseTransformer {
37 AliL3HoughTransformerRow();
38 AliL3HoughTransformerRow(Int_t slice,Int_t patch,Int_t netasegments,Bool_t DoMC=kFALSE,Float_t zvertex=0.0);
39 virtual ~AliL3HoughTransformerRow();
41 void CreateHistograms(Float_t ptmin,Float_t ptmax,Float_t pres,Int_t nybin,Float_t psi) {
42 AliL3HoughBaseTransformer::CreateHistograms(ptmin,ptmax,pres,nybin,psi);
44 void CreateHistograms(Int_t /*nxbin*/,Float_t /*ptmin*/,Int_t /*nybin*/,Float_t /*phimin*/,Float_t /*phimax*/)
45 {STDCERR<<"This method for creation of parameter space histograms is not supported for this Transformer!"<<STDENDL;}
46 void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,
47 Int_t nybin,Float_t ymin,Float_t ymax);
49 void TransformCircle();
50 void TransformCircle(Int_t *row_range,Int_t every) {
51 AliL3HoughBaseTransformer::TransformCircle(row_range,every);
54 Int_t GetEtaIndex(Double_t eta) const;
55 AliL3Histogram *GetHistogram(Int_t etaindex);
56 Double_t GetEta(Int_t etaindex,Int_t slice) const;
57 Int_t GetTrackID(Int_t etaindex,Double_t alpha1,Double_t alpha2) const;
58 Int_t GetTrackLength(Double_t alpha1,Double_t alpha2,Int_t *rows) const;
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; }
67 static Float_t GetBeta1() {return fgBeta1;}
68 static Float_t GetBeta2() {return fgBeta2;}
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;}
75 void SetTPCRawStream(AliTPCRawStream *rawstream) {fTPCRawStream=rawstream;}
79 UChar_t **fGapCount; //!
80 UChar_t **fCurrentRowCount; //!
82 AliL3TrackIndex **fTrackID; //!
85 UChar_t *fTrackNRows; //!
86 UChar_t *fTrackFirstRow; //!
87 UChar_t *fTrackLastRow; //!
88 UChar_t *fInitialGapCount; //!
90 UChar_t **fPrevBin; //!
91 UChar_t **fNextBin; //!
92 UChar_t **fNextRow; //!
94 AliL3PadHoughParams **fStartPadParams; //!
95 AliL3PadHoughParams **fEndPadParams; //!
98 Float_t *fLUTforwardZ; //!
99 Float_t *fLUTbackwardZ; //!
101 AliL3Histogram **fParamSpace; //!
103 void TransformCircleFromDigitArray();
104 void TransformCircleFromRawStream();
106 void DeleteHistograms(); //Method to clean up the histograms containing Hough space
108 inline void FillClusterRow(UChar_t i,Int_t binx1,Int_t binx2,UChar_t *ngaps2,UChar_t *currentrow2,UChar_t *lastrow2
110 ,AliL3EtaRow etaclust,AliL3TrackIndex *trackid
113 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);
115 inline void FillClusterMCLabels(AliL3DigitData digpt,AliL3EtaRow *etaclust);
118 void SetTransformerArrays(AliL3HoughTransformerRow *tr);
120 static Float_t fgBeta1,fgBeta2; // Two curves which define the Hough space
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
125 AliTPCRawStream *fTPCRawStream; // Pointer to the raw stream in case of fast reading of the raw data (fast_raw flag)
127 ClassDef(AliL3HoughTransformerRow,1) //TPC Rows Hough transformation class