X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSVertexerZ.cxx;h=5aedc635e4dd4729d6b0245559dea60d36c78e99;hb=618aa277a12e2b49094cf1898bc880f0325d09c4;hp=cd5b87357f63941ab247da096d61cbfda8a9802f;hpb=308c2f7c71668bd4c7193564d1da2ebd974ea86c;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSVertexerZ.cxx b/ITS/AliITSVertexerZ.cxx index cd5b87357f6..5aedc635e4d 100644 --- a/ITS/AliITSVertexerZ.cxx +++ b/ITS/AliITSVertexerZ.cxx @@ -247,6 +247,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ static TClonesArray points("AliITSZPoint",maxdim); Int_t nopoints =0; for(Int_t modul1= fFirstL1; modul1<=fLastL1;modul1++){ // Loop on modules of layer 1 + if(!fUseModule[modul1]) continue; UShort_t ladder=int(modul1/4)+1; // ladders are numbered starting from 1 branch->GetEvent(modul1); Int_t nrecp1 = itsRec->GetEntries(); @@ -278,6 +279,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ Int_t ladmod=fLadders[ladder-1]+ladl2; if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2); Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1); + if(!fUseModule[modul2]) continue; branch->GetEvent(modul2); Int_t nrecp2 = itsRec->GetEntries(); for(Int_t j2=0;j2GetBinContent(hc->GetMaximumBin())<3)hc->Rebin(3); + if(hc->GetBinContent(hc->GetMaximumBin())<3)hc->Rebin(4); Int_t binmin,binmax; Int_t nPeaks=GetPeakRegion(hc,binmin,binmax); if(nPeaks==2)AliWarning("2 peaks found"); @@ -367,8 +369,10 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ ncontr++; } } - zm/=ezm; - ezm=TMath::Sqrt(1./ezm); + if(ezm>0) { + zm/=ezm; + ezm=TMath::Sqrt(1./ezm); + } niter++; } while(niter<10 && TMath::Abs((zm-lim1)-(lim2-zm))>fTolerance); fCurrentVertex = new AliESDVertex(zm,ezm,ncontr);