ATLAS Offline Software
Loading...
Searching...
No Matches
TauPi0Cluster.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <iostream>
8
9namespace Analysis {
10
11 // default constructor
34
35 // copy constructor
60
61 // Assignment operator
89
90 bool TauPi0Cluster::operator==( const TauPi0Cluster& rhs ) const{
91 if(m_cluster != rhs.m_cluster) return false;
92 if(m_tauShotVector.size() != rhs.m_tauShotVector.size()) return false;
93 for(unsigned iShot=0; iShot!=m_tauShotVector.size();++iShot){
94 if(!(*(m_tauShotVector.at(iShot))==*(rhs.m_tauShotVector.at(iShot)))) return false;
95 }
96 if(m_DELTA_PHI != rhs.m_DELTA_PHI) return false;
97 if(m_DELTA_THETA != rhs.m_DELTA_THETA) return false;
98 if(m_ENG_FRAC_EM != rhs.m_ENG_FRAC_EM) return false;
99 if(m_ENG_FRAC_MAX != rhs.m_ENG_FRAC_MAX) return false;
100 if(m_ENG_FRAC_CORE != rhs.m_ENG_FRAC_CORE) return false;
101 if(m_SECOND_ENG_DENS != rhs.m_SECOND_ENG_DENS) return false;
102 if(m_LATERAL != rhs.m_LATERAL) return false;
103 if(m_LONGITUDINAL != rhs.m_LONGITUDINAL) return false;
104 if(m_EM1CoreFrac != rhs.m_EM1CoreFrac) return false;
105 if(m_asymmetryInEM1WRTTrk != rhs.m_asymmetryInEM1WRTTrk) return false;
106 if(m_NHitsInEM1 != rhs.m_NHitsInEM1) return false;
107 if(m_NPosECells_PS != rhs.m_NPosECells_PS) return false;
108 if(m_NPosECells_EM1 != rhs.m_NPosECells_EM1) return false;
109 if(m_NPosECells_EM2 != rhs.m_NPosECells_EM2) return false;
114 if(m_BDTScore != rhs.m_BDTScore) return false;
115 return true;
116 }
117
118 bool TauPi0Cluster::operator!=( const TauPi0Cluster& rhs ) const{
119 if(m_cluster != rhs.m_cluster) return true;
120 if(m_tauShotVector.size() != rhs.m_tauShotVector.size()) return true;
121 for(unsigned iShot=0; iShot!=m_tauShotVector.size();++iShot){
122 if(!(*(m_tauShotVector.at(iShot))==*(rhs.m_tauShotVector.at(iShot)))) return true;
123 }
124 if(m_DELTA_PHI != rhs.m_DELTA_PHI) return true;
125 if(m_DELTA_THETA != rhs.m_DELTA_THETA) return true;
126 if(m_ENG_FRAC_EM != rhs.m_ENG_FRAC_EM) return true;
127 if(m_ENG_FRAC_MAX != rhs.m_ENG_FRAC_MAX) return true;
128 if(m_ENG_FRAC_CORE != rhs.m_ENG_FRAC_CORE) return true;
129 if(m_SECOND_ENG_DENS != rhs.m_SECOND_ENG_DENS) return true;
130 if(m_LATERAL != rhs.m_LATERAL) return true;
131 if(m_LONGITUDINAL != rhs.m_LONGITUDINAL) return true;
132 if(m_EM1CoreFrac != rhs.m_EM1CoreFrac) return true;
133 if(m_asymmetryInEM1WRTTrk != rhs.m_asymmetryInEM1WRTTrk) return true;
134 if(m_NHitsInEM1 != rhs.m_NHitsInEM1) return true;
135 if(m_NPosECells_PS != rhs.m_NPosECells_PS) return true;
136 if(m_NPosECells_EM1 != rhs.m_NPosECells_EM1) return true;
137 if(m_NPosECells_EM2 != rhs.m_NPosECells_EM2) return true;
142 if(m_BDTScore != rhs.m_BDTScore) return true;
143 return false;
144 }
145
146 // destructor
150
151 // just for testing.
153 {
154 int oldpr = std::cout.precision(5); // store and change precision
155 std::cout << "in TauPi0Cluster::dump()" << std::endl;
156 std::cout << "-------------------------" << std::endl;
157 std::cout << "m_DELTA_PHI = " << m_DELTA_PHI << std::endl;
158 std::cout << "m_DELTA_THETA = " << m_DELTA_THETA << std::endl;
159 std::cout << "m_ENG_FRAC_EM = " << m_ENG_FRAC_EM << std::endl;
160 std::cout << "m_ENG_FRAC_MAX = " << m_ENG_FRAC_MAX << std::endl;
161 std::cout << "m_ENG_FRAC_CORE = " << m_ENG_FRAC_CORE << std::endl;
162 std::cout << "m_SECOND_ENG_DENS = " << m_SECOND_ENG_DENS << std::endl;
163 if (m_SECOND_ENG_DENS>0)
164 std::cout << "log(m_SECOND_ENG_DENS) = " << log(m_SECOND_ENG_DENS) << std::endl;
165 std::cout << "m_LATERAL = " << m_LATERAL << std::endl;
166 std::cout << "m_LONGITUDINAL = " << m_LONGITUDINAL << std::endl;
167 std::cout << "m_EM1CoreFrac = " << m_EM1CoreFrac << std::endl;
168 std::cout << "m_asymmetryInEM1WRTTrk = " << m_asymmetryInEM1WRTTrk << std::endl;
169 std::cout << "m_NHitsInEM1 = " << m_NHitsInEM1 << std::endl;
170 std::cout << "m_NPosECells_PS = " << m_NPosECells_PS << std::endl;
171 std::cout << "m_NPosECells_EM1 = " << m_NPosECells_EM1 << std::endl;
172 std::cout << "m_NPosECells_EM2 = " << m_NPosECells_EM2 << std::endl;
173 std::cout << "m_firstEtaWRTClusterPosition_EM1 = " << m_firstEtaWRTClusterPosition_EM1 << std::endl;
174 std::cout << "m_firstEtaWRTClusterPosition_EM2 = " << m_firstEtaWRTClusterPosition_EM2 << std::endl;
175 std::cout << "m_secondEtaWRTClusterPosition_EM1 = " << m_secondEtaWRTClusterPosition_EM1 << std::endl;
176 std::cout << "m_secondEtaWRTClusterPosition_EM2 = " << m_secondEtaWRTClusterPosition_EM2 << std::endl;
177 std::cout << "m_BDTScore = " << m_BDTScore << std::endl;
178 if (m_cluster.isValid()) {
179 std::cout << "this->cluster()->e() = " << this->cluster()->e() << std::endl;
180 std::cout << "this->cluster()->pt() = " << this->cluster()->pt() << std::endl;
181 std::cout << "this->cluster()->eta() = " << this->cluster()->eta() << std::endl;
182 std::cout << "this->cluster()->phi() = " << this->cluster()->phi() << std::endl;
183 }
184 std::cout << std::endl <<std::endl;
185 std::cout << "-------------------------" <<std::endl;
186 std::cout.precision(oldpr); //restore previous precision
187 }
188}
Declaration of tau details base class.
TauPi0Cluster & operator=(const TauPi0Cluster &rhs)
assignment operator
const CaloCluster * cluster() const
Get cluster Consider using direct access through clusterLink() instead.
bool operator==(const TauPi0Cluster &rhs) const
Equality operator.
float m_DELTA_PHI
cluster external properties
TauPi0Cluster()
default constructor
bool operator!=(const TauPi0Cluster &rhs) const
Inequality operator.
virtual ~TauPi0Cluster()
destructor (virtual)
ElementLink< CaloClusterContainer > m_cluster
cluster
std::vector< TauShot * > m_tauShotVector
virtual double e() const
Retrieve energy independent of signal state.
virtual double eta() const
Retrieve eta independent of signal state.
virtual double phi() const
Retrieve phi independent of signal state.
virtual double pt() const
transverse momentum
The namespace of all packages in PhysicsAnalysis/JetTagging.