]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexerFast.cxx
protect against wrong instantiation of trending manager
[u/mrichter/AliRoot.git] / ITS / AliITSVertexerFast.cxx
index 2e20c39dbde820b5a66ae4a849e4ad50bdc52c1f..80428d8e08c7961bf90c39d34c45bc98f03a041a 100644 (file)
@@ -30,6 +30,9 @@
 // Origin: masera@to.infn.it     25/09/2003                            //
 //                                                                     //
 /////////////////////////////////////////////////////////////////////////
+
+using std::endl;
+using std::cout;
 ClassImp(AliITSVertexerFast)
 
 
@@ -53,7 +56,7 @@ fSmear(0)
   // Standard constructor
   fSmear = new Double_t[3];
   for(Int_t i=0;i<3;i++)fSmear[i]=smear[i];
-  Info("AliITSVertexerFast","Gaussian smaring of the generated vertex. Parameters %f12.5 , %f12.5 , %f12.5 \n",fSmear[0],fSmear[1],fSmear[2]);
+  AliInfo(Form("Gaussian smaring of the generated vertex. Sigmas (x,y,z) = %12.5f , %12.5f , %12.5f cm",fSmear[0],fSmear[1],fSmear[2]));
   AliRunLoader *rl =AliRunLoader::Instance();
   TTree *trK=(TTree*)rl->TreeK();
   if(!trK)AliFatal("This class should be used only with simulated events!!");
@@ -65,8 +68,7 @@ fSmear(0)
 //______________________________________________________________________
 AliITSVertexerFast::~AliITSVertexerFast(){
   // Destructor
-  if(fSmear)delete [] fSmear;
-  fSmear = 0;
+  delete [] fSmear;
 }
 
 //______________________________________________________________________
@@ -88,6 +90,7 @@ AliESDVertex* AliITSVertexerFast::FindVertexForCurrentEvent(TTree *itsClusterTre
     vrtx[k] = gRandom->Gaus(vrttrue[k],fSmear[k]);
   }
   fCurrentVertex = new AliESDVertex(vrtx,fSmear,"Smeared Generated Vertex");
+  fCurrentVertex->SetTitle("vertexer: smearMC");
   return fCurrentVertex;
   
 }