]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/Ali3Vector.h
Removed classes not included in compilation
[u/mrichter/AliRoot.git] / RALICE / Ali3Vector.h
index 40eef45dd61bade71f026ab59579d1a06ed3fea3..8fcfabd230af4dea1a6941d06d912f4e8123628c 100644 (file)
@@ -1,82 +1,58 @@
 #ifndef ALI3VECTOR_H
 #define ALI3VECTOR_H
-///////////////////////////////////////////////////////////////////////////
-// Class Ali3Vector
-// Handling of 3-vectors in various reference frames.
-//
-// This class is meant to serve as a base class for ALICE objects
-// that have 3-dimensional vector characteristics.
-//
-// Note :
-// ------
-// Vectors (v) and reference frames (f) are specified via
-// SetVector(Float_t* v,TString f) under the following conventions :
-//
-// f="car" ==> v in Cartesian coordinates   (x,y,z)
-// f="sph" ==> v in Spherical coordinates   (r,theta,phi)
-// f="cyl" ==> v in Cylindrical coordinates (rho,phi,z)
-//
-// All angles are in radians.
-//
-// Example :
-// ---------
-//
-// Ali3Vector a;
-// Float_t v[3]={-1,25,7};
-// a.SetVector(v,"car");
-// a.Info();
-//
-// Float_t vec[3];
-// a.GetVector(vec,"sph");
-//
-// Ali3Vector b;
-// Float_t v2[3]={6,-18,33};
-// b.SetVector(v2,"car");
-//
-// Float_t dotpro=a.Dot(b);
-//
-// Ali3Vector c=a.Cross(b);
-// c.Info("sph");
-// c.GetVector(vec,"cyl");
-// Float_t norm=c.GetNorm();
-// c=a+b;
-// c=a-b;
-// c=a*5;
-//
-//--- NvE 30-mar-1999 UU-SAP Utrecht
-///////////////////////////////////////////////////////////////////////////
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// $Id$
 
-#include <iostream.h>
 #include <math.h>
  
 #include "TObject.h"
 #include "TString.h"
+#include "TRotMatrix.h"
  
 class Ali3Vector
 {
  public:
   Ali3Vector();                                  // Default constructor
   virtual ~Ali3Vector();                         // Destructor
-  virtual void SetVector(Double_t* v,TString f); // Store vector v in frame f
-  virtual void GetVector(Double_t* v,TString f); // Provide vector v in frame f
-  virtual void SetVector(Float_t*  v,TString f); // Store vector v in frame f
-  virtual void GetVector(Float_t*  v,TString f); // Provide vector v in frame f
-  virtual void Info(TString f="car");            // Print vector components in frame f
+  Ali3Vector(const Ali3Vector& v);               // Copy constructor
+  virtual void Load(Ali3Vector& q);              // Load all attributes of input Ali3Vector
+  virtual void SetZero();                        // (Re)set all attributes to zero.
+  void SetVector(Double_t* v,TString f,TString u="rad");       // Store vector v in frame f with ang units u
+  void GetVector(Double_t* v,TString f,TString u="rad") const; // Provide vector v in frame f in ang units u
+  void SetVector(Float_t*  v,TString f,TString u="rad");       // Store vector v in frame f with ang units u
+  void GetVector(Float_t*  v,TString f,TString u="rad") const; // Provide vector v in frame f in ang units u
+  void SetErrors(Double_t* e,TString f,TString u="rad");       // Store errors of vector in frame f with ang units u
+  void GetErrors(Double_t* e,TString f,TString u="rad") const; // Provide errors of vector in frame f in ang units u
+  void SetErrors(Float_t*  e,TString f,TString u="rad");       // Store errors of vector in frame f with ang units u
+  void GetErrors(Float_t*  e,TString f,TString u="rad") const; // Provide errors of vector in frame f in ang units u
+  virtual void Data(TString f="car",TString u="rad") const;    // Print vector components in frame f in ang units u
   Double_t GetNorm();                            // Provide norm of the vector
   Double_t Dot(Ali3Vector& q);                   // Provide dot product with q
-  Ali3Vector Cross(Ali3Vector& q);               // Provide cross product with q
-  Ali3Vector operator+(Ali3Vector& q);           // Add vector q
-  Ali3Vector operator-(Ali3Vector& q);           // Subtract vector q
-  Ali3Vector operator*(Double_t s);              // Multiply vector with scalar s
-  Ali3Vector operator/(Double_t s);              // Divide vector by scalar s
+  Double_t GetPseudoRapidity();                  // Provide the pseudorapidity w.r.t z-axis
+  Double_t GetResultError() const;               // Provide error on scalar result (e.g. norm)
+  Ali3Vector Cross(Ali3Vector& q) const;         // Provide cross product with q
+  Ali3Vector operator+(Ali3Vector& q) const;     // Add vector q
+  Ali3Vector operator-(Ali3Vector& q) const;     // Subtract vector q
+  Ali3Vector operator*(Double_t s) const;        // Multiply vector with scalar s
+  Ali3Vector operator/(Double_t s) const;        // Divide vector by scalar s
   Ali3Vector& operator+=(Ali3Vector& q);         // Add vector q
   Ali3Vector& operator-=(Ali3Vector& q);         // Subtract vector q
   Ali3Vector& operator*=(Double_t s);            // Multiply with scalar s
   Ali3Vector& operator/=(Double_t s);            // Divide by scalar s
+  Ali3Vector GetVecTrans() const;                // Provide transverse vector w.r.t. z-axis
+  Ali3Vector GetVecLong() const;                 // Provide longitudinal vector w.r.t. z-axis
+  Ali3Vector GetPrimed(TRotMatrix* m) const;     // Provide vector components in a rotated frame
+  Ali3Vector GetUnprimed(TRotMatrix* m) const;   // Provide original vector components from a rotated one
+  Double_t GetX(Int_t i,TString f,TString u="rad"); // Provide i-th vector component in frame f in units u
+  virtual Double_t GetOpeningAngle(Ali3Vector& q,TString u="rad"); // Provide opening angle with q in units u
 
  protected:
-  Double_t fV,fTheta,fPhi; // Vector in spherical coordinates
+  Double32_t fV,fTheta,fPhi;    // Vector in spherical coordinates
+  Double32_t fDx,fDy,fDz;       // Errors on Cartesian coordinates
+  Double32_t fDresult;          //! Error on scalar result (e.g. norm or dotproduct)
 
- ClassDef(Ali3Vector,1) // Class definition to enable ROOT I/O
+ ClassDef(Ali3Vector,11) // Handling of 3-vectors in various reference frames.
 };
 #endif