Checking in for the weekend
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Feb 2002 15:43:10 +0000 (15:43 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Feb 2002 15:43:10 +0000 (15:43 +0000)
38 files changed:
HLT/comp/AliL3CompLinkDef.h
HLT/comp/AliL3Compress.cxx
HLT/comp/AliL3Compress.h
HLT/comp/AliL3ModelTrack.cxx
HLT/comp/AliL3ModelTrack.h
HLT/comp/AliL3Modeller.cxx
HLT/comp/AliL3Modeller.h
HLT/hough/AliL3Histogram.cxx
HLT/hough/AliL3Histogram.h
HLT/hough/AliL3Histogram1D.cxx
HLT/hough/AliL3Histogram1D.h
HLT/hough/AliL3Hough.cxx
HLT/hough/AliL3Hough.h
HLT/hough/AliL3HoughEval.cxx
HLT/hough/AliL3HoughEval.h
HLT/hough/AliL3HoughGlobalMerger.cxx
HLT/hough/AliL3HoughIntMerger.cxx
HLT/hough/AliL3HoughMaxFinder.cxx
HLT/hough/AliL3HoughMaxFinder.h
HLT/hough/AliL3HoughMerger.cxx
HLT/hough/AliL3HoughTransformer.h
HLT/hough/Makefile.standalone
HLT/hough/rootlogon.C
HLT/hough/test.C
HLT/src/AliL3ClustFinderNew.cxx
HLT/src/AliL3Defs.h
HLT/src/AliL3Display.cxx
HLT/src/AliL3Display.h
HLT/src/AliL3FileHandler.cxx
HLT/src/AliL3FileHandler.h
HLT/src/AliL3MemHandler.cxx
HLT/src/AliL3RootTypes.h
HLT/src/AliL3SpacePointData.h
HLT/src/AliL3TrackArray.cxx
HLT/src/AliL3Transform.h
HLT/src/AliLevel3.cxx
HLT/src/Makefile
HLT/src/Makefile.AliROOT

index eadd58ec8b4c46619695d069d837060e33068f12..dd103c0b63479ca8ae78d2d8556edda4766a8d74 100644 (file)
@@ -6,6 +6,7 @@
 
 #pragma link C++ class AliL3Modeller; 
 #pragma link C++ class AliL3ModelTrack; 
+#pragma link C++ class AliL3Compress; 
 
 #endif
 
index 8634ea9b112778f1e6b2b5ef83fc7fd4423e5242..2b285f844af9858d63df525bd0d0afff71bfc5af 100644 (file)
@@ -16,67 +16,68 @@ ClassImp(AliL3Compress)
 
 AliL3Compress::AliL3Compress()
 {
-  
+  fTracks=0;
 }
 
 AliL3Compress::~AliL3Compress()
 {
-  
+  if(fTracks)
+    delete fTracks;
 }
 
-void AliL3Compress::Write2File(AliL3TrackArray *tracks)
+void AliL3Compress::WriteFile(AliL3TrackArray *tracks,Char_t *filename)
 {
-  FILE *file = fopen("data.raw","w");
+  FILE *file = fopen(filename,"w");
   Short_t ntracks = tracks->GetNTracks();
-  cout<<"Writing "<<ntracks<<" tracks to file"<<endl;
-  //Write the number of tracks at the beginning:
-  //fwrite(&ntracks,sizeof(Short_t),1,file);
-  
+  //cout<<"Writing "<<ntracks<<" tracks to file"<<endl;
+    
+  Int_t count=0;
+  AliL3ClusterModel *clusters=0;
+  AliL3TrackModel *model=0;
   for(Int_t i=0; i<ntracks; i++)
     {
       AliL3ModelTrack *track = (AliL3ModelTrack*)tracks->GetCheckedTrack(i);
       if(!track) continue;
-      AliL3TrackModel *model = track->GetModel();
-      cout<<"Writing "<<model->fFirstPointX<<endl;
+      model = track->GetModel();
+      if(model->fNClusters==0) continue;
+      clusters = track->GetClusters();
+      //cout<<"Writing "<<(int)model->fNClusters<<" clusters"<<endl;
       if(fwrite(model,sizeof(AliL3TrackModel),1,file)!=1) break;
-      for(Int_t j=0; j<model->fNClusters; j++)
-       {
-         AliL3ClusterModel *cl = track->GetClusterModel(j);
-         fwrite(cl,sizeof(AliL3ClusterModel),1,file);
-       }
+      //cout<<"Writing "<<(int)model->fNClusters<<" clusters to file"<<endl;
+      if(fwrite(clusters,model->fNClusters*sizeof(AliL3ClusterModel),1,file)!=1) break;
+      count++;
     }
+  cout<<"Wrote "<<count<<" tracks "<<endl;
   fclose(file);
 }
 
-void AliL3Compress::ReadFile()
+void AliL3Compress::ReadFile(Char_t *filename)
 {
-  FILE *file = fopen("data.raw","r");
+  FILE *file = fopen(filename,"r");
   
-  AliL3TrackArray *tracks = new AliL3TrackArray("AliL3ModelTrack");
-  Int_t ntracks=0;
+  if(fTracks)
+    delete fTracks;
+  fTracks = new AliL3TrackArray("AliL3ModelTrack");
   
   while(!feof(file))
     {
-      AliL3ModelTrack *track = (AliL3ModelTrack*)tracks->NextTrack();
+      AliL3ModelTrack *track = (AliL3ModelTrack*)fTracks->NextTrack();
       track->Init(0,0);
       AliL3TrackModel *model = track->GetModel();
       AliL3ClusterModel *clusters = track->GetClusters();
       if(fread(model,sizeof(AliL3TrackModel),1,file)!=1) break;
-      cout<<"Read model "<<model->fFirstPointX<<endl;
       if(fread(clusters,(model->fNClusters)*sizeof(AliL3ClusterModel),1,file)!=1) break;
-      ntracks++;
     }
   
-  delete tracks;
-  cout<<"Read "<<ntracks<<" tracks from file"<<endl;
+  cout<<"Read "<<fTracks->GetNTracks()<<" tracks from file"<<endl;
   fclose(file);
 }
 
-void AliL3Compress::CompressFile()
+void AliL3Compress::CompressFile(Char_t *infile,Char_t *outfile)
 {
   
-  BIT_FILE *output = OpenOutputBitFile("test.raw");
-  FILE *input = fopen("data.raw","r");
+  BIT_FILE *output = OpenOutputBitFile(outfile);
+  FILE *input = fopen(infile,"r");
 
   AliL3TrackModel track;
   AliL3ClusterModel cluster;
@@ -85,15 +86,19 @@ void AliL3Compress::CompressFile()
   while(!feof(input))
     {
       if(fread(&track,sizeof(AliL3TrackModel),1,input)!=1) break;
-      cout<<"Writing "<<sizeof(AliL3TrackModel)<<endl;
+      
+      if(output->mask != 0x80) //Write the current byte to file.
+       {
+         if(putc(output->rack,output->file )!=output->rack)
+           cerr<<"AliL3Compress::ComressFile : Error writing to bitfile"<<endl;
+         output->mask=0x80;
+       }
       fwrite(&track,sizeof(AliL3TrackModel),1,output->file);
-      Int_t bitcount=0;
       for(Int_t i=0; i<track.fNClusters; i++)
        {
          if(fread(&cluster,sizeof(AliL3ClusterModel),1,input)!=1) break;
-         Int_t flag = cluster.fPresent;
+         Int_t flag = (Int_t)cluster.fPresent;
          OutputBit(output,flag);
-         bitcount++;
          if(!flag) continue;
          temp = (Int_t)cluster.fDTime;
          if(temp<0)
@@ -107,46 +112,60 @@ void AliL3Compress::CompressFile()
          else
            OutputBit(output,1);
          OutputBits(output,abs(temp),8);
-         bitcount+=8;
          temp = (Int_t)cluster.fDCharge;
          OutputBits(output,temp,10);
-         bitcount+=10;
          
          //Short_t temp=(Short_t)cluster.fDTime;
-         cout<<"flag "<<(int)flag<<" dtime "<<(int)cluster.fDTime<<" dpad "<<(int)cluster.fDPad<<" charge "<<cluster.fDCharge<<endl;
+         // cout<<"flag "<<(int)flag<<" dtime "<<(int)cluster.fDTime<<" dpad "<<(int)cluster.fDPad<<" charge "<<cluster.fDCharge<<endl;
        }
       
     }
-
+  
   fclose(input);
   CloseOutputBitFile(output);
 }
 
-void AliL3Compress::ExpandFile()
+void AliL3Compress::ExpandFile(Char_t *infile,Char_t *outfile)
 {
-  BIT_FILE *input = OpenInputBitFile("test.raw");
-  
-  AliL3TrackModel track;
-  AliL3ClusterModel cluster;
+  BIT_FILE *input = OpenInputBitFile(infile);
+  FILE *output = fopen(outfile,"w");
+
+  AliL3TrackModel trackmodel;
+  AliL3ClusterModel *clusters=0;
   
-  fread(&track,sizeof(AliL3TrackModel),1,input->file);
-  for(Int_t i=0; i<track.fNClusters; i++)
+  while(!feof(input->file))
     {
-      Int_t temp,sign;
-      temp = InputBit(input);
-      if(!temp) break;
-      sign=InputBit(input);
-      temp = InputBits(input,8);
-      if(!sign)
-       temp*=-1;
-      cout<<"Dtime "<<temp;
-      sign=InputBit(input);
-      temp = InputBits(input,8);
-      if(!sign)
-       temp*=-1;
-      cout<<" DPad "<<temp;
-      temp=InputBits(input,10);
-      cout<<" Charge "<<temp<<endl;
+      
+      if(fread(&trackmodel,sizeof(AliL3TrackModel),1,input->file)!=1) break;
+      fwrite(&trackmodel,sizeof(AliL3TrackModel),1,output);
+      input->mask=0x80;//make sure we read a new byte from file.
+      clusters = new AliL3ClusterModel[(trackmodel.fNClusters)];
+      for(Int_t i=0; i<trackmodel.fNClusters; i++)
+       {
+         Int_t temp,sign;
+         temp = InputBit(input);
+         if(!temp) 
+           {
+             clusters[i].fPresent=kFALSE;
+             continue;
+           }
+         clusters[i].fPresent=kTRUE;
+         sign=InputBit(input);
+         temp = InputBits(input,8);
+         if(!sign)
+           temp*=-1;
+         clusters[i].fDTime = temp;
+         sign=InputBit(input);
+         temp = InputBits(input,8);
+         if(!sign)
+           temp*=-1;
+         clusters[i].fDPad = temp;
+         temp=InputBits(input,10);
+         clusters[i].fDCharge = temp;
+       }
+      fwrite(clusters,(trackmodel.fNClusters)*sizeof(AliL3ClusterModel),1,output);
+      delete [] clusters;
     }
+  fclose(output);
   CloseInputBitFile(input);
 }
index e5eeaec38a82259bddeb720e9edeb770b690a256..ddca1739f751ba34e73cc20c5e4bc29177b1cf4f 100644 (file)
@@ -9,18 +9,20 @@ class AliL3TrackArray;
 class AliL3Compress {
   
  private:
-  
+  AliL3TrackArray *fTracks; //!
   
   
  public:
   AliL3Compress();
   virtual ~AliL3Compress();
   
-  void Write2File(AliL3TrackArray *tracks);
-  void ReadFile();
-  void CompressFile();
-  void ExpandFile();
-
+  void WriteFile(AliL3TrackArray *tracks,Char_t *filename);
+  void ReadFile(Char_t *filename);
+  void CompressFile(Char_t *infile,Char_t *outfile);
+  void ExpandFile(Char_t *infile,Char_t *outfile);
+  
+  AliL3TrackArray *GetTracks() {return fTracks;}
+  
   ClassDef(AliL3Compress,1) 
 
 };
index cf3e3d80c9afd919a128e0ef9c1443cab1db67f1..6a474619c48e44157f3b9ae4d5673749eaa74286 100644 (file)
@@ -5,9 +5,11 @@
 
 #include <stream.h>
 #include <string.h>
+#include <math.h>
 
 #include "AliL3ModelTrack.h"
 #include "AliL3Defs.h"
+#include "AliL3Transform.h"
 
 ClassImp(AliL3ModelTrack)
 
@@ -19,6 +21,7 @@ AliL3ModelTrack::AliL3ModelTrack()
   fPad=0;
   fTime=0;
   fClusterCharge=0;
+  fTrackModel=0;
 }
 
 
