Added LUT transformer and new function to set parameter for VHDL transformer.
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Aug 2002 08:40:03 +0000 (08:40 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Aug 2002 08:40:03 +0000 (08:40 +0000)
HLT/hough/AliL3Hough.cxx
HLT/hough/AliL3Hough.h

index 989cc92..8fe3fee 100644 (file)
@@ -14,6 +14,7 @@
 #include "AliL3Hough.h"
 #include "AliL3HoughTransformer.h"
 #include "AliL3HoughClusterTransformer.h"
+#include "AliL3HoughTransformerLUT.h"
 #include "AliL3HoughTransformerVhdl.h"
 #include "AliL3HoughMaxFinder.h"
 #ifdef use_aliroot
@@ -78,6 +79,7 @@ AliL3Hough::AliL3Hough()
 
   SetTransformerParams();
   SetThreshold();
+  SetNSaveIterations();
 }
 
 AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments,Bool_t bit8,Int_t tv)
@@ -156,21 +158,16 @@ void AliL3Hough::Init(Bool_t doit, Bool_t addhists)
 
   for(Int_t i=0; i<fNPatches; i++)
     {
-      //VESTBO: Changes here, slice information is in principle not needed
-      //by the HoughTransformers. You always gave here a one, I changed
-      //it to zero and have Init function with is called in ReadData (see
-      //a few lines below.). I did not have time to think about it longer
-      //as there was that strange bug, but we should either consider not
-      //to give slice at all or to give it correcty (thats what I am doing
-      //a the moment.) 
-
       switch (fVersion){ //choose Transformer
       case 1: 
-       fHoughTransformer[i] = new AliL3HoughTransformerVhdl(0,i,fNEtaSegments);
+       fHoughTransformer[i] = new AliL3HoughTransformerLUT(0,i,fNEtaSegments);
        break;
       case 2:
        fHoughTransformer[i] = new AliL3HoughClusterTransformer(0,i,fNEtaSegments);
        break;
+      case 3:
+       fHoughTransformer[i] = new AliL3HoughTransformerVhdl(0,i,fNEtaSegments,fNSaveIterations);
+       break;
       default:
        fHoughTransformer[i] = new AliL3HoughTransformer(0,i,fNEtaSegments);
       }
@@ -242,6 +239,7 @@ void AliL3Hough::ReadData(Int_t slice,Int_t eventnr)
            sprintf(name,"%sdigits_c8_%d_%d.raw",fPath,slice,i);
          else
            sprintf(name,"%sdigits_%d_%d.raw",fPath,slice,i);
+
          fMemHandler[i]->SetBinaryInput(name);
          digits = (AliL3DigitRowData *)fMemHandler[i]->CompBinary2Memory(ndigits);
          fMemHandler[i]->CloseBinaryInput();
@@ -255,11 +253,10 @@ void AliL3Hough::ReadData(Int_t slice,Int_t eventnr)
          cerr<<"You cannot read from rootfile now"<<endl;
 #endif
        }
-      fHoughTransformer[i]->SetInputData(ndigits,digits);
 
-      //VESTBO: due to bug commented out!!!
-      //fHoughTransformer[i]->Init(slice,i,fNEtaSegments);
-      //fHoughTransformer[i]->Print();
+      //set input data and init transformer
+      fHoughTransformer[i]->SetInputData(ndigits,digits);
+      fHoughTransformer[i]->Init(slice,i,fNEtaSegments);
     }
 }
 
index c986015..a23bf7b 100644 (file)
@@ -25,7 +25,7 @@ class AliL3Hough {
   Bool_t fUse8bits;
   Int_t fNEtaSegments;
   Int_t fNPatches;
-  Int_t fVersion; //for HoughTransformer
+  Int_t fVersion; //which HoughTransformer to use
   Int_t fCurrentSlice;
 
   Float_t fLowPt;
@@ -33,7 +33,8 @@ class AliL3Hough {
   Int_t fNBinX;
   Int_t fNBinY;
   Int_t fThreshold;
-  
+  Int_t fNSaveIterations; //for HoughtransformerVhld
+
   AliL3MemHandler **fMemHandler; //!
   AliL3HoughBaseTransformer **fHoughTransformer; //!
   AliL3HoughEval **fEval; //!
@@ -79,6 +80,7 @@ class AliL3Hough {
   void SetWriteDigits() {fWriteDigits = kTRUE;}
   void SetTransformerParams(Int_t nx=64, Int_t ny=64,Float_t lpt=0.1,Float_t phi=30) {fNBinX=nx;fNBinY=ny;fLowPt=lpt;fPhi=phi;}
   void SetThreshold(Int_t t=3) {fThreshold=t;}
+  void SetNSaveIterations(Int_t t=10) {fNSaveIterations=t;}
 
   //Getters
   AliL3HoughBaseTransformer *GetTransformer(Int_t i) {if(!fHoughTransformer[i]) return 0; return fHoughTransformer[i];}