Extended pileup search tomore than 1 pileup vertex
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Jun 2011 23:42:08 +0000 (23:42 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Jun 2011 23:42:08 +0000 (23:42 +0000)
ITS/AliITSVertexer3D.cxx
ITS/AliITSVertexer3D.h

index 37b3902..679b6d7 100644 (file)
@@ -995,28 +995,35 @@ Int_t AliITSVertexer3D::RemoveTracklets(){
 //________________________________________________________
 void AliITSVertexer3D::FindOther3DVertices(TTree *itsClusterTree){
   // pileup identification based on 3D vertexing with not used clusters
-  MarkUsedClusters();
-  fLines.Clear("C");
-  Int_t nolines = FindTracklets(itsClusterTree,2);
-  if(nolines>=2){
-    Int_t nr=RemoveTracklets();
-    nolines-=nr;
+
+  fVertArray = new AliESDVertex[kMaxPileupVertices+1];
+  fVertArray[0]=(*fCurrentVertex);
+  Int_t nFoundVert=1;
+  for(Int_t iPilV=1; iPilV<=kMaxPileupVertices; iPilV++){
+    MarkUsedClusters();
+    fLines.Clear("C");
+    Int_t nolines = FindTracklets(itsClusterTree,2);
     if(nolines>=2){
-      Int_t rc=Prepare3DVertex(2);
-      if(rc==0){ 
-       fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
-       if(fVert3D.GetNContributors()>=fMinTrackletsForPilup){
-         fIsPileup=kTRUE;
-         fNoVertices=2;
-         fVertArray = new AliESDVertex[2];
-         fVertArray[0]=(*fCurrentVertex);
-         fVertArray[1]=fVert3D;
-         fZpuv=fVert3D.GetZv();
-         fNTrpuv=fVert3D.GetNContributors();
+      Int_t nr=RemoveTracklets();
+      nolines-=nr;
+      if(nolines>=2){
+       Int_t rc=Prepare3DVertex(2);
+       if(rc==0){ 
+         fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
+         if(fVert3D.GetNContributors()>=fMinTrackletsForPilup){
+           fIsPileup=kTRUE;
+           fVertArray[nFoundVert]=fVert3D;
+           nFoundVert++;
+           if(nFoundVert==2){
+             fZpuv=fVert3D.GetZv();
+             fNTrpuv=fVert3D.GetNContributors();
+           }
+         }
        }
       }
     }
   }
+  fNoVertices=nFoundVert;
 }
 //______________________________________________________________________
 void AliITSVertexer3D::PileupFromZ(){
index 3435087..0397b83 100644 (file)
@@ -76,6 +76,7 @@ protected:
   void  FindOther3DVertices(TTree *itsClusterTree);
 
   enum {kMaxCluPerMod=250};
+  enum {kMaxPileupVertices=10};
 
   TClonesArray fLines;      //! array of tracklets
   AliESDVertex fVert3D;        // 3D Vertex