@@ -30,36 +33,142 @@ AliL3ModelTrack::~AliL3ModelTrack()
     delete [] fPad;
   if(fTime)
     delete [] fTime;
+  if(fTrackModel)
+    delete fTrackModel;
 }
 
 void AliL3ModelTrack::Init(Int_t slice,Int_t patch)
 {
   fNClusters = 0;
   Int_t nrows = NumRows[patch];
-  fClusters = new ClusterComp[nrows];
-  memset((void*)fClusters,0,nrows*sizeof(ClusterComp));
+  fClusters = new AliL3ClusterModel[nrows];
+  memset((void*)fClusters,0,nrows*sizeof(AliL3ClusterModel));
   
   fPad = new Float_t[NRowsSlice];
   fTime = new Float_t[NRowsSlice];
+  fTrackModel = new AliL3TrackModel;
+  memset(fTrackModel,0,sizeof(AliL3TrackModel));
   
   fClusterCharge = 100;
+  AliL3Transform transform;
   
+  fXYResidualQ = 0.01/transform.GetPadPitchWidth(patch);
+  fZResidualQ = 0.01/transform.GetPadPitchWidth(patch);
 }
 
 
 void AliL3ModelTrack::SetCluster(Float_t fpad,Float_t ftime,Float_t charge,Float_t sigmaY2,Float_t sigmaZ2)
 {
-  ClusterComp *cl = &fClusters[fNClusters];
+
+  AliL3ClusterModel *cl = &fClusters[fNClusters];
   if(!charge)
-    cl->fEmpty = kTRUE;
+    cl->fPresent = kFALSE;
   else
     {
-      cl->fEmpty = kFALSE;
-      cl->fDTime = ftime - GetTimeHit(fNClusters);
-      cl->fDPad = fpad - GetPadHit(fNClusters);
-      cl->fDCharge = charge - fClusterCharge;
+      cl->fPresent = kTRUE;
+      cl->fDTime = (ftime - GetTimeHit(fNClusters))/fXYResidualQ;
+      cl->fDPad = (fpad - GetPadHit(fNClusters))/fZResidualQ;
+      cl->fDCharge = charge;
+      cl->fDSigmaY2 = sigmaY2;
+      cl->fDSigmaZ2 = sigmaZ2;
     }
-  cout<<"DPad "<<fpad<<" dtime "<<ftime<<" charge "<<charge<<" sigmaY2 "<<sigmaY2<<" sigmaZ2 "<<sigmaZ2<<endl;
+  //cout<<"Pad "<<fpad<<" dtime "<<ftime<<" charge "<<charge<<" sigmaY2 "<<sigmaY2<<" sigmaZ2 "<<sigmaZ2<<endl;
   fNClusters++;
 }
 
+
+
+void AliL3ModelTrack::FillModel()
+{
+  //fTrackModel = new AliL3TrackModel;
+  fTrackModel->fKappa = GetKappa();
+  fTrackModel->fFirstPointX = GetFirstPointX();
+  fTrackModel->fFirstPointY = GetFirstPointY();
+  fTrackModel->fFirstPointZ = GetFirstPointZ();
+  fTrackModel->fTgl = GetTgl();
+  fTrackModel->fPsi = GetPsi();
+  fTrackModel->fLength = GetLength();
+  fTrackModel->fClusterCharge = fClusterCharge;
+  fTrackModel->fNClusters = fNClusters;
+
+}
+
+void AliL3ModelTrack::Print()
+{
+  //Print info
+
+  cout<<"---------------------"<<endl;
+  for(Int_t i=0; i<fNClusters; i++)
+    {
+      AliL3ClusterModel *cl = &fClusters[i];
+      if(!cl->fPresent)
+       cout<<i<<" Empty"<<endl;
+      else
+       {
+         cout<<i<<" Dpad "<<cl->fDPad<<" Dtime "<<cl->fDTime<<" Dcharge "<<cl->fDCharge;
+         cout<<" Padcrossing "<<GetPadHit(i)<<" Timecrossing "<<GetTimeHit(i)<<endl;
+       }
+    }
+}
+
+Bool_t AliL3ModelTrack::GetPadResidual(Int_t row,Float_t &res)
+{
+  res = fClusters[row].fDPad;
+  return fClusters[row].fPresent;
+}
+
+Bool_t AliL3ModelTrack::GetTimeResidual(Int_t row,Float_t &res)
+{
+  res = fClusters[row].fDTime;
+  return fClusters[row].fPresent;
+}
+
+//----------Code below taken from AliTPCTracker.cxx-----------------------
+//Functions that give the expected cluster errors based on track parameters.
+Double_t AliL3ModelTrack::GetParSigmaY2(Double_t r)//, Double_t tgl, Double_t pt)
+{
+  
+  //
+  // Parametrised error of the cluster reconstruction (pad direction)   
+  //
+  // Sigma rphi
+  
+  Double_t tgl = GetTgl();
+  Double_t pt = GetPt();
+  
+  const Float_t kArphi=0.41818e-2;
+  const Float_t kBrphi=0.17460e-4;
+  const Float_t kCrphi=0.30993e-2;
+  const Float_t kDrphi=0.41061e-3;
+  
+  pt=fabs(pt)*1000.;
+  Double_t x=r/pt;
+  tgl=fabs(tgl);
+  Double_t s=kArphi - kBrphi*r*tgl + kCrphi*x*x + kDrphi*x;
+  if (s<0.4e-3) s=0.4e-3;
+  s*=1.3; //Iouri Belikov
+
+  return s;
+}
+
+Double_t AliL3ModelTrack::GetParSigmaZ2(Double_t r)//, Double_t tgl) 
+{
+  //
+  // Parametrised error of the cluster reconstruction (drift direction)
+  //
+  // Sigma z
+  
+  Double_t tgl = GetTgl();
+
+  const Float_t kAz=0.39614e-2;
+  const Float_t kBz=0.22443e-4;
+  const Float_t kCz=0.51504e-1;
+  
+
+  tgl=fabs(tgl);
+  Double_t s=kAz - kBz*r*tgl + kCz*tgl*tgl;
+  if (s<0.4e-3) s=0.4e-3;
+  s*=1.3; //Iouri Belikov
+
+  return s;
+}
index e39925b7acf3c8d1e45a136f0348cefc692fce41..e6baf1356af805251d474894d37f5a861de58f22 100644 (file)
@@ -2,26 +2,20 @@
 #define AliL3Model_Track
 
 #include "AliL3Track.h"
