]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexerZ.cxx
Fix for coverity (Annalisa De Caro).
[u/mrichter/AliRoot.git] / ITS / AliITSVertexerZ.cxx
index 7d0f73d9a8c875843da86fedbeb7295138a9cca0..798b9fb1b3ed5cc65ddd1a4df9ccc430085d26d5 100644 (file)
@@ -32,6 +32,8 @@
 // It can be used successfully with Pb-Pb collisions
 ////////////////////////////////////////////////////////////////
 
+using std::endl;
+using std::cout;
 ClassImp(AliITSVertexerZ)
 
 
@@ -191,6 +193,7 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(TTree *itsClusterTree){
 //______________________________________________________________________
 void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
   // Defines the AliESDVertex for the current event
+  delete fCurrentVertex;
   fCurrentVertex = 0;
   Double_t startPos[3]={GetNominalPos()[0],GetNominalPos()[1],GetNominalPos()[2]};
   Double_t startCov[6]={GetNominalCov()[0],GetNominalCov()[1],GetNominalCov()[2],
@@ -398,7 +401,9 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
 }
 
 //_____________________________________________________________________
-Int_t AliITSVertexerZ::FindSecondPeak(TH1F* h, Int_t binmin,Int_t binmax, Float_t& secPeakPos){  
+Int_t AliITSVertexerZ::FindSecondPeak(TH1F* h, Int_t binmin,Int_t binmax, Float_t& secPeakPos){ 
+  // Resets bin contents between binmin and binmax and then search 
+  // for a second peak position 
   for(Int_t i=binmin-1;i<=binmax+1;i++){
     h->SetBinContent(i,0.);
   }