ATLAS Offline Software
Loading...
Searching...
No Matches
TrigInDetTrack.cxx File Reference
Include dependency graph for TrigInDetTrack.cxx:

Go to the source code of this file.

Functions

std::string str (const TrigInDetTrack &t)
MsgStream & operator<< (MsgStream &m, const TrigInDetTrack &t)
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

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}
static Double_t a
encapsulates LVL2 track parameters and covariance matrix The vector of track parameters consists of
void eta(const double eta)
Setter: pseudorapidity.
void z0(const double z0)
Setter: longitudinal impact parameter.
void phi0(const double phi0)
Setter: azimuthal angle of the momentum.
void a0(const double a0)
Setter: transverse impact parameter.
void pT(const double pT)
Setter: transverse momentum.

◆ 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}
static Double_t ss