-
-
-struct ClusterComp {
-  Bool_t fEmpty;
-  Float_t fDTime;
-  Float_t fDPad;
-  Float_t fDCharge;
-  Float_t fDShape;
-};
-
+#include "AliL3Models.h"
 
 class AliL3ModelTrack : public AliL3Track {
 
  private:
   
   Short_t fClusterCharge; //Average cluster charge
-  ClusterComp *fClusters; //!
+  AliL3ClusterModel *fClusters; //!
+  AliL3TrackModel *fTrackModel; //!
   Short_t fNClusters;
   Int_t fOverlap;
-
+  Float_t fXYResidualQ; //Quantization steps.
+  Float_t fZResidualQ;
+  
   //Crossing points with padrows
   Float_t *fPad; //!
   Float_t *fTime; //!
@@ -32,15 +26,26 @@ class AliL3ModelTrack : public AliL3Track {
   
   void Init(Int_t slice,Int_t patch);
   void SetCluster(Float_t dpad,Float_t dtime,Float_t charge,Float_t sigmaY2,Float_t sigmaZ2);
+  void FillModel();
+  void Print();
   
   void SetPadHit(Int_t row,Float_t f) {fPad[row]=f;}
   void SetTimeHit(Int_t row,Float_t f) {fTime[row]=f;}
   void SetOverlap(Int_t i) {fOverlap=i;}
   
+  AliL3ClusterModel *GetClusters() {return fClusters;}
+  AliL3ClusterModel *GetClusterModel(Int_t i) {if(!fClusters) return 0; return &fClusters[i];}
+  AliL3TrackModel *GetModel() {return fTrackModel;}
   Int_t GetOverlap() {return fOverlap;}
   Float_t GetPadHit(Int_t row) {return fPad[row];}
   Float_t GetTimeHit(Int_t row) {return fTime[row];}
-
+  Bool_t GetPadResidual(Int_t row,Float_t &res);
+  Bool_t GetTimeResidual(Int_t row,Float_t &res);
+  Int_t GetNClusters() {return fNClusters;}
+  
+  Double_t GetParSigmaY2(Double_t r);
+  Double_t GetParSigmaZ2(Double_t r);
+  
   ClassDef(AliL3ModelTrack,1)
 
 };
index 4c72c1535bdb298eb1c16dd3fc093e4d4f52671b..d13a740df8f1b5745bbf1eed85cc38f382650f69 100644 (file)
@@ -45,7 +45,7 @@ void AliL3Modeller::Init(Int_t slice,Int_t patch,Char_t *path)
   fTimeOverlap=4;
   fTransform = new AliL3Transform();
   fTracks = new AliL3TrackArray("AliL3ModelTrack");
-  
+
   AliL3MemHandler *file = new AliL3MemHandler();
   if(!file->SetBinaryInput("tracks.raw"))
     {
@@ -71,7 +71,7 @@ void AliL3Modeller::Init(Int_t slice,Int_t patch,Char_t *path)
 
   fMemHandler = new AliL3MemHandler();
   Char_t fname[100];
-  sprintf(fname,"%s/digits_%d_%d.raw",path,fSlice,fPatch);
+  sprintf(fname,"%sdigits_%d_%d.raw",path,fSlice,fPatch);
   if(!fMemHandler->SetBinaryInput(fname))
     {
       cerr<<"AliL3Modeller::Init : Error opening file "<<fname<<endl;
@@ -127,10 +127,15 @@ void AliL3Modeller::Process()
          AliL3ModelTrack *track = (AliL3ModelTrack*)fTracks->GetCheckedTrack(k);
          if(!track) continue;
          if(track->GetOverlap()>=0) continue;//Track is overlapping
+         if(track->GetPadHit(i)<0 || track->GetTimeHit(i)<0)
+           {
+             track->SetCluster(0,0,0,0,0); //The track has left the patch.
+             continue;
+           }
          
          Int_t hitpad = (Int_t)rint(track->GetPadHit(i));
          Int_t hittime = (Int_t)rint(track->GetTimeHit(i));
-         cout<<"Checking track with pad "<<hitpad<<" time "<<hittime<<endl;
+         //cout<<"Checking track with pad "<<hitpad<<" time "<<hittime<<endl;
          pad = hitpad;
          time = hittime;
          Int_t padsign=-1;
@@ -163,14 +168,29 @@ void AliL3Modeller::Process()
                  row[ntimes*pad+time].fUsed = kTRUE;
                  time += timesign;
                }
-             cout<<"Finished on pad "<<pad<<" and time "<<time<<endl;
+             //cout<<"Finished on pad "<<pad<<" and time "<<time<<endl;
              if(seq_charge)
                pad += padsign;
-               
              else //Nothing more on this pad, goto next pad
                {
                  if(padsign==-1) 
-                   {pad=hitpad+1; padsign=1; continue;}
+                   {
+                     if(cluster.fCharge==0 && abs(pad-hitpad) < fPadOverlap/2)
+                       {
+                         pad--; //In this case, we haven't found anything yet, 
+                       }        //so we will try to expand our search within the natural boundaries.
+                     else
+                       {
+                         pad=hitpad+1; 
+                         padsign=1; 
+                       }
+                     continue;
+                   }
+                 else if(padsign==1 && cluster.fCharge==0 && abs(pad-hitpad) < fPadOverlap/2)
+                   {
+                     pad++;
+                     continue;
+                   }
                  else //Nothing more in this cluster
                    {
                      Float_t fcharge = (Float_t)cluster.fCharge;
@@ -178,7 +198,7 @@ void AliL3Modeller::Process()
                      Float_t ftime = ((Float_t)cluster.fTime/fcharge);
                      Float_t sigmaY2,sigmaZ2;
                      CalcClusterWidth(&cluster,sigmaY2,sigmaZ2);
-                     //cout<<"row "<<i<<" pad "<<dpad<<endl;
+                     //cout<<"row "<<i<<" charge "<<fcharge<<endl;
                      track->SetCluster(fpad,ftime,fcharge,sigmaY2,sigmaZ2);
                      break;
                    } 
@@ -186,13 +206,96 @@ void AliL3Modeller::Process()
              // pad += padsign;
            }
        }
+      FillZeros(rowPt,row);
       fMemHandler->UpdateRowPointer(rowPt);
-      
     }
   delete [] row;
   
 }
 
