2 // origin hough/AliL3HoughBaseTransformer.h,v 1.22 Tue Mar 22 13:11:58 2005 UTC by cvetan
4 #ifndef ALIHLTTPCHOUGHBASETRANSFORMER_H
5 #define ALIHLTTPCHOUGHBASETRANSFORMER_H
7 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
8 * See cxx source for full Copyright notice */
10 /** @file AliHLTTPCHoughTransformer.h
13 @brief Base class for TPC hough tracking algorithms
16 //-------------------------------------------------------------------------
17 // Class AliHLTTPCHoughTransformer
18 // This is the base class for all the Hough Transformer tracking
19 // algorithms for HLT.
20 //-------------------------------------------------------------------------
22 #include "AliHLTStdIncludes.h"
23 #include "AliHLTTPCRootTypes.h"
26 const UInt_t MaxTrack=120;
27 struct AliHLTTrackIndex {
28 Int_t fLabel[MaxTrack];//MC label
29 UChar_t fNHits[MaxTrack];//Number of different mc labels
30 UChar_t fCurrentRow[MaxTrack];//Index of the current row while filling Hough space
32 typedef struct AliHLTTrackIndex AliHLTTrackIndex;
35 class AliHLTTPCDigitRowData;
36 class AliHLTTPCHistogram;
37 class AliTPCRawStream;
40 * @class AliHLTTPCHoughTransformer
41 * Base class for TPC hough tracking transfomers.
43 class AliHLTTPCHoughTransformer {
47 /** standard constructor */
48 AliHLTTPCHoughTransformer();
50 AliHLTTPCHoughTransformer(Int_t slice,Int_t patch,Int_t netasegments,Float_t zvertex=0.0);
51 /** standard destructor */
52 virtual ~AliHLTTPCHoughTransformer();
54 void SetInputData(UInt_t /*ndigits*/,AliHLTTPCDigitRowData *ptr) {fDigitRowData = ptr;}
56 //this is for adaptave histograms
57 virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/)
58 {STDCERR<<"Adaptive histograms are not supported for this Transformer!"<<STDENDL;}
60 virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0;
61 virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0;
63 virtual void Reset() = 0;
64 virtual void TransformCircle()
65 {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
66 virtual void TransformCircle(Int_t */*rowRange*/,Int_t /*every*/)
67 {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
68 virtual void TransformCircleC(Int_t */*rowRange*/,Int_t /*every*/)
69 {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;}
70 virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0)
71 {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;}
72 virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/)
73 {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;}
76 Int_t GetSlice() const {return fSlice;}
77 Int_t GetPatch() const {return fPatch;}
78 Int_t GetLastPatch() const {return fLastPatch;}
79 AliHLTTPCHoughTransformer *GetLastTransfromer() const {return fLastTransformer;}
80 Int_t GetNEtaSegments() const {return fNEtaSegments;}
81 Int_t GetLowerThreshold() const {return fLowerThreshold;}
82 Int_t GetUpperThreshold() const {return fUpperThreshold;}
83 Double_t GetEtaMin() const {return fEtaMin;}
84 Double_t GetEtaMax() const {return fEtaMax;}
85 Float_t GetZVertex() const {return fZVertex;}
87 AliHLTTPCDigitRowData *GetDataPointer() {return fDigitRowData;}
89 virtual Int_t GetEtaIndex(Double_t eta) const = 0;
90 virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const
91 {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;}
92 virtual AliHLTTPCHistogram *GetHistogram(Int_t etaindex) = 0;
93 virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0;
95 virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const {
96 STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL;
101 virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1);
102 void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
103 void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
104 void SetLastPatch(Int_t i) {fLastPatch = i;}
105 void SetLastTransformer(AliHLTTPCHoughTransformer *transformer) {fLastTransformer = transformer;}
107 virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){};
109 virtual void Print(){};
113 AliHLTTPCHoughTransformer *fLastTransformer;//Pointer to the previous hough transformer
116 /** copy constructor prohibited */
117 AliHLTTPCHoughTransformer(const AliHLTTPCHoughTransformer&);
118 /** assignment operator prohibited */
119 AliHLTTPCHoughTransformer& operator=(const AliHLTTPCHoughTransformer&);
121 Int_t fSlice;//Index of the current slice being processed
122 Int_t fPatch;//Index of the current patch being processed
123 Int_t fLastPatch;//Index of the last processed patch
124 Int_t fNEtaSegments;//Number of eta slices
125 Double_t fEtaMin;//Minimum allowed eta
126 Double_t fEtaMax;//Maximum allowed eta
127 Int_t fLowerThreshold;//Lower threshold for digits amplitude
128 Int_t fUpperThreshold;//Upper threshold for digits amplitude
130 AliHLTTPCDigitRowData *fDigitRowData; //!
132 Float_t fZVertex;//Z position of the primary vertex
134 ClassDef(AliHLTTPCHoughTransformer,1) //Hough transformation base class