src
AnalysisDataFormats
TrackInfo
src
TPtoRecoTrack.cc
Go to the documentation of this file.
1
#include "
AnalysisDataFormats/TrackInfo/interface/TPtoRecoTrack.h
"
2
3
// Constructors
4
TPtoRecoTrack::TPtoRecoTrack
() {
5
SetBeamSpot
(
math::XYZPoint
(-9999.0, -9999.0, -9999.0));
6
SetTrackingParticlePCA
(
GlobalPoint
(-9999.0, -9999.0, -9999.0));
7
SetTrackingParticleMomentumPCA
(
GlobalVector
(-9999.0, -9999.0, -9999.0));
8
}
9
10
TPtoRecoTrack::~TPtoRecoTrack
() {}
11
12
TrackingParticle
TPtoRecoTrack::TPMother
(
unsigned
short
i
)
const
{
13
std::vector<TrackingParticle>
result
;
14
15
if
(
TP
().parentVertex().isNonnull()) {
16
if
(
TP
().parentVertex()->nSourceTracks() > 0) {
17
for
(
TrackingParticleRefVector::iterator
si =
TP
().parentVertex()->sourceTracks_begin();
18
si !=
TP
().
parentVertex
()->sourceTracks_end();
19
++si) {
20
for
(
TrackingParticleRefVector::iterator
di =
TP
().
parentVertex
()->daughterTracks_begin();
21
di !=
TP
().
parentVertex
()->daughterTracks_end();
22
++di) {
23
if
(si != di) {
24
result
.push_back(**si);
25
break
;
26
}
27
}
28
if
(!
result
.empty())
29
break
;
30
}
31
}
else
{
32
return
TrackingParticle
();
33
}
34
}
else
{
35
return
TrackingParticle
();
36
}
37
38
return
i
<
result
.size() ?
result
[
i
] :
TrackingParticle
();
39
}
40
41
int
TPtoRecoTrack::numTPMothers
()
const
{
42
int
count
= 0;
43
for
(
TrackingParticleRefVector::iterator
si =
TP
().parentVertex()->sourceTracks_begin();
44
si !=
TP
().
parentVertex
()->sourceTracks_end();
45
++si) {
46
for
(
TrackingParticleRefVector::iterator
di =
TP
().
parentVertex
()->daughterTracks_begin();
47
di !=
TP
().
parentVertex
()->daughterTracks_end();
48
++di) {
49
if
(si != di)
50
count
++;
51
break
;
52
}
53
if
(
count
> 0)
54
break
;
55
}
56
return
count
;
57
}
mps_fire.i
i
Definition:
mps_fire.py:429
TPtoRecoTrack::~TPtoRecoTrack
~TPtoRecoTrack()
Definition:
TPtoRecoTrack.cc:10
mps_fire.result
result
Definition:
mps_fire.py:311
ProducerSetup_cfi.TrackingParticle
TrackingParticle
Definition:
ProducerSetup_cfi.py:72
TPtoRecoTrack::SetTrackingParticleMomentumPCA
void SetTrackingParticleMomentumPCA(const GlobalVector &p)
Definition:
TPtoRecoTrack.h:82
GlobalPoint
Global3DPoint GlobalPoint
Definition:
GlobalPoint.h:10
TPtoRecoTrack::SetTrackingParticlePCA
void SetTrackingParticlePCA(const GlobalPoint &v)
Definition:
TPtoRecoTrack.h:83
TPtoRecoTrack::TP
TrackingParticle TP() const
Definition:
TPtoRecoTrack.h:41
TPtoRecoTrack::numTPMothers
int numTPMothers() const
Definition:
TPtoRecoTrack.cc:41
TPtoRecoTrack::TPMother
TrackingParticle TPMother() const
Definition:
TPtoRecoTrack.h:109
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:352
TrackingParticle::parentVertex
const TrackingVertexRef & parentVertex() const
Definition:
TrackingParticle.h:90
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition:
Point3D.h:12
TPtoRecoTrack::SetBeamSpot
void SetBeamSpot(const math::XYZPoint &bs)
Definition:
TPtoRecoTrack.h:36
edm::RefVectorIterator
Definition:
EDProductfwd.h:33
TPtoRecoTrack.h
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition:
TrackingParticle.h:29
TPtoRecoTrack::TPtoRecoTrack
TPtoRecoTrack()
Definition:
TPtoRecoTrack.cc:4
GlobalVector
Global3DVector GlobalVector
Definition:
GlobalVector.h:10
Generated for CMSSW Reference Manual by
1.8.14