ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonEFCbTrack.cxx File Reference
#include <sstream>
#include <cmath>
#include "GaudiKernel/MsgStream.h"
#include "Particle/TrackParticleContainer.h"
#include "Particle/TrackParticle.h"
#include "TrigMuonEvent/TrigMuonEFCbTrack.h"
Include dependency graph for TrigMuonEFCbTrack.cxx:

Go to the source code of this file.

Functions

std::string str (const TrigMuonEFCbTrack &d)
 This function uses the function str(TrigMuonEFTrack&) to print the "base class part" of the object.
MsgStream & operator<< (MsgStream &m, const TrigMuonEFCbTrack &d)
 Helper operator for printing the object.
bool operator== (const TrigMuonEFCbTrack &a, const TrigMuonEFCbTrack &b)
 This operator uses the operator operator==(TrigMuonEFTrack&,TrigMuonEFTrack&) to compare the "base class parts" of the objects.
void diff (const TrigMuonEFCbTrack &a, const TrigMuonEFCbTrack &b, std::map< std::string, double > &variableChange)
 Function compares two objects and returns "semi verbose" output in the form of map where there are varaible names and relative differences between two obejcts.

Variables

static const double DELTA = 0.001

Function Documentation

◆ diff()

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

Function compares two objects and returns "semi verbose" output in the form of map where there are varaible names and relative differences between two obejcts.

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 159 of file TrigMuonEFCbTrack.cxx.

160 {
161
162 // Call the function operating on the base class:
163 diff( static_cast<const TrigMuonEFTrack&>(a), static_cast<const TrigMuonEFTrack&>(b), variableChange );
164
165 if( std::abs( a.matchChi2() - b.matchChi2() ) > DELTA ) {
166 variableChange[ "MatchChi2" ] = a.matchChi2() - b.matchChi2();
167 }
168
169 return;
170}
static const double DELTA
static Double_t a
void diff(const TrigMuonEFCbTrack &a, const TrigMuonEFCbTrack &b, std::map< std::string, double > &variableChange)
Function compares two objects and returns "semi verbose" output in the form of map where there are va...

◆ operator<<()

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

Helper operator for printing the object.

Definition at line 131 of file TrigMuonEFCbTrack.cxx.

131 {
132
133 return ( m << str( d ) );
134}

◆ operator==()

bool operator== ( const TrigMuonEFCbTrack & a,
const TrigMuonEFCbTrack & b )

This operator uses the operator operator==(TrigMuonEFTrack&,TrigMuonEFTrack&) to compare the "base class parts" of the objects.

Operator comparing two TrigMuonEFCbTrack objects for equality.

Definition at line 140 of file TrigMuonEFCbTrack.cxx.

140 {
141
142 if( static_cast<const TrigMuonEFTrack&>(a) != static_cast<const TrigMuonEFTrack&>(b) )
143 return false;
144 if( std::abs( a.matchChi2() - b.matchChi2() ) > DELTA )
145 return false;
146
147 return true;
148}

◆ str()

std::string str ( const TrigMuonEFCbTrack & d)

This function uses the function str(TrigMuonEFTrack&) to print the "base class part" of the object.

Helper function for printing the object.

Definition at line 123 of file TrigMuonEFCbTrack.cxx.

123 {
124 std::stringstream ss;
126 << "; chi2 match: " << d.matchChi2();
127
128 return ss.str();
129}
static Double_t ss

Variable Documentation

◆ DELTA

const double DELTA = 0.001
static

Definition at line 30 of file TrigMuonEFCbTrack.cxx.