ATLAS Offline Software
Classes | Functions
CombinedMuonFeature.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 "AthLinks/ElementLink.h"
#include <vector>
#include <stdint.h>
#include <map>
#include <string>
#include "TrigMuonEvent/MuonFeatureContainer.h"
#include "TrigInDetEvent/TrigInDetTrackCollection.h"
#include "TrigMuonEvent/CombinedMuonFeatureContainer.h"

Go to the source code of this file.

Classes

class  CombinedMuonFeature
 

Functions

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

Function Documentation

◆ diff()

void diff ( const CombinedMuonFeature a,
const CombinedMuonFeature 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 212 of file CombinedMuonFeature.cxx.

213  {
214 
215  if( std::abs( a.pt() - b.pt() ) > DELTA ) {
216  variableChange[ "Pt" ] = a.pt() - b.pt();
217  }
218  if( std::abs( a.charge() - b.charge() ) > DELTA ) {
219  variableChange[ "Charge" ] = a.charge() - b.charge();
220  }
221  if( std::abs( a.sigma_pt() - b.sigma_pt() ) > DELTA ) {
222  variableChange[ "sigmaPt" ] = a.sigma_pt() - b.sigma_pt();
223  }
224  if( std::abs( a.getFlag() - b.getFlag() ) > DELTA ) {
225  variableChange[ "flag" ] = a.getFlag() - b.getFlag();
226  }
227  if( std::abs( a.eta() - b.eta() ) > DELTA ) {
228  variableChange[ "Eta" ] = a.eta() - b.eta();
229  }
230  if( std::abs( a.phi() - b.phi() ) > DELTA ) {
231  variableChange[ "Phi" ] = a.phi() - b.phi();
232  }
233 
234  return;
235 }

◆ operator!=()

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

Operator comparing two CombinedMuonFeature objects for inequality.

Definition at line 92 of file CombinedMuonFeature.h.

92  {
93  return !( a == b );
94 }

◆ operator<<()

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

Helper operator for printing the object.

Definition at line 186 of file CombinedMuonFeature.cxx.

186  {
187 
188  return ( m << str( d ) );
189 }

◆ operator==()

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

Operator comparing two CombinedMuonFeature objects for equality.

Definition at line 191 of file CombinedMuonFeature.cxx.

191  {
192 
193  if( std::abs( a.pt() - b.pt() ) > DELTA ) return false;
194  if( std::abs( a.charge() - b.charge() ) > DELTA ) return false;
195  if( std::abs( a.sigma_pt() - b.sigma_pt() ) > DELTA ) return false;
196  if( std::abs( a.getFlag() - b.getFlag() ) > DELTA ) return false;
197  if( std::abs( a.eta() - b.eta() ) > DELTA ) return false;
198  if( std::abs( a.phi() - b.phi() ) > DELTA ) return false;
199 
200  return true;
201 }

◆ str()

std::string str ( const CombinedMuonFeature d)

Helper function for printing the object.

Definition at line 174 of file CombinedMuonFeature.cxx.

174  {
175  std::stringstream ss;
176  ss << "Pt: " << d.pt()
177  << "; sigmaPt: " << d.sigma_pt()
178  << "; charge: " << d.charge()
179  << "; flag: " << d.getFlag()
180  << "; Eta: " << d.eta()
181  << "; Phi: " << d.phi();
182 
183  return ss.str();
184 }
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 CombinedMuonFeature &d)
Helper function for printing the object.
Definition: CombinedMuonFeature.cxx:174
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10