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

Go to the source code of this file.

Functions

MsgStream & operator<< (MsgStream &m, const TrigEFBphys &p)
 
std::string str (const TrigEFBphys &p)
 
bool operator== (const TrigEFBphys &a, const TrigEFBphys &b)
 
void diff (const TrigEFBphys &a, const TrigEFBphys &b, std::map< std::string, double > &variableChange)
 comparison with feedback Function compares two objects and returns "semi verbose" output in the form of map where there are varaibel names and differences between two obejcts More...
 

Function Documentation

◆ diff()

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

comparison with feedback Function compares two objects and returns "semi verbose" output in the form of map where there are varaibel names and differences between two obejcts

Parameters
variableChange- map to record the differences In case of collections (or objects when the size may be different) that information can also be returned in variableChange

Definition at line 152 of file TrigEFBphys.cxx.

153 {
154  variableChange["eta"] = a.eta() - b.eta();
155  variableChange["phi"] = a.phi() - b.phi();
156  variableChange["mass"] = a.mass() - b.mass();
157  variableChange["fitmass"] = a.fitmass() - b.fitmass();
158  variableChange["fitchi2"] = a.fitchi2() - b.fitchi2();
159  variableChange["x"] = a.fitx() - b.fitx();
160  variableChange["y"] = a.fity() - b.fity();
161  variableChange["z"] = a.fitz() - b.fitz();
162 }

◆ operator<<()

MsgStream& operator<< ( MsgStream &  m,
const TrigEFBphys p 
)

Definition at line 95 of file TrigEFBphys.cxx.

96 {
97  m << str(p);
98  return m;
99 }

◆ operator==()

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

Definition at line 119 of file TrigEFBphys.cxx.

120 {
121  const double epsilon = 1e-8;
122 
123  int aHasSD = (a.pSecondDecay()!=NULL)?1:0;
124  int bHasSD = (b.pSecondDecay()!=NULL)?1:0;
125  if((aHasSD+bHasSD)==1)
126  return false;
127 
128  if(a.trackVector().size()!=b.trackVector().size())
129  return false;
130 
131  if(a.roiId() != b.roiId()) return false;
132  if(a.particleType() != b.particleType()) return false;
133  if(a.fitndof() != b.fitndof()) return false;
134 
135  if(fabs(a.eta()-b.eta())>epsilon) return false;
136  if(fabs(a.phi()-b.phi())>epsilon) return false;
137  if(fabs(a.mass()-b.mass())>epsilon) return false;
138  if(fabs(a.fitmass()-b.fitmass())>epsilon) return false;
139  if(fabs(a.fitchi2()-b.fitchi2())>epsilon) return false;
140  if(fabs(a.fitx()-b.fitx())>epsilon) return false;
141  if(fabs(a.fity()-b.fity())>epsilon) return false;
142  if(fabs(a.fitz()-b.fitz())>epsilon) return false;
143 
144  if((aHasSD+bHasSD)==2)
145  {
146  if (!((*a.pSecondDecay())==(*b.pSecondDecay())))
147  return false;
148  }
149  return true;
150 }

◆ str()

std::string str ( const TrigEFBphys p)

Definition at line 101 of file TrigEFBphys.cxx.

102 {
103  std::stringstream ss;
104 
105  ss << "RoI_ID: "<<p.roiId()
106  << "Particle type: "<<p.particleType()
107  << "eta: "<<p.eta()
108  << "phi: "<<p.phi()
109  << "mass: "<<p.mass()
110  << "mass after fit: "<<p.fitmass()
111  << "fit chi2: "<<p.fitchi2()
112  << "fit ndof: "<<p.fitndof()
113  << "x: "<<p.fitx()
114  << "y: "<<p.fity()
115  << "z: "<<p.fitz();
116  return ss.str();
117 }
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
str
std::string str(const TrigEFBphys &p)
Definition: TrigEFBphys.cxx:101
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10