BOSS
7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
DifRotation.cxx
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: DifRotation.cxx,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4
//
5
// Description:
6
// Class Implementation for |DifRotation|
7
// Rotates things
8
// Environment:
9
// Software developed for the BaBar Detector at the SLAC B-Factory.
10
//
11
// Author List:
12
// A. Snyder
13
//
14
// Copyright Information:
15
// Copyright (C) 1996 SLAC
16
//
17
// History:
18
// Migration for BESIII MDC
19
//
20
//------------------------------------------------------------------------
21
22
23
#include "
MdcRecoUtil/DifRotation.h
"
24
25
DifRotation::DifRotation
()
26
:_xnew(1.0,0.0,0.0),_ynew(0.0,1.0,0.0),_znew(0.0,0.0,1.0)
27
{
28
}
29
30
DifRotation::DifRotation
31
(
const
DifNumber
&
alpha
,
const
DifNumber
& beta,
const
DifNumber
& gamma)
32
{
33
34
//active transformation - move the vector (reverse sines)
35
DifNumber
calpha=
cos
(
alpha
);
DifNumber
salpha=-
sin
(
alpha
);
36
DifNumber
cbeta=
cos
(beta);
DifNumber
sbeta=-
sin
(beta);
37
DifNumber
cgamma=
cos
(gamma);
DifNumber
sgamma=-
sin
(gamma);
38
39
_xnew.
x
=cbeta*calpha*cgamma-salpha*sgamma;
40
_xnew.
y
=cbeta*salpha*cgamma+calpha*sgamma;
41
_xnew.
z
=-sbeta*cgamma;
42
43
_ynew.
x
=-cbeta*calpha*sgamma-salpha*cgamma;
44
_ynew.
y
=-cbeta*salpha*sgamma+calpha*cgamma;
45
_ynew.
z
=sbeta*sgamma;
46
47
_znew.
x
=sbeta*calpha;
48
_znew.
y
=sbeta*salpha;
49
_znew.
z
=cbeta;
50
}
51
52
DifRotation::DifRotation
53
(
const
DifVector
& xp,
const
DifVector
& yp,
const
DifVector
&zp)
54
:_xnew(xp),_ynew(yp),_znew(zp)
55
{}
56
57
DifRotation::DifRotation
58
(
const
DifVector
& xp,
const
DifVector
& yp)
59
:_xnew(xp),_ynew(yp),_znew()
60
{
61
_znew=
cross
(_xnew,_ynew);
62
}
63
64
int
DifRotation::fail
()
const
{
65
return
0;
66
}
67
68
void
DifRotation::rotate
(
DifVector
&
v
)
const
{
69
DifNumber
xcomp=
xnew
()*
v
;
70
DifNumber
ycomp=
ynew
()*
v
;
71
DifNumber
zcomp=
znew
()*
v
;
72
v
.
x
=xcomp;
v
.y=ycomp;
v
.z=zcomp;
73
}
sin
double sin(const BesAngle a)
Definition
BesAngle.h:210
cos
double cos(const BesAngle a)
Definition
BesAngle.h:213
DifRotation.h
cross
EvtVector3R cross(const EvtVector3R &p1, const EvtVector3R &p2)
Definition
EvtVector3R.cc:84
alpha
const double alpha
Definition
FastVertexFit.cxx:4
v
**********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
DifNumber
Definition
DifNumber.h:42
DifRotation::DifRotation
DifRotation()
Definition
DifRotation.cxx:25
DifRotation::xnew
DifVector xnew() const
Definition
DifRotation.h:47
DifRotation::rotate
void rotate(DifVector &v) const
Definition
DifRotation.cxx:68
DifRotation::ynew
DifVector ynew() const
Definition
DifRotation.h:48
DifRotation::znew
DifVector znew() const
Definition
DifRotation.h:49
DifRotation::fail
int fail() const
Definition
DifRotation.cxx:64
DifVector
Definition
DifVector.h:32
DifVector::y
DifNumber y
Definition
DifVector.h:149
DifVector::x
DifNumber x
Definition
DifVector.h:148
DifVector::z
DifNumber z
Definition
DifVector.h:150
7.1.2
Reconstruction
MdcPatRec
MdcRecoUtil
MdcRecoUtil-00-01-08
src
DifRotation.cxx
Generated by
1.12.0