13 vector<reco::TransientTrack> newtrks;
16 for (vector<reco::TransientTrack>::const_iterator
i =
trks.begin();
i !=
trks.end(); ++
i) {
18 newtrks.push_back(*
i);
35 vector<reco::TransientTrack> newrfs;
37 vector<reco::TransientTrack>::const_iterator origtrkiter =
trks.begin();
38 for (vector<reco::TransientTrack>::const_iterator
i = oldrfs.begin();
i != oldrfs.end(); ++
i) {
45 ret.refittedTracks(newrfs);
48 if (
ret.refittedTracks().size() >
ret.originalTracks().size()) {
49 edm::LogError(
"AdaptiveVertexReconstructor") <<
"More refitted tracks than original tracks!";
56 set<reco::TransientTrack>& remainingtrks,
62 const vector<reco::TransientTrack>& origtrks = newvtx.
originalTracks();
63 for (vector<reco::TransientTrack>::const_iterator
i = origtrks.begin();
i != origtrks.end(); ++
i) {
66 remainingtrks.erase(*
i);
72 : thePrimaryFitter(nullptr), theSecondaryFitter(nullptr), theMinWeight(min_weight), theWeightThreshold(0.001) {
121 : thePrimaryFitter(nullptr), theSecondaryFitter(nullptr), theMinWeight(0.5), theWeightThreshold(0.001) {
133 primcut =
m.getParameter<
double>(
"primcut");
134 primT =
m.getParameter<
double>(
"primT");
135 primr =
m.getParameter<
double>(
"primr");
136 seccut =
m.getParameter<
double>(
"seccut");
137 secT =
m.getParameter<
double>(
"secT");
138 secr =
m.getParameter<
double>(
"secr");
141 smoothing =
m.getParameter<
bool>(
"smoothing");
151 return vertices(vector<reco::TransientTrack>(),
t,
s,
false,
true);
155 const vector<reco::TransientTrack>&
tracks,
165 const vector<reco::TransientTrack>&
tracks,
168 bool usespot)
const {
169 vector<TransientVertex>
ret;
170 set<reco::TransientTrack> remainingtrks;
172 copy(
tracks.begin(),
tracks.end(), inserter(remainingtrks, remainingtrks.begin()));
175 unsigned int n_tracks = remainingtrks.size();
179 while (remainingtrks.size() > 1) {
189 vector<reco::TransientTrack> fittrks;
190 fittrks.reserve(remainingtrks.size());
192 copy(remainingtrks.begin(), remainingtrks.end(), back_inserter(fittrks));
195 if ((
ret.empty()) && has_primaries) {
197 copy(primaries.begin(), primaries.end(), back_inserter(fittrks));
199 if ((
ret.empty()) && usespot) {
200 tmpvtx = fitter->
vertex(fittrks,
s);
202 tmpvtx = fitter->
vertex(fittrks);
205 ret.push_back(newvtx);
207 if (n_tracks == remainingtrks.size()) {
211 LogDebug(
"AdaptiveVertexReconstructor") <<
"no tracks in vertex. trying again without beamspot constraint!";
214 LogDebug(
"AdaptiveVertexReconstructor")
215 <<
"all tracks (" << n_tracks <<
") would be recycled for next fit. Trying with low threshold!";
216 erase(newvtx, remainingtrks, 1.
e-5);
217 if (n_tracks == remainingtrks.size()) {
218 LogDebug(
"AdaptiveVertexReconstructor") <<
"low threshold didnt help! "
219 <<
"Discontinue procedure!";
225 n_tracks = remainingtrks.size();
236 vector<TransientVertex>
ret;
237 for (vector<TransientVertex>::const_iterator
i = old.begin();
i != old.end(); ++
i) {
238 if (!(
i->hasTrackWeight())) {
247 for (TransientVertex::TransientTrackToFloatMap::const_iterator
w = wm.begin();
w != wm.end(); ++
w) {