Can now use 8 bit data as input, by setting the apropriate
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 25 May 2002 10:01:15 +0000 (10:01 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 25 May 2002 10:01:15 +0000 (10:01 +0000)
flag in AliL3Hough::Init.

HLT/hough/AliL3Hough.cxx
HLT/hough/AliL3Hough.h
HLT/hough/AliL3HoughDisplay.cxx
HLT/hough/AliL3HoughTrack.cxx
HLT/hough/AliL3HoughTransformer.cxx
HLT/hough/Makefile

index 9ffd6a617f9629efe63445f3c280532871a873ec..5923edc703b996d8102aaf9edf1deff91d521233 100644 (file)
@@ -19,6 +19,7 @@
 #else
 #include "AliL3MemHandler.h"
 #endif
+#include "AliL3DataHandler.h"
 #include "AliL3DigitData.h"
 #include "AliL3HoughEval.h"
 #include "AliL3Transform.h"
@@ -63,20 +64,6 @@ AliL3Hough::AliL3Hough()
 }
 
 
-AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments)
-{
-  //Default ctor.
-
-  fBinary = binary;
-  strcpy(fPath,path);
-  fNEtaSegments = n_eta_segments;
-  fAddHistograms = kFALSE;
-  fDoIterative = kFALSE; 
-  fWriteDigits = kFALSE;
-  Init();
-}
-
-
 AliL3Hough::~AliL3Hough()
 {
   //dtor
@@ -112,35 +99,42 @@ void AliL3Hough::CleanUp()
   */
 }
 
