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 /** not a valid copy constructor, defined according to effective C++ style */
52 AliHLTTPCHoughTransformer(const AliHLTTPCHoughTransformer&);
53 /** not a valid assignment op, but defined according to effective C++ style */
54 AliHLTTPCHoughTransformer& operator=(const AliHLTTPCHoughTransformer&);
55 /** standard destructor */
56 virtual ~AliHLTTPCHoughTransformer();
58 void SetInputData(UInt_t /*ndigits*/,AliHLTTPCDigitRowData *ptr) {fDigitRowData = ptr;}
60 //this is for adaptave histograms
61 virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/)
62 {STDCERR<<"Adaptive histograms are not supported for this Transformer!"<<STDENDL;}
64 virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0;
65 virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0;
67 virtual void Reset() = 0;
68 virtual void TransformCircle()
69 {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
70 virtual void TransformCircle(Int_t */*rowRange*/,Int_t /*every*/)
71 {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;}
72 virtual void TransformCircleC(Int_t */*rowRange*/,Int_t /*every*/)
73 {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;}
74 virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0)
75 {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;}
76 virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/)
77 {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;}
80 Int_t GetSlice() const {return fSlice;}
81 Int_t GetPatch() const {return fPatch;}
82 Int_t GetLastPatch() const {return fLastPatch;}
83 AliHLTTPCHoughTransformer *GetLastTransfromer() const {return fLastTransformer;}
84 Int_t GetNEtaSegments() const {return fNEtaSegments;}
85 Int_t GetLowerThreshold() const {return fLowerThreshold;}
86 Int_t GetUpperThreshold() const {return fUpperThreshold;}
87 Double_t GetEtaMin() const {return fEtaMin;}
88 Double_t GetEtaMax() const {return fEtaMax;}
89 Float_t GetZVertex() const {return fZVertex;}
91 AliHLTTPCDigitRowData *GetDataPointer() {return fDigitRowData;}
93 virtual Int_t GetEtaIndex(Double_t eta) const = 0;
94 virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const
95 {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;}
96 virtual AliHLTTPCHistogram *GetHistogram(Int_t etaindex) = 0;
97 virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0;
99 virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const {
100 STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL;
105 virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1);
106 void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
107 void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
108 void SetLastPatch(Int_t i) {fLastPatch = i;}
109 void SetLastTransformer(AliHLTTPCHoughTransformer *transformer) {fLastTransformer = transformer;}
111 virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){};
113 virtual void Print(){};
117 AliHLTTPCHoughTransformer *fLastTransformer;//Pointer to the previous hough transformer
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