]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/hough/AliL3HoughBaseTransformer.h
Coding violation fixes.
[u/mrichter/AliRoot.git] / HLT / hough / AliL3HoughBaseTransformer.h
CommitLineData
3e87ef69 1// @(#) $Id$
2
c62b480b 3#ifndef ALIL3HOUGHBASETRANSFORMER_H
4#define ALIL3HOUGHBASETRANSFORMER_H
c52cf5d8 5
fc79823f 6//-------------------------------------------------------------------------
7// Class AliL3HoughBaseTransformer
8// This is the base class for all the Hough Transformer tracking
9// algorithms for HLT.
10//-------------------------------------------------------------------------
11
c52cf5d8 12#include "AliL3RootTypes.h"
13
1eef4efc 14#ifdef do_mc
e81ffe36 15const UInt_t MaxTrack=120;
c62b480b 16struct AliL3TrackIndex {
17 Int_t fLabel[MaxTrack];//MC label
18 UChar_t fNHits[MaxTrack];//Number of different mc labels
19 UChar_t fCurrentRow[MaxTrack];//Index of the current row while filling Hough space
1eef4efc 20};
c62b480b 21typedef struct AliL3TrackIndex AliL3TrackIndex;
1eef4efc 22#endif
23
c52cf5d8 24class AliL3DigitRowData;
25class AliL3Histogram;
26
fc79823f 27#include "AliTPCRawStream.h"
a8ffd46b 28
c52cf5d8 29class AliL3HoughBaseTransformer {
0bd0c1ef 30
c52cf5d8 31 public:
e06900d5 32
c52cf5d8 33 AliL3HoughBaseTransformer();
c62b480b 34 AliL3HoughBaseTransformer(Int_t slice,Int_t patch,Int_t netasegments,Float_t zvertex=0.0);
c52cf5d8 35 virtual ~AliL3HoughBaseTransformer();
36
0615a438 37 void SetInputData(UInt_t /*ndigits*/,AliL3DigitRowData *ptr) {fDigitRowData = ptr;}
c52cf5d8 38
1f1942b8 39 //this is for adaptave histograms
eb016424 40 virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/)
1f1942b8 41 {STDCERR<<"Adaptive histograms are not supported for this Transformer!"<<STDENDL;}
42
b2a02bce 43 virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0;
44 virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0;
1f1942b8 45
c52cf5d8 46 virtual void Reset() = 0;
eb016424 47 virtual void TransformCircle()
1f1942b8 48 {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
eb016424 49 virtual void TransformCircle(Int_t */*row_range*/,Int_t /*every*/)
1f1942b8 50 {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
eb016424 51 virtual void TransformCircleC(Int_t */*row_range*/,Int_t /*every*/)
1f1942b8 52 {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;}
eb016424 53 virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0)
1f1942b8 54 {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;}
eb016424 55 virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/)
1f1942b8 56 {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;}
57
c52cf5d8 58 //Getters
974fb714 59 Int_t GetSlice() const {return fSlice;}
60 Int_t GetPatch() const {return fPatch;}
a8ffd46b 61 Int_t GetLastPatch() const {return fLastPatch;}
62 AliL3HoughBaseTransformer *GetLastTransfromer() const {return fLastTransformer;}
974fb714 63 Int_t GetNEtaSegments() const {return fNEtaSegments;}
64 Int_t GetLowerThreshold() const {return fLowerThreshold;}
65 Int_t GetUpperThreshold() const {return fUpperThreshold;}
66 Double_t GetEtaMin() const {return fEtaMin;}
67 Double_t GetEtaMax() const {return fEtaMax;}
68 Float_t GetZVertex() const {return fZVertex;}
0bd0c1ef 69
c52cf5d8 70 AliL3DigitRowData *GetDataPointer() {return fDigitRowData;}
71
bd2f8772 72 virtual Int_t GetEtaIndex(Double_t eta) const = 0;
c62b480b 73 virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const
1f1942b8 74 {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;}
c62b480b 75 virtual AliL3Histogram *GetHistogram(Int_t etaindex) = 0;
76 virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0;
1f1942b8 77
c62b480b 78 virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const {
1f1942b8 79 STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL;
80 return -1;
81 }
1eef4efc 82
c52cf5d8 83 //setters
c62b480b 84 virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1);
3bb06991 85 void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
86 void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
a8ffd46b 87 void SetLastPatch(Int_t i) {fLastPatch = i;}
88 void SetLastTransformer(AliL3HoughBaseTransformer *transformer) {fLastTransformer = transformer;}
89
90 virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){};
c52cf5d8 91
65ca0c00 92 virtual void Print(){};
a8ffd46b 93
94 protected:
95
96 AliL3HoughBaseTransformer *fLastTransformer;//Pointer to the previous hough transformer
c62b480b 97
98 private:
99
100 Int_t fSlice;//Index of the current slice being processed
101 Int_t fPatch;//Index of the current patch being processed
a8ffd46b 102 Int_t fLastPatch;//Index of the last processed patch
c62b480b 103 Int_t fNEtaSegments;//Number of eta slices
104 Double_t fEtaMin;//Minimum allowed eta
105 Double_t fEtaMax;//Maximum allowed eta
106 Int_t fLowerThreshold;//Lower threshold for digits amplitude
107 Int_t fUpperThreshold;//Upper threshold for digits amplitude
108
109 AliL3DigitRowData *fDigitRowData; //!
110
111 Float_t fZVertex;//Z position of the primary vertex
65ca0c00 112
c52cf5d8 113 ClassDef(AliL3HoughBaseTransformer,1) //Hough transformation base class
114
115};
116
117
118#endif
65ca0c00 119