Fix bug in pileup tagging (F. Prino)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Feb 2009 14:02:49 +0000 (14:02 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Feb 2009 14:02:49 +0000 (14:02 +0000)
ITS/AliITSVertexerZ.cxx

index dcb695d..a8055ed 100644 (file)
@@ -188,6 +188,9 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(TTree *itsClusterTree){
 void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
   // Defines the AliESDVertex for the current event
   fCurrentVertex = 0;
+  fIsPileup=kFALSE;
+  fNTrpuv=-2;     
+  fZpuv=-99999.;
 
   TTree *tR = itsClusterTree;
   fDetTypeRec->SetTreeAddressR(tR);
@@ -377,8 +380,6 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
   fCurrentVertex = new AliESDVertex(zm,ezm,ncontr);
   fCurrentVertex->SetTitle("vertexer: B");
   points.Clear();
-  fIsPileup=kFALSE;
-  fNTrpuv=-2;
   if(ncontr>fMinTrackletsForPilup){ 
     Float_t secPeakPos;
     Int_t ncontr2=FindSecondPeak(fZCombc,binmin,binmax,secPeakPos);
@@ -387,7 +388,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
       fZpuv=secPeakPos;
       fNTrpuv=ncontr2;
     }
-  }    
+  }
   ResetHistograms();
   return;
 }