CMS 3D CMS Logo

TPtoRecoTrack.cc
Go to the documentation of this file.
2 
3 // Constructors
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 
11 
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 
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:428
TPtoRecoTrack::SetTrackingParticleMomentumPCA
void SetTrackingParticleMomentumPCA(const GlobalVector &p)
Definition: TPtoRecoTrack.h:82
TPtoRecoTrack.h
ProducerES_cfi.TrackingParticle
TrackingParticle
Definition: ProducerES_cfi.py:66
TrackingParticle::parentVertex
const TrackingVertexRef & parentVertex() const
Definition: TrackingParticle.h:90
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
TPtoRecoTrack::TP
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:41
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
TPtoRecoTrack::SetBeamSpot
void SetBeamSpot(const math::XYZPoint &bs)
Definition: TPtoRecoTrack.h:36
TPtoRecoTrack::numTPMothers
int numTPMothers() const
Definition: TPtoRecoTrack.cc:41
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
TPtoRecoTrack::TPtoRecoTrack
TPtoRecoTrack()
Definition: TPtoRecoTrack.cc:4
TPtoRecoTrack::~TPtoRecoTrack
~TPtoRecoTrack()
Definition: TPtoRecoTrack.cc:10
TPtoRecoTrack::SetTrackingParticlePCA
void SetTrackingParticlePCA(const GlobalPoint &v)
Definition: TPtoRecoTrack.h:83
edm::RefVectorIterator
Definition: EDProductfwd.h:33
mps_fire.result
result
Definition: mps_fire.py:311
TPtoRecoTrack::TPMother
TrackingParticle TPMother() const
Definition: TPtoRecoTrack.h:109