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 }
void SetTrackingParticleMomentumPCA(const GlobalVector &p)
Definition: TPtoRecoTrack.h:82
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
void SetTrackingParticlePCA(const GlobalPoint &v)
Definition: TPtoRecoTrack.h:83
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:41
int numTPMothers() const
TrackingParticle TPMother() const
const TrackingVertexRef & parentVertex() const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void SetBeamSpot(const math::XYZPoint &bs)
Definition: TPtoRecoTrack.h:36
Monte Carlo truth information used for tracking validation.
Global3DVector GlobalVector
Definition: GlobalVector.h:10