Fixed missing initialization for some variables at the edges of the hough space
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Aug 2004 19:35:01 +0000 (19:35 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Aug 2004 19:35:01 +0000 (19:35 +0000)
HLT/hough/AliL3Histogram.cxx
HLT/hough/AliL3HoughTransformerRow.cxx

index 06db927..0d72439 100644 (file)
@@ -349,7 +349,7 @@ Double_t AliL3Histogram::GetBinCenterY(Int_t ybin) const
 Double_t AliL3Histogram::GetPreciseBinCenterX(Float_t xbin) const
 {
   // Returns the position of the center of a bin using precise values inside the bin
-  if(xbin < (fFirstXbin-0.5) || xbin > (fLastXbin+0.5))
+  if(xbin < (fFirstXbin-1.5) || xbin > (fLastXbin+1.5))
     {
       LOG(AliL3Log::kError,"AliL3Histogram::GetBinCenterX","xbin")
        <<"Bin-value out of range "<<xbin<<ENDLOG;
@@ -362,7 +362,7 @@ Double_t AliL3Histogram::GetPreciseBinCenterX(Float_t xbin) const
 Double_t AliL3Histogram::GetPreciseBinCenterY(Float_t ybin) const
 {
   // Returns the position of the center of a bin using precise values inside the bin
-  if(ybin < (fFirstYbin-0.5) || ybin > (fLastYbin+0.5))
+  if(ybin < (fFirstYbin-1.5) || ybin > (fLastYbin+1.5))
     {
       LOG(AliL3Log::kError,"AliL3Histogram::GetBinCenterY","ybin")
        <<"Bin-value out of range "<<ybin<<ENDLOG;
index 457200b..43faf71 100644 (file)
@@ -77,7 +77,7 @@ AliL3HoughTransformerRow::~AliL3HoughTransformerRow()
       for(Int_t i=0; i<GetNEtaSegments(); i++)
        {
          if(!fgTrackID[i]) continue;
-         delete fgTrackID[i];
+         delete [] fgTrackID[i];
        }
       delete [] fgTrackID;
       fgTrackID = 0;
@@ -232,9 +232,9 @@ void AliL3HoughTransformerRow::CreateHistograms(Int_t nxbin,Float_t xmin,Float_t
       Int_t ymin = hist->GetFirstYbin();
       Int_t ymax = hist->GetLastYbin();
       Int_t nxbins = hist->GetNbinsX()+2;
-      for(Int_t ybin=ymin; ybin<=ymax; ybin++)
+      for(Int_t ybin=ymin-1; ybin<=(ymax+1); ybin++)
        {
-         for(Int_t xbin=xmin; xbin<=xmax; xbin++)
+         for(Int_t xbin=xmin-1; xbin<=(xmax+1); xbin++)
            {
              //cvetan: we get strange warning on gcc-2.95
              //warning: large integer implicitly truncated to unsigned type