#include <sstream>
#include <cmath>
#include "GaudiKernel/MsgStream.h"
#include "TrigMuonEvent/IsoMuonFeature.h"
Go to the source code of this file.
◆ diff()
Function compares two objects and returns "semi verbose" output in the form of map where there are varaible names and relative differences between two obejcts.
Comparison with feedback.
- Parameters
-
variableChange | Map to record the differences In case of collections (or objects when the size may be different) that information can also be returned in varaibleChange |
Definition at line 264 of file IsoMuonFeature.cxx.
267 if( std::abs(
a.getsumet01() -
b.getsumet01() ) > DELTA ) {
268 variableChange[
"sumet01" ] =
a.getsumet01() -
b.getsumet01();
270 if( std::abs(
a.getsumet02() -
b.getsumet02() ) > DELTA ) {
271 variableChange[
"sumet02" ] =
a.getsumet02() -
b.getsumet02();
273 if( std::abs(
a.getsumet03() -
b.getsumet03() ) > DELTA ) {
274 variableChange[
"sumet03" ] =
a.getsumet03() -
b.getsumet03();
276 if( std::abs(
a.getsumet04() -
b.getsumet04() ) > DELTA ) {
277 variableChange[
"sumet04" ] =
a.getsumet04() -
b.getsumet04();
279 if( std::abs(
a.getsumpt01() -
b.getsumpt01() ) > DELTA ) {
280 variableChange[
"sumpt01" ] =
a.getsumpt01() -
b.getsumpt01();
282 if( std::abs(
a.getsumet02() -
b.getsumet02() ) > DELTA ) {
283 variableChange[
"sumet02" ] =
a.getsumet02() -
b.getsumpt02();
285 if( std::abs(
a.getsumpt03() -
b.getsumpt03() ) > DELTA ) {
286 variableChange[
"sumpt03" ] =
a.getsumpt03() -
b.getsumpt03();
288 if( std::abs(
a.getsumpt04() -
b.getsumpt04() ) > DELTA ) {
289 variableChange[
"sumpt04" ] =
a.getsumpt04() -
b.getsumpt04();
291 if(
a.getFlag() !=
b.getFlag() ) {
292 variableChange[
"flag" ] =
static_cast< double >(
a.getFlag() -
295 if(
a.getRoiIdMu() !=
b.getRoiIdMu() ) {
296 variableChange[
"RoiIdMu" ] =
static_cast< double >(
a.getRoiIdMu() -
299 if( std::abs(
a.pt() -
b.pt() ) > DELTA ) {
300 variableChange[
"PtMu" ] =
a.pt() -
b.pt();
302 if( std::abs(
a.getQMu() -
b.getQMu() ) > DELTA ) {
303 variableChange[
"QMu" ] =
a.getQMu() -
b.getQMu();
305 if( std::abs(
a.getEtaMu() -
b.getEtaMu() ) > DELTA ) {
306 variableChange[
"EtaMu" ] =
a.getEtaMu() -
b.getEtaMu();
308 if( std::abs(
a.getPhiMu() -
b.getPhiMu() ) > DELTA ) {
309 variableChange[
"PhiMu" ] =
a.getPhiMu() -
b.getPhiMu();
◆ operator<<()
◆ operator==()
Operator comparing two IsoMuonFeature objects for equality.
Definition at line 217 of file IsoMuonFeature.cxx.
219 if( std::abs(
a.getsumet01() -
b.getsumet01() ) > DELTA )
221 if( std::abs(
a.getsumet02() -
b.getsumet02() ) > DELTA )
223 if( std::abs(
a.getsumet03() -
b.getsumet03() ) > DELTA )
225 if( std::abs(
a.getsumet04() -
b.getsumet04() ) > DELTA )
227 if( std::abs(
a.getsumpt01() -
b.getsumpt01() ) > DELTA )
229 if( std::abs(
a.getsumpt02() -
b.getsumpt02() ) > DELTA )
231 if( std::abs(
a.getsumpt03() -
b.getsumpt03() ) > DELTA )
233 if( std::abs(
a.getsumpt04() -
b.getsumpt04() ) > DELTA )
235 if( std::abs(
a.getPtMuID() -
b.getPtMuID() ) > DELTA )
237 if( std::abs(
a.getMaxPtID() -
b.getMaxPtID() ) > DELTA )
239 if(
a.getFlag() !=
b.getFlag() )
241 if(
a.getRoiIdMu() !=
b.getRoiIdMu() )
243 if( std::abs(
a.pt() -
b.pt() ) > DELTA )
245 if( std::abs(
a.getQMu() -
b.getQMu() ) > DELTA )
247 if( std::abs(
a.getEtaMu() -
b.getEtaMu() ) > DELTA )
249 if( std::abs(
a.getPhiMu() -
b.getPhiMu() ) > DELTA )
◆ str()
Helper function for printing the object.
Definition at line 189 of file IsoMuonFeature.cxx.
190 std::stringstream
ss;
191 ss <<
"sumet01: " <<
d.getsumet01()
192 <<
"; sumet02: " <<
d.getsumet02()
193 <<
"; sumet03: " <<
d.getsumet03()
194 <<
"; sumet04: " <<
d.getsumet04()
195 <<
"; sumpt01: " <<
d.getsumpt01()
196 <<
"; sumpt02: " <<
d.getsumpt02()
197 <<
"; sumpt03: " <<
d.getsumpt03()
198 <<
"; sumpt04: " <<
d.getsumpt04()
199 <<
"; PtMuID: " <<
d.getPtMuID()
200 <<
"; MaxPtID: " <<
d.getMaxPtID()
201 <<
"; flag: " <<
d.getFlag()
202 <<
"; RoiIdMu: " <<
d.getRoiIdMu()
203 <<
"; RoiIdMu: " <<
d.getRoiIdMu()
204 <<
"; PtMu: " <<
d.pt()
205 <<
"; QMu: " <<
d.getQMu()
206 <<
"; EtaMu: " <<
d.getEtaMu()
207 <<
"; PhiMu: " <<
d.getPhiMu();