warning fixed
[u/mrichter/AliRoot.git] / RALICE / Ali4Vector.h
CommitLineData
d88f97cc 1#ifndef ALI4VECTOR_H
2#define ALI4VECTOR_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 "Ali3Vector.h"
11
12class Ali4Vector
13{
14 public:
15 Ali4Vector(); // Default constructor for contravariant vector
16 virtual ~Ali4Vector(); // Destructor
c72198f1 17 Ali4Vector(const Ali4Vector& v); // Copy constructor
1fbffa23 18 virtual void Load(Ali4Vector& q); // Load all attributes of input Ali4Vector
c72198f1 19 virtual void SetZero(); // (Re)set all attributes to zero
1c01b4f8 20 void SetVector(Double_t v0,Ali3Vector& v); // Store contravariant vector
1f241680 21 void SetVector(Double_t* v,TString f,TString u="rad"); // Store contravariant vector v^i in frame f with ang units u
22 void GetVector(Double_t* v,TString f,TString u="rad"); // Provide contravariant vector v^i in frame f in ang units u
23 void SetVector(Float_t* v,TString f,TString u="rad"); // Store contravariant vector v^i in frame f with ang units u
24 void GetVector(Float_t* v,TString f,TString u="rad"); // Provide contravariant vector v^i in frame f in ang units u
1c01b4f8 25 void SetScalar(Double_t v0,Double_t dv0=0); // Set the scalar part (with error) of v
26 void SetScalarError(Double_t dv0); // Set error on the scalar part of v
d88f97cc 27 Double_t GetScalar(); // Provide the scalar part of v
1c01b4f8 28 void Set3Vector(Ali3Vector& v); // Set the 3-vector part of v
1f241680 29 void Set3Vector(Double_t* v,TString f,TString u="rad"); // Set the 3-vector part of v in frame f with ang units u
30 void Set3Vector(Float_t* v,TString f,TString u="rad"); // Set the 3-vector part of v in frame f with ang units u
261c0caf 31 Ali3Vector Get3Vector() const; // Provide the 3-vector part of v
1c01b4f8 32 void SetInvariant(Double_t v2,Double_t dv2=0); // Set the Lorentz invariant (with error)
33 void SetInvariantError(Double_t dv2); // Set error on the Lorentz invariant
959fbac5 34 Double_t GetInvariant(); // Provide the Lorentz invariant
1f241680 35 void SetErrors(Double_t* v,TString f,TString u="rad"); // Store errors of vector v^i in frame f with ang units u
36 void GetErrors(Double_t* v,TString f,TString u="rad"); // Provide errors of vector v^i in frame f in ang units u
37 void SetErrors(Float_t* v,TString f,TString u="rad"); // Store errors of vector v^i in frame f with ang units u
38 void GetErrors(Float_t* v,TString f,TString u="rad"); // Provide errors of vector v^i in frame f in ang units u
39 virtual void Data(TString f="car",TString u="rad"); // Print contravariant components in frame f in ang units u
d88f97cc 40 Double_t Dot(Ali4Vector& q); // Provide dot product v^i*q_i
261c0caf 41 Double_t GetResultError() const; // Provide error on scalar result (e.g. Dot)
d88f97cc 42 Ali4Vector operator+(Ali4Vector& q); // Add contravariant vector q
43 Ali4Vector operator-(Ali4Vector& q); // Subtract contravariant vector q
44 Ali4Vector operator*(Double_t s); // Multiply contravariant vector with scalar s
45 Ali4Vector operator/(Double_t s); // Divide contravariant vector by scalar s
46 Ali4Vector& operator+=(Ali4Vector& q); // Add contravariant vector q
47 Ali4Vector& operator-=(Ali4Vector& q); // Subtract contravariant vector q
48 Ali4Vector& operator*=(Double_t s); // Multiply with scalar s
49 Ali4Vector& operator/=(Double_t s); // Divide by scalar s
261c0caf 50 Int_t GetScalarFlag() const; // Provide the fScalar flag value
51 Ali3Vector GetVecTrans() const; // Provide transverse vector part w.r.t. z-axis
52 Ali3Vector GetVecLong() const; // Provide longitudinal vector part w.r.t. z-axis
d071d629 53 Double_t GetPseudoRapidity(); // Provide pseudorapidity of vector part w.r.t z-axis
261c0caf 54 Ali3Vector GetBetaVector() const; // Provide the beta 3-vector
176f88c0 55 Double_t GetBeta(); // Provide the norm of the beta 3-vector, i.e. v/c
56 Double_t GetGamma(); // Provide the Lorentz gamma factor
4962c850 57 Double_t GetX(Int_t i,TString f,TString u="rad"); // Provide i-th vector component in frame f in units u
1f241680 58 virtual Double_t GetOpeningAngle(Ali4Vector& q,TString u="rad"); // Opening angle between 3-vector parts in units u
413d0114 59 virtual Double_t GetOpeningAngle(Ali3Vector& q,TString u="rad"); // Opening angle with 3-vector q in units u
d88f97cc 60
61 protected:
d0120ca2 62 Double32_t fV2; // The Lorentz invariant (v^i*v_i)
63 Double32_t fV0; // The scalar part
64 Ali3Vector fV; // The 3-vector part
65 Double32_t fDv2; // The error on the Lorentz invariant
66 Double32_t fDv0; // The error on the scalar part
67 Double32_t fDresult; //! The error on the scalar result of an operation (e.g. dotproduct)
68 Int_t fScalar; // Flag denoting scalar mode
d071d629 69 Double_t GetScaTrans(); // Provide "transverse value" of scalar part w.r.t. z-axis
70 Double_t GetScaLong(); // Provide "longitudinal value" of scalar part w.r.t. z-axis
d88f97cc 71
d0120ca2 72 ClassDef(Ali4Vector,11) // Handling of Lorentz 4-vectors in various reference frames.
d88f97cc 73};
74#endif