From b0be0269314881fa1ec68d16208b818ec9672e7e Mon Sep 17 00:00:00 2001 From: vestbo Date: Mon, 9 Dec 2002 13:17:23 +0000 Subject: [PATCH] Seems to be working properly now. --- HLT/hough/AliL3HistogramAdaptive.cxx | 85 ++++++++++++---------------- HLT/hough/AliL3HistogramAdaptive.h | 1 - 2 files changed, 35 insertions(+), 51 deletions(-) diff --git a/HLT/hough/AliL3HistogramAdaptive.cxx b/HLT/hough/AliL3HistogramAdaptive.cxx index e02102e9d87..c3e2792cd9d 100644 --- a/HLT/hough/AliL3HistogramAdaptive.cxx +++ b/HLT/hough/AliL3HistogramAdaptive.cxx @@ -32,7 +32,6 @@ AliL3HistogramAdaptive::AliL3HistogramAdaptive(Char_t *name,Double_t minpt,Doubl fXmin = -1*AliL3Transform::GetBFact()*AliL3Transform::GetBField()/minpt; fXmax = AliL3Transform::GetBFact()*AliL3Transform::GetBField()/minpt; - fPtstep = 0.1; fMinPt = minpt; fMaxPt = maxpt; fNxbins = InitPtBins(); @@ -63,19 +62,14 @@ Int_t AliL3HistogramAdaptive::InitPtBins() Double_t pt = fMinPt,delta_pt,local_pt; Int_t bin=0; - while(pt < fMaxPt + fPtstep) + while(pt < fMaxPt) { local_pt = pt; - delta_pt = fPtres*(local_pt+0.5*fPtstep); - - while(local_pt < pt + fPtstep) - { - if(local_pt > fMaxPt) break; - local_pt += delta_pt; - bin++; - } - //cout<<"Setting "< fMaxPt) return -1; - - Double_t delta_pt,ptplus1,pt = fMinPt,local_pt; - Bool_t found=kFALSE; + // cout<<"Looking for pt "<= local_pt && ptfind < pt) { - ptplus1 = local_pt + delta_pt; - if(ptfind >= local_pt && ptfind < ptplus1) - { - found=kTRUE; - break; - } - local_pt = ptplus1; - bin++; + // cout<<"Found in range "<= fNxbins/2) cerr<<"AliL3HistogramAdaptive::FindXbin : Bin out of range : "< fNxbins) { cerr<<"AliL3HistogramAdaptive::GetBinCenterX : Xbin out of range "<