8 #ifndef FAIRGEOVECTOR_H
9 #define FAIRGEOVECTOR_H
13 #include <TMathBase.h>
25 inline void round(Double_t d, Int_t n);
41 Double_t&
X() {
return x; }
42 Double_t&
Y() {
return y; }
43 Double_t&
Z() {
return z; }
44 Double_t
getX()
const {
return x; }
45 Double_t
getY()
const {
return y; }
46 Double_t
getZ()
const {
return z; }
51 std::cout <<
" -E- Vector index is 0 1 2 only ! " << std::endl;
65 void setXYZ(
const Double_t xx,
const Double_t yy,
const Double_t zz)
71 void setX(
const Double_t a) {
x = a; }
72 void setY(
const Double_t a) {
y = a; }
73 void setZ(
const Double_t a) {
z = a; }
76 inline Double_t
operator()(
const Int_t i)
const;
81 inline Bool_t
operator<(
const Double_t a);
83 inline Bool_t
operator>(
const Double_t a);
98 void print()
const { printf(
"%10.3f%10.3f%10.3f\n",
x,
y,
z); }
99 inline void round(Int_t n);
131 Error(
"operator()",
"bad index");
152 return ((v.
getX() !=
x || v.
getY() !=
y || v.
getZ() !=
z) ? kFALSE : kTRUE);
157 return (v.
getX() !=
x || v.
getY() !=
y || v.
getZ() !=
z) ? kTRUE : kFALSE;
251 d = floor(d * pow(10., n) + 0.5) / pow(10., n);
253 d = -floor((-d) * pow(10., n) + 0.5) / pow(10., n);
267 return put << v(0) <<
" " << v(1) <<
" " << v(2) <<
'\n';
273 get >> x[0] >> x[1] >> x[2];
void setX(const Double_t a)
Bool_t operator>(const Double_t a)
FairGeoVector & operator/=(const Double_t a)
ClassDef(FairGeoVector, 1)
friend std::ostream & operator<<(std::ostream &put, const FairGeoVector &v)
friend std::istream & operator>>(std::istream &get, FairGeoVector &v)
std::istream & operator>>(std::istream &get, FairGeoVector &v)
void setVector(const Double_t *a)
FairGeoVector vectorProduct(const FairGeoVector &v) const
FairGeoVector & operator+=(const Double_t a)
Bool_t operator>=(const Double_t a)
void setZ(const Double_t a)
FairGeoVector(Double_t dx=0, Double_t dy=0, Double_t dz=0)
FairGeoVector operator+(const FairGeoVector &v) const
Double_t operator()(const Int_t i) const
Double_t getValues(Int_t i)
Bool_t operator!=(const FairGeoVector &v) const
Bool_t operator<(const Double_t a)
check with ilse
void setXYZ(const Double_t xx, const Double_t yy, const Double_t zz)
FairGeoVector operator-() const
FairGeoVector & operator*=(const Double_t a)
Double_t scalarProduct(const FairGeoVector &v) const
Bool_t operator==(const FairGeoVector &v) const
void setY(const Double_t a)
Bool_t operator<=(const Double_t a)
FairGeoVector & operator=(const FairGeoVector &v)
FairGeoVector(const FairGeoVector &v)
FairGeoVector & operator-=(const Double_t a)
void round(Double_t d, Int_t n)
std::ostream & operator<<(std::ostream &put, const FairGeoVector &v)