src
AnalysisDataFormats
TrackInfo
src
RecoTracktoTP.cc
Go to the documentation of this file.
1
#include "
AnalysisDataFormats/TrackInfo/interface/RecoTracktoTP.h
"
2
3
// Constructors
4
RecoTracktoTP::RecoTracktoTP
() {
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
RecoTracktoTP::~RecoTracktoTP
() {}
11
12
TrackingParticle
RecoTracktoTP::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
RecoTracktoTP::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
}
RecoTracktoTP::TP
TrackingParticle TP() const
Definition:
RecoTracktoTP.h:33
mps_fire.i
i
Definition:
mps_fire.py:429
RecoTracktoTP::SetTrackingParticleMomentumPCA
void SetTrackingParticleMomentumPCA(const GlobalVector &p)
Definition:
RecoTracktoTP.h:55
mps_fire.result
result
Definition:
mps_fire.py:311
ProducerSetup_cfi.TrackingParticle
TrackingParticle
Definition:
ProducerSetup_cfi.py:73
GlobalPoint
Global3DPoint GlobalPoint
Definition:
GlobalPoint.h:10
RecoTracktoTP::SetTrackingParticlePCA
void SetTrackingParticlePCA(const GlobalPoint &v)
Definition:
RecoTracktoTP.h:56
RecoTracktoTP::~RecoTracktoTP
~RecoTracktoTP()
Definition:
RecoTracktoTP.cc:10
RecoTracktoTP::numTPMothers
int numTPMothers() const
Definition:
RecoTracktoTP.cc:41
RecoTracktoTP::TPMother
TrackingParticle TPMother() const
Definition:
RecoTracktoTP.h:83
RecoTracktoTP::RecoTracktoTP
RecoTracktoTP()
Definition:
RecoTracktoTP.cc:4
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:359
TrackingParticle::parentVertex
const TrackingVertexRef & parentVertex() const
Definition:
TrackingParticle.h:90
RecoTracktoTP.h
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition:
Point3D.h:12
RecoTracktoTP::SetBeamSpot
void SetBeamSpot(const math::XYZPoint &bs)
Definition:
RecoTracktoTP.h:28
edm::RefVectorIterator
Definition:
EDProductfwd.h:33
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition:
TrackingParticle.h:29
GlobalVector
Global3DVector GlobalVector
Definition:
GlobalVector.h:10
Generated for CMSSW Reference Manual by
1.8.14