]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/Ali3Vector.h
Update of slat geometry
[u/mrichter/AliRoot.git] / RALICE / Ali3Vector.h
CommitLineData
d88f97cc 1#ifndef ALI3VECTOR_H
2#define ALI3VECTOR_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
f531a546 6// $Id$
3da30618 7
d88f97cc 8#include <math.h>
9
10#include "TObject.h"
11#include "TString.h"
261c0caf 12#include "TRotMatrix.h"
d88f97cc 13
14class Ali3Vector
15{
16 public:
17 Ali3Vector(); // Default constructor
18 virtual ~Ali3Vector(); // Destructor
c72198f1 19 Ali3Vector(const Ali3Vector& v); // Copy constructor
1fbffa23 20 virtual void Load(Ali3Vector& q); // Load all attributes of input Ali3Vector
c72198f1 21 virtual void SetZero(); // (Re)set all attributes to zero.
1c01b4f8 22 void SetVector(Double_t* v,TString f); // Store vector v in frame f
261c0caf 23 void GetVector(Double_t* v,TString f) const; // Provide vector v in frame f
1c01b4f8 24 void SetVector(Float_t* v,TString f); // Store vector v in frame f
261c0caf 25 void GetVector(Float_t* v,TString f) const; // Provide vector v in frame f
1c01b4f8 26 void SetErrors(Double_t* e,TString f); // Store errors of vector in frame f
261c0caf 27 void GetErrors(Double_t* e,TString f) const; // Provide errors of vector in frame f
1c01b4f8 28 void SetErrors(Float_t* e,TString f); // Store errors of vector in frame f
261c0caf 29 void GetErrors(Float_t* e,TString f) const; // Provide errors of vector in frame f
30 virtual void Data(TString f="car") const; // Print vector components in frame f
d88f97cc 31 Double_t GetNorm(); // Provide norm of the vector
32 Double_t Dot(Ali3Vector& q); // Provide dot product with q
959fbac5 33 Double_t GetPseudoRapidity(); // Provide the pseudorapidity w.r.t z-axis
261c0caf 34 Double_t GetResultError() const; // Provide error on scalar result (e.g. norm)
35 Ali3Vector Cross(Ali3Vector& q) const; // Provide cross product with q
36 Ali3Vector operator+(Ali3Vector& q) const; // Add vector q
37 Ali3Vector operator-(Ali3Vector& q) const; // Subtract vector q
38 Ali3Vector operator*(Double_t s) const; // Multiply vector with scalar s
39 Ali3Vector operator/(Double_t s) const; // Divide vector by scalar s
d88f97cc 40 Ali3Vector& operator+=(Ali3Vector& q); // Add vector q
41 Ali3Vector& operator-=(Ali3Vector& q); // Subtract vector q
42 Ali3Vector& operator*=(Double_t s); // Multiply with scalar s
43 Ali3Vector& operator/=(Double_t s); // Divide by scalar s
261c0caf 44 Ali3Vector GetVecTrans() const; // Provide transverse vector w.r.t. z-axis
45 Ali3Vector GetVecLong() const; // Provide longitudinal vector w.r.t. z-axis
46 Ali3Vector GetPrimed(TRotMatrix* m) const; // Provide vector components in a rotated frame
c5555bc0 47 Ali3Vector GetUnprimed(TRotMatrix* m) const; // Provide original vector components from a rotated one
d88f97cc 48
49 protected:
959fbac5 50 Double_t fV,fTheta,fPhi; // Vector in spherical coordinates
51 Double_t fDx,fDy,fDz; // Errors on Cartesian coordinates
52 Double_t fDresult; // Error on scalar result (e.g. norm or dotproduct)
d88f97cc 53
c5555bc0 54 ClassDef(Ali3Vector,8) // Handling of 3-vectors in various reference frames.
d88f97cc 55};
56#endif