BOSS 8.0.0
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, <ygxie@mail.ihep.ac.cn> |
5// [Date ]: May 22, 2005 |
6//------------------------------------------------------------------------------|
7
8#include <cmath>
9#include <iostream>
10
11#include "MucCalib/MucGapCal.h"
12#include "MucCalib/MucStructConst.h"
13
14using namespace std;
15
16// Constructor
17MucGapCal::MucGapCal( int part, int segment, int layer )
18 : MucEntityCal( part, segment, layer ) {
20 m_MucBoxCal = NULL;
21}
22
23// Copy constructor
24MucGapCal::MucGapCal( const MucGapCal& other ) : MucEntityCal( other ) {
25 m_MucBoxCal = other.m_MucBoxCal;
26}
27
28// Operator =
30 if ( this == &other ) return *this;
32 m_MucBoxCal = other.m_MucBoxCal;
33
34 return *this;
35}
36
37// Destructor
38MucGapCal::~MucGapCal() { delete m_MucBoxCal; }
39
40// Initialize
42 SetTheta();
43 SetRin();
44 SetRout();
45 SetRc();
46
47 SetThin();
48 SetW();
49 SetWu();
50 SetWd();
51 SetH();
52 SetL();
53}
54
55// ------------------- Get methods --------------------
56
58 if ( m_MucBoxCal != NULL ) return m_MucBoxCal;
59 else return ( m_MucBoxCal = new MucBoxCal( m_Part, m_Segment, m_Layer ) );
60}
61
62// --------------------- Set motheds ----------------------
64 if ( m_Part == BRID ) m_Theta = m_Segment * ( PI / 4.0 );
65 else m_Theta = ( 2 * m_Segment + 1 ) * ( PI / 4.0 );
66}
67
69 if ( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - AS_GAP;
70 else m_Rin = 0.;
71}
72
74 if ( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer];
75 else m_Rout = E_AS_RMAX;
76}
77
79 if ( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP / 2.0;
80 else m_Rc = sqrt( 2.0 ) * E_AS_RMAX / 2.0;
81}
82
83void MucGapCal::SetThin() { m_Thin = AS_GAP; }
84
86 if ( m_Part == BRID ) m_W = B_GP_WT[m_Layer];
87 else m_W = E_AS_RMAX - E_GP_DX;
88}
89
91 if ( m_Part == BRID ) m_H = AS_GAP - 0.2; // avoid overlap between absorber and gap
92 else m_H = E_AS_RMAX - E_GP_DY;
93}
94
96 if ( m_Part == BRID ) m_L = B_GP_LT;
97 else m_L = AS_GAP;
98}
99
101
103
104// END
#define PI
MucEntityCal(int part, int segment, int layer)
MucEntityCal & operator=(const MucEntityCal &other)
virtual void SetWd()
virtual void Init()
Definition MucGapCal.cxx:41
virtual void SetH()
Definition MucGapCal.cxx:90
virtual void SetWu()
virtual void SetW()
Definition MucGapCal.cxx:85
MucGapCal & operator=(const MucGapCal &other)
Definition MucGapCal.cxx:29
MucGapCal(int part, int segment, int layer)
Definition MucGapCal.cxx:17
virtual void SetRc()
Definition MucGapCal.cxx:78
MucBoxCal * GetBox()
Definition MucGapCal.cxx:57
virtual void SetL()
Definition MucGapCal.cxx:95
virtual void SetRout()
Definition MucGapCal.cxx:73
virtual void SetRin()
Definition MucGapCal.cxx:68
virtual void SetThin()
Definition MucGapCal.cxx:83
virtual void SetTheta()
Definition MucGapCal.cxx:63