ATLAS Offline Software
Classes | Functions
TrigMuonEFTrack.h File Reference
#include <string>
#include <sstream>
#include <map>
#include "FourMom/P4IPtCotThPhiM.h"
#include "AthenaKernel/CLASS_DEF.h"
#include "Navigation/NavigableTerminalNode.h"
#include "EventKernel/INavigable4Momentum.h"
Include dependency graph for TrigMuonEFTrack.h:

Go to the source code of this file.

Classes

class  TrigMuonEFTrack
 

Functions

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

Function Documentation

◆ diff()

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

Comparison with feedback.

Comparison with feedback.

Parameters
variableChangeMap 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 222 of file TrigMuonEFTrack.cxx.

223  {
224 
225  if( std::abs( a.charge() - b.charge() ) > DELTA ) {
226  variableChange[ "Charge" ] = a.charge() - b.charge();
227  }
228  if( std::abs( a.iPt() - b.iPt() ) > IDELTA ) {
229  variableChange[ "iPt" ] = a.iPt() - b.iPt();
230  }
231  if( std::abs( a.eta() - b.eta() ) > DELTA ) {
232  variableChange[ "Eta" ] = a.eta() - b.eta();
233  }
234  if( std::abs( a.phi() - b.phi() ) > DELTA ) {
235  variableChange[ "Phi" ] = a.phi() - b.phi();
236  }
237  if( std::abs( a.m() - b.m() ) > DELTA ) {
238  variableChange[ "Mass" ] = a.m() - b.m();
239  }
240  if( std::abs( a.d0() - b.d0() ) > DELTA ) {
241  variableChange[ "d0" ] = a.d0() - b.d0();
242  }
243  if( std::abs( a.z0() - b.z0() ) > DELTA ) {
244  variableChange[ "z0" ] = a.z0() - b.z0();
245  }
246  if( std::abs( a.chi2() - b.chi2() ) > DELTA ) {
247  variableChange[ "chi2" ] = a.chi2() - b.chi2();
248  }
249  if( std::abs( a.chi2prob() - b.chi2prob() ) > DELTA ) {
250  variableChange[ "chi2prob" ] = a.chi2prob() - b.chi2prob();
251  }
252  if( std::abs( a.posX() - b.posX() ) > DELTA ) {
253  variableChange[ "posX" ] = a.posX() - b.posX();
254  }
255  if( std::abs( a.posY() - b.posY() ) > DELTA ) {
256  variableChange[ "posY" ] = a.posY() - b.posY();
257  }
258  if( std::abs( a.posZ() - b.posZ() ) > DELTA ) {
259  variableChange[ "posZ" ] = a.posZ() - b.posZ();
260  }
261  if( a.NRpcHitsPhi() != b.NRpcHitsPhi() ) {
262  variableChange[ "NRpcHitsPhi" ] = static_cast< double >( a.NRpcHitsPhi() -
263  b.NRpcHitsPhi() );
264  }
265  if( a.NTgcHitsPhi() != b.NTgcHitsPhi() ) {
266  variableChange[ "NTgcHitsPhi" ] = static_cast< double >( a.NTgcHitsPhi() -
267  b.NTgcHitsPhi() );
268  }
269  if( a.NCscHitsPhi() != b.NCscHitsPhi() ) {
270  variableChange[ "NCscHitsPhi" ] = static_cast< double >( a.NCscHitsPhi() -
271  b.NCscHitsPhi() );
272  }
273  if( a.NRpcHitsEta() != b.NRpcHitsEta() ) {
274  variableChange[ "NRpcHitsEta" ] = static_cast< double >( a.NRpcHitsEta() -
275  b.NRpcHitsEta() );
276  }
277  if( a.NTgcHitsEta() != b.NTgcHitsEta() ) {
278  variableChange[ "NTgcHitsEta" ] = static_cast< double >( a.NTgcHitsEta() -
279  b.NTgcHitsEta() );
280  }
281  if( a.NCscHitsEta() != b.NCscHitsEta() ) {
282  variableChange[ "NCscHitsEta" ] = static_cast< double >( a.NCscHitsEta() -
283  b.NCscHitsEta() );
284  }
285  if( a.NMdtHits() != b.NMdtHits() ) {
286  variableChange[ "NMdtHits" ] = static_cast< double >( a.NMdtHits() -
287  b.NMdtHits() );
288  }
289 
290  return;
291 }

