Skip to content

Commit

Permalink
Added protection before using AliVertexerTracks::TrackletVertexFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
mmasera committed Jun 5, 2015
1 parent 1e183d9 commit 9ce3cd2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ITS/ITSbase/AliITSVertexer3D.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ void AliITSVertexer3D::FindVertex3DIterativeMM(){
}
// cout<<endl;
delete []labels;

fVertArray[kk]=AliVertexerTracks::TrackletVertexFinder(tclo,size);
delete [] tclo;
// fVertArray[kk].PrintStatus();
Expand Down Expand Up @@ -994,6 +995,7 @@ Int_t AliITSVertexer3D::Prepare3DVertex(Int_t optCuts){
if(fLines.GetEntriesFast()>1){
retcode=0;
// find a first candidate for the primary vertex

fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
// make a further selection on tracklets based on this first candidate
fVert3D.GetXYZ(peak);
Expand Down Expand Up @@ -1115,9 +1117,10 @@ Int_t AliITSVertexer3D::Prepare3DVertexPbPb(){

AliDebug(1,Form("Number of tracklets (after 3rd compression) %d",fLines.GetEntriesFast()));

fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
fVert3D.GetXYZ(f3DPeak);

if(fLines.GetEntriesFast()>1){
fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
fVert3D.GetXYZ(f3DPeak);
}
return 0;
}

Expand Down

0 comments on commit 9ce3cd2

Please sign in to comment.