#include "TrigMuonEvent/TrigMuonClusterFeature.h"
#include "GaudiKernel/MsgStream.h"
#include <format>
#include <cmath>
Go to the source code of this file.
|
| static constexpr double | DELTA = 0.001 |
◆ diff()
comparison with feedback Function compares two objects and returns "semi verbose" output in the form of map where there are variable names and differences between two objects
- 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 71 of file TrigMuonClusterFeature.cxx.
72 {
73
74 if( std::abs(
a.getEta() -
b.getEta() ) >
DELTA ) {
75 variableChange[
"Eta" ] =
a.getEta() -
b.getEta();
76 }
77 if( std::abs(
a.getPhi() -
b.getPhi() ) >
DELTA ) {
78 variableChange[
"Phi" ] =
a.getPhi() -
b.getPhi();
79 }
80 if(
a.getNRoi() !=
b.getNRoi() ) {
81 variableChange[
"NRoI" ] =
static_cast< double >(
a.getNRoi() -
b.getNRoi() );
82 }
83 if(
a.getNJet() !=
b.getNJet() ) {
84 variableChange[
"NJet" ] =
static_cast< double >(
a.getNJet() -
b.getNJet() );
85 }
86 if(
a.getNTRK() !=
b.getNTRK() ) {
87 variableChange[
"NTRK" ] =
static_cast< double >(
a.getNTRK() -
b.getNTRK() );
88 }
89
90 return;
91}
static const double DELTA
◆ operator<<()
◆ operator==()
Operator comparing two TrigMuonClusterFeature objects for equality.
Definition at line 62 of file TrigMuonClusterFeature.cxx.
62 {
63 if ( std::abs(
a.getEta() -
b.getEta()) >
DELTA )
return false;
64 if ( std::abs(
a.getPhi() -
b.getPhi()) >
DELTA )
return false;
65 if (
a.getNRoi() !=
b.getNRoi() )
return false;
66 if (
a.getNJet() !=
b.getNJet() )
return false;
67 if (
a.getNTRK() !=
b.getNTRK() )
return false;
68 return true;
69}
◆ str()
Helper function for printing the object.
Definition at line 47 of file TrigMuonClusterFeature.cxx.
47 {
48 return std::format(
49 " Eta: {}; Phi: {}; NRoI: {}; NJET: {}; NTRK: {}",
55 );
56}
◆ DELTA