BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcShower.cxx
Go to the documentation of this file.
1
2#include "EmcBhaCalib/EmcShower.h"
3//#include "CLHEP/Units/PhysicalConstants.h"
4
5//----------------
6// Constructors --
7//----------------
9 m_energy(0.0),
10 m_theta(999.),
11 m_phi(999.),
12 m_module(999),
13 m_thetaIndex(9999),
14 m_phiIndex(9999),
15 m_numberOfDigis(0),
16 m_where(0,0,0),
17 m_x(0.),
18 m_y(0.),
19 m_z(0.)
20{
21 m_maxima=EmcShDigi();
22}
23
24//--------------
25// Destructor --
26//--------------
28{
29}
30
31//Copy and assignment
33{
34 m_energy=aShower.energy();
35 m_theta=aShower.theta();
36 m_phi=aShower.phi();
37 m_module=aShower.module();
38 m_thetaIndex=aShower.thetaIndex();
39 m_phiIndex=aShower.phiIndex();
40 m_numberOfDigis=aShower.numberOfDigis();
41 m_digiList=aShower.digiList();
42 m_maxima=aShower.maxima();
43 m_where = aShower.where();
44 m_x=aShower.x();
45 m_y=aShower.y();
46 m_z=aShower.z();
47}
48
50{
51 if(this!=&aShower)
52 {
53 m_energy=aShower.energy();
54 m_theta=aShower.theta();
55 m_phi=aShower.phi();
56 m_module=aShower.module();
57 m_thetaIndex=aShower.thetaIndex();
58 m_phiIndex=aShower.phiIndex();
59 m_numberOfDigis=aShower.numberOfDigis();
60 m_digiList=aShower.digiList();
61 m_maxima=aShower.maxima();
62 m_where = aShower.where();
63 m_x=aShower.x();
64 m_y=aShower.y();
65 m_z=aShower.z();
66 }
67
68 return *this;
69}
70
71bool
72EmcShower::operator==( const EmcShower& otherShower ) const
73{
74 bool equal=false;
75
76 if ( this->theta() == otherShower.theta()
77 && this->phi() == otherShower.phi()
78 && this->energy() == otherShower.energy() )
79 {
80 equal=true;
81 }
82
83 return equal;
84}
85
86bool
87EmcShower::operator>=( const EmcShower& otherShower ) const
88{
89 bool Gequal=false;
90
91 if ( this->energy() >= otherShower.energy() )
92 {
93 Gequal=true;
94 }
95
96 return Gequal;
97}
98
99bool
100EmcShower::operator<=( const EmcShower& otherShower ) const
101{
102 bool Lequal=false;
103
104 if ( this->energy() <= otherShower.energy() )
105 {
106 Lequal=true;
107 }
108
109 return Lequal;
110}
111
112bool
113EmcShower::operator>( const EmcShower& otherShower ) const
114{
115 bool Large=false;
116
117 if ( this->energy() > otherShower.energy() )
118 {
119 Large=true;
120 }
121
122 return Large;
123}
124
125bool
126EmcShower::operator<( const EmcShower& otherShower ) const
127{
128 bool Less=false;
129
130 if ( this->energy() < otherShower.energy() )
131 {
132 Less=true;
133 }
134
135 return Less;
136}
137
138//-------------
139// Modifiers --
140//-------------
141void
143{
144 m_digiList.push_back(theDigi);
145
146}
bool operator==(const EmcShower &otherShower) const
Definition: EmcShower.cxx:72
bool operator<=(const EmcShower &otherShower) const
Definition: EmcShower.cxx:100
bool operator>=(const EmcShower &otherShower) const
Definition: EmcShower.cxx:87
bool operator<(const EmcShower &otherShower) const
Definition: EmcShower.cxx:126
void addDigi(EmcShDigi d)
Definition: EmcShower.cxx:142
EmcShower & operator=(const EmcShower &aShower)
Definition: EmcShower.cxx:49
bool operator>(const EmcShower &otherShower) const
Definition: EmcShower.cxx:113