/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Muc/MucCalibAlg/MucCalibAlg-00-02-16/src/MucGapCal.cxx

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------|
00002 //      [File  ]:                       MucGapCal.cxx                              |
00003 //      [Brief ]:       MUC geometry yoke creating class                        |
00004 //      [Author]:       Xie Yuguang, <ygxie@mail.ihep.ac.cn>                    |
00005 //      [Date  ]:       May 22, 2005                                            |
00006 //------------------------------------------------------------------------------|
00007 
00008 #include <iostream>
00009 #include <cmath>
00010 
00011 #include "MucCalibAlg/MucStructConst.h"
00012 #include "MucCalibAlg/MucGapCal.h"
00013 
00014 using namespace std;
00015 
00016 // Constructor
00017 MucGapCal::MucGapCal( int part, int segment, int layer ) : MucEntityCal( part, segment, layer )
00018 {
00019   MucGapCal::Init();
00020   m_MucBoxCal = NULL;
00021 }
00022 
00023 // Copy constructor             
00024 MucGapCal::MucGapCal( const MucGapCal &other ) : MucEntityCal( other )
00025 {
00026   m_MucBoxCal  = other.m_MucBoxCal;
00027 }
00028 
00029 // Operator =
00030 MucGapCal& MucGapCal::operator =( const MucGapCal &other )
00031 {
00032   if( this == &other) return *this;
00033   MucEntityCal::operator =(other);
00034   m_MucBoxCal = other.m_MucBoxCal;
00035 
00036   return *this; 
00037 }
00038 
00039 // Destructor
00040 MucGapCal::~MucGapCal()
00041 {       
00042  delete m_MucBoxCal;
00043 }
00044 
00045 // Initialize
00046 void MucGapCal::Init()
00047 {
00048   SetTheta();
00049   SetRin();
00050   SetRout();
00051   SetRc();
00052   
00053   SetThin();
00054   SetW();
00055   SetWu();
00056   SetWd();
00057   SetH();
00058   SetL();
00059 }
00060 
00061 // ------------------- Get methods --------------------
00062 
00063 MucBoxCal* MucGapCal::GetBox( )
00064 {
00065   if( m_MucBoxCal != NULL ) 
00066     return m_MucBoxCal;
00067   else
00068     return ( m_MucBoxCal = new MucBoxCal(m_Part, m_Segment, m_Layer) );
00069 }
00070 
00071 
00072 // --------------------- Set motheds ----------------------
00073 void MucGapCal::SetTheta() {
00074   if( m_Part == BRID )  m_Theta = m_Segment * ( PI/4.0 );
00075   else                  m_Theta = ( 2*m_Segment + 1 ) * ( PI/4.0 );
00076 }
00077 
00078 void MucGapCal::SetRin() {
00079   if( m_Part == BRID )  m_Rin = B_AS_RMIN[m_Layer] - AS_GAP;
00080   else                  m_Rin = 0.;
00081 }
00082 
00083 void MucGapCal::SetRout() {
00084   if( m_Part == BRID )  m_Rout = B_AS_RMIN[m_Layer];
00085   else                  m_Rout = E_AS_RMAX;
00086 }
00087 
00088 void MucGapCal::SetRc() {
00089   if( m_Part == BRID )  m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
00090   else                  m_Rc = sqrt(2.0) * E_AS_RMAX / 2.0;
00091 }
00092 
00093 void MucGapCal::SetThin() {
00094   m_Thin = AS_GAP;
00095 }
00096 
00097 void MucGapCal::SetW() {
00098   if( m_Part == BRID) m_W = B_GP_WT[m_Layer];
00099   else                m_W = E_AS_RMAX - E_GP_DX;
00100 }
00101 
00102 void MucGapCal::SetH()
00103 {
00104   if( m_Part == BRID )
00105     m_H = AS_GAP-0.2; // avoid overlap between absorber and gap
00106   else
00107     m_H = E_AS_RMAX - E_GP_DY;
00108 }
00109 
00110 void MucGapCal::SetL() {
00111   if( m_Part == BRID )  m_L = B_GP_LT;
00112   else                  m_L = AS_GAP;
00113 }
00114 
00115 void MucGapCal::SetWu() {
00116   m_Wu = m_W;
00117 }
00118 
00119 void MucGapCal::SetWd() {
00120   m_Wd = m_W;
00121 }
00122 
00123 // END

Generated on Tue Nov 29 23:12:55 2016 for BOSS_7.0.2 by  doxygen 1.4.7