+void AliL3Modeller::FillZeros(AliL3DigitRowData *rowPt,Digit *row)
+{
+  //Fill zero where data has been used.
+  
+  Int_t ntimes = fTransform->GetNTimeBins()+1;
+  AliL3DigitData *digPt = (AliL3DigitData*)rowPt->fDigitData;
+  for(UInt_t j=0; j<rowPt->fNDigit; j++)
+    {
+      Int_t pad = digPt[j].fPad;
+      Int_t time = digPt[j].fTime;
+      if(row[ntimes*pad+time].fUsed==kTRUE)
+       digPt[j].fCharge = 0;
+    }
+}
+
+void AliL3Modeller::WriteRemaining(Char_t *output)
+{
+  //Write remaining (nonzero) digits to file.
+  
+  cout<<"Writing remaining data to file "<<output<<endl;
+  AliL3DigitRowData *rowPt;
+  rowPt = (AliL3DigitRowData*)fRowData;
+  Int_t digitcount=0;
+  Int_t ndigits[(NumRows[fPatch])];
+  for(Int_t i=NRows[fPatch][0]; i<NRows[fPatch][1]; i++)
+    {
+      AliL3DigitData *digPt = (AliL3DigitData*)rowPt->fDigitData;
+      ndigits[(i-NRows[fPatch][0])]=0;
+      for(UInt_t j=0; j<rowPt->fNDigit; j++)
+       {
+         if(digPt[j].fCharge==0) continue;
+         digitcount++;
+         ndigits[(i-NRows[fPatch][0])]++;
+       }
+      //cout<<"Difference "<<(int)ndigits[(i-NRows[fPatch][0])]<<" "<<(int)rowPt->fNDigit<<endl;
+      fMemHandler->UpdateRowPointer(rowPt);
+    }
+  
+  Int_t size = digitcount*sizeof(AliL3DigitData) + NumRows[fPatch]*sizeof(AliL3DigitRowData);
+  Byte_t *data = new Byte_t[size];
+  memset(data,0,size);
+  AliL3DigitRowData *tempPt = (AliL3DigitRowData*)data;
+  rowPt = (AliL3DigitRowData*)fRowData;
+  
+  for(Int_t i=NRows[fPatch][0]; i<NRows[fPatch][1]; i++)
+    {
+      Int_t localcount=0;
+      tempPt->fRow = i;
+      tempPt->fNDigit = ndigits[(i-NRows[fPatch][0])];
+      AliL3DigitData *digPt = (AliL3DigitData*)rowPt->fDigitData;
+      for(UInt_t j=0; j<rowPt->fNDigit; j++)
+       {
+         if(digPt[j].fCharge==0) continue;
+         if(localcount >= ndigits[(i-NRows[fPatch][0])])
+           {
+             cerr<<"AliL3Modeller::WriteRemaining : Digitarray out of range!!"<<endl;
+             return;
+           }
+         tempPt->fDigitData[localcount].fCharge = digPt[j].fCharge;
+         tempPt->fDigitData[localcount].fPad = digPt[j].fPad;
+         tempPt->fDigitData[localcount].fTime = digPt[j].fTime;
+         localcount++;
+       }
+      if(ndigits[(i-NRows[fPatch][0])] != localcount)
+       {
+         cerr<<"AliL3Modeller::WriteRemaining : Mismatch in digitcount"<<endl;
+         return;
+       }
+      fMemHandler->UpdateRowPointer(rowPt);
+      Byte_t *tmp = (Byte_t*)tempPt;
+      Int_t size = sizeof(AliL3DigitRowData) + ndigits[(i-NRows[fPatch][0])]*sizeof(AliL3DigitData);
+      tmp += size;
+      tempPt = (AliL3DigitRowData*)tmp;
+    }
+
+  AliL3MemHandler *mem = new AliL3MemHandler();
+  mem->SetBinaryOutput(output);
+  mem->Memory2CompBinary((UInt_t)NumRows[fPatch],(AliL3DigitRowData*)data);
+  mem->CloseBinaryOutput();
+  delete mem;
+}
+
+
 void AliL3Modeller::CalculateCrossingPoints()
 {
   cout<<"Calculating crossing points on "<<fTracks->GetNTracks()<<" tracks"<<endl;
@@ -202,32 +305,41 @@ void AliL3Modeller::CalculateCrossingPoints()
       return;
     }
   Float_t hit[3];
-  for(Int_t i=NRows[fPatch][0]; i<NRows[fPatch][1]; i++)
+  for(Int_t i=NRows[fPatch][1]; i>=NRows[fPatch][0]; i--)
     {
       for(Int_t j=0; j<fTracks->GetNTracks(); j++)
        {
          AliL3ModelTrack *track = (AliL3ModelTrack*)fTracks->GetCheckedTrack(j);
          if(!track) continue;
-         //if(!track->GetCrossingPoint(i,hit)) 
-         // fTracks->Remove(j); //Track is bending out.
-         track->CalculatePoint(fTransform->Row2X(i));
-         if(!track->IsPoint())
+         if(track->GetNHits() < 100)
+           fTracks->Remove(j);
+         if(!track->GetCrossingPoint(i,hit)) 
            {
-             fTracks->Remove(j);
+             cerr<<"AliL3Modeller::CalculateCrossingPoints : Track does not intersect line "<<endl;
              continue;
            }
-         hit[1]=track->GetPointY();
-         hit[2]=track->GetPointZ();
+         //cout<<" x "<<track->GetPointX()<<" y "<<track->GetPointY()<<" z "<<track->GetPointZ()<<endl;
+         
          fTransform->Local2Raw(hit,fSlice,i);
+         if(hit[1]<0 || hit[1]>fTransform->GetNPads(i) ||
+            hit[2]<0 || hit[2]>fTransform->GetNTimeBins())
+           {//Track is leaving the patch, so flag the track hits (<0)
+             track->SetPadHit(i,-1);
+             track->SetTimeHit(i,-1);
+             continue;
+           }
+           
          track->SetPadHit(i,hit[1]);
          track->SetTimeHit(i,hit[2]);
+         
          //if(hit[1]<0 || hit[2]>445)
-         cout<<"pad "<<hit[1]<<" time "<<hit[2]<<" pt "<<track->GetPt()<<" psi "<<track->GetPsi()<<" tgl "<<track->GetTgl()<<" firstpoint "<<track->GetFirstPointX()<<" "<<track->GetFirstPointY()<<" "<<track->GetFirstPointZ()<<endl;
+         //if(hit[2]<0 || hit[2]>445)
+         //cout<<"pad "<<hit[1]<<" time "<<hit[2]<<" pt "<<track->GetPt()<<" psi "<<track->GetPsi()<<" tgl "<<track->GetTgl()<<" firstpoint "<<track->GetFirstPointX()<<" "<<track->GetFirstPointY()<<" "<<track->GetFirstPointZ()<<endl;
          //cout<<"Crossing pad "<<hit[1]<<" time "<<hit[2]<<endl;
        }
     }
   fTracks->Compress();
-  cout<<"And there are "<<fTracks->GetNTracks()<<" tracks remaining"<<endl;
+  //cout<<"And there are "<<fTracks->GetNTracks()<<" tracks remaining"<<endl;
 }
 
 void AliL3Modeller::CheckForOverlaps()
