From: belikov Date: Mon, 6 Apr 2009 10:01:01 +0000 (+0000) Subject: Setting the VertexID for the tracks used in the fit of this vertex (A. Dainese) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=4448efe418ceb4782351cf7d9efa0964a70ee044 Setting the VertexID for the tracks used in the fit of this vertex (A. Dainese) --- diff --git a/STEER/AliVertexerTracks.cxx b/STEER/AliVertexerTracks.cxx index 1c46cca5af1..c3c9270529d 100644 --- a/STEER/AliVertexerTracks.cxx +++ b/STEER/AliVertexerTracks.cxx @@ -124,7 +124,7 @@ AliVertexerTracks::~AliVertexerTracks() if(fIdSel) { delete [] fIdSel; fIdSel=NULL; } } //---------------------------------------------------------------------------- -AliESDVertex* AliVertexerTracks::FindPrimaryVertex(const AliVEvent *vEvent) +AliESDVertex* AliVertexerTracks::FindPrimaryVertex(AliVEvent *vEvent) { // // Primary vertex for current ESD or AOD event @@ -216,6 +216,17 @@ AliESDVertex* AliVertexerTracks::FindPrimaryVertex(const AliVEvent *vEvent) olddir->cd(); } + // set vertex ID for tracks used in the fit + // (only for ESD) + if(!inputAOD) { + Int_t nIndices = fCurrentVertex->GetNIndices(); + UShort_t *indices = fCurrentVertex->GetIndices(); + for(Int_t ind=0; indGetTrack(indices[ind]); + esdt->SetVertexID(-1); + } + } + return fCurrentVertex; } //---------------------------------------------------------------------------- diff --git a/STEER/AliVertexerTracks.h b/STEER/AliVertexerTracks.h index 9cc7f8462b7..1445fabc2f8 100644 --- a/STEER/AliVertexerTracks.h +++ b/STEER/AliVertexerTracks.h @@ -39,7 +39,7 @@ class AliVertexerTracks : public TObject { AliVertexerTracks(Double_t fieldkG); virtual ~AliVertexerTracks(); - AliESDVertex* FindPrimaryVertex(const AliVEvent *vEvent); + AliESDVertex* FindPrimaryVertex(AliVEvent *vEvent); AliESDVertex* FindPrimaryVertex(TObjArray *trkArrayOrig,UShort_t *idOrig); AliESDVertex* VertexForSelectedTracks(TObjArray *trkArray,UShort_t *id, Bool_t optUseFitter=kTRUE,