BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector3R.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtGen/EvtVector3R.hh
12//
13// Description: Class to describe real 3 vectors
14//
15// Modification history:
16//
17// RYD Sept. 5, 1997 Module created
18//
19//------------------------------------------------------------------------
20
21#ifndef EVTVECTOR3R_HH
22#define EVTVECTOR3R_HH
23
24//#include <iostream.h>
25//#include <math.h>
26#include <iosfwd>
27
29
30 friend EvtVector3R rotateEuler(const EvtVector3R& v,
31 double phi,double theta,double ksi);
32
33 inline friend EvtVector3R operator*(double c,const EvtVector3R& v2);
34 inline friend double operator*(const EvtVector3R& v1,const EvtVector3R& v2);
35 inline friend EvtVector3R operator+(const EvtVector3R& v1,const EvtVector3R& v2);
36 inline friend EvtVector3R operator-(const EvtVector3R& v1,const EvtVector3R& v2);
37 inline friend EvtVector3R operator*(const EvtVector3R& v1,double c);
38 inline friend EvtVector3R operator/(const EvtVector3R& v1,double c);
39 friend EvtVector3R cross(const EvtVector3R& v1,const EvtVector3R& v2);
40
41public:
43 EvtVector3R(double x,double y ,double z);
44 virtual ~EvtVector3R();
45 inline EvtVector3R& operator*=(const double c);
46 inline EvtVector3R& operator/=(const double c);
47 inline EvtVector3R& operator+=(const EvtVector3R& v2);
48 inline EvtVector3R& operator-=(const EvtVector3R& v2);
49 inline void set(int i,double d);
50 inline void set(double x,double y ,double z);
51 void applyRotateEuler(double phi,double theta,double ksi);
52 inline double get(int i) const;
53 friend std::ostream& operator<<(std::ostream& s,const EvtVector3R& v);
54 double dot(const EvtVector3R& v2);
55 double d3mag() const;
56
57private:
58
59 double v[3];
60
61};
62
63inline EvtVector3R& EvtVector3R::operator*=(const double c){
64
65 v[0]*=c;
66 v[1]*=c;
67 v[2]*=c;
68 return *this;
69}
70
71inline EvtVector3R& EvtVector3R::operator/=(const double c){
72
73 v[0]/=c;
74 v[1]/=c;
75 v[2]/=c;
76 return *this;
77}
78
80
81 v[0]+=v2.v[0];
82 v[1]+=v2.v[1];
83 v[2]+=v2.v[2];
84 return *this;
85}
86
88
89 v[0]-=v2.v[0];
90 v[1]-=v2.v[1];
91 v[2]-=v2.v[2];
92 return *this;
93}
94
95inline EvtVector3R operator*(double c,const EvtVector3R& v2){
96
97 return EvtVector3R(v2)*=c;
98}
99
100inline EvtVector3R operator*(const EvtVector3R& v1,double c){
101
102 return EvtVector3R(v1)*=c;
103}
104
105inline EvtVector3R operator/(const EvtVector3R& v1,double c){
106
107 return EvtVector3R(v1)/=c;
108}
109
110inline double operator*(const EvtVector3R& v1,const EvtVector3R& v2){
111
112 return v1.v[0]*v2.v[0]+v1.v[1]*v2.v[1]+v1.v[2]*v2.v[2];
113}
114
115inline EvtVector3R operator+(const EvtVector3R& v1,const EvtVector3R& v2) {
116
117 return EvtVector3R(v1)+=v2;
118}
119
120inline EvtVector3R operator-(const EvtVector3R& v1,const EvtVector3R& v2) {
121
122 return EvtVector3R(v1)-=v2;
123
124}
125
126inline double EvtVector3R::get(int i) const {
127 return v[i];
128}
129
130inline void EvtVector3R::set(int i,double d){
131
132 v[i]=d;
133}
134
135inline void EvtVector3R::set(double x,double y, double z){
136
137 v[0]=x;
138 v[1]=y;
139 v[2]=z;
140}
141
142#endif
143
Double_t x[10]
XmlRpcServer s
Definition: HelloServer.cpp:11
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
EvtVector3R operator*(double c, const EvtVector3R &v2)
EvtVector3R operator/(const EvtVector3R &v1, double c)
EvtVector3R operator+(const EvtVector3R &v1, const EvtVector3R &v2)
EvtVector3R operator-(const EvtVector3R &v1, const EvtVector3R &v2)
friend EvtVector3R operator*(double c, const EvtVector3R &v2)
friend EvtVector3R rotateEuler(const EvtVector3R &v, double phi, double theta, double ksi)
friend EvtVector3R operator/(const EvtVector3R &v1, double c)
void applyRotateEuler(double phi, double theta, double ksi)
EvtVector3R & operator-=(const EvtVector3R &v2)
EvtVector3R & operator+=(const EvtVector3R &v2)
friend EvtVector3R cross(const EvtVector3R &v1, const EvtVector3R &v2)
friend EvtVector3R operator+(const EvtVector3R &v1, const EvtVector3R &v2)
friend std::ostream & operator<<(std::ostream &s, const EvtVector3R &v)
friend EvtVector3R operator-(const EvtVector3R &v1, const EvtVector3R &v2)
double y[1000]