@@ -246,6 +358,9 @@ void AliL3Modeller::CheckForOverlaps()
          if(!track2) continue;
          for(Int_t k=NRows[fPatch][0]; k<NRows[fPatch][1]; k++)
            {
+             if(track1->GetPadHit(k)<0 || track1->GetTimeHit(k)<0 ||
+                track2->GetPadHit(k)<0 || track2->GetTimeHit(k)<0)
+               continue;
              if(fabs(track1->GetPadHit(k)-track2->GetPadHit(k)) < fPadOverlap &&
                 fabs(track1->GetTimeHit(k)-track2->GetTimeHit(k)) < fTimeOverlap)
                {
index 86ef7c000d2bb6d9c96770f0befe6f5784aecbf3..963f80cbcd2d07630b8a6203abe015762f7ab5a3 100644 (file)
@@ -41,7 +41,8 @@ class AliL3Modeller {
   Int_t fPatch;
   
   void CalcClusterWidth(Cluster *cl,Float_t &sigmaY2,Float_t &sigmaZ2);
-  
+  void FillZeros(AliL3DigitRowData *digPt,Digit *row);
+
  public:
   
   AliL3Modeller();
@@ -51,9 +52,11 @@ class AliL3Modeller {
   void Process();
   void CheckForOverlaps();
   void CalculateCrossingPoints();
-
+  void WriteRemaining(Char_t *output);
+  
   void SetInputData(AliL3DigitRowData *digits) {fRowData = digits;}
   
+  AliL3TrackArray *GetTracks() {return fTracks;}
     
   ClassDef(AliL3Modeller,1) //Modeller class
     
index 5bb8af5ea819b9c99d867e24a24869331153ded0..6f998ce249bf96571a629f88983a6dd8996fb90f 100644 (file)
@@ -1,6 +1,9 @@
+//$Id$
+
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
 //*-- Copyright &copy ASV
 
+#include <string.h>
 #include "AliL3Logging.h"
 #include "AliL3Histogram.h"
 
index 77a1eb41f44d1eb1ee9b1c9601ed0e6f605ed1ab..e50162147929a0eb40960d9121707d9ca0a86f90 100644 (file)
@@ -2,8 +2,9 @@
 #define ALIL3_HISTOGRAM
 
 #include "AliL3RootTypes.h"
+#ifdef use_root
 #include <TH2.h>
-
+#endif
 
 class AliL3Histogram {
   
index 24c27a9bae4f64cc6d8db79a805274ba85c81fe1..30446b4b390769ab548c01b07c55ba5917c2aaac 100644 (file)
@@ -1,6 +1,9 @@
+//$Id$
+
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
 //*-- Copyright &copy ASV
 
+#include <string.h>
 #include "AliL3Logging.h"
 #include "AliL3Histogram1D.h"
 
@@ -37,8 +40,9 @@ AliL3Histogram1D::AliL3Histogram1D(Char_t *name,Char_t *id,Int_t nxbin,Double_t
   fEntries = 0;
   fXmin = xmin;
   fXmax = xmax;
-  
+#ifdef use_root
   fRootHisto = 0;
+#endif
   fThreshold = 0;
   
   fContent = new Double_t[fNcells];
index 307fc96afb8e26cd368a1215f2a0733a9fb6cdd5..517b284bb75e36ed60be9d8864492f84c8156e55 100644 (file)
@@ -2,8 +2,10 @@
 #define ALIL3_HISTOGRAM1D
 
 #include "AliL3RootTypes.h"
-#include <TH1.h>
 
+#ifdef use_root
+#include <TH1.h>
+#endif
 
 class AliL3Histogram1D {
   
index 5529cdbbf178c2a8113e03ee4f09872c5641cb3d..621ba034310ab607e3e2a5ccf84a1a846662a43a 100644 (file)
@@ -5,8 +5,6 @@
 
 
 #include <string.h>
-#include <TCanvas.h>
-#include <TFile.h>
 
 #include "AliL3HoughMerger.h"
 #include "AliL3HoughIntMerger.h"
 #include "AliL3Hough.h"
 #include "AliL3HoughTransformer.h"
 #include "AliL3HoughMaxFinder.h"
+#ifdef use_aliroot
 #include "AliL3FileHandler.h"
+#else
+#include "AliL3MemHandler.h"
+#endif
 #include "AliL3DigitData.h"
 #include "AliL3HoughEval.h"
 #include "AliL3Transform.h"
 #include "AliL3Defs.h"
 #include "AliL3TrackArray.h"
 #include "AliL3HoughTrack.h"
-#include "AliL3Benchmark.h"
+
 
 //_____________________________________________________________
 // AliL3Hough
@@ -97,7 +99,11 @@ void AliL3Hough::Init()
 {
   fNPatches = NPatches;
   fHoughTransformer = new AliL3HoughTransformer*[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++)
@@ -107,9 +113,14 @@ void AliL3Hough::Init()
       fHoughTransformer[i]->SetThreshold(3);
       fEval[i] = new AliL3HoughEval();
       fTracks[i] = new AliL3TrackArray("AliL3HoughTrack");
+#ifdef use_aliroot
       fMemHandler[i] = new AliL3FileHandler();
       if(!fBinary)
        fMemHandler[i]->SetAliInput(fPath);
+#else
+      fMemHandler[i] = new AliL3MemHandler();
+#endif
+      
     }
   fPeakFinder = new AliL3HoughMaxFinder("KappaPhi");
   fMerger = new AliL3HoughMerger(fNPatches);
@@ -129,8 +140,6 @@ void AliL3Hough::Process(Int_t minslice,Int_t maxslice)
        AddAllHistograms();
       FindTrackCandidates();
       Evaluate();
-      if(fWriteDigits)
-       WriteDigits();
       fGlobalMerger->FillTracks(fTracks[0],i);
     }
   
@@ -156,8 +165,12 @@ void AliL3Hough::ReadData(Int_t slice)
        }
       else //read data from root file
        {
+#ifdef use_aliroot
          fMemHandler[i]->Init(slice,i,NRows[i]);
          digits=(AliL3DigitRowData *)fMemHandler[i]->AliDigits2Memory(ndigits); 
+#else
+         cerr<<"You cannot read from rootfile now"<<endl;
+#endif
        }
       fHoughTransformer[i]->SetInputData(ndigits,digits);
     }
@@ -168,15 +181,10 @@ void AliL3Hough::Transform()
   //Transform all data given to the transformer within the given slice
   //(after ReadData(slice))
 
-  Double_t initTime,finalTime;
   for(Int_t i=0; i<fNPatches; i++)
     {
       fHoughTransformer[i]->Reset();//Reset the histograms
-      initTime = AliL3Benchmark::GetCpuTime();
       fHoughTransformer[i]->TransformCircle();
-      finalTime = AliL3Benchmark::GetCpuTime();
-      LOG(AliL3Log::kInformational,"AliL3Hough::Transform","Timing")
-       <<AliL3Log::kDec<<"Transform finished in "<<(finalTime-initTime)*1000<<"ms"<<ENDLOG;
     }
 }
 
@@ -369,19 +377,20 @@ void AliL3Hough::EvaluateWithEta()
       fEval[i]->FindEta(fTracks[0]);
     }
   fMerger->FillTracks(fTracks[0],0);
-  fMerger->MergeEtaSlices(0);
 }
 
-void AliL3Hough::WriteTracks()
+void AliL3Hough::WriteTracks(Char_t *path)
 {
   AliL3MemHandler *mem = new AliL3MemHandler();
-  mem->SetBinaryOutput("tracks.raw");
+  Char_t fname[100];
+  sprintf(fname,"%s/tracks.raw",path);
+  mem->SetBinaryOutput(fname);
   mem->TrackArray2Binary(fTracks[0]);
   mem->CloseBinaryOutput();
   delete mem;
   
 }
-
+#ifdef use_aliroot
 void AliL3Hough::WriteDigits(Char_t *outfile)
 {
   //Write the current data to a new rootfile.
@@ -393,3 +402,4 @@ void AliL3Hough::WriteDigits(Char_t *outfile)
     }
   
 }
+#endif
index 0f6e50b062daf034708f2c5d01c20c7b50032fa3..ff161ce5577d59c39304006b2b85ec9c8ce78982 100644 (file)
@@ -6,6 +6,7 @@
 class AliL3HoughMaxFinder;
 class AliL3HoughTransformer;
 class AliL3Histogram;
+class AliL3MemHandler;
 class AliL3FileHandler;
 class AliL3HoughEval;
 class AliL3Transform;
@@ -24,7 +25,11 @@ class AliL3Hough {
   Bool_t fWriteDigits;
   Int_t fNEtaSegments;
   Int_t fNPatches;
+#ifdef use_aliroot
   AliL3FileHandler **fMemHandler; //!
+#else
+  AliL3MemHandler **fMemHandler; //!
+#endif
   AliL3HoughTransformer **fHoughTransformer; //!
   AliL3HoughEval **fEval; //!
   AliL3HoughMaxFinder *fPeakFinder; //!
@@ -54,9 +59,11 @@ class AliL3Hough {
   void AddAllHistograms();
   void Evaluate(Int_t road_width=1);
   void EvaluateWithEta();
-  void WriteTracks();
+  void WriteTracks(Char_t *path="./");
+#ifdef use_aliroot
   void WriteDigits(Char_t *outfile="output_digits.root");
-  
+#endif
+
   //Setters
   void SetNEtaSegments(Int_t i) {fNEtaSegments = i;}
   void SetAddHistograms() {fAddHistograms = kTRUE;}
@@ -69,7 +76,11 @@ 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 bf4fa08949a02d783ef130156c55d93ae1585544..3a64d62be8060b99e11f3ffb5db4aafaf7154623 100644 (file)
@@ -1,10 +1,14 @@
+//$Id$
+
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
 //*-- Copyright &copy ASV 
 
 #include <math.h>
+#include <iostream.h>
+#ifdef use_root
 #include <TH1.h>
 #include <TFile.h>
-
+#endif
 #include "AliL3MemHandler.h"
 #include "GetGoodParticles.h"
 #include "AliL3TrackArray.h"
@@ -94,7 +98,9 @@ Bool_t AliL3HoughEval::LookInsideRoad(AliL3HoughTrack *track,Int_t eta_index,Boo
   
   Int_t total_charge=0;//total charge along the road
   Double_t etaslice = (fEtaMax - fEtaMin)/fNEtaSegments;
-  
+
+
+  //Check if the track is leaving the sector at some point
   Float_t maxrow=300;
   Double_t angle=Pi/18;
   track->CalculateEdgePoint(angle);
@@ -122,6 +128,7 @@ Bool_t AliL3HoughEval::LookInsideRoad(AliL3HoughTrack *track,Int_t eta_index,Boo
       fTransform->Local2Raw(xyz,sector,row);
       npixs=0;
       
+      
       //Get the timebins for this pad
       AliL3DigitRowData *tempPt = fRowPointers[prow];
       if(!tempPt) 
@@ -312,9 +319,10 @@ void AliL3HoughEval::DisplayEtaSlice(Int_t eta_index,AliL3Histogram *hist)
   
 }
 
+#ifdef use_root
 void AliL3HoughEval::CompareMC(AliL3TrackArray *tracks,Char_t *trackfile,Int_t threshold)
 {
-  
+  /*  
   struct GoodTrack goodtracks[15000];
   Int_t nt=0;
   ifstream in(trackfile);
@@ -408,6 +416,7 @@ void AliL3HoughEval::CompareMC(AliL3TrackArray *tracks,Char_t *trackfile,Int_t t
   
   delete [] particles;
   delete [] ftracks;
-  
+  */  
 }
 
+#endif
index e437981bdd138a79da7bd7e4d5fd1da5209d3ca2..029d314bee7a9ab8c98e4f8ad829930f5c1706ca 100644 (file)
@@ -11,7 +11,7 @@ class AliL3DigitRowData;
 class AliL3Histogram;
 class AliL3Histogram1D;
 
-class AliL3HoughEval : public TObject {
+class AliL3HoughEval {
   
  private:
 
@@ -40,7 +40,9 @@ class AliL3HoughEval : public TObject {
   void GenerateLUT();
   void DisplayEtaSlice(Int_t eta_index,AliL3Histogram *hist);
   Bool_t LookInsideRoad(AliL3HoughTrack *track,Int_t eta_index,Bool_t remove=kFALSE);
+#ifdef use_root
   void CompareMC(AliL3TrackArray *tracks,Char_t *goodtracks="good_tracks",Int_t treshold=0);
+#endif
   void FindEta(AliL3TrackArray *tracks);
   
   //Getters
index bc94771aeb50e22994fa14250a2a876e6763317f..1d9426d04a7319a2613d6c0aa76f63ee9538521a 100644 (file)
@@ -1,6 +1,7 @@
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
 //*-- Copyright &copy ASV 
 
+#include <stdlib.h>
 #include <math.h>
 #include <iostream.h>
 #include "AliL3Logging.h"
index 35450c4b7edfb5199bf5b89d9ce8bd5254759ca1..5e7cee177fe2ae37e7a11aef9c2233da44aa48b7 100644 (file)
@@ -1,6 +1,7 @@
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
 //*-- Copyright &copy ASV 
 
+#include <stdlib.h>
 #include <math.h>
 #include <iostream.h>
 #include "AliL3Logging.h"
index 1b6472bec96b5638596897c4817bfbeb08eba720..776ec7ea4f56c431bfc03e34cd3e83ab3362883f 100644 (file)
@@ -60,7 +60,7 @@ void AliL3HoughMaxFinder::FindAbsMaxima(Int_t &max_xbin,Int_t &max_ybin)
   Int_t ymin = hist->GetFirstYbin();
   Int_t ymax = hist->GetLastYbin();  
   Int_t bin;
-  Stat_t value,max_value=0;
+  Double_t value,max_value=0;
 
   for(Int_t xbin=xmin; xbin<=xmax; xbin++)
     {
@@ -87,7 +87,7 @@ AliL3TrackArray *AliL3HoughMaxFinder::FindBigMaxima(AliL3Histogram *hist)
   Int_t ymin = hist->GetFirstYbin();
   Int_t ymax = hist->GetLastYbin();
   Int_t bin[25],bin_index;
-  Stat_t value[25];
+  Double_t value[25];
   
   AliL3TrackArray *tracks = new AliL3TrackArray("AliL3HoughTrack");
   AliL3HoughTrack *track;
@@ -142,7 +142,7 @@ AliL3TrackArray *AliL3HoughMaxFinder::FindMaxima(AliL3Histogram *hist,Int_t *row
   Int_t ymin = hist->GetFirstYbin();
   Int_t ymax = hist->GetLastYbin();
   Int_t bin[9],track_counter=0;
-  Stat_t value[9];
+  Double_t value[9];
   
   AliL3TrackArray *tracks = new AliL3TrackArray("AliL3HoughTrack");
   AliL3HoughTrack *track;
@@ -626,7 +626,7 @@ void AliL3HoughMaxFinder::FindPeak1(Float_t *xpeaks,Float_t *ypeaks,Int_t *weigh
              Int_t bin = fCurrentHisto->GetBin(j,k);
              ytop += (fCurrentHisto->GetBinCenterY(k))*(fCurrentHisto->GetBinContent(bin));
              ybutt += fCurrentHisto->GetBinContent(bin);
-             w+=fCurrentHisto->GetBinContent(bin);
+             w+=(Int_t)fCurrentHisto->GetBinContent(bin);
            }
        }
       
@@ -865,8 +865,8 @@ void AliL3HoughMaxFinder::FindPeak(Int_t t1,Double_t t2,Int_t t3,Float_t &kappa,
 
 
   //Find the weight:
-  bin = hist->FindBin(x_peak,y_peak);
-  Int_t weight = (Int_t)hist->GetBinContent(bin);
+  //bin = hist->FindBin(x_peak,y_peak);
+  //Int_t weight = (Int_t)hist->GetBinContent(bin);
 
   //AliL3HoughTrack *track = new AliL3HoughTrack();
   //track->SetTrackParameters(x_peak,y_peak,weight);
index 15a08132d1386f398a6442ef612685068b458048..520c19b5dd4b3095e1f852a902a9077245a7a8a0 100644 (file)
@@ -15,7 +15,7 @@ struct AxisWindow
   Int_t weight;
 };
 
-class AliL3HoughMaxFinder : public TObject {
+class AliL3HoughMaxFinder {
   
  private:
 
index dbabfc850fc8bb6016e082660ea37919fda68622..4478cf5dbb016d64e1bf6ce309c3d089ef6221e7 100644 (file)
@@ -1,6 +1,8 @@
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
 //*-- Copyright &copy ASV 
 
+#include <math.h>
+#include <stdlib.h>
 #include "AliL3Logging.h"
 #include "AliL3Defs.h"
 #include "AliL3Transform.h"
index 588df419827c78a2d0854c9bd14d18fdab20e189..585056528d23b30cd8040d58e36a8264580785b4 100644 (file)
@@ -7,7 +7,7 @@ class AliL3Transform;
 class AliL3Histogram;
 class AliL3DigitRowData;
 
-class AliL3HoughTransformer : public TObject {
+class AliL3HoughTransformer {
   
  private:
 
index 2b5ead6c9826e7ef01535228e872be62482be373..cca8ffaa4acee77bc0634c7ef553ade814e485d9 100644 (file)
@@ -18,10 +18,11 @@ HOUGHOBJDIR = $(HOUGHDIR)/tgt_Linux
 
 SRC    = AliL3Track.cxx AliL3Vertex.cxx AliL3Transform.cxx AliL3TrackArray.cxx \
          AliL3MemHandler.cxx AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx \
-         AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx
+         AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Merger.cxx
 
 HOUGH  = AliL3Histogram1D.cxx AliL3Histogram.cxx AliL3HoughEval.cxx \
-          AliL3HoughMaxFinder.cxx AliL3HoughTrack.cxx AliL3HoughTransformer.cxx 
+          AliL3HoughMaxFinder.cxx AliL3HoughTrack.cxx AliL3HoughTransformer.cxx \
+         AliL3Hough.cxx AliL3HoughMerger.cxx AliL3HoughIntMerger.cxx AliL3HoughGlobalMerger.cxx
 
 SRCOBJS        = $(patsubst %.cxx,$(SRCOBJDIR)/%.o,$(SRC))
 
index 1dde61a73fdb20a433ca9b982c99dc7a899a9ee0..0a4a8f998d76854ba3d050dfdc8b562e75c09662 100644 (file)
@@ -2,19 +2,26 @@
 {
   printf("\nWELCOME to the magic world of Level3\n\n"); 
 
-  //load library neccesary for TPC alone 
   gSystem->Load("$(ROOTSYS)/lib/libPhysics");
   gSystem->Load("$(ROOTSYS)/lib/libEG");
-  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTEER");
-  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libCONTAINERS");
-  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTPC");
-  gSystem->Load("$(LEVEL3)/kip/MLUC/lib/linux-i386/libMLUC.so");
-  
-  gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3");
-  gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Hough");
+
+  if(0)
+    {
+      gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTEER");
+      gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libCONTAINERS");
+      gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTPC");
+      cout<<"TPC libraries loaded"<<endl;
+    }
+  if(1)
+    {
+      gSystem->Load("$(LEVEL3)/kip/MLUC/lib/linux-i386/libMLUC.so");
+      gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3");
+      gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Hough");
+      gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Comp");
+      cout<<"HLT libraries loaded"<<endl;
+    }
   gROOT->LoadMacro("$(HOME)/alirootcode/XFunct.C");
   gStyle->SetStatBorderSize(1);
   gStyle->SetTitleBorderSize(0);
-  printf("TPC libraries loaded\n");
-  printf("Level3 libraries loaded\n");
+
 }
index 4b3d93743f247347f68bd3dd66f92187f804e89c..3270df0cb3c2daac80c4bdb7ad90fda4f921950e 100644 (file)
@@ -131,7 +131,7 @@ void test(char *file="/prog/alice/data/Rawdata/1_patch/pp/event_0/",bool bin=tru
   road->Draw("same");
 } 
 
-void process(char *digitfile="/prog/alice/data/Rawdata/1_patch/pp/event_0/",bool bin=true,char *trackfile="good_tracks")
+void process(char *digitfile="/prog/alice/data/Rawdata/6_patch/hg_42105_s1-3/",bool bin=true,char *trackfile="good_tracks")
 {
   AliL3Logger l;
   //  l.UnSet(AliL3Logger::kDebug);
@@ -140,6 +140,8 @@ void process(char *digitfile="/prog/alice/data/Rawdata/1_patch/pp/event_0/",bool
   //l.UseStdout();
   l.UseStream();
   
+  transform = new AliL3Transform();
+
   double torad = 3.1415/180;
   int slice=1;
   a = new AliL3Hough(digitfile,bin,100);
@@ -148,9 +150,9 @@ void process(char *digitfile="/prog/alice/data/Rawdata/1_patch/pp/event_0/",bool
   a->Transform();
   a->AddAllHistograms();
   a->FindTrackCandidates();
-  // a->Evaluate(2);
-  a->WriteTracks();
-  return;
+  a->Evaluate(2);
+  a->WriteTracks("../comp/");
+
   //a->MergePatches();
 
   //a->MergeInternally();
@@ -160,12 +162,19 @@ void process(char *digitfile="/prog/alice/data/Rawdata/1_patch/pp/event_0/",bool
   tracks = (AliL3TrackArray*)a->GetTracks(0);
   //a->GetEval(0)->CompareMC(tracks,"good_tracks_hg4000_s1");
  
+  float xyz[3];
+  int row=0;
   for(int i=0; i<tracks->GetNTracks(); i++)
     {
       AliL3HoughTrack *track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
       if(!track) continue;
-      printf("found pt %f phi0 %f eta %f weight %d rowange %d %d\n",track->GetPt(),track->GetPhi0(),track->GetEta(),track->GetWeight(),track->GetFirstRow(),track->GetLastRow());
+      track->GetCrossingPoint(row,xyz);
+      transform->Local2Raw(xyz,1,row);
+      cout<<"Recon. pad "<<(int)xyz[1]<<" time "<<(int)xyz[2]<<endl;
+      cout<<"Pt "<<track->GetPt()<<" phi "<<track->GetPhi0()<<" charge "<<track->GetCharge()<<endl;
     }
+  
+  delete transform;
   return;
 
 }
index 97af325c23dc7941534c3734350527afe93dcee4..b94af6883be6e79b9a1f1d610d43db039a6f2d2d 100644 (file)
@@ -318,6 +318,7 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,ClusterData *list)
            <<AliL3Log::kDec<<"Too many clusters"<<ENDLOG;
          return;
          }  
+      fSpacePointData[counter].fCharge = list[j].fTotalCharge;
       fSpacePointData[counter].fX = xyz[0];
       fSpacePointData[counter].fY = xyz[1];
       fSpacePointData[counter].fZ = xyz[2];
index e281d79c269ae6f2a349c91144ff63c41c860aab..5d2f7af9779e76426d9140ab0fb48fe5cdd4d017 100644 (file)
@@ -6,6 +6,7 @@
 const Int_t NPatches = 6;
 const Int_t NRowsSlice = 176;
 const Int_t NRows[6][2] = {{0,31},{32,63},{64,91},{92,119},{120,143},{144,175}};
+const Int_t NumRows[6] = {32,32,28,28,24,32};
 //const Int_t NRows[6][2] = {{ 0, 175},{0,0},{0,0},{0,0},{0,0},{0,0}};
 const Double_t Pi = 3.14159265358979323846;
 const Double_t ToRad = Pi/180.;
index db110a3337b40f39efd97535b0a26eba7bec4e7f..d7bc868790901881355c46dbc9e2fc059be5392a 100644 (file)
@@ -13,8 +13,9 @@
 #include <TGeometry.h>
 #include <TShape.h>
 #include <TParticle.h>
+#include <TFile.h>
 
-#include "AliL3Evaluate.h"
+#include "AliL3Display.h"
 #ifdef use_aliroot
 #include "AliRun.h"
 #include "AliSimDigits.h"
@@ -24,9 +25,9 @@
 #include "AliL3Track.h"
 #include "AliL3TrackArray.h"
 #include "AliL3SpacePointData.h"
-#include "AliL3FileHandler.h"
+#include "AliL3MemHandler.h"
 #include "AliL3Logging.h"
-#include "AliL3Display.h"
+
 
 //_____________________________________________________________
 // AliL3Display
@@ -74,12 +75,12 @@ void AliL3Display::Setup(Char_t *trackfile,Char_t *path)
   //Read in the hit and track information from produced files.
   
   Char_t fname[256];
-  AliL3FileHandler *clusterfile[36][6];
+  AliL3MemHandler *clusterfile[36][6];
   for(Int_t s=fMinSlice; s<=fMaxSlice; s++)
     {
       for(Int_t p=0; p<6; p++)
        {
-         clusterfile[s][p] = new AliL3FileHandler();
+         clusterfile[s][p] = new AliL3MemHandler();
          sprintf(fname,"%spoints_%d_%d.raw",path,s,p);
          if(!clusterfile[s][p]->SetBinaryInput(fname))
            {
@@ -96,7 +97,7 @@ void AliL3Display::Setup(Char_t *trackfile,Char_t *path)
     }
   
   
-  AliL3FileHandler *tfile = new AliL3FileHandler();
+  AliL3MemHandler *tfile = new AliL3MemHandler();
   if(!tfile->SetBinaryInput(trackfile))
     {
       LOG(AliL3Log::kError,"AliL3Evaluation::Setup","File Open")
index 831b9bd3a74e8cf7680bdfac6b52893f568dfd35..e26a7a4a493dfa4dcc27da3a22ceea98f6281db4 100644 (file)
@@ -4,6 +4,8 @@
 #include <TObject.h>
 #include <TGeometry.h>
 
+#include "AliL3RootTypes.h"
+
 class AliL3SpacePointData;
 class AliL3TrackArray;
 class AliL3Transform;
index 1c8c52cb85221c5f1e4c930dbfc93507f3989a8a..3762e2eb1f3b51ecfb2196d504e762438ce33551 100644 (file)
@@ -5,10 +5,6 @@
 
 #include <math.h>
 #include <iostream.h>
-#include <TObject.h>
-#include <TFile.h>
-#include <TTree.h>
-#include <stdio.h>
 
 #include "AliL3Transform.h"
 #include "AliL3Logging.h"
@@ -19,8 +15,6 @@
 #include "AliTPCClustersArray.h"
 #include "AliTPCcluster.h"
 #include "AliTPCClustersRow.h"
-#include "AliTPCParam.h"
-#include "AliSimDigits.h"
 
 #include "AliL3DigitData.h"
 #include "AliL3TrackSegmentData.h"
index 2ea7204c888fd00083cf9a5e616324e5a9bf5baa..3fd4eed0fd8091be9d109c100040aac283cde8c5 100644 (file)
@@ -3,15 +3,16 @@
 
 #include "AliTPCParam.h"
 #include "AliL3MemHandler.h"
+#include "AliSimDigits.h"
 #include <TObject.h>
 #include <TFile.h>
+#include <TTree.h>
 #include <stdio.h>
+
 class AliL3SpacePointData;
 class AliL3DigitRowData;
 class AliL3TrackSegmentData;
 class AliL3TrackArray;
-class AliSimDigits;
-class TTree;
 
 class AliL3FileHandler:public AliL3MemHandler{
  private:
index c2826218f7d7660a40d81643c0ba5de565ae9b47..c29199ca5d368df7a5194ffcf43db798c4d081df 100644 (file)
@@ -110,7 +110,7 @@ Bool_t AliL3MemHandler::SetBinaryInput(char *name){
   fInBinary = fopen(name,"r");
   if(!fInBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::SetBinaryInput","File Open")
-    <<"Pointer to File = 0x0 "<<ENDLOG;
+      <<"Error opening file "<<name<<ENDLOG;
     return kFALSE;
   }
   return kTRUE;
index da2aace1b8ed93343db5b3e25383e444e7aa1808..47d16496e6d495669552de3e1829ab90480a156f 100644 (file)
@@ -11,7 +11,7 @@
 #include <math.h>
 
 //#define no_root //switch on the root
-#define use_aliroot //use AliL3FileHandler
+//#define use_aliroot //use AliL3FileHandler
 
 #ifndef no_root
 #define use_root
index 0782815b7876ac9f90182d855ec91580926b4ff8..10783aa7415a3acc6fe4e590150a399971203c87 100644 (file)
@@ -10,6 +10,7 @@ struct AliL3SpacePointData{
     UChar_t fPadRow;
     Float_t fXYErr;
     Float_t fZErr;
+  UInt_t fCharge;
 };
 typedef struct AliL3SpacePointData AliL3SpacePointData;
 
index 665628fb73cc9891e1ef83d2c9809d0d772d5f68..183e13f2ae54418d345b4eeeede7876ed97cdaa0 100644 (file)
@@ -1,3 +1,5 @@
+//$Id$
+
 // Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
 //*-- Copyright &copy ULI
 
@@ -7,6 +9,7 @@
 #include "AliL3Logging.h"
 #include "AliL3TrackArray.h"
 #include "AliL3HoughTrack.h"
+#include "AliL3ModelTrack.h"
 #include "AliL3ConfMapTrack.h"
 #include "AliL3TrackSegmentData.h"
 #include "AliL3Transform.h"
@@ -47,6 +50,7 @@ AliL3TrackArray::AliL3TrackArray(char* tracktype,Int_t ntrack){
   if(strcmp(tracktype,"AliL3Track")==0) fTrackType='t';
   if(strcmp(tracktype,"AliL3ConfMapTrack")==0) fTrackType='c';
   if(strcmp(tracktype,"AliL3HoughTrack")==0) fTrackType='h';
+  if(strcmp(tracktype,"AliL3ModelTrack")==0) fTrackType='m';
   SetSize(ntrack);
 }
 
@@ -58,6 +62,7 @@ AliL3TrackArray::AliL3TrackArray(char* tracktype){
   if(strcmp(tracktype,"AliL3Track")==0) fTrackType='t';
   if(strcmp(tracktype,"AliL3ConfMapTrack")==0) fTrackType='c';
   if(strcmp(tracktype,"AliL3HoughTrack")==0) fTrackType='h';
+  if(strcmp(tracktype,"AliL3ModelTrack")==0) fTrackType='m';
   SetSize();
 }
 
@@ -106,6 +111,12 @@ Bool_t AliL3TrackArray::SetSize(Int_t newsize){
           fIsPresent[i] = kTRUE;
         }
         break;
+       case 'm':
+        for(Int_t i=0;i<fSize;i++){
+          fTrack[i]   = new AliL3ModelTrack();
+          fIsPresent[i] = kTRUE;
+        }
+        break;
       default: 
         return kFALSE;
     }
@@ -146,6 +157,12 @@ Bool_t AliL3TrackArray::SetSize(Int_t newsize){
         fIsPresent[i] = kTRUE;
       }
       break;
+    case 'm':
+      for(Int_t i=fSize;i<newsize;i++){
+        fTrack[i]   = new AliL3ModelTrack();
+        fIsPresent[i] = kTRUE;
+      }
+      break;
     default: 
       return kFALSE;
   }
@@ -170,7 +187,7 @@ void AliL3TrackArray::Remove(Int_t track){
 void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr){
   //Read tracks from shared memory (or memory)
   AliL3TrackSegmentData *trs = tr;
-  for(Int_t i=0; i<ntracks; i++){
+   for(Int_t i=0; i<ntracks; i++){
     AliL3Track *track = NextTrack(); 
     track->SetPt(trs->fPt);
     track->SetPsi(trs->fPsi);
index 2a9ac19d8df25cd2c04accfc8be1b5a92bf8ba90..8780254fbcd79b845eddd2528f2c00cdcab08190 100644 (file)
@@ -34,7 +34,9 @@ class AliL3Transform {
 
   Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
   Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
-
+  Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;}
+  Double_t GetZWidth() {return fZWidth;}
+  
   Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector, Int_t &row) const;
 
   Bool_t Sector2Slice(Int_t & slice, Int_t  sector) const;
index 40fbc6bf3dd7cff2000e078d1f7b92dfa5b44ec6..e99b32a1b931b9e7b862d24ef6b5d69a99356379 100644 (file)
@@ -144,7 +144,7 @@ void AliLevel3::Init(){
     fRow[1][1] = 77;
     fRow[2][0] = 78;
     fRow[2][1] = 109;
-    fRow[3][0] = 110;
+    fRow[3][0] = 110; 
     fRow[3][1] = 141;
     fRow[4][0] = 142;
     fRow[4][1] = 175;   // last row
@@ -255,11 +255,14 @@ void AliLevel3::ProcessSlice(Int_t slice){
   Bool_t UseCF = kFALSE;
 #ifdef use_aliroot
   UseCF = fFileHandler->IsDigit();
+#else
+  if(fUseBinary)
+    UseCF = kTRUE; //In case you are not using aliroot
 #endif
   const Int_t maxpoints=100000;
   const Int_t pointsize = maxpoints * sizeof(AliL3SpacePointData);
   AliL3MemHandler *memory = new AliL3MemHandler();
-
+  
   fTrackMerger->Reset();
   fTrackMerger->SetTransformer(fTransformer);
   fTrackMerger->SetRows(fRow[0]);
@@ -274,10 +277,10 @@ void AliLevel3::ProcessSlice(Int_t slice){
       if(fUseBinary){
         if(!fDoRoi){ 
           if(1){     //Binary to Memory
-            fFileHandler->Free();
+           fFileHandler->Free();
             sprintf(name,"%sdigits_%d_%d.raw",fPath,slice,patch);
-            if(!fFileHandler->SetBinaryInput(name)) return;
-            digits= (AliL3DigitRowData *)fFileHandler->CompBinary2Memory(ndigits);
+           if(!fFileHandler->SetBinaryInput(name)) return;
+           digits= (AliL3DigitRowData *)fFileHandler->CompBinary2Memory(ndigits);
             fFileHandler->CloseBinaryInput(); 
           }
 
@@ -496,8 +499,8 @@ void AliLevel3::ProcessSlice(Int_t slice){
   }
   fBenchmark->Start("Patch Merger");
 //  fTrackMerger->SlowMerge();
-  fTrackMerger->AddAllTracks();
-  //fTrackMerger->Merge();
+  //fTrackMerger->AddAllTracks();
+  fTrackMerger->Merge();
   fBenchmark->Stop("Patch Merger");
   /*
   //write merged tracks
index 6de8a35bc15fcfe1859e809d17920870806c6ea7..11bc72c5ac2a291862546750ddb0fd1e0b3bd37a 100644 (file)
@@ -1,8 +1,12 @@
-#
-# Makefile for ROOT version of HLT code.
-#
-# Author: Anders Vestbo                       
-#
+#$Id$
+###########################
+# Makefile for HLT code.  #
+#                         #
+# Author: Anders Vestbo   #                    
+###########################
+
+USEPACKAGE = ROOT
+#USEPACKAGE = ALIROOT
 
 CXX         = g++
 LD          = g++
@@ -12,6 +16,15 @@ SOFLAGS     = -shared
 
 TOPDIR = $(HOME)/level3code
 OBJDIR = tgt_Linux
+LIBDIR = $(LEVEL3)/lib_$(USERNAME)
+
+ifeq ($(USEPACKAGE),ROOT) 
+INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
+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
+endif
 
 SRCS   = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx AliLevel3.cxx\
           AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Track.cxx\
@@ -25,28 +38,38 @@ DICT = AliL3Cint.cxx
 DICTH = AliL3Cint.h
 DICTO = $(OBJDIR)/AliL3Cint.o
 
+ifeq ($(USEPACKAGE),ROOT)
 HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
-
 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
+endif
+
+ifeq ($(USEPACKAGE),ALIROOT)
+HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3LinkDef.h
+OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3FileHandler.o $(DICTO)
+endif
 
-LEVELSO = $(LEVEL3)/lib_$(USERNAME)/libAliL3.so
+LEVELSO = $(LIBDIR)/libAliL3.so
 
-all : $(OBJDIR) $(LEVELSO)
+all : $(LEVELSO) $(OBJDIR) 
 
 $(LEVELSO) : $(OBJS)
        $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
 
 $(DICT) : $(HDRS)
        @echo "Generating dictionary..."
-       @rootcint -f $(DICT) -c $(HDRS)
+       @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
 
 $(OBJDIR)/%.o : %.cxx 
-       $(CXX) $(CXXFLAGS) -c -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -o $@ $<
+       $(CXX) $(CXXFLAGS) -c $(INCLUDES) -o $@ $<
 
 $(OBJDIR) : 
        test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
+       test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
 
 clean :
        rm -f $(OBJDIR)/*.o
-       rm -f $(LEVEL3)/lib_$(USERNAME)/libAliL3.so
-       rm $(DICT) $(DICTH) 
\ No newline at end of file
+       rm -f $(LIBDIR)/libAliL3.so
+       rm $(DICT) $(DICTH) 
+
+so :
+       rm -f $(LIBDIR)/libAliL3.so
\ No newline at end of file
index faff9c9e2758ab02445c1e52b18427b38ff4a928..d1df3f832adf8ffc7f25212d1ec8dce9187e2b73 100644 (file)
@@ -1,4 +1,4 @@
-############################### TPC Makefile ##################################
+############################### HLT Makefile ##################################
 
 # Include machine specific definitions
 
@@ -43,7 +43,7 @@ OBJS          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
 
 # C++ compilation flags
 
-CXXFLAGS      = $(CXXOPTS) -g -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/  -I$(ALICE_ROOT)/TPC  -I$(ALICE_ROOT)/CONTAINERS -I$(HOME)/level3code/hough/
+CXXFLAGS      = $(CXXOPTS) -g -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/  -I$(ALICE_ROOT)/TPC  -I$(ALICE_ROOT)/CONTAINERS -I$(HOME)/level3code/hough/ -I$(HOME)/level3code/comp/ 
 
 #CXXFLAGS      = $(CXXOPTS) -g -Wall -I$(ROOTSYS)/include -I. -I $(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/include/ -DCOMPILING