ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigInDetEvent
src
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
5
#include "
TrigInDetEvent/TrigInDetTrack.h
"
6
7
TrigInDetTrack::TrigInDetTrack
(
TrigInDetTrack
&& other)
8
:
m_algId
(other.
m_algId
),
9
m_param
(other.
m_param
),
10
m_endParam
(other.
m_endParam
),
11
m_chi2
(other.
m_chi2
),
12
m_NStrawHits
(other.
m_NStrawHits
),
13
m_NStraw
(other.
m_NStraw
),
14
m_NStrawTime
(other.
m_NStrawTime
),
15
m_NTRHits
(other.
m_NTRHits
),
16
m_NPixelSpacePoints
(other.
m_NPixelSpacePoints
),
17
m_NSCT_SpacePoints
(other.
m_NSCT_SpacePoints
),
18
m_HitPattern
(other.
m_HitPattern
),
19
m_siSpacePoints
(other.
m_siSpacePoints
),
20
m_trtDriftCircles
(other.
m_trtDriftCircles
),
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
29
void
TrigInDetTrack::fillSiHitInfo
()
30
{
31
eraseRdoList
();
32
if
(
m_siSpacePoints
==NULL)
return
;
33
m_NPixelSpacePoints
=0;
m_NSCT_SpacePoints
=0;
m_HitPattern
=0;
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
40
m_NPixelSpacePoints
++;
41
}
42
else
{
43
m_NSCT_SpacePoints
++;
44
}
45
46
long
layer = (*it)->layer();
47
long
mask = 1 << layer;
48
m_HitPattern
|= mask;
49
}
50
}
51
52
void
TrigInDetTrack::fillRdoList
() {
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
68
std::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
87
MsgStream&
operator<<
( MsgStream& m,
const
TrigInDetTrack
& t )
//<! printing helper (wraps above)
88
{
89
m <<
str
(t);
90
return
m;
91
}
92
93
bool
operator==
(
const
TrigInDetTrack
&
a
,
const
TrigInDetTrack
& b )
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
112
void
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
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
operator<<
MsgStream & operator<<(MsgStream &m, const TrigInDetTrack &t)
Definition
TrigInDetTrack.cxx:87
operator==
bool operator==(const TrigInDetTrack &a, const TrigInDetTrack &b)
Definition
TrigInDetTrack.cxx:93
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 ...
Definition
TrigInDetTrack.cxx:112
TrigInDetTrack.h
TrigInDetTrackFitPar
encapsulates LVL2 track parameters and covariance matrix The vector of track parameters consists of
Definition
TrigInDetTrackFitPar.h:68
TrigInDetTrackFitPar::eta
void eta(const double eta)
Setter: pseudorapidity.
Definition
TrigInDetTrackFitPar.h:220
TrigInDetTrackFitPar::z0
void z0(const double z0)
Setter: longitudinal impact parameter.
Definition
TrigInDetTrackFitPar.h:216
TrigInDetTrackFitPar::phi0
void phi0(const double phi0)
Setter: azimuthal angle of the momentum.
Definition
TrigInDetTrackFitPar.h:218
TrigInDetTrackFitPar::a0
void a0(const double a0)
Setter: transverse impact parameter.
Definition
TrigInDetTrackFitPar.h:214
TrigInDetTrackFitPar::pT
void pT(const double pT)
Setter: transverse momentum.
Definition
TrigInDetTrackFitPar.h:222
TrigInDetTrack
represents a LVL2 ID track
Definition
TrigInDetTrack.h:34
TrigInDetTrack::TrigInDetTrack
TrigInDetTrack()
Constructors: POOL needs default constructor.
Definition
TrigInDetTrack.h:42
TrigInDetTrack::fillRdoList
void fillRdoList()
Definition
TrigInDetTrack.cxx:52
TrigInDetTrack::m_trtDriftCircles
std::vector< const InDet::TRT_DriftCircle * > * m_trtDriftCircles
Definition
TrigInDetTrack.h:213
TrigInDetTrack::m_HitPattern
long m_HitPattern
Definition
TrigInDetTrack.h:211
TrigInDetTrack::m_NStrawTime
int m_NStrawTime
Definition
TrigInDetTrack.h:207
TrigInDetTrack::m_chi2
double m_chi2
Definition
TrigInDetTrack.h:204
TrigInDetTrack::fillSiHitInfo
void fillSiHitInfo()
Definition
TrigInDetTrack.cxx:29
TrigInDetTrack::m_param
const TrigInDetTrackFitPar * m_param
Definition
TrigInDetTrack.h:202
TrigInDetTrack::m_NPixelSpacePoints
int m_NPixelSpacePoints
Definition
TrigInDetTrack.h:209
TrigInDetTrack::m_siSpacePoints
std::vector< const TrigSiSpacePoint * > * m_siSpacePoints
Definition
TrigInDetTrack.h:212
TrigInDetTrack::m_endParam
const TrigInDetTrackFitPar * m_endParam
Definition
TrigInDetTrack.h:203
TrigInDetTrack::m_NStraw
int m_NStraw
Definition
TrigInDetTrack.h:206
TrigInDetTrack::eraseRdoList
void eraseRdoList()
Definition
TrigInDetTrack.h:193
TrigInDetTrack::m_NStrawHits
int m_NStrawHits
Definition
TrigInDetTrack.h:205
TrigInDetTrack::m_algId
AlgoId m_algId
Definition
TrigInDetTrack.h:201
TrigInDetTrack::m_rdoList
std::vector< Identifier > m_rdoList
Definition
TrigInDetTrack.h:216
TrigInDetTrack::m_NSCT_SpacePoints
int m_NSCT_SpacePoints
Definition
TrigInDetTrack.h:210
TrigInDetTrack::m_NTRHits
int m_NTRHits
Definition
TrigInDetTrack.h:208
std
STL namespace.
str
Definition
BTagTrackIpAccessor.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0