CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcShDigi.cxx
Go to the documentation of this file.
1//EmcShDigi.cxx file
2
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_time(0.0),
16 m_fraction(0.),
17 m_where(0,0,0),
18 m_x(0),
19 m_y(0),
20 m_z(0)
21{
22
23}
24
25//--------------
26// Destructor --
27//--------------
31
32//Copy and assignment
34{
35 m_energy=aDigi.energy();
36 m_theta=aDigi.theta();
37 m_phi=aDigi.phi();
38 m_module=aDigi.module();
39 m_thetaIndex=aDigi.thetaIndex();
40 m_phiIndex=aDigi.phiIndex();
41 m_time=aDigi.time();
42 m_fraction=aDigi.fraction();
43 m_where = aDigi.where();
44 m_x=aDigi.x();
45 m_y=aDigi.y();
46 m_z=aDigi.z();
47}
48
50{
51 if(this!=&aDigi)
52 {
53 m_energy=aDigi.energy();
54 m_theta=aDigi.theta();
55 m_phi=aDigi.phi();
56 m_module=aDigi.module();
57 m_thetaIndex=aDigi.thetaIndex();
58 m_phiIndex=aDigi.phiIndex();
59 m_time=aDigi.time();
60 m_fraction=aDigi.fraction();
61 m_where = aDigi.where();
62 m_x=aDigi.x();
63 m_y=aDigi.y();
64 m_z=aDigi.z();
65 }
66
67 return *this;
68}
69
70bool
71EmcShDigi::operator==( const EmcShDigi& otherDigi ) const
72{
73 bool equal=false;
74
75 if ( this->energy() == otherDigi.energy()
76 && this->theta() == otherDigi.theta()
77 && this->phi() == otherDigi.phi()
78 && this->time() == otherDigi.time()
79 && this->fraction() == otherDigi.fraction() )
80 {
81 equal=true;
82 }
83
84 return equal;
85}
86
87bool
88EmcShDigi::operator>=( const EmcShDigi& otherDigi ) const
89{
90 bool Gequal=false;
91
92 if ( this->energy() >= otherDigi.energy())
93 {
94 Gequal=true;
95 }
96
97 return Gequal;
98}
99
100bool
101EmcShDigi::operator<=( const EmcShDigi& otherDigi ) const
102{
103 bool Lequal=false;
104
105 if ( this->energy() <= otherDigi.energy())
106 {
107 Lequal=true;
108 }
109 return Lequal;
110}
111
112bool
113EmcShDigi::operator>( const EmcShDigi& otherDigi ) const
114{
115 bool Large=false;
116
117 if ( this->energy() > otherDigi.energy())
118 {
119 Large=true;
120 }
121
122 return Large;
123}
124
125bool
126EmcShDigi::operator<( const EmcShDigi& otherDigi ) const
127{
128 bool Less=false;
129
130 if ( this->energy() < otherDigi.energy())
131 {
132 Less=true;
133 }
134
135 return Less;
136}
NTuple::Array< double > m_z
NTuple::Array< double > m_x
NTuple::Array< double > m_y
bool operator<(const EmcShDigi &otherDigi) const
const HepPoint3D & where() const
Definition EmcShDigi.h:39
const unsigned int & thetaIndex() const
Definition EmcShDigi.h:35
const double & y() const
Definition EmcShDigi.h:41
const double & energy() const
Definition EmcShDigi.h:31
const double & x() const
Definition EmcShDigi.h:40
const double & fraction() const
Definition EmcShDigi.h:38
const unsigned int & phiIndex() const
Definition EmcShDigi.h:36
bool operator>=(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:88
bool operator==(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:71
const double & phi() const
Definition EmcShDigi.h:33
const double & theta() const
Definition EmcShDigi.h:32
bool operator>(const EmcShDigi &otherDigi) const
bool operator<=(const EmcShDigi &otherDigi) const
const double & time() const
Definition EmcShDigi.h:37
const unsigned int & module() const
Definition EmcShDigi.h:34
const double & z() const
Definition EmcShDigi.h:42
EmcShDigi & operator=(const EmcShDigi &aDigi)
Definition EmcShDigi.cxx:49