]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDVertex.cxx
Pedestal suppression implemented
[u/mrichter/AliRoot.git] / STEER / AliESDVertex.cxx
index fd3df8741b225f1563b1fc656f3b0e4005987279..a2a320b598cb94890e76ee04a8206713d6994905 100644 (file)
@@ -18,7 +18,7 @@
 //           for the Event Data Summary class
 //           This class contains the Primary Vertex
 //           of the event coming from reconstruction
-// Origin: A.Dainese, Padova, andrea.dainese@pd.infn.it
+// Origin: A.Dainese, andrea.dainese@lnl.infn.it
 //-----------------------------------------------------------------
 
 //---- standard headers ----
@@ -138,22 +138,56 @@ AliESDVertex::AliESDVertex(Double_t position[3],Double_t sigma[3],
   fSNR[2]        = snr[2];
 
 }
-
+//--------------------------------------------------------------------------
+AliESDVertex::AliESDVertex(const AliESDVertex &source):
+  AliVertex(source),
+  fCovXX(source.fCovXX),
+  fCovXY(source.fCovXY),
+  fCovYY(source.fCovYY),
+  fCovXZ(source.fCovXZ),
+  fCovYZ(source.fCovYZ),
+  fCovZZ(source.fCovZZ),
+  fChi2(source.fChi2)
+{
+  //
+  // Copy constructor
+  //
+  for(Int_t i=0;i<3;i++) {
+    fSNR[i] = source.fSNR[i];
+  }
+}
+//--------------------------------------------------------------------------
+AliESDVertex &AliESDVertex::operator=(const AliESDVertex &source){
+  //
+  // assignment operator
+  //
+  if(&source != this){
+    AliVertex::operator=(source);
+    for(Int_t i=0;i<3;++i)fSNR[i] = source.fSNR[i];
+    fCovXX = source.fCovXX;
+    fCovXY = source.fCovXY;
+    fCovYY = source.fCovYY;
+    fCovXZ = source.fCovXZ;
+    fCovYZ = source.fCovYZ;
+    fCovZZ = source.fCovZZ;
+    fChi2 = source.fChi2;
+  }
+  return *this;
+}
 //--------------------------------------------------------------------------
 void AliESDVertex::SetToZero() {
   //
   // Set the content of arrays to 0. Used by constructors
   //
   for(Int_t i=0; i<3; i++){
-    fTruePos[i] = 0;
     fSNR[i] = 0.;
   }
 }
 //--------------------------------------------------------------------------
 void AliESDVertex::GetSigmaXYZ(Double_t sigma[3]) const {
-//
-// Return errors on vertex position
-//
+  //
+  // Return errors on vertex position in thrust frame
+  //
   sigma[0] = TMath::Sqrt(fCovXX);
   sigma[1] = TMath::Sqrt(fCovYY);
   sigma[2] = TMath::Sqrt(fCovZZ);
@@ -162,9 +196,9 @@ void AliESDVertex::GetSigmaXYZ(Double_t sigma[3]) const {
 }
 //--------------------------------------------------------------------------
 void AliESDVertex::GetCovMatrix(Double_t covmatrix[6]) const {
-//
-// Return covariance matrix of the vertex
-//
+  //
+  // Return covariance matrix of the vertex
+  //
   covmatrix[0] = fCovXX;
   covmatrix[1] = fCovXY;
   covmatrix[2] = fCovYY;
@@ -177,18 +211,18 @@ void AliESDVertex::GetCovMatrix(Double_t covmatrix[6]) const {
 
 //--------------------------------------------------------------------------
 void AliESDVertex::GetSNR(Double_t snr[3]) const {
-//
-// Return S/N ratios
-//
+  //
+  // Return S/N ratios
+  //
   for(Int_t i=0;i<3;i++) snr[i] = fSNR[i];
 
   return;
 }
 //--------------------------------------------------------------------------
 void AliESDVertex::Print(Option_t* /*option*/) const {
-//
-// Print out information on all data members
-//
+  //
+  // Print out information on all data members
+  //
   printf("ESD vertex position:\n");
   printf("   x = %f +- %f\n",fPosition[0],TMath::Sqrt(fCovXX));
   printf("   y = %f +- %f\n",fPosition[1],TMath::Sqrt(fCovYY));
@@ -199,8 +233,6 @@ void AliESDVertex::Print(Option_t* /*option*/) const {
   printf(" chi2 = %f\n",fChi2);
   printf(" # tracks (or tracklets) = %d\n",fNContributors);
 
-  printf(" True vertex position - for comparison: %12.10f  %12.10f  %12.10f\n ",fTruePos[0],fTruePos[1],fTruePos[2]);
-
   return;
 }