00001 //-------------------------------------------------------------------------- 00002 // Environment: 00003 // This software was developed for the BESIII collaboration. If you 00004 // use all or part of it, please give an appropriate acknowledgement. 00005 // 00006 // Author List: 00007 // ChunXiu Liu IHEP 00008 // 00009 //------------------------------------------------------------------------ 00010 00011 #ifndef EMCBHABHA_H 00012 #define EMCBHABHA_H 00013 #include "EmcBhaCalib/EmcShDigi.h" 00014 #include "EmcBhaCalib/EmcShower.h" 00015 #include <iostream> 00016 using namespace std; 00017 00018 // --------------------- 00019 // -- Class Interface -- 00020 // --------------------- 00021 00029 class EmcBhabha 00030 { 00031 public: 00032 00033 // Constructors 00034 EmcBhabha(); 00035 00036 // copy 00037 EmcBhabha(const EmcBhabha& otherBhabha); 00038 00039 // Destructor 00040 ~EmcBhabha( ); 00041 00042 // Was the particle found in event ? 00043 const bool& found() {return m_found;} 00044 00045 // the energy to calibrate on 00046 const double& calibEnergy() const {return m_calibEnergy;} 00047 00048 // the error on the energy to calibrate on 00049 const double& errorOnCalibEnergy() const {return m_errCalibEnergy;} 00050 00051 //error on the measured shower energy 00052 double errorOnShowerEnergy() const; 00053 00054 //the cluster of this bhabha 00055 EmcShower shower() const {return m_shower;} 00056 00057 // its theta 00058 00059 const double& theta() const 00060 { 00061 if ( m_theta < 0 ) 00062 { 00063 cout<<"warning: " << " EmcBhabha::theta not yet set !" << endl; 00064 } 00065 return m_theta; 00066 } 00067 00068 const double& phi() const 00069 { 00070 return m_phi; 00071 } 00072 00073 const unsigned int & thetaIndex() const 00074 { 00075 return m_thetaIndex; 00076 } 00077 00078 const unsigned int& phiIndex() const 00079 { 00080 return m_phiIndex; 00081 } 00082 00083 void print(); 00084 00085 //this is the error on the Bhabha (measurement error + 00086 // error on the energy to calibrate on) 00087 double sigma2() const; 00088 00089 void setFound(bool what) {m_found=what;} 00090 void setCalibEnergy(double energy) {m_calibEnergy=energy;} 00091 void setErrorOnCalibEnergy(double error) { m_errCalibEnergy = error;} 00092 void setShower(EmcShower aShower){ m_shower=aShower;} 00093 void setTheta(double theta) {m_theta=theta;} 00094 void setPhi(double phi) {m_phi=phi;} 00095 void setThetaIndex(unsigned int thetaIndex) {m_thetaIndex=thetaIndex;} 00096 void setPhiIndex(unsigned int phiIndex) {m_phiIndex=phiIndex;} 00097 00098 private: 00099 00100 // the energy to calibrate on (either the true or the deposited cluster energy 00101 double m_calibEnergy; 00102 00103 // error of the energy to calibrate on 00104 double m_errCalibEnergy; 00105 00106 // shower of bhabha particle 00107 EmcShower m_shower; 00108 00109 // theta of Bhabha 00110 double m_theta; 00111 00112 double m_phi; 00113 00114 // was Bhabha found in event ? 00115 bool m_found; 00116 00117 // the theta index of the shower 00118 // from east endcap(0-5) ,barrel(6-49) to west endcap (50-55) 00119 unsigned int m_thetaIndex; 00120 00121 // the phi index of the shower 00122 unsigned int m_phiIndex; 00123 }; 00124 00125 #endif //EMCBHABHA_H