ATLAS Offline Software
Loading...
Searching...
No Matches
TrigInDetTrack.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8 : m_algId (other.m_algId),
9 m_param (other.m_param),
10 m_endParam (other.m_endParam),
11 m_chi2 (other.m_chi2),
13 m_NStraw (other.m_NStraw),
15 m_NTRHits (other.m_NTRHits),
21 m_rdoList (std::move (other.m_rdoList))
22{
23 other.m_param = nullptr;
24 other.m_endParam = nullptr;
25 other.m_siSpacePoints = nullptr;
26 other.m_trtDriftCircles = nullptr;
27}
28
30{
32 if(m_siSpacePoints==NULL) return;
34 for(std::vector<const TrigSiSpacePoint*>::iterator it = m_siSpacePoints->begin();
35 it!= m_siSpacePoints->end();++it)
36 {
37
38 std::pair < const InDet::SiCluster*, const InDet::SiCluster* > cls = (*it)->clusters();
39 if(cls.second==NULL) {//i.e pixel
41 }
42 else {
44 }
45
46 long layer = (*it)->layer();
47 long mask = 1 << layer;
48 m_HitPattern |= mask;
49 }
50}
51
53 if(m_siSpacePoints==NULL) return;
54 m_rdoList.clear();
55 for(std::vector<const TrigSiSpacePoint*>::iterator it = m_siSpacePoints->begin();
56 it!= m_siSpacePoints->end();++it)
57 {
58 std::pair < const InDet::SiCluster*, const InDet::SiCluster* > cls = (*it)->clusters();
59 if(cls.first!=NULL) {
60 std::copy(cls.first->rdoList().begin(),cls.first->rdoList().end(),std::back_inserter(m_rdoList));
61 }
62 if(cls.second!=NULL) {
63 std::copy(cls.second->rdoList().begin(),cls.second->rdoList().end(),std::back_inserter(m_rdoList));
64 }
65 }
66}
67
68std::string str( const TrigInDetTrack& t ) //<! printing helper
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}
86
87MsgStream& operator<< ( MsgStream& m, const TrigInDetTrack& t ) //<! printing helper (wraps above)
88{
89 m << str(t);
90 return m;
91}
92
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}
111
112void diff( const TrigInDetTrack& a, const TrigInDetTrack& b, std::map<std::string, double>& variableChange )
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}
124
static Double_t a
static Double_t ss
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 ...
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.
represents a LVL2 ID track
TrigInDetTrack()
Constructors: POOL needs default constructor.
std::vector< const InDet::TRT_DriftCircle * > * m_trtDriftCircles
const TrigInDetTrackFitPar * m_param
std::vector< const TrigSiSpacePoint * > * m_siSpacePoints
const TrigInDetTrackFitPar * m_endParam
std::vector< Identifier > m_rdoList
STL namespace.