]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliVertexer.cxx
Consistency changes, bug fix, and new conditions on the kITSrefit and kTPCrefit bits...
[u/mrichter/AliRoot.git] / STEER / AliVertexer.cxx
index 1125ff7787c77d03ab95a7a73d426e34f9907dfd..4b41e37d984f82aa32cf1f4a0e819aae6613385c 100644 (file)
@@ -1,5 +1,23 @@
-#include <AliESDVertex.h>
-#include <AliVertexer.h>
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+#include "AliLog.h"
+#include "AliESDVertex.h"
+#include "AliVertexer.h"
 
 ClassImp(AliVertexer)
 
@@ -11,36 +29,61 @@ ClassImp(AliVertexer)
 //////////////////////////////////////////////////////////////////////
 
 //______________________________________________________________________
-AliVertexer::AliVertexer() {
+AliVertexer::AliVertexer() :
+  fCurrentVertex(0),
+  fFirstEvent(0),
+  fLastEvent(0),
+  fMult()
+{
+  //
   // Default Constructor
-
-    fCurrentVertex  = 0;
-    SetDebug();
-    SetFirstEvent(0);
-    SetLastEvent(0);
+  //
+  SetVtxStart(0.,0.,0.);
+  for(Int_t i=0;i<6;i++)fNominalCov[i]=0.;
 }
 
 
 //______________________________________________________________________
-AliVertexer::AliVertexer(const AliVertexer &vtxr) : TObject(vtxr) {
+AliVertexer::AliVertexer(const AliVertexer &vtxr) : 
+  TObject(vtxr),
+  fCurrentVertex(vtxr.fCurrentVertex),
+  fFirstEvent(vtxr.fFirstEvent),
+  fLastEvent(vtxr.fLastEvent),
+  fMult(vtxr.fMult)
+{
   // Copy constructor
   // Copies are not allowed. The method is protected to avoid misuse.
-  Error("AliVertexer","Copy constructor not allowed\n");
+  AliFatal("Copy constructor not allowed");
 }
 
 //______________________________________________________________________
 AliVertexer& AliVertexer::operator=(const AliVertexer& /* vtxr */){
   // Assignment operator
   // Assignment is not allowed. The method is protected to avoid misuse.
-  Error("= operator","Assignment operator not allowed\n");
+  AliFatal("Assignment operator not allowed");
   return *this;
 }
 
 //______________________________________________________________________
 AliVertexer::~AliVertexer() {
   // Default Destructor
+
+  if(fMult) delete fMult;
   // The objects pointed by the following pointers are not owned
   // by this class and are not deleted
 
     fCurrentVertex  = 0;
+
+}
+
+
+//---------------------------------------------------------------------------
+void  AliVertexer::SetVtxStart(AliESDVertex *vtx) 
+{ 
+//
+// Set initial vertex knowledge
+//
+  vtx->GetXYZ(fNominalPos);
+  vtx->GetCovMatrix(fNominalCov);
+  return; 
 }