18 theWeightMapIsAvailable(
false),
19 theCovMapAvailable(
false),
20 withRefittedTracks(
false) {}
24 const std::vector<TransientTrack>&
tracks,
32 theWeightMapIsAvailable(
false),
33 theCovMapAvailable(
false),
34 withRefittedTracks(
false) {
41 const std::vector<TransientTrack>&
tracks,
43 : theVertexState(
pos,
time, posTimeError),
49 theWeightMapIsAvailable(
false),
50 theCovMapAvailable(
false),
51 withRefittedTracks(
false) {
57 const std::vector<TransientTrack>&
tracks,
66 theWeightMapIsAvailable(
false),
67 theCovMapAvailable(
false),
68 withRefittedTracks(
false) {}
73 const std::vector<TransientTrack>&
tracks,
76 : theVertexState(
pos,
time, posTimeError),
82 theWeightMapIsAvailable(
false),
83 theCovMapAvailable(
false),
84 withRefittedTracks(
false) {}
90 const std::vector<TransientTrack>&
tracks,
92 : thePriorVertexState(priorPos, priorErr),
99 theWeightMapIsAvailable(
false),
100 theCovMapAvailable(
false),
101 withRefittedTracks(
false) {
106 const double priorTime,
111 const std::vector<TransientTrack>&
tracks,
113 : thePriorVertexState(priorPos, priorTime, priorErr),
115 theOriginalTracks(
tracks),
120 theWeightMapIsAvailable(
false),
121 theCovMapAvailable(
false),
122 withRefittedTracks(
false) {
130 const std::vector<TransientTrack>&
tracks,
133 : thePriorVertexState(priorPos, priorErr),
135 theOriginalTracks(
tracks),
140 theWeightMapIsAvailable(
false),
141 theCovMapAvailable(
false),
142 withRefittedTracks(
false) {}
145 const double priorTime,
150 const std::vector<TransientTrack>&
tracks,
153 : thePriorVertexState(priorPos, priorTime, priorErr),
155 theOriginalTracks(
tracks),
160 theWeightMapIsAvailable(
false),
161 theCovMapAvailable(
false),
162 withRefittedTracks(
false) {}
165 : theVertexState(state),
166 theOriginalTracks(
tracks),
171 theWeightMapIsAvailable(
false),
172 theCovMapAvailable(
false),
173 withRefittedTracks(
false) {
178 const std::vector<TransientTrack>&
tracks,
181 : theVertexState(state),
182 theOriginalTracks(
tracks),
187 theWeightMapIsAvailable(
false),
188 theCovMapAvailable(
false),
189 withRefittedTracks(
false) {}
193 const std::vector<TransientTrack>&
tracks,
195 : thePriorVertexState(
prior),
196 theVertexState(state),
197 theOriginalTracks(
tracks),
202 theWeightMapIsAvailable(
false),
203 theCovMapAvailable(
false),
204 withRefittedTracks(
false) {
210 const std::vector<TransientTrack>&
tracks,
213 : thePriorVertexState(
prior),
214 theVertexState(state),
215 theOriginalTracks(
tracks),
220 theWeightMapIsAvailable(
false),
221 theCovMapAvailable(
false),
222 withRefittedTracks(
false) {}
231 throw VertexException(
"TransientVertex::refittedTracks: No refitted tracks stored in input container");
243 std::vector<TransientTrack>::const_iterator foundTrack =
256 throw VertexException(
"TransientVertex::Track-to-track covariance matrices not available");
267 TTtoTTmap::const_iterator it =
theCovMap.find(*tr1);
269 const TTmap& tm = it->second;
270 TTmap::const_iterator nit = tm.find(*tr2);
271 if (nit != tm.end()) {
272 return (nit->second);
274 throw VertexException(
"TransientVertex::requested Track-to-track covariance matrix does not exist");
277 throw VertexException(
"TransientVertex::requested Track-to-track covariance matrix does not exist");
308 theVertexState.error4D().matrix4D(),
309 theVertexState.time(),
312 theOriginalTracks.size());
313 for (std::vector<TransientTrack>::const_iterator
i = theOriginalTracks.begin();
i != theOriginalTracks.end(); ++
i) {
319 if (withRefittedTracks) {
330 using namespace reco;
337 vtxCompPtrCand.
setCovariance(vertexState().error4D().matrix4D());
338 vtxCompPtrCand.
setChi2AndNdof(totalChiSquared(), degreesOfFreedom());
342 for (std::vector<reco::TransientTrack>::const_iterator
tt = theOriginalTracks.begin();
tt != theOriginalTracks.end();
349 edm::LogError(
"DynamicCastingFailed") <<
"Casting of TransientTrack to CandidatePtrTransientTrack failed!";
358 return vtxCompPtrCand;