ATLAS Offline Software
Functions
TrigEFBjet.cxx File Reference
#include "TrigParticle/TrigEFBjet.h"
Include dependency graph for TrigEFBjet.cxx:

Go to the source code of this file.

Functions

std::string str (const TrigEFBjet &a)
 
MsgStream & operator<< (MsgStream &m, const TrigEFBjet &a)
 
bool operator== (const TrigEFBjet &a, const TrigEFBjet &b)
 
void diff (const TrigEFBjet &a, const TrigEFBjet &b, std::map< std::string, double > &variableChange)
 

Function Documentation

◆ diff()

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

Definition at line 140 of file TrigEFBjet.cxx.

140  {
141 
142  if(a.prmVtx() != b.prmVtx()) variableChange[ "prmVtx" ] = static_cast< double >( a.prmVtx() - b.prmVtx() );
143 
144  if(a.xComb() != b.xComb()) variableChange["xComb"] = static_cast<double>(a.xComb() - b.xComb());
145  if(a.xIP1D() != b.xIP1D()) variableChange["xIP1D"] = static_cast<double>(a.xIP1D() - b.xIP1D());
146  if(a.xIP2D() != b.xIP2D()) variableChange["xIP2D"] = static_cast<double>(a.xIP2D() - b.xIP2D());
147  if(a.xIP3D() != b.xIP3D()) variableChange["xIP3D"] = static_cast<double>(a.xIP3D() - b.xIP3D());
148  if(a.xCHI2() != b.xCHI2()) variableChange["xCHI2"] = static_cast<double>(a.xCHI2() - b.xCHI2());
149  if(a.xSV() != b.xSV()) variableChange["xSV"] = static_cast<double>(a.xSV() - b.xSV());
150  if(a.xMVtx() != b.xMVtx()) variableChange["xMVtx"] = static_cast<double>(a.xMVtx() - b.xMVtx());
151  if(a.xEVtx() != b.xEVtx()) variableChange["xEVtx"] = static_cast<double>(a.xEVtx() - b.xEVtx());
152  if(a.xNVtx() != b.xNVtx()) variableChange["xNVtx"] = static_cast<double>(a.xNVtx() - b.xNVtx());
153 
154  return;
155 }

◆ operator<<()

MsgStream& operator<< ( MsgStream &  m,
const TrigEFBjet a 
)

Definition at line 110 of file TrigEFBjet.cxx.

110  {
111 
112  return (m << str(a));
113 }

◆ operator==()

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

Definition at line 116 of file TrigEFBjet.cxx.

116  {
117 
118  //* distance used to compare floats *//
119  const double DELTA=1e-3;
120 
121  if(std::abs(a.eta() - b.eta()) > DELTA) return false;
122  if(std::abs(a.phi() - b.phi()) > DELTA) return false;
123 
124  if(std::abs(a.prmVtx() - b.prmVtx()) > DELTA) return false;
125 
126  if(std::abs(a.xComb() - b.xComb()) > DELTA) return false;
127  if(std::abs(a.xIP1D() - b.xIP1D()) > DELTA) return false;
128  if(std::abs(a.xIP2D() - b.xIP2D()) > DELTA) return false;
129  if(std::abs(a.xIP3D() - b.xIP3D()) > DELTA) return false;
130  if(std::abs(a.xCHI2() - b.xCHI2()) > DELTA) return false;
131  if(std::abs(a.xSV() - b.xSV()) > DELTA) return false;
132  if(std::abs(a.xMVtx() - b.xMVtx()) > DELTA) return false;
133  if(std::abs(a.xEVtx() - b.xEVtx()) > DELTA) return false;
134  if(std::abs(a.xNVtx() - b.xNVtx()) > DELTA) return false;
135 
136  return true;
137 }

◆ str()

std::string str ( const TrigEFBjet a)

Definition at line 90 of file TrigEFBjet.cxx.

90  {
91 
92  std::stringstream ss;
93 
94  ss << "RoI index = " << a.roiId()
95  << "; prmVtx = " << a.prmVtx()
96  << "; xComb = " << a.xComb()
97  << "; xIP1D = " << a.xIP1D()
98  << "; xIP2D = " << a.xIP2D()
99  << "; xIP3D = " << a.xIP3D()
100  << "; xCHI2 = " << a.xCHI2()
101  << "; xSV = " << a.xSV()
102  << "; xMVtx = " << a.xMVtx()
103  << "; xEVtx = " << a.xEVtx()
104  << "; xNVtx = " << a.xNVtx();
105 
106  return ss.str();
107 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
str
std::string str(const TrigEFBjet &a)
Definition: TrigEFBjet.cxx:90
a
TList * a
Definition: liststreamerinfos.cxx:10