00001
00002
00003 #include "EmcBhaCalib/EmcShDigi.h"
00004
00005
00006
00007
00008 EmcShDigi::EmcShDigi():
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_time(0.0),
00016 m_fraction(0.),
00017 m_where(0,0,0),
00018 m_x(0),
00019 m_y(0),
00020 m_z(0)
00021 {
00022
00023 }
00024
00025
00026
00027
00028 EmcShDigi::~EmcShDigi()
00029 {
00030 }
00031
00032
00033 EmcShDigi::EmcShDigi(const EmcShDigi& aDigi)
00034 {
00035 m_energy=aDigi.energy();
00036 m_theta=aDigi.theta();
00037 m_phi=aDigi.phi();
00038 m_module=aDigi.module();
00039 m_thetaIndex=aDigi.thetaIndex();
00040 m_phiIndex=aDigi.phiIndex();
00041 m_time=aDigi.time();
00042 m_fraction=aDigi.fraction();
00043 m_where = aDigi.where();
00044 m_x=aDigi.x();
00045 m_y=aDigi.y();
00046 m_z=aDigi.z();
00047 }
00048
00049 EmcShDigi& EmcShDigi::operator=(const EmcShDigi& aDigi)
00050 {
00051 if(this!=&aDigi)
00052 {
00053 m_energy=aDigi.energy();
00054 m_theta=aDigi.theta();
00055 m_phi=aDigi.phi();
00056 m_module=aDigi.module();
00057 m_thetaIndex=aDigi.thetaIndex();
00058 m_phiIndex=aDigi.phiIndex();
00059 m_time=aDigi.time();
00060 m_fraction=aDigi.fraction();
00061 m_where = aDigi.where();
00062 m_x=aDigi.x();
00063 m_y=aDigi.y();
00064 m_z=aDigi.z();
00065 }
00066
00067 return *this;
00068 }
00069
00070 bool
00071 EmcShDigi::operator==( const EmcShDigi& otherDigi ) const
00072 {
00073 bool equal=false;
00074
00075 if ( this->energy() == otherDigi.energy()
00076 && this->theta() == otherDigi.theta()
00077 && this->phi() == otherDigi.phi()
00078 && this->time() == otherDigi.time()
00079 && this->fraction() == otherDigi.fraction() )
00080 {
00081 equal=true;
00082 }
00083
00084 return equal;
00085 }
00086
00087 bool
00088 EmcShDigi::operator>=( const EmcShDigi& otherDigi ) const
00089 {
00090 bool Gequal=false;
00091
00092 if ( this->energy() >= otherDigi.energy())
00093 {
00094 Gequal=true;
00095 }
00096
00097 return Gequal;
00098 }
00099
00100 bool
00101 EmcShDigi::operator<=( const EmcShDigi& otherDigi ) const
00102 {
00103 bool Lequal=false;
00104
00105 if ( this->energy() <= otherDigi.energy())
00106 {
00107 Lequal=true;
00108 }
00109 return Lequal;
00110 }
00111
00112 bool
00113 EmcShDigi::operator>( const EmcShDigi& otherDigi ) const
00114 {
00115 bool Large=false;
00116
00117 if ( this->energy() > otherDigi.energy())
00118 {
00119 Large=true;
00120 }
00121
00122 return Large;
00123 }
00124
00125 bool
00126 EmcShDigi::operator<( const EmcShDigi& otherDigi ) const
00127 {
00128 bool Less=false;
00129
00130 if ( this->energy() < otherDigi.energy())
00131 {
00132 Less=true;
00133 }
00134
00135 return Less;
00136 }