New version of RALICE introduced
[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
6/* $Id$ */
7
d88f97cc 8#include <iostream.h>
9#include <math.h>
10
11#include "TObject.h"
12#include "TString.h"
13
14class Ali3Vector
15{
16 public:
17 Ali3Vector(); // Default constructor
18 virtual ~Ali3Vector(); // Destructor
19 virtual void SetVector(Double_t* v,TString f); // Store vector v in frame f
20 virtual void GetVector(Double_t* v,TString f); // Provide vector v in frame f
21 virtual void SetVector(Float_t* v,TString f); // Store vector v in frame f
22 virtual void GetVector(Float_t* v,TString f); // Provide vector v in frame f
959fbac5 23 virtual void SetErrors(Double_t* e,TString f); // Store errors of vector in frame f
24 virtual void GetErrors(Double_t* e,TString f); // Provide errors of vector in frame f
25 virtual void SetErrors(Float_t* e,TString f); // Store errors of vector in frame f
26 virtual void GetErrors(Float_t* e,TString f); // Provide errors of vector in frame f
d88f97cc 27 virtual void Info(TString f="car"); // Print vector components in frame f
28 Double_t GetNorm(); // Provide norm of the vector
29 Double_t Dot(Ali3Vector& q); // Provide dot product with q
959fbac5 30 Double_t GetPseudoRapidity(); // Provide the pseudorapidity w.r.t z-axis
31 Double_t GetResultError(); // Provide error on scalar result (e.g. norm)
d88f97cc 32 Ali3Vector Cross(Ali3Vector& q); // Provide cross product with q
33 Ali3Vector operator+(Ali3Vector& q); // Add vector q
34 Ali3Vector operator-(Ali3Vector& q); // Subtract vector q
35 Ali3Vector operator*(Double_t s); // Multiply vector with scalar s
36 Ali3Vector operator/(Double_t s); // Divide vector by scalar s
37 Ali3Vector& operator+=(Ali3Vector& q); // Add vector q
38 Ali3Vector& operator-=(Ali3Vector& q); // Subtract vector q
39 Ali3Vector& operator*=(Double_t s); // Multiply with scalar s
40 Ali3Vector& operator/=(Double_t s); // Divide by scalar s
41
42 protected:
959fbac5 43 Double_t fV,fTheta,fPhi; // Vector in spherical coordinates
44 Double_t fDx,fDy,fDz; // Errors on Cartesian coordinates
45 Double_t fDresult; // Error on scalar result (e.g. norm or dotproduct)
d88f97cc 46
959fbac5 47 ClassDef(Ali3Vector,1) // Handling of 3-vectors in various reference frames.
d88f97cc 48};
49#endif