ATLAS Offline Software
Classes | Functions
TrigMuonEF.h File Reference
#include "EventKernel/INavigable4Momentum.h"
#include "FourMom/P4IPtCotThPhiM.h"
#include "Navigation/NavigableTerminalNode.h"
#include "AthenaKernel/CLASS_DEF.h"
#include <string>
#include <map>
Include dependency graph for TrigMuonEF.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TrigMuonEF
 

Functions

std::string str (const TrigMuonEF &d)
 Helper function for printing the object. More...
 
MsgStream & operator<< (MsgStream &m, const TrigMuonEF &d)
 Helper operator for printing the object. More...
 
bool operator== (const TrigMuonEF &a, const TrigMuonEF &b)
 Operator comparing two TrigMuonEF objects for equality. More...
 
bool operator!= (const TrigMuonEF &a, const TrigMuonEF &b)
 Operator comparing two TrigMuonEF objects for inequality. More...
 
void diff (const TrigMuonEF &a, const TrigMuonEF &b, std::map< std::string, double > &variableChange)
 Comparison with feedback. More...
 

Function Documentation

◆ diff()

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

Comparison with feedback.

Definition at line 97 of file TrigMuonEF.cxx.

98  {
99 
100  if( a.MuonCode() != b.MuonCode() ) {
101  variableChange[ "MuonCode" ] = static_cast< double >( a.MuonCode() - b.MuonCode() );
102  }
103  if( std::abs( a.charge() - b.charge() ) > DELTA ) {
104  variableChange[ "Charge" ] = a.charge() - b.charge();
105  }
106  if( std::abs( a.pt() - b.pt() ) > DELTA ) {
107  variableChange[ "Pt" ] = a.pt() - b.pt();
108  }
109  if( std::abs( a.eta() - b.eta() ) > DELTA ) {
110  variableChange[ "Eta" ] = a.eta() - b.eta();
111  }
112  if( std::abs( a.phi() - b.phi() ) > DELTA ) {
113  variableChange[ "Phi" ] = a.phi() - b.phi();
114  }
115  if( std::abs( a.m() - b.m() ) > DELTA ) {
116  variableChange[ "Mass" ] = a.m() - b.m();
117  }
118 
119  return;
120 
121 }

◆ operator!=()

bool operator!= ( const TrigMuonEF a,
const TrigMuonEF b 
)
inline

Operator comparing two TrigMuonEF objects for inequality.

Definition at line 82 of file TrigMuonEF.h.

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

◆ operator<<()

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

Helper operator for printing the object.

Definition at line 73 of file TrigMuonEF.cxx.

73  {
74 
75  return ( m << str( d ) );
76 
77 }

◆ operator==()

bool operator== ( const TrigMuonEF a,
const TrigMuonEF b 
)

Operator comparing two TrigMuonEF objects for equality.

Definition at line 79 of file TrigMuonEF.cxx.

79  {
80 
81  if( a.MuonCode() != b.MuonCode() )
82  return false;
83  if( std::abs( a.charge() - b.charge() ) > DELTA )
84  return false;
85  if( std::abs( a.pt() - b.pt() ) > DELTA )
86  return false;
87  if( std::abs( a.eta() - b.eta() ) > DELTA )
88  return false;
89  if( std::abs( a.phi() - b.phi() ) > DELTA )
90  return false;
91  if( std::abs( a.m() - b.m() ) > DELTA )
92  return false;
93 
94  return true;
95 }

◆ str()

std::string str ( const TrigMuonEF d)

Helper function for printing the object.

Definition at line 60 of file TrigMuonEF.cxx.

60  {
61 
62  std::stringstream stream;
63  stream << "MuonCode: " << d.MuonCode()
64  << "; RoINum: " << d.RoINum()
65  << "; eta: " << d.eta()
66  << "; phi: " << d.phi()
67  << "; pt: " << d.pt()
68  << "; charge: " << d.charge();
69 
70  return stream.str();
71 }
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
hist_file_dump.d
d
Definition: hist_file_dump.py:137
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
str
std::string str(const TrigMuonEF &d)
Helper function for printing the object.
Definition: TrigMuonEF.cxx:60
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10