]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/hough/AliL3HoughTransformer.h
a sample component library
[u/mrichter/AliRoot.git] / HLT / hough / AliL3HoughTransformer.h
index 588df419827c78a2d0854c9bd14d18fdab20e189..aab044c63f0d50515238e2c518b3b0d17b00476b 100644 (file)
@@ -1,72 +1,59 @@
-#ifndef ALIL3_HOUGHTRANSFORMER
-#define ALIL3_HOUGHTRANSFORMER
+// @(#) $Id$
 
-#include "AliL3RootTypes.h"
+#ifndef ALIL3HOUGHTRANSFORMER_H
+#define ALIL3HOUGHTRANSFORMER_H
 
-class AliL3Transform;
-class AliL3Histogram;
-class AliL3DigitRowData;
+//-------------------------------------------------------------------------
+//                Class AliL3HoughTransformer
+//   This is one of the possible implementations of the Hough Transform
+//   TPC tracking algorithms for HLT. 
+//-------------------------------------------------------------------------
 
-class AliL3HoughTransformer : public TObject {
-  
- private:
+#include "AliL3RootTypes.h"
+#include "AliL3HoughBaseTransformer.h"
 
-  Int_t fSlice;
-  Int_t fPatch;
-  Int_t fNEtaSegments;
-  Double_t fEtaMin;
-  Double_t fEtaMax;
-  Int_t fThreshold;
-  AliL3Transform *fTransform; //!
-  
-  //Pointers to histograms
-  AliL3Histogram **fParamSpace; //!
+class AliL3Histogram;
 
-  //Data pointers
-  UInt_t fNDigitRowData;
-  AliL3DigitRowData *fDigitRowData; //!
-  
-  void DeleteHistograms();
+class AliL3HoughTransformer : public AliL3HoughBaseTransformer {
 
  public:
   AliL3HoughTransformer(); 
-  AliL3HoughTransformer(Int_t slice,Int_t patch,Int_t n_eta_segments);
+  AliL3HoughTransformer(Int_t slice,Int_t patch,Int_t netasegments,Bool_t DoEtaOverlap=kFALSE,Bool_t DoMC=kFALSE);
   virtual ~AliL3HoughTransformer();
   
-  void SetInputData(UInt_t ndigits,AliL3DigitRowData *ptr);
-  void CreateHistograms(Int_t nxbin,Double_t ptmin,Int_t nybin,Double_t phimin,Double_t phimax);
-  void CreateHistograms(Int_t nxbin=64,Double_t xmin=-0.006,Double_t xmax=0.006,
-                       Int_t nybin=64,Double_t ymin=-0.26,Double_t ymax=0.26);
+  void CreateHistograms(Float_t ptmin,Float_t ptmax,Float_t ptres,Int_t nybin,Float_t psi);
+  void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax);
+  void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,
+                       Int_t nybin,Float_t ymin,Float_t ymax);
   void Reset();
   void TransformCircle();
-  void TransformCircleC();
-  void TransformLine();
-
-  //Getters
-  Int_t GetSlice() {return fSlice;}
-  Int_t GetPatch() {return fPatch;}
-  Int_t GetNEtaSegments() {return fNEtaSegments;}
-  Int_t GetThreshold() {return fThreshold;}
-  Double_t GetEtaMin() {return fEtaMin;}
-  Double_t GetEtaMax() {return fEtaMax;}
-  Double_t GetEtaSlice() {return (fEtaMax - fEtaMin)/fNEtaSegments;}
-  void *GetDataPointer() {return (void*)fDigitRowData;}
-  AliL3Histogram *GetHistogram(Int_t eta_index);
+  void TransformCircleC(Int_t *rowrange,Int_t every=1);
+  void TransformLine(Int_t *rowrange=0,Float_t *phirange=0);
+  void TransformLineC(Int_t *rowrange,Float_t *phirange);
+
+  Int_t GetEtaIndex(Double_t eta) const;
+  void GetEtaIndexes(Double_t eta,Int_t *indexes) const;
+  AliL3Histogram *GetHistogram(Int_t etaindex);
+  Double_t GetEta(Int_t etaindex,Int_t slice) const;
+  Int_t GetTrackID(Int_t etaindex,Double_t kappa,Double_t psi) const;
   
-  //setters
-  void SetThreshold(Int_t i) {fThreshold = i;}
+ private:
+  
+  AliL3Histogram **fParamSpace; //!
+#ifdef do_mc
+  AliL3TrackIndex **fTrackID; //!
+#endif
+  Bool_t fDoMC; // Calculate mc labels or not
+  Bool_t fEtaOverlap; // Allow overlapping of eta slice or not
+  
+  void DeleteHistograms();
 
-  ClassDef(AliL3HoughTransformer,1) //Hough transformation class
+  ClassDef(AliL3HoughTransformer,1) //Normal Hough transformation class
 
 };
 
-inline AliL3Histogram *AliL3HoughTransformer::GetHistogram(Int_t eta_index)
-{
-  if(!fParamSpace || eta_index >= fNEtaSegments || eta_index < 0)
-    return 0;
-  if(!fParamSpace[eta_index])
-    return 0;
-  return fParamSpace[eta_index];
-}
-
 #endif
+
+
+
+