Bugfix related to the filling of MC labels
[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 MAX_GAP_SIZE 4
11#define MIN_TRACK_LENGTH 70
12#define MAX_MISS_ROWS 2
13
a8ffd46b 14struct 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
24struct AliL3PadHoughParams {
25 Float_t fAlpha;
26 Float_t fDeltaAlpha;
27 Int_t fFirstBin;
28 Int_t fLastBin;
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;
917e711b 53 UChar_t *GetGapCount(Int_t etaindex);
54 UChar_t *GetCurrentRowCount(Int_t etaindex);
a8ffd46b 55 UChar_t *GetPrevBin(Int_t etaindex);
56 UChar_t *GetNextBin(Int_t etaindex);
57 UChar_t *GetNextRow(Int_t etaindex);
58 UChar_t *GetTrackNRows();
59 UChar_t *GetTrackFirstRow();
60 UChar_t *GetTrackLastRow();
917e711b 61 static Float_t GetBeta1() {return fgBeta1;}
62 static Float_t GetBeta2() {return fgBeta2;}
63
a8ffd46b 64 void SetTPCRawStream(AliTPCRawStream *rawstream) {fTPCRawStream=rawstream;}
917e711b 65
a8ffd46b 66 UChar_t **fGapCount; //!
67 UChar_t **fCurrentRowCount; //!
917e711b 68#ifdef do_mc
a8ffd46b 69 AliL3TrackIndex **fTrackID; //!
917e711b 70#endif
917e711b 71
a8ffd46b 72 UChar_t *fTrackNRows; //!
73 UChar_t *fTrackFirstRow; //!
74 UChar_t *fTrackLastRow; //!
75 UChar_t *fInitialGapCount; //!
917e711b 76
a8ffd46b 77 UChar_t **fPrevBin; //!
78 UChar_t **fNextBin; //!
79 UChar_t **fNextRow; //!
917e711b 80
a8ffd46b 81 AliL3PadHoughParams **fStartPadParams; //!
82 AliL3PadHoughParams **fEndPadParams; //!
83 Float_t **fLUTr2; //!
917e711b 84
85 Float_t *fLUTforwardZ; //!
86 Float_t *fLUTforwardZ2; //!
87 Float_t *fLUTbackwardZ; //!
88 Float_t *fLUTbackwardZ2; //!
89
a8ffd46b 90 private:
91
92 AliL3Histogram **fParamSpace; //!
93
94 void TransformCircleFromDigitArray();
95 void TransformCircleFromRawStream();
96
97 void DeleteHistograms(); //Method to clean up the histograms containing Hough space
98
99 inline void FillClusterRow(UChar_t i,Int_t binx1,Int_t binx2,UChar_t *ngaps2,UChar_t *currentrow2,UChar_t *lastrow2
100#ifdef do_mc
101 ,AliL3EtaRow etaclust,AliL3TrackIndex *trackid
102#endif
103 );
104 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);
105#ifdef do_mc
8cc2b1a5 106 inline void FillClusterMCLabels(AliL3DigitData digpt,AliL3EtaRow *etaclust);
a8ffd46b 107#endif
108
917e711b 109 static Float_t fgBeta1,fgBeta2; // Two curves which define the Hough space
5a31e9df 110
a8ffd46b 111 AliTPCRawStream *fTPCRawStream;
112
0bd0c1ef 113 ClassDef(AliL3HoughTransformerRow,1) //TPC Rows Hough transformation class
5a31e9df 114
115};
116
117#endif
118
119
120
121