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 102 of file TrigMuonEF.cxx.

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

◆ 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 78 of file TrigMuonEF.cxx.

78  {
79 
80  return ( m << str( d ) );
81 
82 }

◆ operator==()

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

Operator comparing two TrigMuonEF objects for equality.

Definition at line 84 of file TrigMuonEF.cxx.

84  {
85 
86  if( a.MuonCode() != b.MuonCode() )
87  return false;
88  if( std::abs( a.charge() - b.charge() ) > DELTA )
89  return false;
90  if( std::abs( a.pt() - b.pt() ) > DELTA )
91  return false;
92  if( std::abs( a.eta() - b.eta() ) > DELTA )
93  return false;
94  if( std::abs( a.phi() - b.phi() ) > DELTA )
95  return false;
96  if( std::abs( a.m() - b.m() ) > DELTA )
97  return false;
98 
99  return true;
100 }

◆ str()

std::string str ( const TrigMuonEF d)

Helper function for printing the object.

Definition at line 65 of file TrigMuonEF.cxx.

65  {
66 
67  std::stringstream stream;
68  stream << "MuonCode: " << d.MuonCode()
69  << "; RoINum: " << d.RoINum()
70  << "; eta: " << d.eta()
71  << "; phi: " << d.phi()
72  << "; pt: " << d.pt()
73  << "; charge: " << d.charge();
74 
75  return stream.str();
76 }
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:65
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10