BOSS
7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MucBoxCal.cxx
Go to the documentation of this file.
1
//------------------------------------------------------------------------------|
2
// [File ]: MucBoxCal.cxx |
3
// [Brief ]: MUC geometry box creating class for calibration |
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/MucBoxCal.h
"
13
14
using namespace
std
;
15
16
// Constructor
17
MucBoxCal::MucBoxCal
(
int
part,
int
segment,
int
layer ) :
MucEntityCal
( part, segment, layer )
18
{
19
MucBoxCal::Init
();
20
}
21
22
// Copy constructor
23
MucBoxCal::MucBoxCal
(
const
MucBoxCal
&other ) :
MucEntityCal
( other )
24
{
25
;
26
}
27
28
// Operator =
29
MucBoxCal
&
MucBoxCal::operator =
(
const
MucBoxCal
&other )
30
{
31
if
(
this
== &other)
return
*
this
;
32
33
MucEntityCal::operator =
(other);
34
35
return
*
this
;
36
}
37
38
// Destructor
39
MucBoxCal::~MucBoxCal
()
40
{
41
;
42
}
43
44
// Initialize
45
void
MucBoxCal::Init
()
46
{
47
SetTheta
();
48
SetRin
();
49
SetRout
();
50
SetRc
();
51
52
SetThin
();
53
SetW
();
54
SetWu
();
55
SetWd
();
56
SetH
();
57
SetL
();
58
SetArea
();
59
}
60
61
//------------------------------- Set motheds -------------------------
62
void
MucBoxCal::SetTheta
()
63
{
64
if
(
m_Part
==
BRID
)
65
m_Theta
=
m_Segment
* (
PI
/4.0 );
66
else
67
m_Theta
= (
m_Segment
+ 1 ) * (
PI
/4.0 );
68
}
69
70
void
MucBoxCal::SetRin
()
71
{
72
if
(
m_Part
==
BRID
)
73
m_Rin
= B_AS_RMIN[
m_Layer
] - ( AS_GAP + BOX_TH ) / 2.0;
74
else
75
m_Rin
= E_GP_RMIN[
m_Layer
] - E_STRPLN_DR;
76
}
77
78
void
MucBoxCal::SetRout
()
79
{
80
if
(
m_Part
==
BRID
)
81
m_Rout
= B_AS_RMIN[
m_Layer
] -( AS_GAP - BOX_TH ) / 2.0;
82
else
83
m_Rout
= E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[(
m_Layer
==0)?0:1];
84
}
85
86
void
MucBoxCal::SetRc
()
87
{
88
if
(
m_Part
==
BRID
)
89
m_Rc
= B_AS_RMIN[
m_Layer
] - AS_GAP/2.0;
90
else
91
m_Rc
= (
m_Rin
+
m_Rout
)/2.0;
92
}
93
94
void
MucBoxCal::SetThin
()
95
{
96
m_Thin
= BOX_TH;
97
}
98
99
void
MucBoxCal::SetW
()
100
{
101
if
(
m_Part
==
BRID
) {
102
m_W
= B_BOX_WT[
m_Layer
];
103
}
104
else
{
105
m_W
= E_AS_RMAX - E_BOX_DR - E_GP_DX;
106
}
107
}
108
109
void
MucBoxCal::SetH
()
110
{
111
if
(
m_Part
==
BRID
)
112
m_H
= BOX_TH;
113
else
114
m_H
= E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[(
m_Layer
==0)?0:1] - E_STRPLN_DR - E_GP_RMIN[
m_Layer
];
115
}
116
117
void
MucBoxCal::SetL
()
118
{
119
if
(
m_Part
==
BRID
)
120
m_L
= B_BOX_LT;
121
else
122
m_L
= BOX_TH;
123
}
124
125
void
MucBoxCal::SetWu
()
126
{
127
if
(
m_Part
==
BRID
)
128
m_Wu
=
m_W
;
129
else
130
m_Wu
= 2 * VALUE *
m_Rin
;
131
}
132
133
void
MucBoxCal::SetWd
()
134
{
135
if
(
m_Part
==
BRID
)
136
m_Wd
=
m_W
;
137
else
138
m_Wd
= 2 * VALUE *
m_Rout
;
139
}
140
141
void
MucBoxCal::SetArea
()
142
{
143
if
(
m_Part
==
BRID
) {
144
m_Area
=
m_W
*
m_L
;
145
if
(
m_Segment
== B_TOP )
m_Area
-= B_BOX_SLOT_WT*B_TOPRPC_LTS[(
m_Layer
==0)?1:(
m_Layer
%2)];
146
}
147
else
148
m_Area
= (
m_Wu
+
m_Wd
)*
m_H
- (E_GP_DX + E_GP_DY + 2*E_STRPLN_DA)*
m_H
;
149
150
m_Area
/= 100;
// mm^2 -> cm^2
151
}
152
153
// END
PI
#define PI
Definition
EvtD0ToKKpi0.cc:41
MucBoxCal.h
BRID
const int BRID
Definition
MucMappingAlg/MucMappingAlg-00-01-00/MucMappingAlg/MucGeoConst.h:18
MucStructConst.h
MucBoxCal
Definition
MucBoxCal.h:18
MucBoxCal::SetThin
virtual void SetThin()
Definition
MucBoxCal.cxx:94
MucBoxCal::SetArea
virtual void SetArea()
Definition
MucBoxCal.cxx:141
MucBoxCal::MucBoxCal
MucBoxCal(int part, int segment, int layer)
Definition
MucBoxCal.cxx:17
MucBoxCal::~MucBoxCal
~MucBoxCal()
Definition
MucBoxCal.cxx:39
MucBoxCal::SetL
virtual void SetL()
Definition
MucBoxCal.cxx:117
MucBoxCal::SetH
virtual void SetH()
Definition
MucBoxCal.cxx:109
MucBoxCal::SetWu
virtual void SetWu()
Definition
MucBoxCal.cxx:125
MucBoxCal::operator=
MucBoxCal & operator=(const MucBoxCal &other)
Definition
MucBoxCal.cxx:29
MucBoxCal::SetRin
virtual void SetRin()
Definition
MucBoxCal.cxx:70
MucBoxCal::Init
virtual void Init()
Definition
MucBoxCal.cxx:45
MucBoxCal::SetRout
virtual void SetRout()
Definition
MucBoxCal.cxx:78
MucBoxCal::SetTheta
virtual void SetTheta()
Definition
MucBoxCal.cxx:62
MucBoxCal::SetWd
virtual void SetWd()
Definition
MucBoxCal.cxx:133
MucBoxCal::SetW
virtual void SetW()
Definition
MucBoxCal.cxx:99
MucBoxCal::SetRc
virtual void SetRc()
Definition
MucBoxCal.cxx:86
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_Area
double m_Area
Definition
MucEntityCal.h:75
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
std
Definition
RootEventData/RootEventData_rootcint.cxx:38
7.1.1
Muc
MucCalibAlg
MucCalibAlg-00-03-00
src
MucBoxCal.cxx
Generated by
1.12.0