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

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------|
00002 //      [File  ]:                       MucBoxCal.cxx                           |
00003 //      [Brief ]:       MUC geometry box creating class for calibration         |
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/MucBoxCal.h"
00013 
00014 using namespace std;
00015 
00016 // Constructor
00017 MucBoxCal::MucBoxCal( int part, int segment, int layer ) : MucEntityCal( part, segment, layer )
00018 {
00019   MucBoxCal::Init();
00020 }
00021 
00022 // Copy constructor             
00023 MucBoxCal::MucBoxCal( const MucBoxCal &other ) : MucEntityCal( other )
00024 {
00025   ;
00026 }
00027 
00028 // Operator =
00029 MucBoxCal& MucBoxCal::operator =( const MucBoxCal &other )
00030 {
00031   if( this == &other) return *this;
00032 
00033   MucEntityCal::operator =(other);
00034 
00035   return *this; 
00036 }
00037 
00038 // Destructor
00039 MucBoxCal::~MucBoxCal()
00040 {
00041   ;     
00042 }
00043 
00044 // Initialize
00045 void MucBoxCal::Init()
00046 {
00047   SetTheta();
00048   SetRin();
00049   SetRout();
00050   SetRc();
00051   
00052   SetThin();
00053   SetW();
00054   SetWu();
00055   SetWd();
00056   SetH();
00057   SetL();
00058   SetArea();
00059 }
00060                 
00061 //------------------------------- Set motheds -------------------------
00062 void MucBoxCal::SetTheta()
00063 {
00064   if( m_Part == BRID )
00065     m_Theta = m_Segment * ( PI/4.0 );
00066   else
00067     m_Theta = ( m_Segment + 1 ) * ( PI/4.0 );
00068 }
00069 
00070 void MucBoxCal::SetRin()
00071 {
00072   if( m_Part == BRID )
00073     m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
00074   else
00075     m_Rin = E_GP_RMIN[m_Layer] - E_STRPLN_DR;
00076 }
00077 
00078 void MucBoxCal::SetRout()
00079 {
00080   if( m_Part == BRID )
00081     m_Rout = B_AS_RMIN[m_Layer] -( AS_GAP - BOX_TH ) / 2.0;
00082   else
00083     m_Rout = E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[(m_Layer==0)?0:1];
00084 }
00085 
00086 void MucBoxCal::SetRc()
00087 {
00088   if( m_Part == BRID )
00089     m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
00090   else
00091     m_Rc = (m_Rin + m_Rout)/2.0;
00092 }
00093 
00094 void MucBoxCal::SetThin()
00095 {
00096   m_Thin = BOX_TH;
00097 }
00098 
00099 void MucBoxCal::SetW()
00100 {
00101   if( m_Part == BRID) {
00102     m_W = B_BOX_WT[m_Layer];
00103   }
00104   else {
00105     m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
00106   }
00107 }
00108 
00109 void MucBoxCal::SetH()
00110 {
00111   if( m_Part == BRID )
00112     m_H = BOX_TH;
00113   else
00114     m_H = E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[(m_Layer==0)?0:1] - E_STRPLN_DR - E_GP_RMIN[m_Layer];
00115 }
00116 
00117 void MucBoxCal::SetL()
00118 {
00119   if( m_Part == BRID )
00120     m_L = B_BOX_LT;
00121   else
00122     m_L = BOX_TH;
00123 }
00124 
00125 void MucBoxCal::SetWu()
00126 {
00127   if( m_Part == BRID )
00128     m_Wu = m_W;
00129   else
00130     m_Wu = 2 * VALUE * m_Rin ;
00131 }
00132 
00133 void MucBoxCal::SetWd()
00134 {
00135   if( m_Part == BRID )
00136     m_Wd = m_W;
00137   else
00138     m_Wd = 2 * VALUE * m_Rout;
00139 }
00140 
00141 void MucBoxCal::SetArea()
00142 {
00143   if( m_Part == BRID ) {
00144     m_Area = m_W * m_L;
00145     if( m_Segment == B_TOP ) m_Area -= B_BOX_SLOT_WT*B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
00146   }
00147   else
00148     m_Area = (m_Wu + m_Wd)*m_H - (E_GP_DX + E_GP_DY + 2*E_STRPLN_DA)* m_H; 
00149   
00150   m_Area /= 100; // mm^2 -> cm^2
00151 }
00152 
00153 // END

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