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