]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/DevNanoAOD/AliNanoAODReplicator.cxx
changed to nanoAOD production; fix in AliAODVertex::CloneWithoutRefts
[u/mrichter/AliRoot.git] / PWG / DevNanoAOD / AliNanoAODReplicator.cxx
index 4952fffd59d3c2bdb713d9515e20af4569c05678..15838fbefed960bab7ceef10a6b36cd8b631bf6e 100644 (file)
@@ -497,11 +497,9 @@ void AliNanoAODReplicator::ReplicateAndFilter(const AliAODEvent& source)
     AliAODTrack *aodtrack =(AliAODTrack*)track;// FIXME DYNAMIC CAST?
     if(!fTrackCut->IsSelected(aodtrack)) continue;
 
-    AliNanoAODTrack * special = new  AliNanoAODTrack (aodtrack, fVarList);
+    AliNanoAODTrack * special = new((*fTracks)[ntracks++]) AliNanoAODTrack (aodtrack, fVarList);
     
     if(fCustomSetter) fCustomSetter->SetNanoAODTrack(aodtrack, special);
-    (*fTracks)[ntracks++] = special;
-    //new((*fTracks)[ntrac\ks++])
   }  
   //----------------------------------------------------------
   
@@ -514,15 +512,8 @@ void AliNanoAODReplicator::ReplicateAndFilter(const AliAODEvent& source)
       AliAODVertex* tmp = v->CloneWithoutRefs();
       AliAODVertex* copiedVertex = new((*fVertices)[nvertices++]) AliAODVertex(*tmp);
       
-      // to insure the main vertex retains the ncontributors information
-      // (which is otherwise computed dynamically from
-      // references to tracks, which we do not keep in muon aods...)
-      // we set it here
-      
       copiedVertex->SetNContributors(v->GetNContributors()); 
       
-      //  fVertices->Delete();
-      //         delete copiedVertex;
       delete tmp;
     }