BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcShower.cxx
Go to the documentation of this file.
1
2#include "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 m_maxima = EmcShDigi();
21}
22
23//--------------
24// Destructor --
25//--------------
27
28// Copy and assignment
30 m_energy = aShower.energy();
31 m_theta = aShower.theta();
32 m_phi = aShower.phi();
33 m_module = aShower.module();
34 m_thetaIndex = aShower.thetaIndex();
35 m_phiIndex = aShower.phiIndex();
36 m_numberOfDigis = aShower.numberOfDigis();
37 m_digiList = aShower.digiList();
38 m_maxima = aShower.maxima();
39 m_where = aShower.where();
40 m_x = aShower.x();
41 m_y = aShower.y();
42 m_z = aShower.z();
43}
44
46 if ( this != &aShower )
47 {
48 m_energy = aShower.energy();
49 m_theta = aShower.theta();
50 m_phi = aShower.phi();
51 m_module = aShower.module();
52 m_thetaIndex = aShower.thetaIndex();
53 m_phiIndex = aShower.phiIndex();
54 m_numberOfDigis = aShower.numberOfDigis();
55 m_digiList = aShower.digiList();
56 m_maxima = aShower.maxima();
57 m_where = aShower.where();
58 m_x = aShower.x();
59 m_y = aShower.y();
60 m_z = aShower.z();
61 }
62
63 return *this;
64}
65
66bool EmcShower::operator==( const EmcShower& otherShower ) const {
67 bool equal = false;
68
69 if ( this->theta() == otherShower.theta() && this->phi() == otherShower.phi() &&
70 this->energy() == otherShower.energy() )
71 { equal = true; }
72
73 return equal;
74}
75
76bool EmcShower::operator>=( const EmcShower& otherShower ) const {
77 bool Gequal = false;
78
79 if ( this->energy() >= otherShower.energy() ) { Gequal = true; }
80
81 return Gequal;
82}
83
84bool EmcShower::operator<=( const EmcShower& otherShower ) const {
85 bool Lequal = false;
86
87 if ( this->energy() <= otherShower.energy() ) { Lequal = true; }
88
89 return Lequal;
90}
91
92bool EmcShower::operator>( const EmcShower& otherShower ) const {
93 bool Large = false;
94
95 if ( this->energy() > otherShower.energy() ) { Large = true; }
96
97 return Large;
98}
99
100bool EmcShower::operator<( const EmcShower& otherShower ) const {
101 bool Less = false;
102
103 if ( this->energy() < otherShower.energy() ) { Less = true; }
104
105 return Less;
106}
107
108//-------------
109// Modifiers --
110//-------------
111void EmcShower::addDigi( EmcShDigi theDigi ) { m_digiList.push_back( theDigi ); }
bool operator==(const EmcShower &otherShower) const
Definition EmcShower.cxx:66
bool operator<=(const EmcShower &otherShower) const
Definition EmcShower.cxx:84
const double & z() const
Definition EmcShower.h:48
const unsigned int & thetaIndex() const
Definition EmcShower.h:40
const double & x() const
Definition EmcShower.h:46
const double & theta() const
Definition EmcShower.h:37
bool operator>=(const EmcShower &otherShower) const
Definition EmcShower.cxx:76
const double & y() const
Definition EmcShower.h:47
const double & energy() const
Definition EmcShower.h:36
const double & phi() const
Definition EmcShower.h:38
bool operator<(const EmcShower &otherShower) const
void addDigi(EmcShDigi d)
EmcShower & operator=(const EmcShower &aShower)
Definition EmcShower.cxx:45
const EmcShDigi maxima() const
Definition EmcShower.h:44
const long int & numberOfDigis() const
Definition EmcShower.h:42
const HepPoint3D & where() const
Definition EmcShower.h:45
const unsigned int & phiIndex() const
Definition EmcShower.h:41
bool operator>(const EmcShower &otherShower) const
Definition EmcShower.cxx:92
const std::list< EmcShDigi > digiList() const
Definition EmcShower.h:43
const unsigned int & module() const
Definition EmcShower.h:39