]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updating
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Jul 2001 14:39:06 +0000 (14:39 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Jul 2001 14:39:06 +0000 (14:39 +0000)
HLT/hough/AliL3HoughTransformer.cxx
HLT/hough/AliL3HoughTransformer.h
HLT/hough/Makefile

index 6e61b531f64f8d5b5b1340be6a6852077ec7574d..10eebbc1754a94963885433a09d01bcf18cb2e38 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <math.h>
 #include <TH2.h>
+#include <time.h>
 
 #include <TFile.h>
 #include <TTree.h>
@@ -119,10 +120,10 @@ void AliL3HoughTransformer::InitTables()
   for(Int_t i=0; i<etabounds; i++)
     fEtaIndex[i] = -1;
   
-  fTrackTable = new UChar_t*[fNumEtaSegments];
+  fTrackTable = new Char_t*[fNumEtaSegments];
   for(Int_t i=0; i<fNumEtaSegments; i++)
     {
-      fTrackTable[i] = new UChar_t[fBinTableBounds];
+      fTrackTable[i] = new Char_t[fBinTableBounds];
       for(Int_t j=0; j<fBinTableBounds; j++)
        fTrackTable[i][j] = 0;
     }
@@ -177,8 +178,8 @@ void AliL3HoughTransformer::TransformTables(AliL3Histogram **histos,AliL3Histogr
   //Transform is done using LUT created in InitTables.
   //fTrackTable : table telling whether a specific pixel is active (nonzero):
   //fTrackTable = 0  ->  no track
-  //fTrackindex = 1  ->  track present
-  //fTrackindex = 2  ->  track has been removed (already found)
+  //fTrackindex > 0  ->  track present
+  //fTrackindex = -1  ->  track has been removed (already found)
   //fEtaIndex : table storing the etaindex -> used to find correct histogram to fill
   //fBinTable : table storing all the bins to fill for each nonzero pixel
     
@@ -195,7 +196,7 @@ void AliL3HoughTransformer::TransformTables(AliL3Histogram **histos,AliL3Histogr
 
   Int_t out_count=0,tot_count=0;
   Int_t index,ind;
-  
+
   for(Int_t i=NRows[fPatch][0]; i<=NRows[fPatch][1]; i++)
     {
       Int_t prow = i - NRows[fPatch][0];
@@ -207,8 +208,8 @@ void AliL3HoughTransformer::TransformTables(AliL3Histogram **histos,AliL3Histogr
          eta_index = fEtaIndex[ind];
          if(eta_index < 0) continue;  //pixel out of etarange
          
-         if(fTrackTable[eta_index][index]==2) continue; //this pixel has already been removed. 
-         fTrackTable[eta_index][index] = 1; //this pixel is now marked as active (it is nonzero)
+         if(fTrackTable[eta_index][index]<0) continue; //this pixel has already been removed. 
+         fTrackTable[eta_index][index]++; //this pixel is now marked as active (it is nonzero)
          
          tot_count++;
          hist = histos[eta_index];
@@ -274,6 +275,11 @@ void AliL3HoughTransformer::WriteTables()
   fclose(file2);
 }
 
+Double_t AliL3HoughTransformer::CpuTime()
+{
+  return (Double_t)(clock()) / CLOCKS_PER_SEC;
+}
+
 /*
 void AliL3HoughTransformer::InitTemplates(TH2F *hist)
 {
index 6e702f34525c733e4afd1478b639712d8d421b33..0688636f79874d610bfadf86ae5aa15dc5ad1f36 100644 (file)
@@ -55,7 +55,7 @@ class AliL3HoughTransformer : public TObject {
   Int_t fNDigits;
   Int_t **fBinTable; //!
   Int_t *fEtaIndex; //!
-  UChar_t **fTrackTable; //!
+  Char_t **fTrackTable; //!
   AliL3Histogram *fHistoPt;
   
   Int_t fSlice;
@@ -64,7 +64,7 @@ class AliL3HoughTransformer : public TObject {
  public:
   AliL3HoughTransformer(); 
   AliL3HoughTransformer(Int_t slice,Int_t patch,Float_t *etarange);
-  AliL3HoughTransformer(Int_t slice,Int_t patch,Double_t *etarange=0,Int_t n_eta_segments=1);
+  AliL3HoughTransformer(Int_t slice,Int_t patch,Double_t *etarange=0,Int_t n_eta_segments=90);
   virtual ~AliL3HoughTransformer();
 
   void InitTables();
@@ -72,6 +72,8 @@ class AliL3HoughTransformer : public TObject {
   void SetInputData(UInt_t ndigits,AliL3DigitRowData *ptr);
   void WriteTables();
   void SetHistogram(AliL3Histogram *hist) {fHistoPt = hist;}
+  Double_t CpuTime();
+  Int_t GetNumEtaSegments() {return fNumEtaSegments;}
   /*
     void Transform2Circle(TH2F *hist,Int_t eta_index);
     void Transform2Circle(TH2F **histos,Int_t n_eta_segments,UInt_t ndigits,AliL3DigitRowData *ptr);
index 6268a76fefea01056fd7aca4d0f026dfb759abc6..85ac3935ce7ad35adaf3a1636fd20cde49fd170b 100644 (file)
@@ -11,8 +11,9 @@ PACKAGE = AliL3Hough
 
 
 SRCS          = AliL3HoughTransformer.cxx AliL3Hough.cxx \
-                AliL3HoughMaxFinder.cxx AliL3HoughEval.cxx AliL3HoughMerge.cxx 
-                
+                AliL3HoughMaxFinder.cxx AliL3HoughEval.cxx AliL3HoughMerge.cxx \
+                AliL3Histogram.cxx
+
 
 # C++ Headers