BOSS
7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
MucGapCal.cxx
Go to the documentation of this file.
1
//------------------------------------------------------------------------------|
2
// [File ]: MucGapCal.cxx |
3
// [Brief ]: MUC geometry yoke creating class |
4
// [Author]: Xie Yuguang, <
[email protected]
> |
5
// [Date ]: May 22, 2005 |
6
//------------------------------------------------------------------------------|
7
8
#include <iostream>
9
#include <cmath>
10
11
#include "
MucCalibAlg/MucStructConst.h
"
12
#include "
MucCalibAlg/MucGapCal.h
"
13
14
using namespace
std
;
15
16
// Constructor
17
MucGapCal::MucGapCal
(
int
part,
int
segment,
int
layer ) :
MucEntityCal
( part, segment, layer )
18
{
19
MucGapCal::Init
();
20
m_MucBoxCal =
NULL
;
21
}
22
23
// Copy constructor
24
MucGapCal::MucGapCal
(
const
MucGapCal
&other ) :
MucEntityCal
( other )
25
{
26
m_MucBoxCal = other.m_MucBoxCal;
27
}
28
29
// Operator =
30
MucGapCal
&
MucGapCal::operator =
(
const
MucGapCal
&other )
31
{
32
if
(
this
== &other)
return
*
this
;
33
MucEntityCal::operator =
(other);
34
m_MucBoxCal = other.m_MucBoxCal;
35
36
return
*
this
;
37
}
38
39
// Destructor
40
MucGapCal::~MucGapCal
()
41
{
42
delete
m_MucBoxCal;
43
}
44
45
// Initialize
46
void
MucGapCal::Init
()
47
{
48
SetTheta
();
49
SetRin
();
50
SetRout
();
51
SetRc
();
52
53
SetThin
();
54
SetW
();
55
SetWu
();
56
SetWd
();
57
SetH
();
58
SetL
();
59
}
60
61
// ------------------- Get methods --------------------
62
63
MucBoxCal
*
MucGapCal::GetBox
( )
64
{
65
if
( m_MucBoxCal !=
NULL
)
66
return
m_MucBoxCal;
67
else
68
return
( m_MucBoxCal =
new
MucBoxCal
(
m_Part
,
m_Segment
,
m_Layer
) );
69
}
70
71
72
// --------------------- Set motheds ----------------------
73
void
MucGapCal::SetTheta
() {
74
if
(
m_Part
==
BRID
)
m_Theta
=
m_Segment
* (
PI
/4.0 );
75
else
m_Theta
= ( 2*
m_Segment
+ 1 ) * (
PI
/4.0 );
76
}
77
78
void
MucGapCal::SetRin
() {
79
if
(
m_Part
==
BRID
)
m_Rin
= B_AS_RMIN[
m_Layer
] - AS_GAP;
80
else
m_Rin
= 0.;
81
}
82
83
void
MucGapCal::SetRout
() {
84
if
(
m_Part
==
BRID
)
m_Rout
= B_AS_RMIN[
m_Layer
];
85
else
m_Rout
= E_AS_RMAX;
86
}
87
88
void
MucGapCal::SetRc
() {
89
if
(
m_Part
==
BRID
)
m_Rc
= B_AS_RMIN[
m_Layer
] - AS_GAP/2.0;
90
else
m_Rc
= sqrt(2.0) * E_AS_RMAX / 2.0;
91
}
92
93
void
MucGapCal::SetThin
() {
94
m_Thin
= AS_GAP;
95
}
96
97
void
MucGapCal::SetW
() {
98
if
(
m_Part
==
BRID
)
m_W
= B_GP_WT[
m_Layer
];
99
else
m_W
= E_AS_RMAX - E_GP_DX;
100
}
101
102
void
MucGapCal::SetH
()
103
{
104
if
(
m_Part
==
BRID
)
105
m_H
= AS_GAP-0.2;
// avoid overlap between absorber and gap
106
else
107
m_H
= E_AS_RMAX - E_GP_DY;
108
}
109
110
void
MucGapCal::SetL
() {
111
if
(
m_Part
==
BRID
)
m_L
= B_GP_LT;
112
else
m_L
= AS_GAP;
113
}
114
115
void
MucGapCal::SetWu
() {
116
m_Wu
=
m_W
;
117
}
118
119
void
MucGapCal::SetWd
() {
120
m_Wd
=
m_W
;
121
}
122
123
// END
MucGapCal.h
BRID
const int BRID
Definition:
MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucGeoConst.h:18
MucStructConst.h
PI
const double PI
Definition:
PipiJpsi.cxx:55
NULL
#define NULL
Definition:
VertexExtrapolate.h:14
MucBoxCal
Definition:
MucBoxCal.h:18
MucEntityCal
Definition:
MucEntityCal.h:16
MucEntityCal::m_Rout
double m_Rout
Definition:
MucEntityCal.h:67
MucEntityCal::m_Thin
double m_Thin
Definition:
MucEntityCal.h:69
MucEntityCal::m_Theta
double m_Theta
Definition:
MucEntityCal.h:63
MucEntityCal::m_Layer
int m_Layer
Definition:
MucEntityCal.h:60
MucEntityCal::m_Rc
double m_Rc
Definition:
MucEntityCal.h:68
MucEntityCal::m_H
double m_H
Definition:
MucEntityCal.h:71
MucEntityCal::m_L
double m_L
Definition:
MucEntityCal.h:72
MucEntityCal::m_Rin
double m_Rin
Definition:
MucEntityCal.h:66
MucEntityCal::operator=
MucEntityCal & operator=(const MucEntityCal &other)
Definition:
MucEntityCal.cxx:53
MucEntityCal::m_Wu
double m_Wu
Definition:
MucEntityCal.h:73
MucEntityCal::m_Segment
int m_Segment
Definition:
MucEntityCal.h:59
MucEntityCal::m_W
double m_W
Definition:
MucEntityCal.h:70
MucEntityCal::m_Part
int m_Part
Definition:
MucEntityCal.h:58
MucEntityCal::m_Wd
double m_Wd
Definition:
MucEntityCal.h:74
MucGapCal
Definition:
MucGapCal.h:19
MucGapCal::SetWd
virtual void SetWd()
Definition:
MucGapCal.cxx:119
MucGapCal::Init
virtual void Init()
Definition:
MucGapCal.cxx:46
MucGapCal::SetH
virtual void SetH()
Definition:
MucGapCal.cxx:102
MucGapCal::SetWu
virtual void SetWu()
Definition:
MucGapCal.cxx:115
MucGapCal::SetW
virtual void SetW()
Definition:
MucGapCal.cxx:97
MucGapCal::operator=
MucGapCal & operator=(const MucGapCal &other)
Definition:
MucGapCal.cxx:30
MucGapCal::MucGapCal
MucGapCal(int part, int segment, int layer)
Definition:
MucGapCal.cxx:17
MucGapCal::SetRc
virtual void SetRc()
Definition:
MucGapCal.cxx:88
MucGapCal::GetBox
MucBoxCal * GetBox()
Definition:
MucGapCal.cxx:63
MucGapCal::~MucGapCal
~MucGapCal()
Definition:
MucGapCal.cxx:40
MucGapCal::SetL
virtual void SetL()
Definition:
MucGapCal.cxx:110
MucGapCal::SetRout
virtual void SetRout()
Definition:
MucGapCal.cxx:83
MucGapCal::SetRin
virtual void SetRin()
Definition:
MucGapCal.cxx:78
MucGapCal::SetThin
virtual void SetThin()
Definition:
MucGapCal.cxx:93
MucGapCal::SetTheta
virtual void SetTheta()
Definition:
MucGapCal.cxx:73
std
Definition:
RootEventData_rootcint.cxx:16
source
Muc
MucCalibAlg
MucCalibAlg-00-02-16
src
MucGapCal.cxx
Generated by
1.9.6