18 if (prevVtxComponents.empty()) {
19 throw VertexException(
"GsfVertexUpdator::(Previous) Vertex to update has no components");
22 LTC ltComponents =
track->linearizedTrack()->components();
23 if (ltComponents.empty()) {
24 throw VertexException(
"GsfVertexUpdator::Track to add to vertex has no components");
27 if ((ltComponents.size() == 1) && (prevVtxComponents.size() == 1))
32 std::vector<VertexComponent> newVertexComponents;
33 newVertexComponents.reserve(prevVtxComponents.size() * ltComponents.size());
40 for (VSC::iterator vertexCompIter = prevVtxComponents.begin(); vertexCompIter != prevVtxComponents.end();
42 for (LTC::iterator trackCompIter = ltComponents.begin(); trackCompIter != ltComponents.end(); trackCompIter++) {
45 if (!newVertexComponents.back().first.isValid())
53 std::vector<RefCountedVertexTrack> newVertexTracks = oldVertex.
tracks();
54 newVertexTracks.push_back(
track);
99 throw VertexException(
"GsfVertexUpdator::sign of -1 not yet implemented.");
103 if (weightInMixture < 0.)
122 const std::vector<GsfVertexUpdator::VertexComponent>& newVertexComponents)
const {
123 VSC vertexComponents;
124 vertexComponents.reserve(newVertexComponents.size());
129 double totalChi2 = 0.;
131 for (std::vector<VertexComponent>::const_iterator iter = newVertexComponents.begin();
132 iter != newVertexComponents.end();
138 edm::LogWarning(
"GsfVertexUpdator") <<
"Updated Vertex has total weight of 0. "
139 <<
"The track is probably very far away.";
143 for (std::vector<VertexComponent>::const_iterator iter = newVertexComponents.begin();
144 iter != newVertexComponents.end();
147 if (iter->second.first > DBL_MIN) {
148 vertexComponents.push_back(
VertexState(iter->first.weightTimesPosition(), iter->first.weight(),
weight));
149 totalChi2 += iter->second.second *
weight;
155 if (vertexComponents.empty()) {
156 edm::LogWarning(
"GsfVertexUpdator") <<
"No Vertex State left after reweighting.";