BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVector3R Class Reference

#include <EvtVector3R.hh>

Public Member Functions

 EvtVector3R ()
 
 EvtVector3R (double x, double y, double z)
 
virtual ~EvtVector3R ()
 
EvtVector3Roperator*= (const double c)
 
EvtVector3Roperator/= (const double c)
 
EvtVector3Roperator+= (const EvtVector3R &v2)
 
EvtVector3Roperator-= (const EvtVector3R &v2)
 
void set (int i, double d)
 
void set (double x, double y, double z)
 
void applyRotateEuler (double phi, double theta, double ksi)
 
double get (int i) const
 
double dot (const EvtVector3R &v2)
 
double d3mag () const
 

Friends

EvtVector3R rotateEuler (const EvtVector3R &v, double phi, double theta, double ksi)
 
EvtVector3R operator* (double c, const EvtVector3R &v2)
 
double operator* (const EvtVector3R &v1, const EvtVector3R &v2)
 
EvtVector3R operator+ (const EvtVector3R &v1, const EvtVector3R &v2)
 
EvtVector3R operator- (const EvtVector3R &v1, const EvtVector3R &v2)
 
EvtVector3R operator* (const EvtVector3R &v1, double c)
 
EvtVector3R operator/ (const EvtVector3R &v1, double c)
 
EvtVector3R cross (const EvtVector3R &v1, const EvtVector3R &v2)
 
std::ostream & operator<< (std::ostream &s, const EvtVector3R &v)
 

Detailed Description

Definition at line 28 of file EvtVector3R.hh.

Constructor & Destructor Documentation

◆ EvtVector3R() [1/2]

EvtVector3R::EvtVector3R ( )

Definition at line 32 of file EvtVector3R.cc.

32 {
33
34 v[0]=v[1]=v[2]=0.0;
35}

◆ EvtVector3R() [2/2]

EvtVector3R::EvtVector3R ( double  x,
double  y,
double  z 
)

Definition at line 38 of file EvtVector3R.cc.

38 {
39
40 v[0]=x; v[1]=y; v[2]=z;
41}
Double_t x[10]

◆ ~EvtVector3R()

EvtVector3R::~EvtVector3R ( )
virtual

Definition at line 30 of file EvtVector3R.cc.

30{}

Member Function Documentation

◆ applyRotateEuler()

void EvtVector3R::applyRotateEuler ( double  phi,
double  theta,
double  ksi 
)

Definition at line 53 of file EvtVector3R.cc.

53 {
54
55 double temp[3];
56 double sp,st,sk,cp,ct,ck;
57
58 sp=sin(phi);
59 st=sin(theta);
60 sk=sin(ksi);
61 cp=cos(phi);
62 ct=cos(theta);
63 ck=cos(ksi);
64
65 temp[0]=( ck*ct*cp-sk*sp)*v[0]+( -sk*ct*cp-ck*sp)*v[1]+st*cp*v[2];
66 temp[1]=( ck*ct*sp+sk*cp)*v[0]+(-sk*ct*sp+ck*cp)*v[1]+st*sp*v[2];
67 temp[2]=-ck*st*v[0]+sk*st*v[1]+ct*v[2];
68
69
70 v[0]=temp[0];
71 v[1]=temp[1];
72 v[2]=temp[2];
73}
double sin(const BesAngle a)
double cos(const BesAngle a)
**********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

◆ d3mag()

double EvtVector3R::d3mag ( ) const

Definition at line 95 of file EvtVector3R.cc.

98{
99 double temp;
100
101 temp = v[0]*v[0]+v[1]*v[1]+v[2]*v[2];
102 temp = sqrt( temp );
103
104 return temp;
105} // r3mag

Referenced by EvtEulerAngles::EulerAngles(), and EvtSVVHelAmp::SVVHel().

◆ dot()

double EvtVector3R::dot ( const EvtVector3R v2)

Definition at line 107 of file EvtVector3R.cc.

107 {
108
109 double temp;
110
111 temp = v[0]*p2.v[0];
112 temp += v[1]*p2.v[1]; //2010-2-22,pingrg: corrected
113 temp += v[2]*p2.v[2];
114
115 return temp;
116} //dot

◆ get()

double EvtVector3R::get ( int  i) const
inline

◆ operator*=()

EvtVector3R & EvtVector3R::operator*= ( const double  c)
inline

