Bugfix in AliL3Hough::FindTrackCandidates; when track->SetEta, one has to
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 May 2002 14:39:40 +0000 (14:39 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 May 2002 14:39:40 +0000 (14:39 +0000)
check the current slice, in order to get minus sign on other half of TPC.
Included an upper threshold in AliL3HoughBaseTransformer; all digits with
high values than this are not transformed.

HLT/hough/AliL3Hough.cxx
HLT/hough/AliL3Hough.h
HLT/hough/AliL3HoughBaseTransformer.cxx
HLT/hough/AliL3HoughBaseTransformer.h
HLT/hough/AliL3HoughEval.cxx
HLT/hough/AliL3HoughTransformer.cxx
HLT/hough/AliL3HoughTransformerVhdl.cxx
HLT/hough/Makefile

index acd660224a89ccf0d9d7efe531b66e73a0c7237e..8af03dfc42c816be847a5907a5c4ddb6f12b3361 100644 (file)
@@ -136,12 +136,12 @@ void AliL3Hough::Init(Char_t *path,Bool_t binary,Int_t n_eta_segments,Bool_t bit
       case 1: 
        fHoughTransformer[i] = new AliL3HoughTransformerVhdl(1,i,fNEtaSegments);
        fHoughTransformer[i]->CreateHistograms(180,0.1,180,-90,90);
-       fHoughTransformer[i]->SetThreshold(3);
+       fHoughTransformer[i]->SetLowerThreshold(3);
        break;
       default:
        fHoughTransformer[i] = new AliL3HoughTransformer(1,i,fNEtaSegments);
        fHoughTransformer[i]->CreateHistograms(64,0.1,64,-30,30);
-       fHoughTransformer[i]->SetThreshold(3);
+       fHoughTransformer[i]->SetLowerThreshold(3);
       }
 
       fEval[i] = new AliL3HoughEval();
@@ -153,7 +153,11 @@ void AliL3Hough::Init(Char_t *path,Bool_t binary,Int_t n_eta_segments,Bool_t bit
        {
          fMemHandler[i] = new AliL3FileHandler();
          if(!fBinary)
-           fMemHandler[i]->SetAliInput(fPath);
+           {
+             Char_t filename[100];
+             sprintf(filename,"%s/digitfile",fPath);
+             fMemHandler[i]->SetAliInput(filename);
+           }
        }
 #else
       fMemHandler[i] = new AliL3MemHandler();
@@ -185,7 +189,8 @@ void AliL3Hough::Process(Int_t minslice,Int_t maxslice)
 void AliL3Hough::ReadData(Int_t slice,Int_t eventnr=0)
 {
   //Read data from files, binary or root.
-
+  
+  fCurrentSlice = slice;
   for(Int_t i=0; i<fNPatches; i++)
     {
       fMemHandler[i]->Free();
@@ -206,7 +211,7 @@ void AliL3Hough::ReadData(Int_t slice,Int_t eventnr=0)
       else //read data from root file
        {
 #ifdef use_aliroot
-         digits=(AliL3DigitRowData *)fMemHandler[i]->AliDigits2Memory(ndigits,eventnr); 
+         digits=(AliL3DigitRowData *)fMemHandler[i]->AliDigits2Memory(ndigits,eventnr);
          fMemHandler[i]->FreeDigitsTree();
 #else
          cerr<<"You cannot read from rootfile now"<<endl;
@@ -342,15 +347,17 @@ void AliL3Hough::FindTrackCandidates()
          fPeakFinder->Reset();
          fPeakFinder->SetHistogram(hist);
          fPeakFinder->FindMaxima(0,0); //Simple maxima finder
-         cout<<"Found "<<fPeakFinder->GetEntries()<<endl;
-
+         
+         //fPeakFinder->FindAbsMaxima();
          for(Int_t k=0; k<fPeakFinder->GetEntries(); k++)
            {
              if(fPeakFinder->GetWeight(k) == 0) continue;
              AliL3HoughTrack *track = (AliL3HoughTrack*)fTracks[i]->NextTrack();
              track->SetTrackParameters(fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k),fPeakFinder->GetWeight(k));
              track->SetEtaIndex(j);
-             track->SetEta((Double_t)((j+0.5)*eta_slice));
+             Double_t eta = (Double_t)((j+0.5)*eta_slice);
+             if(fCurrentSlice > 17) eta*=-1;
+             track->SetEta(eta);
              track->SetRowRange(AliL3Transform::GetFirstRow(0),AliL3Transform::GetLastRow(5));
            }
        }
index e6c7354b68ea79bd54629f221c5f37209a10b4c4..02960bcba3e3d1a2852fb0dc780edd5ce7b2c2be 100644 (file)
@@ -26,7 +26,8 @@ class AliL3Hough {
   Int_t fNEtaSegments;
   Int_t fNPatches;
   Int_t fversion;
-
+  Int_t fCurrentSlice;
+  
   AliL3MemHandler **fMemHandler; //!
   AliL3HoughBaseTransformer **fHoughTransformer; //!
   AliL3HoughEval **fEval; //!
index 28cd6e1b64b5f91ed337db6276a64bdec1d9ddf3..d67deec35105f5817f9b7d6dea3a2c6d350dbef6 100644 (file)
@@ -32,7 +32,8 @@ AliL3HoughBaseTransformer::AliL3HoughBaseTransformer(Int_t slice,Int_t patch,Int
   fNEtaSegments = n_eta_segments;
   fEtaMin = 0;
   fEtaMax = fSlice < 18 ? 0.9 : -0.9;
-  fThreshold = 0;
+  fLowerThreshold = 3;
+  fUpperThreshold = 1023;
   fDigitRowData = 0;
 }
 
index 8d7d8ce207725cdd82195178a52ea8fe128801c7..7645574bdccc281c8e7bec3c3f80b9552c5ea2bd 100644 (file)
@@ -15,7 +15,8 @@ class AliL3HoughBaseTransformer {
   Int_t fNEtaSegments;
   Double_t fEtaMin;
   Double_t fEtaMax;
-  Int_t fThreshold;
+  Int_t fLowerThreshold;
+  Int_t fUpperThreshold;
   
   AliL3DigitRowData *fDigitRowData; //!
   
@@ -37,7 +38,8 @@ class AliL3HoughBaseTransformer {
   Int_t GetSlice() {return fSlice;}
   Int_t GetPatch() {return fPatch;}
   Int_t GetNEtaSegments() {return fNEtaSegments;}
-  Int_t GetThreshold() {return fThreshold;}
+  Int_t GetLowerThreshold() {return fLowerThreshold;}
+  Int_t GetUpperThreshold() {return fUpperThreshold;}
   Double_t GetEtaMin() {return fEtaMin;}
   Double_t GetEtaMax() {return fEtaMax;}
   
@@ -47,7 +49,8 @@ class AliL3HoughBaseTransformer {
   virtual AliL3Histogram *GetHistogram(Int_t eta_index) = 0;
   
   //setters
-  void SetThreshold(Int_t i) {fThreshold = i;}
+  void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
+  void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
 
   ClassDef(AliL3HoughBaseTransformer,1) //Hough transformation base class
 
index 0053e0456ca206fb355ba9e35eaec55a90c9b0ff..51a7bcfd7e84f7853e2ccf5e68c9aa26514d378a 100644 (file)
@@ -289,7 +289,7 @@ void AliL3HoughEval::DisplayEtaSlice(Int_t eta_index,AliL3Histogram *hist)
          UChar_t pad = digPt[j].fPad;
          UChar_t charge = digPt[j].fCharge;
          UShort_t time = digPt[j].fTime;
-         if(charge < fHoughTransformer->GetThreshold()) continue;
+         if((Int_t)charge < fHoughTransformer->GetLowerThreshold() || (Int_t)charge > fHoughTransformer->GetUpperThreshold()) continue;
          Float_t xyz[3];
          Int_t sector,row;
          AliL3Transform::Slice2Sector(fSlice,padrow,sector,row);
index a9e6dd0e44ac73eb0047eef75ab969ef2ca0e3e6..43c48ae547009d21cb10c8b3bbbb048e9016bc3e 100644 (file)
@@ -144,7 +144,7 @@ void AliL3HoughTransformer::TransformCircle()
          UShort_t charge = digPt[j].fCharge;
          UChar_t pad = digPt[j].fPad;
          UShort_t time = digPt[j].fTime;
-         if(charge <= GetThreshold())
+         if((Int_t)charge <= GetLowerThreshold() || (Int_t)charge > GetUpperThreshold())
            continue;
          Int_t sector,row;
          Float_t xyz[3];
@@ -302,7 +302,7 @@ void AliL3HoughTransformer::TransformLine()
          UShort_t charge = digPt[j].fCharge;
          UChar_t pad = digPt[j].fPad;
          UShort_t time = digPt[j].fTime;
-         if(charge < GetThreshold())
+         if(charge < GetLowerThreshold())
            continue;
          Int_t sector,row;
          Float_t xyz[3];
index 801e3ac1ea9655bce83439514168de06c983b275..9efc2505423bb006bca4813f53219e51af910fcb 100644 (file)
@@ -144,7 +144,7 @@ void AliL3HoughTransformerVhdl::TransformCircle()
          UShort_t charge = digPt[j].fCharge;
          UChar_t pad = digPt[j].fPad;
          UShort_t time = digPt[j].fTime;
-         if(charge <= GetThreshold())
+         if((Int_t)charge <= GetLowerThreshold())
            continue;
          Int_t sector,row;
          Float_t xyz[3];
@@ -302,7 +302,7 @@ void AliL3HoughTransformerVhdl::TransformLine()
          UShort_t charge = digPt[j].fCharge;
          UChar_t pad = digPt[j].fPad;
          UShort_t time = digPt[j].fTime;
-         if(charge < GetThreshold())
+         if((Int_t)charge < GetLowerThreshold())
            continue;
          Int_t sector,row;
          Float_t xyz[3];
index 29a50e2c2d29459437aaa0556c6fcadbca0f9df2..e5882bbaf1624ce64d62154c9ad5a1d044ea63ae 100644 (file)
@@ -15,7 +15,7 @@ DEFSTR = -Dno_root
 
 CXX         = g++
 LD          = g++
-CXXFLAGS    = -O2 -Wall -fPIC
+CXXFLAGS    = -O2 -Wall -fPIC -Woverloaded-virtual
 LDFLAGS     = -O2
 SOFLAGS     = -shared