]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/AliBoost.cxx
Additional protection
[u/mrichter/AliRoot.git] / RALICE / AliBoost.cxx
index ebe99912216614365efe20fe119be79b4f9314c2..52519aa1062bbf0d03e8f515a74324a91220e7f9 100644 (file)
@@ -30,7 +30,7 @@
 //
 // AliBoost b1;
 // b1.SetBeta(beta);
-// b1.Info();
+// b1.Data();
 //
 // Float_t b[4]={14,1,2,3};
 // Float_t eb[4]={1.4,0.1,0.2,0.3};
 // p.SetVector(b,"car");
 // p.SetErrors(eb,"car");
 // Ali4Vector pprim=b1.Boost(p);
-// p.Info();
-// pprim.Info();
+// p.Data();
+// pprim.Data();
 //
 // p=b1.Inverse(pprim);
-// pprim.Info();
-// p.Info();
+// pprim.Data();
+// p.Data();
 //
 // Float_t c[4]={5,0,0,4};
 // Float_t ec[4]={0.5,0,0,0.4};
 //
 // AliBoost b2;
 // b2.Set4Momentum(q);
-// b2.Info("sph");
+// b2.Data("sph");
 //
 //--- Author: Nick van Eijndhoven 14-may-1996 UU-SAP Utrecht
 //- Modified: NvE $Date$ UU-SAP Utrecht
 ///////////////////////////////////////////////////////////////////////////
 
 #include "AliBoost.h"
+#include "Riostream.h"
  
 ClassImp(AliBoost) // Class implementation to enable ROOT I/O
  
-AliBoost::AliBoost()
+AliBoost::AliBoost() : TObject()
 {
 // Creation of a Lorentz boost object and initialisation of parameters.
 // Beta is set to (0,0,0) and consequently Gamma=1. 
@@ -80,7 +81,16 @@ AliBoost::~AliBoost()
 // Default destructor.
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliBoost::SetBeta(Ali3Vector b)
+AliBoost::AliBoost(const AliBoost& b) : TObject(b)
+{
+// Copy constructor
+ fBeta=b.fBeta;
+ fGamma=b.fGamma;
+ fDgamma=b.fDgamma;
+ fDresult=b.fDresult;
+}
+///////////////////////////////////////////////////////////////////////////
+void AliBoost::SetBeta(Ali3Vector& b)
 {
 // Setting of boost parameters on basis of beta 3-vector.
 // The errors on the beta 3-vector are taken from the input 3-vector.
@@ -113,7 +123,7 @@ void AliBoost::Set4Momentum(Ali4Vector& p)
  if (E <= 0.)
  {
   cout << " *AliBoost::Set4Momentum* Unphysical situation." << endl;
-  p.Info();
+  p.Data();
  }
  else
  {
@@ -131,7 +141,7 @@ void AliBoost::Set4Momentum(Ali4Vector& p)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector AliBoost::GetBetaVector()
+Ali3Vector AliBoost::GetBetaVector() const
 {
 // Provide the beta 3-vector.
  return fBeta;
@@ -154,22 +164,22 @@ Double_t AliBoost::GetGamma()
  return fGamma;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliBoost::GetResultError()
+Double_t AliBoost::GetResultError() const
 {
 // Provide the error on the result of an operation yielding a scalar.
 // E.g. GetBeta() or GetGamma()
  return fDresult;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliBoost::Info(TString f)
+void AliBoost::Data(TString f)
 {
 // Printing of the boost parameter info in coordinate frame f.
  Double_t beta=fBeta.GetNorm();
  Double_t dbeta=fBeta.GetResultError();
- cout << " *AliBoost::Info* beta : " << beta << " error : " << dbeta
+ cout << " *AliBoost::Data* beta : " << beta << " error : " << dbeta
       << " gamma : " << fGamma << " error : " << fDgamma << endl;
  cout << "  Beta"; 
- fBeta.Info(f);
+ fBeta.Data(f);
 }
 ///////////////////////////////////////////////////////////////////////////
 Ali4Vector AliBoost::Boost(Ali4Vector& v)