Definition at line 63 of file EvtVector3R.hh.

63 {
64
65 v[0]*=c;
66 v[1]*=c;
67 v[2]*=c;
68 return *this;
69}

◆ operator+=()

EvtVector3R & EvtVector3R::operator+= ( const EvtVector3R v2)
inline

Definition at line 79 of file EvtVector3R.hh.

79 {
80
81 v[0]+=v2.v[0];
82 v[1]+=v2.v[1];
83 v[2]+=v2.v[2];
84 return *this;
85}

◆ operator-=()

EvtVector3R & EvtVector3R::operator-= ( const EvtVector3R v2)
inline

Definition at line 87 of file EvtVector3R.hh.

87 {
88
89 v[0]-=v2.v[0];
90 v[1]-=v2.v[1];
91 v[2]-=v2.v[2];
92 return *this;
93}

◆ operator/=()

EvtVector3R & EvtVector3R::operator/= ( const double  c)
inline

Definition at line 71 of file EvtVector3R.hh.

71 {
72
73 v[0]/=c;
74 v[1]/=c;
75 v[2]/=c;
76 return *this;
77}

◆ set() [1/2]

void EvtVector3R::set ( double  x,
double  y,
double  z 
)
inline

Definition at line 135 of file EvtVector3R.hh.

135 {
136
137 v[0]=x;
138 v[1]=y;
139 v[2]=z;
140}

◆ set() [2/2]

void EvtVector3R::set ( int  i,
double  d 
)
inline

Definition at line 130 of file EvtVector3R.hh.

130 {
131
132 v[i]=d;
133}

Referenced by EvtEulerAngles::EvtEulerAngles().

Friends And Related Function Documentation

◆ cross

EvtVector3R cross ( const EvtVector3R v1,
const EvtVector3R v2 
)
friend

Definition at line 84 of file EvtVector3R.cc.

84 {
85
86 //Calcs the cross product. Added by djl on July 27, 1995.
87 //Modified for real vectros by ryd Aug 28-96
88
89 return EvtVector3R(p1.v[1]*p2.v[2] - p1.v[2]*p2.v[1],
90 p1.v[2]*p2.v[0] - p1.v[0]*p2.v[2],
91 p1.v[0]*p2.v[1] - p1.v[1]*p2.v[0]);
92
93}

◆ operator* [1/3]

double operator* ( const EvtVector3R v1,
const EvtVector3R v2 
)
friend

Definition at line 110 of file EvtVector3R.hh.

110 {
111
112 return v1.v[0]*v2.v[0]+v1.v[1]*v2.v[1]+v1.v[2]*v2.v[2];
113}

◆ operator* [2/3]

EvtVector3R operator* ( const EvtVector3R v1,
double  c 
)
friend

Definition at line 100 of file EvtVector3R.hh.

100 {
101
102 return EvtVector3R(v1)*=c;
103}

◆ operator* [3/3]

EvtVector3R operator* ( double  c,
const EvtVector3R v2 
)
friend

Definition at line 95 of file EvtVector3R.hh.

95 {
96
97 return EvtVector3R(v2)*=c;
98}

◆ operator+

EvtVector3R operator+ ( const EvtVector3R v1,
const EvtVector3R v2 
)
friend

Definition at line 115 of file EvtVector3R.hh.

115 {
116
117 return EvtVector3R(v1)+=v2;
118}

◆ operator-

EvtVector3R operator- ( const EvtVector3R v1,
const EvtVector3R v2 
)
friend

Definition at line 120 of file EvtVector3R.hh.

120 {
121
122 return EvtVector3R(v1)-=v2;
123
124}

◆ operator/

EvtVector3R operator/ ( const EvtVector3R v1,
double  c 
)
friend

Definition at line 105 of file EvtVector3R.hh.

105 {
106
107 return EvtVector3R(v1)/=c;
108}

◆ operator<<

std::ostream & operator<< ( std::ostream &  s,
const EvtVector3R v 
)
friend

◆ rotateEuler

EvtVector3R rotateEuler ( const EvtVector3R v,
double  phi,
double  theta,
double  ksi 
)
friend

Definition at line 43 of file EvtVector3R.cc.

44 {
45
46 EvtVector3R tmp(v);
47 tmp.applyRotateEuler(alpha,beta,gamma);
48 return tmp;
49
50}
const double alpha

The documentation for this class was generated from the following files: