ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonClusterFeature.h File Reference
#include "AthenaKernel/CLASS_DEF.h"
#include "AthContainers/DataVector.h"
#include "EventKernel/INavigable4Momentum.h"
#include "FourMom/P4PtEtaPhiMBase.h"
#include "Navigation/NavigableTerminalNode.h"
#include <vector>
#include <map>
#include <string>
Include dependency graph for TrigMuonClusterFeature.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TrigMuonClusterFeature

Functions

std::string str (const TrigMuonClusterFeature &d)
 Helper function for printing the object.
MsgStream & operator<< (MsgStream &m, const TrigMuonClusterFeature &d)
 Helper operator for printing the object.
bool operator== (const TrigMuonClusterFeature &a, const TrigMuonClusterFeature &b)
 Operator comparing two TrigMuonClusterFeature objects for equality.
bool operator!= (const TrigMuonClusterFeature &a, const TrigMuonClusterFeature &b)
 Operator comparing two TrigMuonClusterFeature objects for inequality.
void diff (const TrigMuonClusterFeature &a, const TrigMuonClusterFeature &b, std::map< std::string, double > &variableChange)
 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

Function Documentation

◆ diff()

void diff ( const TrigMuonClusterFeature & a,
const TrigMuonClusterFeature & b,
std::map< std::string, double > & variableChange )

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
static Double_t a

◆ operator!=()

bool operator!= ( const TrigMuonClusterFeature & a,
const TrigMuonClusterFeature & b )
inline

Operator comparing two TrigMuonClusterFeature objects for inequality.

Definition at line 82 of file TrigMuonClusterFeature.h.

82{ return !(a==b); }

◆ operator<<()

MsgStream & operator<< ( MsgStream & m,
const TrigMuonClusterFeature & d )

Helper operator for printing the object.

Definition at line 58 of file TrigMuonClusterFeature.cxx.

58 {
59 return (m << str(d));
60}

◆ operator==()

bool operator== ( const TrigMuonClusterFeature & a,
const TrigMuonClusterFeature & b )

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()

std::string str ( const TrigMuonClusterFeature & d)

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: {}",
50 d.getEta(),
51 d.getPhi(),
52 d.getNRoi(),
53 d.getNJet(),
54 d.getNTRK()
55 );
56}