12 : theFitter(vf->
clone()), theUpdator(vu->
clone()), theEstimator(ve->
clone()), theMinProb(0.05) {}
18 theMinProb(
other.theMinProb) {}
33 bool use_spot)
const {
34 std::vector<TransientVertex>
all;
47 <<
" vertex finding stops here.";
51 std::vector<RefCountedVertexTrack> selected =
vtx.tracks();
54 std::vector<RefCountedVertexTrack> remain;
56 while (!
found && selected.size() >= 2) {
60 if (iWorst != selected.end()) {
62 remain.push_back(*iWorst);
63 selected.erase(iWorst);
65 if (selected.size() == 1) {
67 remain.push_back(selected.front());
82 <<
"vertex finding stops here.";
88 selected =
vtx.tracks();
94 int n_tracks_in_vertex = selected.size();
97 for (std::vector<RefCountedVertexTrack>::const_iterator
t = selected.begin();
t != selected.end(); ++
t) {
98 if ((**t).weight() < 0.5) {
102 remain.push_back(*
t);
103 n_tracks_in_vertex--;
107 if (n_tracks_in_vertex > 1) {
110 edm::LogError(
"TrimmedVertexFinder") <<
"found vertex has less than 2 tracks";
117 for (std::vector<RefCountedVertexTrack>::const_iterator
i = remain.begin();
i != remain.end();
i++) {
119 dynamic_cast<const PerigeeLinearizedTrackState*>((**i).linearizedTrack().get());
120 if (plts ==
nullptr) {
121 throw cms::Exception(
"TrimmedVertexFinder: can't take track from non-perigee track state");
124 tks.push_back(plts->
track());
136 std::vector<RefCountedVertexTrack>::iterator iWorst = vtxTracks.end();
137 float worseChi2 = 0.;
138 for (std::vector<RefCountedVertexTrack>::iterator itr = vtxTracks.begin(); itr != vtxTracks.end(); itr++) {
152 if (
vtx.tracks().size() == 2)
156 if (prob < cut && chi2 >= worseChi2) {