CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientTrackBuilder.cc
Go to the documentation of this file.
5 
6 using namespace reco;
7 using namespace std;
8 using namespace edm;
9 
11  return TransientTrack(*t, theField, theTrackingGeometry);
12 }
13 
15  return TransientTrack(t, theField, theTrackingGeometry);
16 }
17 
19  return TransientTrack(new GsfTransientTrack(*t, theField, theTrackingGeometry));
20 }
21 
23  return TransientTrack(new GsfTransientTrack(t, theField, theTrackingGeometry));
24 }
25 
27  return TransientTrack(*t, theField, theTrackingGeometry);
28 }
29 
31  return TransientTrack(t, theField, theTrackingGeometry);
32 }
33 
35  return TransientTrack(*t, theField, theTrackingGeometry);
36 }
37 
39  return TransientTrack(t, theField, theTrackingGeometry);
40 }
41 
42 
44  return TransientTrack(new GsfTransientTrack(*t, theField, theTrackingGeometry));
45 }
46 
48  return TransientTrack(new GsfTransientTrack(t, theField, theTrackingGeometry));
49 }
50 
51 vector<TransientTrack>
53 {
54  vector<TransientTrack> ttVect;
55  ttVect.reserve((*trkColl).size());
56  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
57  ttVect.push_back(TransientTrack(TrackRef(trkColl, i), theField, theTrackingGeometry));
58  }
59  return ttVect;
60 }
61 
62 vector<TransientTrack>
64 {
65  vector<TransientTrack> ttVect;
66  ttVect.reserve((*trkColl).size());
67  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
68  ttVect.push_back( TransientTrack(
69  new GsfTransientTrack(GsfTrackRef(trkColl, i), theField, theTrackingGeometry)) );
70  }
71  return ttVect;
72 }
73 
74 vector<TransientTrack>
76 {
77  vector<TransientTrack> ttVect;
78  ttVect.reserve((*trkColl).size());
79  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
80  const Track * trk = &(*trkColl)[i];
81  const GsfTrack * gsfTrack = dynamic_cast<const GsfTrack *>(trk);
82  if (gsfTrack) {
83  ttVect.push_back( TransientTrack(
84  new GsfTransientTrack(RefToBase<Track>(trkColl, i).castTo<GsfTrackRef>(), theField, theTrackingGeometry)) );
85  } else { // gsf
86  ttVect.push_back(TransientTrack(RefToBase<Track>(trkColl, i).castTo<TrackRef>(), theField, theTrackingGeometry));
87  }
88  }
89  return ttVect;
90 }
91 
92 vector<TransientTrack>
94  const reco::BeamSpot & beamSpot) const
95 {
96  vector<TransientTrack> ttVect = build(trkColl);
97  for (unsigned int i = 0; i < ttVect.size() ; i++) {
98  ttVect[i].setBeamSpot(beamSpot);
99  }
100  return ttVect;
101 }
102 
103 vector<TransientTrack>
105  const reco::BeamSpot & beamSpot) const
106 {
107  vector<TransientTrack> ttVect = build(trkColl);
108  for (unsigned int i = 0; i < ttVect.size() ; i++) {
109  ttVect[i].setBeamSpot(beamSpot);
110  }
111  return ttVect;
112 }
113 
114 vector<TransientTrack>
116  const reco::BeamSpot & beamSpot) const
117 {
118  vector<TransientTrack> ttVect = build(trkColl);
119  for (unsigned int i = 0; i < ttVect.size() ; i++) {
120  ttVect[i].setBeamSpot(beamSpot);
121  }
122  return ttVect;
123 }
124 
126  return TransientTrack(new TransientTrackFromFTS(fts));
127 }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
tuple t
Definition: tree.py:139
int i
Definition: DBlmapReader.cc:9
reco::TransientTrack build(const reco::Track *p) const
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19