BOSS 6.6.4.p03
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
13
14using namespace std;
15
16// Constructor
17MucGapCal::MucGapCal( int part, int segment, int layer ) : MucEntityCal( part, segment, layer )
18{
20 m_MucBoxCal = NULL;
21}
22
23// Copy constructor
25{
26 m_MucBoxCal = other.m_MucBoxCal;
27}
28
29// Operator =
31{
32 if( this == &other) return *this;
34 m_MucBoxCal = other.m_MucBoxCal;
35
36 return *this;
37}
38
39// Destructor
41{
42 delete m_MucBoxCal;
43}
44
45// Initialize
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
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 ----------------------
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
79 if( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - AS_GAP;
80 else m_Rin = 0.;
81}
82
84 if( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer];
85 else m_Rout = E_AS_RMAX;
86}
87
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
94 m_Thin = AS_GAP;
95}
96
98 if( m_Part == BRID) m_W = B_GP_WT[m_Layer];
99 else m_W = E_AS_RMAX - E_GP_DX;
100}
101
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
111 if( m_Part == BRID ) m_L = B_GP_LT;
112 else m_L = AS_GAP;
113}
114
116 m_Wu = m_W;
117}
118
120 m_Wd = m_W;
121}
122
123// END
const double PI
Definition: PipiJpsi.cxx:55
double m_Rout
Definition: MucEntityCal.h:67
double m_Thin
Definition: MucEntityCal.h:69
double m_Theta
Definition: MucEntityCal.h:63
double m_Rin
Definition: MucEntityCal.h:66
MucEntityCal & operator=(const MucEntityCal &other)
virtual void SetWd()
Definition: MucGapCal.cxx:119
virtual void Init()
Definition: MucGapCal.cxx:46
virtual void SetH()
Definition: MucGapCal.cxx:102
virtual void SetWu()
Definition: MucGapCal.cxx:115
virtual void SetW()
Definition: MucGapCal.cxx:97
MucGapCal & operator=(const MucGapCal &other)
Definition: MucGapCal.cxx:30
MucGapCal(int part, int segment, int layer)
Definition: MucGapCal.cxx:17
virtual void SetRc()
Definition: MucGapCal.cxx:88
MucBoxCal * GetBox()
Definition: MucGapCal.cxx:63
virtual void SetL()
Definition: MucGapCal.cxx:110
virtual void SetRout()
Definition: MucGapCal.cxx:83
virtual void SetRin()
Definition: MucGapCal.cxx:78
virtual void SetThin()
Definition: MucGapCal.cxx:93
virtual void SetTheta()
Definition: MucGapCal.cxx:73