ATLAS Offline Software
Classes | Functions
TrigInDetTrack.h File Reference
#include "AthenaKernel/CLASS_DEF.h"
#include "TrigInDetEvent/TrigSiSpacePoint.h"
#include "TrigInDetEvent/TrigInDetTrackFitPar.h"
#include "InDetPrepRawData/TRT_DriftCircle.h"
#include "Identifier/Identifier.h"
#include <map>
#include <ostream>
#include "GaudiKernel/MsgStream.h"
Include dependency graph for TrigInDetTrack.h:

Go to the source code of this file.

Classes

class  TrigInDetTrack
 

Functions

std::string str (const TrigInDetTrack &t)
 
MsgStream & operator<< (MsgStream &m, const TrigInDetTrack &t)
 
bool operator== (const TrigInDetTrack &a, const TrigInDetTrack &b)
 
bool operator!= (const TrigInDetTrack &a, const TrigInDetTrack &b)
 
void diff (const TrigInDetTrack &a, const TrigInDetTrack &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 TrigInDetTrack a,
const TrigInDetTrack 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 112 of file TrigInDetTrack.cxx.

113 {
114  const TrigInDetTrackFitPar* pA = a.param();
115  const TrigInDetTrackFitPar* pB = b.param();
116 
117  variableChange["d0"] = pA->a0() - pB->a0();
118  variableChange["z0"] = pA->z0() - pB->z0();
119  variableChange["phi0"] = pA->phi0() - pB->phi0();
120  variableChange["eta"] = pA->eta() - pB->eta();
121  variableChange["pT"] = pA->pT() - pB->pT();
122  variableChange["chi2"] = a.chi2() - b.chi2();
123 }

◆ operator!=()

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

Definition at line 222 of file TrigInDetTrack.h.

222 { return !(a==b); }

◆ operator<<()

MsgStream& operator<< ( MsgStream &  m,
const TrigInDetTrack t 
)

Definition at line 87 of file TrigInDetTrack.cxx.

88 {
89  m << str(t);
90  return m;
91 }

◆ operator==()

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

Definition at line 93 of file TrigInDetTrack.cxx.

94 {
95  const double epsilon = 1e-8;
96 
97  const TrigInDetTrackFitPar* pA = a.param();
98  const TrigInDetTrackFitPar* pB = b.param();
99 
100  if(a.algorithmId() != b.algorithmId()) return false;
101  if(a.HitPattern() != b.HitPattern()) return false;
102  if(a.NStrawHits() != b.NStrawHits()) return false;
103  if(fabs(a.chi2()-b.chi2())>epsilon) return false;
104  if(fabs(pA->a0()-pB->a0())>epsilon) return false;
105  if(fabs(pA->z0()-pB->z0())>epsilon) return false;
106  if(fabs(pA->phi0()-pB->phi0())>epsilon) return false;
107  if(fabs(pA->eta()-pB->eta())>epsilon) return false;
108  if(fabs(pA->pT()-pB->pT())>epsilon) return false;
109  return true;
110 }

◆ str()

std::string str ( const TrigInDetTrack t)

Definition at line 68 of file TrigInDetTrack.cxx.

69 {
70  std::stringstream ss;
71  const TrigInDetTrackFitPar* p = t.param();
72 
73  ss << "AlgorithmID: "<<t.algorithmId()
74  << "d0: "<<p->a0()
75  <<" z0: "<<p->z0()
76  <<" phi0: "<<p->phi0()
77  <<" eta: "<<p->eta()
78  <<" pT: "<<p->pT()
79  <<" chi2: "<<t.chi2()
80  <<" NpixSPs: "<<t.NPixelSpacePoints()
81  <<" NsctSPs: "<<t.NSCT_SpacePoints()
82  <<" NstrawHits: "<<t.NStrawHits()
83  <<" HitPattern: "<<t.HitPattern();
84  return ss.str();
85 }
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
TrigInDetTrackFitPar
Definition: TrigInDetTrackFitPar.h:67
TrigInDetTrackFitPar::eta
void eta(const double eta)
Setter: pseudorapidity.
Definition: TrigInDetTrackFitPar.h:219
TrigInDetTrackFitPar::z0
void z0(const double z0)
Setter: longitudinal impact parameter.
Definition: TrigInDetTrackFitPar.h:215
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
str
std::string str(const TrigInDetTrack &t)
Definition: TrigInDetTrack.cxx:68
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigInDetTrackFitPar::a0
void a0(const double a0)
Setter: transverse impact parameter.
Definition: TrigInDetTrackFitPar.h:213
a
TList * a
Definition: liststreamerinfos.cxx:10
TrigInDetTrackFitPar::phi0
void phi0(const double phi0)
Setter: azimuthal angle of the momentum.
Definition: TrigInDetTrackFitPar.h:217
TrigInDetTrackFitPar::pT
void pT(const double pT)
Setter: transverse momentum.
Definition: TrigInDetTrackFitPar.h:221