BOSS 8.0.0
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, <ygxie@mail.ihep.ac.cn> |
5// [Date ]: May 22, 2005 |
6//------------------------------------------------------------------------------|
7
8#include <cmath>
9#include <iostream>
10
11#include "MucCalib/MucBoxCal.h"
12#include "MucCalib/MucStructConst.h"
13
14using namespace std;
15
16// Constructor
17MucBoxCal::MucBoxCal( int part, int segment, int layer )
18 : MucEntityCal( part, segment, layer ) {
20}
21
22// Copy constructor
23MucBoxCal::MucBoxCal( const MucBoxCal& other ) : MucEntityCal( other ) { ; }
24
25// Operator =
27 if ( this == &other ) return *this;
28
30
31 return *this;
32}
33
34// Destructor
36
37// Initialize
39 SetTheta();
40 SetRin();
41 SetRout();
42 SetRc();
43
44 SetThin();
45 SetW();
46 SetWu();
47 SetWd();
48 SetH();
49 SetL();
50 SetArea();
51}
52
53//------------------------------- Set motheds -------------------------
55 if ( m_Part == BRID ) m_Theta = m_Segment * ( PI / 4.0 );
56 else m_Theta = ( m_Segment + 1 ) * ( PI / 4.0 );
57}
58
60 if ( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
61 else m_Rin = E_GP_RMIN[m_Layer] - E_STRPLN_DR;
62}
63
65 if ( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer] - ( AS_GAP - BOX_TH ) / 2.0;
66 else m_Rout = E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[( m_Layer == 0 ) ? 0 : 1];
67}
68
70 if ( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP / 2.0;
71 else m_Rc = ( m_Rin + m_Rout ) / 2.0;
72}
73
74void MucBoxCal::SetThin() { m_Thin = BOX_TH; }
75
77 if ( m_Part == BRID ) { m_W = B_BOX_WT[m_Layer]; }
78 else { m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX; }
79}
80
82 if ( m_Part == BRID ) m_H = BOX_TH;
83 else
84 m_H = E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[( m_Layer == 0 ) ? 0 : 1] - E_STRPLN_DR -
85 E_GP_RMIN[m_Layer];
86}
87
89 if ( m_Part == BRID ) m_L = B_BOX_LT;
90 else m_L = BOX_TH;
91}
92
94 if ( m_Part == BRID ) m_Wu = m_W;
95 else m_Wu = 2 * VALUE * m_Rin;
96}
97
99 if ( m_Part == BRID ) m_Wd = m_W;
100 else m_Wd = 2 * VALUE * m_Rout;
101}
102
104 if ( m_Part == BRID )
105 {
106 m_Area = m_W * m_L;
107 if ( m_Segment == B_TOP )
108 m_Area -= B_BOX_SLOT_WT * B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )];
109 }
110 else m_Area = ( m_Wu + m_Wd ) * m_H - ( E_GP_DX + E_GP_DY + 2 * E_STRPLN_DA ) * m_H;
111
112 m_Area /= 100; // mm^2 -> cm^2
113}
114
115// END
#define PI
virtual void SetThin()
Definition MucBoxCal.cxx:74
virtual void SetArea()
MucBoxCal(int part, int segment, int layer)
Definition MucBoxCal.cxx:17
virtual void SetL()
Definition MucBoxCal.cxx:88
virtual void SetH()
Definition MucBoxCal.cxx:81
virtual void SetWu()
Definition MucBoxCal.cxx:93
MucBoxCal & operator=(const MucBoxCal &other)
Definition MucBoxCal.cxx:26
virtual void SetRin()
Definition MucBoxCal.cxx:59
virtual void Init()
Definition MucBoxCal.cxx:38
virtual void SetRout()
Definition MucBoxCal.cxx:64
virtual void SetTheta()
Definition MucBoxCal.cxx:54
virtual void SetWd()
Definition MucBoxCal.cxx:98
virtual void SetW()
Definition MucBoxCal.cxx:76
virtual void SetRc()
Definition MucBoxCal.cxx:69
MucEntityCal(int part, int segment, int layer)
MucEntityCal & operator=(const MucEntityCal &other)