◆ operator!=()

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

Operator comparing two TrigMuonEFTrack objects for inequality.

Definition at line 229 of file TrigMuonEFTrack.h.

229  {
230  return !( a == b );
231 }

◆ operator<<()

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

Helper operator for printing the object.

Definition at line 164 of file TrigMuonEFTrack.cxx.

164  {
165 
166  return ( m << str( d ) );
167 }

◆ operator==()

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

Operator comparing two TrigMuonEFTrack objects for equality.

Definition at line 169 of file TrigMuonEFTrack.cxx.

169  {
170 
171  if( std::abs( a.charge() - b.charge() ) > DELTA )
172  return false;
173  if( std::abs( a.iPt() - b.iPt() ) > IDELTA )
174  return false;
175  if( std::abs( a.eta() - b.eta() ) > DELTA )
176  return false;
177  if( std::abs( a.phi() - b.phi() ) > DELTA )
178  return false;
179  if( std::abs( a.m() - b.m() ) > DELTA )
180  return false;
181  if( std::abs( a.d0() - b.d0() ) > DELTA )
182  return false;
183  if( std::abs( a.z0() - b.z0() ) > DELTA )
184  return false;
185  if( std::abs( a.chi2() - b.chi2() ) > DELTA )
186  return false;
187  if( std::abs( a.chi2prob() - b.chi2prob() ) > DELTA )
188  return false;
189  if( std::abs( a.posX() - b.posX() ) > DELTA )
190  return false;
191  if( std::abs( a.posY() - b.posY() ) > DELTA )
192  return false;
193  if( std::abs( a.posZ() - b.posZ() ) > DELTA )
194  return false;
195  if( a.NRpcHitsPhi() != b.NRpcHitsPhi() )
196  return false;
197  if( a.NTgcHitsPhi() != b.NTgcHitsPhi() )
198  return false;
199  if( a.NCscHitsPhi() != b.NCscHitsPhi() )
200  return false;
201  if( a.NRpcHitsEta() != b.NRpcHitsEta() )
202  return false;
203  if( a.NTgcHitsEta() != b.NTgcHitsEta() )
204  return false;
205  if( a.NCscHitsEta() != b.NCscHitsEta() )
206  return false;
207  if( a.NMdtHits() != b.NMdtHits() )
208  return false;
209 
210  return true;
211 }

◆ str()

std::string str ( const TrigMuonEFTrack d)

Helper function for printing the object.

Definition at line 146 of file TrigMuonEFTrack.cxx.

146  {
147  std::stringstream ss;
148  ss << " inverse pt: " << d.iPt()
149  << "; cot(theta): " << d.cotTh()
150  << "; phi: " << d.phi()
151  << "; mass: " << d.m()
152  << "; charge: " << d.charge()
153  << "; NCscHitsPhi: " << d.NCscHitsPhi()
154  << "; NCscHitsEta: " << d.NCscHitsEta()
155  << "; NTgcHitsPhi: " << d.NTgcHitsPhi()
156  << "; NTgcHitsEta: " << d.NTgcHitsEta()
157  << "; NRpcHitsPhi: " << d.NRpcHitsPhi()
158  << "; NRpcHitsEta: " << d.NRpcHitsEta()
159  << "; NMdtHits: " << d.NMdtHits();
160 
161  return ss.str();
162 }
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
hist_file_dump.d
d
Definition: hist_file_dump.py:137
str
std::string str(const TrigMuonEFTrack &d)
Helper function for printing the object.
Definition: TrigMuonEFTrack.cxx:146
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10