BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcShDigi.cxx
Go to the documentation of this file.
1// EmcShDigi.cxx file
2
3#include "EmcShDigi.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_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// Destructor --
24//--------------
26
27// Copy and assignment
29 m_energy = aDigi.energy();
30 m_theta = aDigi.theta();
31 m_phi = aDigi.phi();
32 m_module = aDigi.module();
33 m_thetaIndex = aDigi.thetaIndex();
34 m_phiIndex = aDigi.phiIndex();
35 m_time = aDigi.time();
36 m_fraction = aDigi.fraction();
37 m_where = aDigi.where();
38 m_x = aDigi.x();
39 m_y = aDigi.y();
40 m_z = aDigi.z();
41}
42
44 if ( this != &aDigi )
45 {
46 m_energy = aDigi.energy();
47 m_theta = aDigi.theta();
48 m_phi = aDigi.phi();
49 m_module = aDigi.module();
50 m_thetaIndex = aDigi.thetaIndex();
51 m_phiIndex = aDigi.phiIndex();
52 m_time = aDigi.time();
53 m_fraction = aDigi.fraction();
54 m_where = aDigi.where();
55 m_x = aDigi.x();
56 m_y = aDigi.y();
57 m_z = aDigi.z();
58 }
59
60 return *this;
61}
62
63bool EmcShDigi::operator==( const EmcShDigi& otherDigi ) const {
64 bool equal = false;
65
66 if ( this->energy() == otherDigi.energy() && this->theta() == otherDigi.theta() &&
67 this->phi() == otherDigi.phi() && this->time() == otherDigi.time() &&
68 this->fraction() == otherDigi.fraction() )
69 { equal = true; }
70
71 return equal;
72}
73
74bool EmcShDigi::operator>=( const EmcShDigi& otherDigi ) const {
75 bool Gequal = false;
76
77 if ( this->energy() >= otherDigi.energy() ) { Gequal = true; }
78
79 return Gequal;
80}
81
82bool EmcShDigi::operator<=( const EmcShDigi& otherDigi ) const {
83 bool Lequal = false;
84
85 if ( this->energy() <= otherDigi.energy() ) { Lequal = true; }
86 return Lequal;
87}
88
89bool EmcShDigi::operator>( const EmcShDigi& otherDigi ) const {
90 bool Large = false;
91
92 if ( this->energy() > otherDigi.energy() ) { Large = true; }
93
94 return Large;
95}
96
97bool EmcShDigi::operator<( const EmcShDigi& otherDigi ) const {
98 bool Less = false;
99
100 if ( this->energy() < otherDigi.energy() ) { Less = true; }
101
102 return Less;
103}
bool operator<(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:97
const HepPoint3D & where() const
Definition EmcShDigi.h:37
const unsigned int & thetaIndex() const
Definition EmcShDigi.h:33
const double & y() const
Definition EmcShDigi.h:39
const double & energy() const
Definition EmcShDigi.h:29
const double & x() const
Definition EmcShDigi.h:38
const double & fraction() const
Definition EmcShDigi.h:36
const unsigned int & phiIndex() const
Definition EmcShDigi.h:34
bool operator>=(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:74
bool operator==(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:63
const double & phi() const
Definition EmcShDigi.h:31
const double & theta() const
Definition EmcShDigi.h:30
bool operator>(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:89
bool operator<=(const EmcShDigi &otherDigi) const
Definition EmcShDigi.cxx:82
const double & time() const
Definition EmcShDigi.h:35
const unsigned int & module() const
Definition EmcShDigi.h:32
const double & z() const
Definition EmcShDigi.h:40
EmcShDigi & operator=(const EmcShDigi &aDigi)
Definition EmcShDigi.cxx:43