/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Emc/EmcCalib/EmcBhaCalib/EmcBhaCalib-00-00-34/src/EmcBhabha.cxx

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //
00004 // Description:
00005 //      Class EmcBhabha - see header
00006 //           
00007 // Environment:
00008 //      Software developed for the BESIII Detector at the BEPCII.
00009 //
00010 // Author List:
00011 //      ChunXiu Liu              IHEP        
00012 //
00013 //------------------------------------------------------------------------
00014 
00015 //-----------------------
00016 // This Class's Header --
00017 //-----------------------
00018 #include "EmcBhaCalib/EmcBhabha.h"
00019 
00020 //---------------
00021 // C++ Headers --
00022 //---------------
00023 #include <iostream>
00024 #include <list>
00025 
00026 using namespace std;
00027 //----------------
00028 // Constructors --
00029 //----------------
00030 EmcBhabha::EmcBhabha() 
00031   :m_calibEnergy(0),
00032    m_errCalibEnergy(0),
00033    m_shower(EmcShower()),
00034    m_theta(-1.),
00035    m_found(false),
00036    m_thetaIndex(9999),
00037    m_phiIndex(9999)
00038 {
00039 
00040 }
00041 
00042 //copy constructor
00043 EmcBhabha::EmcBhabha(const EmcBhabha& otherBhabha) {
00044   m_calibEnergy = otherBhabha.m_calibEnergy;
00045   m_errCalibEnergy = otherBhabha.m_errCalibEnergy;
00046   m_shower = otherBhabha.m_shower;
00047   m_theta = otherBhabha.m_theta;
00048   m_found = otherBhabha.m_found;
00049   m_thetaIndex = otherBhabha.m_thetaIndex;
00050   m_phiIndex = otherBhabha.m_phiIndex;
00051 }
00052 
00053 //--------------
00054 // Destructor --
00055 //--------------
00056 EmcBhabha::~EmcBhabha() {
00057  
00058 }
00059 
00060 double
00061 EmcBhabha::errorOnShowerEnergy() const {
00062 
00063   double sig=0,sig1=0,sig2=0;
00064 
00065   //energy measurement error of calorimeter 
00066   /*
00067   sig1 = 0.0034/shower().energy();
00068   sig1 *= sig1;
00069   sig2 = (0.0070/pow(shower().energy(),0.25));
00070   sig2 *= sig2;
00071   sig = sig1+sig2;
00072   sig += (0.0134*0.0134);
00073   sig = sqrt(sig) * shower().energy();
00074   */
00075   return sig;
00076 }
00077 
00078 double
00079 EmcBhabha::sigma2() const{
00080 
00081   double sigSh=0., sigDepo=0., sig2=0.;
00082 
00083   //error on measured shower energy
00084   sigSh = errorOnShowerEnergy();
00085   
00086   //error of energy to calibrate on
00087   sigDepo = errorOnCalibEnergy();
00088 
00089   sig2 = (sigSh * sigSh) + (sigDepo * sigDepo);
00090   return sig2;
00091 }
00092 
00093 //Acessor
00094 void 
00095 EmcBhabha::print( ) {
00096   
00097   cout << "EmcBhabha: " << endl
00098        << "Energies:  calib: " << calibEnergy()
00099        << "  shower: " << m_shower.energy() 
00100        << " Theta: " << theta()
00101        << "  nr Xtals: " << m_shower.digiList().size() 
00102        << endl
00103        << "Errors: calibEne: " << errorOnCalibEnergy()
00104        << " shower: " << errorOnShowerEnergy()
00105        << " sum: " << sigma2() 
00106        << endl;
00107 
00108 }
00109 

Generated on Tue Nov 29 22:58:15 2016 for BOSS_7.0.2 by  doxygen 1.4.7