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 
34 
36  return TransientTrack(new GsfTransientTrack(*t, theField, theTrackingGeometry));
37 }
38 
40  return TransientTrack(new GsfTransientTrack(t, theField, theTrackingGeometry));
41 }
42 
43 vector<TransientTrack>
45 {
46  vector<TransientTrack> ttVect;
47  ttVect.reserve((*trkColl).size());
48  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
49  ttVect.push_back(TransientTrack(TrackRef(trkColl, i), theField, theTrackingGeometry));
50  }
51  return ttVect;
52 }
53 
54 vector<TransientTrack>
56 {
57  vector<TransientTrack> ttVect;
58  ttVect.reserve((*trkColl).size());
59  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
60  ttVect.push_back( TransientTrack(
61  new GsfTransientTrack(GsfTrackRef(trkColl, i), theField, theTrackingGeometry)) );
62  }
63  return ttVect;
64 }
65 
66 vector<TransientTrack>
68 {
69  vector<TransientTrack> ttVect;
70  ttVect.reserve((*trkColl).size());
71  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
72  const Track * trk = &(*trkColl)[i];
73  const GsfTrack * gsfTrack = dynamic_cast<const GsfTrack *>(trk);
74  if (gsfTrack) {
75  ttVect.push_back( TransientTrack(
76  new GsfTransientTrack(RefToBase<Track>(trkColl, i).castTo<GsfTrackRef>(), theField, theTrackingGeometry)) );
77  } else { // gsf
78  ttVect.push_back(TransientTrack(RefToBase<Track>(trkColl, i).castTo<TrackRef>(), theField, theTrackingGeometry));
79  }
80  }
81  return ttVect;
82 }
83 
84 vector<TransientTrack>
86  const reco::BeamSpot & beamSpot) const
87 {
88  vector<TransientTrack> ttVect = build(trkColl);
89  for (unsigned int i = 0; i < ttVect.size() ; i++) {
90  ttVect[i].setBeamSpot(beamSpot);
91  }
92  return ttVect;
93 }
94 
95 vector<TransientTrack>
97  const reco::BeamSpot & beamSpot) const
98 {
99  vector<TransientTrack> ttVect = build(trkColl);
100  for (unsigned int i = 0; i < ttVect.size() ; i++) {
101  ttVect[i].setBeamSpot(beamSpot);
102  }
103  return ttVect;
104 }
105 
106 vector<TransientTrack>
108  const reco::BeamSpot & beamSpot) const
109 {
110  vector<TransientTrack> ttVect = build(trkColl);
111  for (unsigned int i = 0; i < ttVect.size() ; i++) {
112  ttVect[i].setBeamSpot(beamSpot);
113  }
114  return ttVect;
115 }
116 
118  return TransientTrack(new TransientTrackFromFTS(fts));
119 }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
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:14