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

Go to the documentation of this file.
00001 
00002 #include "EmcBhaCalib/EmcShower.h"
00003 //#include "CLHEP/Units/PhysicalConstants.h"
00004 
00005 //----------------
00006 // Constructors --
00007 //----------------
00008 EmcShower::EmcShower():
00009   m_energy(0.0),
00010   m_theta(999.),
00011   m_phi(999.),
00012   m_module(999),
00013   m_thetaIndex(9999),
00014   m_phiIndex(9999),
00015   m_numberOfDigis(0),
00016   m_where(0,0,0),
00017   m_x(0.),
00018   m_y(0.),
00019   m_z(0.)
00020 {
00021   m_maxima=EmcShDigi();
00022 }
00023 
00024 //--------------
00025 // Destructor --
00026 //--------------
00027 EmcShower::~EmcShower()
00028 {
00029 }
00030 
00031 //Copy and assignment
00032 EmcShower::EmcShower(const EmcShower& aShower) 
00033 {
00034   m_energy=aShower.energy();
00035   m_theta=aShower.theta();
00036   m_phi=aShower.phi();
00037   m_module=aShower.module();
00038   m_thetaIndex=aShower.thetaIndex();
00039   m_phiIndex=aShower.phiIndex();
00040   m_numberOfDigis=aShower.numberOfDigis();
00041   m_digiList=aShower.digiList();
00042   m_maxima=aShower.maxima();
00043   m_where = aShower.where();
00044   m_x=aShower.x();
00045   m_y=aShower.y();
00046   m_z=aShower.z();
00047 }
00048   
00049 EmcShower& EmcShower::operator=(const EmcShower& aShower)
00050 {
00051    if(this!=&aShower)
00052      {
00053        m_energy=aShower.energy();
00054        m_theta=aShower.theta();
00055        m_phi=aShower.phi();
00056        m_module=aShower.module();
00057        m_thetaIndex=aShower.thetaIndex();
00058        m_phiIndex=aShower.phiIndex();
00059        m_numberOfDigis=aShower.numberOfDigis();
00060        m_digiList=aShower.digiList();
00061        m_maxima=aShower.maxima();
00062        m_where = aShower.where();
00063        m_x=aShower.x();
00064        m_y=aShower.y();
00065        m_z=aShower.z();
00066      }
00067 
00068    return *this;
00069 }
00070 
00071 bool
00072 EmcShower::operator==( const EmcShower& otherShower ) const
00073 {
00074   bool equal=false;
00075 
00076   if ( this->theta() == otherShower.theta() 
00077        && this->phi() == otherShower.phi() 
00078        && this->energy() == otherShower.energy() ) 
00079     {
00080       equal=true;
00081     }
00082 
00083   return equal;
00084 }
00085 
00086 bool
00087 EmcShower::operator>=( const EmcShower& otherShower ) const
00088 {
00089   bool Gequal=false;
00090 
00091   if ( this->energy() >= otherShower.energy() ) 
00092     {
00093       Gequal=true;
00094     }
00095   
00096   return Gequal;
00097 }
00098 
00099 bool
00100 EmcShower::operator<=( const EmcShower& otherShower ) const
00101 {
00102   bool Lequal=false;
00103 
00104   if ( this->energy() <= otherShower.energy() ) 
00105     {
00106       Lequal=true;
00107     }
00108   
00109   return Lequal;
00110 }
00111 
00112 bool
00113 EmcShower::operator>( const EmcShower& otherShower ) const
00114 {
00115   bool Large=false;
00116 
00117   if ( this->energy() > otherShower.energy() ) 
00118     {
00119       Large=true;
00120     }
00121 
00122   return Large;
00123 }
00124 
00125 bool
00126 EmcShower::operator<( const EmcShower& otherShower ) const
00127 {
00128   bool Less=false;
00129 
00130   if ( this->energy() < otherShower.energy() ) 
00131     {
00132       Less=true;
00133     }
00134 
00135   return Less;
00136 }
00137 
00138 //-------------
00139 // Modifiers --
00140 //-------------
00141 void
00142 EmcShower::addDigi( EmcShDigi theDigi )
00143 { 
00144   m_digiList.push_back(theDigi); 
00145 
00146 }

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