27-may-2001 NvE New class AliEvent introduced and RALICELinkDef.h & co. updated accor...
[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 <iostream.h>
9#include <math.h>
10
11#include "Ali3Vector.h"
12
13class Ali4Vector
14{
15 public:
16 Ali4Vector(); // Default constructor for contravariant vector
17 virtual ~Ali4Vector(); // Destructor
18 virtual void SetVector(Double_t v0,Ali3Vector v); // Store contravariant vector
19 virtual void SetVector(Double_t* v,TString f); // Store contravariant vector v^i in frame f
20 virtual void GetVector(Double_t* v,TString f); // Provide contravariant vector v^i in frame f
21 virtual void SetVector(Float_t* v,TString f); // Store contravariant vector v^i in frame f
22 virtual void GetVector(Float_t* v,TString f); // Provide contravariant vector v^i in frame f
959fbac5 23 virtual void SetScalar(Double_t v0,Double_t dv0=0); // Set the scalar part (with error) of v
24 virtual void SetScalarError(Double_t dv0); // Set error on the scalar part of v
d88f97cc 25 Double_t GetScalar(); // Provide the scalar part of v
959fbac5 26 virtual void Set3Vector(Ali3Vector v); // Set the 3-vector part of v
27 virtual void Set3Vector(Double_t* v,TString f); // Set the 3-vector part of v in frame f
28 virtual void Set3Vector(Float_t* v,TString f); // Set the 3-vector part of v in frame f
d88f97cc 29 Ali3Vector Get3Vector(); // Provide the 3-vector part of v
959fbac5 30 virtual void SetInvariant(Double_t v2,Double_t dv2=0); // Set the Lorentz invariant (with error)
31 virtual void SetInvariantError(Double_t dv2); // Set error on the Lorentz invariant
32 Double_t GetInvariant(); // Provide the Lorentz invariant
33 virtual void SetErrors(Double_t* v,TString f); // Store errors of vector v^i in frame f
34 virtual void GetErrors(Double_t* v,TString f); // Provide errors of vector v^i in frame f
35 virtual void SetErrors(Float_t* v,TString f); // Store errors of vector v^i in frame f
36 virtual void GetErrors(Float_t* v,TString f); // Provide errors of vector v^i in frame f
d88f97cc 37 virtual void Info(TString f="car"); // Print contravariant components in frame f
38 Double_t Dot(Ali4Vector& q); // Provide dot product v^i*q_i
959fbac5 39 Double_t GetResultError(); // Provide error on scalar result (e.g. Dot)
d88f97cc 40 Ali4Vector operator+(Ali4Vector& q); // Add contravariant vector q
41 Ali4Vector operator-(Ali4Vector& q); // Subtract contravariant vector q
42 Ali4Vector operator*(Double_t s); // Multiply contravariant vector with scalar s
43 Ali4Vector operator/(Double_t s); // Divide contravariant vector by scalar s
44 Ali4Vector& operator+=(Ali4Vector& q); // Add contravariant vector q
45 Ali4Vector& operator-=(Ali4Vector& q); // Subtract contravariant vector q
46 Ali4Vector& operator*=(Double_t s); // Multiply with scalar s
47 Ali4Vector& operator/=(Double_t s); // Divide by scalar s
959fbac5 48 Int_t GetScalarFlag(); // Provide the fScalar flag value
d88f97cc 49
50 protected:
959fbac5 51 Double_t fV2; // The Lorentz invariant (v^i*v_i)
52 Double_t fV0; // The scalar part
53 Ali3Vector fV; // The 3-vector part
54 Double_t fDv2; // The error on the Lorentz invariant
55 Double_t fDv0; // The error on the scalar part
56 Double_t fDresult; // The error on the scalar result of an operation (e.g. dotproduct)
57 Int_t fScalar; // Flag denoting scalar mode
d88f97cc 58
959fbac5 59 ClassDef(Ali4Vector,1) // Handling of Lorentz 4-vectors in various reference frames.
d88f97cc 60};
61#endif