-void AliL3Hough::Init()
+void AliL3Hough::Init(Char_t *path,Bool_t binary,Int_t n_eta_segments,Bool_t bit8=kFALSE)
 {
+  fBinary = binary;
+  strcpy(fPath,path);
+  fNEtaSegments = n_eta_segments;
+  fAddHistograms = kFALSE;
+  fDoIterative = kFALSE; 
+  fWriteDigits = kFALSE;
+  fUse8bits = bit8;
+  
   AliL3Transform::Init(fPath);
   fPeakThreshold = 0;
   fNPatches = AliL3Transform::GetNPatches();
   fHoughTransformer = new AliL3HoughBaseTransformer*[fNPatches];
-#ifdef use_aliroot
-  fMemHandler = new AliL3FileHandler*[fNPatches];
-#else
   fMemHandler = new AliL3MemHandler*[fNPatches];
-#endif
   fTracks = new AliL3TrackArray*[fNPatches];
   fEval = new AliL3HoughEval*[fNPatches];
   for(Int_t i=0; i<fNPatches; i++)
     {
       fHoughTransformer[i] = new AliL3HoughTransformer(0,i,fNEtaSegments);
-      //fHoughTransformer[i]->CreateHistograms(64,-0.003,0.003,64,-0.26,0.26);
       fHoughTransformer[i]->CreateHistograms(64,0.1,64,-30,30);
       fHoughTransformer[i]->SetThreshold(3);
       fEval[i] = new AliL3HoughEval();
       fTracks[i] = new AliL3TrackArray("AliL3HoughTrack");
+      if(fUse8bits)
+       fMemHandler[i] = new AliL3DataHandler();
+      else
 #ifdef use_aliroot
-      fMemHandler[i] = new AliL3FileHandler();
-      if(!fBinary)
-       fMemHandler[i]->SetAliInput(fPath);
+       {
+         fMemHandler[i] = new AliL3FileHandler();
+         if(!fBinary)
+           fMemHandler[i]->SetAliInput(fPath);
+       }
 #else
       fMemHandler[i] = new AliL3MemHandler();
 #endif
-      
     }
   fPeakFinder = new AliL3HoughMaxFinder("KappaPhi",100);
   fMerger = new AliL3HoughMerger(fNPatches);
@@ -180,7 +174,10 @@ void AliL3Hough::ReadData(Int_t slice)
       fMemHandler[i]->Init(slice,i);
       if(fBinary)//take input data from binary files
        {
-         sprintf(name,"%sdigits_%d_%d.raw",fPath,slice,i);
+         if(fUse8bits)
+           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();
@@ -188,7 +185,6 @@ void AliL3Hough::ReadData(Int_t slice)
       else //read data from root file
        {
 #ifdef use_aliroot
-         fMemHandler[i]->Init(slice,i);
          digits=(AliL3DigitRowData *)fMemHandler[i]->AliDigits2Memory(ndigits); 
 #else
          cerr<<"You cannot read from rootfile now"<<endl;
index 93516253b49596cb7362299fd98af5ea5a20ae0d..1319655f5af91cbc12a953cf650348314dd61279 100644 (file)
@@ -22,14 +22,11 @@ class AliL3Hough {
   Bool_t fAddHistograms;
   Bool_t fDoIterative;
   Bool_t fWriteDigits;
+  Bool_t fUse8bits;
   Int_t fNEtaSegments;
   Int_t fNPatches;
   Int_t fPeakThreshold;
-#ifdef use_aliroot
-  AliL3FileHandler **fMemHandler; //!
-#else
   AliL3MemHandler **fMemHandler; //!
-#endif
   AliL3HoughBaseTransformer **fHoughTransformer; //!
   AliL3HoughEval **fEval; //!
   AliL3HoughMaxFinder *fPeakFinder; //!
@@ -39,14 +36,13 @@ class AliL3Hough {
   AliL3HoughGlobalMerger *fGlobalMerger; //!
 
   void CleanUp();
-  void Init();
   
  public:
   
   AliL3Hough(); 
-  AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments=100);
   virtual ~AliL3Hough();
   
+  void Init(Char_t *path,Bool_t binary,Int_t n_eta_segments,Bool_t bit8=kFALSE);
   void Process(Int_t minslice,Int_t maxslice);
   void ReadData(Int_t slice);
   void Transform(Int_t row_range = -1);
@@ -78,11 +74,8 @@ class AliL3Hough {
   AliL3HoughEval *GetEval(Int_t i) {if(!fEval[i]) return 0; return fEval[i];}
   AliL3HoughMerger *GetMerger() {if(!fMerger) return 0; return fMerger;}
   AliL3HoughIntMerger *GetInterMerger() {if(!fInterMerger) return 0; return fInterMerger;}
-#ifdef use_aliroot
-  AliL3FileHandler *GetMemHandler(Int_t i) {if(!fMemHandler[i]) return 0; return fMemHandler[i];}
-#else
   AliL3MemHandler *GetMemHandler(Int_t i) {if(!fMemHandler[i]) return 0; return fMemHandler[i];}
-#endif
+
 
   ClassDef(AliL3Hough,1) //Hough transform base class
 
index c570fc8f07fcf3f8c92fbfa6cb4fa7faacfd6b4d..85785d3fe26892ffafb6a1749ad817e141634a85 100644 (file)
@@ -41,7 +41,7 @@ AliL3HoughDisplay::~AliL3HoughDisplay()
 
 void AliL3HoughDisplay::Init()
 {
-  TFile *file = TFile::Open("/prog/alice/data/GEO/alice.geom");
+  TFile *file = TFile::Open("$(LEVEL3)/GEO/alice.geom");
   if(!file->IsOpen())
     cerr<<"AliL3HoughDisplay::AliL3HoughDisplay : Geometry file alice.geom does not exist"<<endl;
   fGeom = (TGeometry*)file->Get("AliceGeom");
index 57b4bf309a94f29e8da1d113f2da9665006512db..6cfbbd7d2e68a305735c99a91b073a3c3b8f0fe6 100644 (file)
@@ -172,13 +172,12 @@ void AliL3HoughTrack::SetTrackParameters(Double_t kappa,Double_t phi,Int_t weigh
   fWeight = weight;
   fMinDist = 100000;
   SetKappa(kappa);
-  SetPhi0(phi);
   Double_t pt = fabs(BFACT*AliL3Transform::GetBField()/kappa);
   SetPt(pt);
   Double_t radius = 1/fabs(kappa);
   SetRadius(radius);
   SetFirstPoint(0,0,0);
-  SetPsi(phi); //Psi = Phi when first point is vertex
+  SetPsi(phi); 
   SetR0(0);
   Double_t charge = -1.*kappa;
   SetCharge((Int_t)copysign(1.,charge));
index 951b124195d8746cba8c63307cb01af366155666..a9e6dd0e44ac73eb0047eef75ab969ef2ca0e3e6 100644 (file)
@@ -134,7 +134,7 @@ void AliL3HoughTransformer::TransformCircle()
       AliL3DigitData *digPt = tempPt->fDigitData;
       if(i != (Int_t)tempPt->fRow)
        {
-         printf("AliL3HoughTransform::TransformCircle : Mismatching padrow numbering\n");
+         cerr<<"AliL3HoughTransform::TransformCircle : Mismatching padrow numbering "<<i<<" "<<(Int_t)tempPt->fRow<<endl;
          continue;
        }
 
index 6e75ceea5c023466778cd58d5d5e2367dbce218b..3a7a0e7cd0aee8b3bcef682c31d06321091047a6 100644 (file)
@@ -28,13 +28,13 @@ endif
 OBJDIR = lib
 
 ifeq ($(USEPACKAGE),ROOT) 
-INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
+INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
 DEFSTR = -Duse_root
 OBJDIR = lib_ROOT
 endif
 
 ifeq ($(USEPACKAGE),ALIROOT)
-INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
+INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
 DEFSTR = -Duse_aliroot -Duse_root
 endif