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++) {
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) {
Log< level::Error, false > LogError
virtual CachingVertex< N > remove(const CachingVertex< N > &v, const typename CachingVertex< N >::RefCountedVertexTrack t) const =0
virtual CachingVertex< N > vertex(const std::vector< reco::TransientTrack > &tracks) const =0
VertexUpdator< 5 > * theUpdator
VertexTrackCompatibilityEstimator< 5 > * theEstimator
float ChiSquaredProbability(double chiSquared, double nrDOF)
std::vector< RefCountedVertexTrack >::iterator theWorst(const CachingVertex< 5 > &vtx, std::vector< RefCountedVertexTrack > &vtxTracks, float cut) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
reco::TransientTrack track() const override
VertexFitter< 5 > * theFitter
Log< level::Warning, false > LogWarning
std::vector< TransientVertex > vertices(std::vector< reco::TransientTrack > &remain) const
TrimmedVertexFinder(const VertexFitter< 5 > *vf, const VertexUpdator< 5 > *vu, const VertexTrackCompatibilityEstimator< 5 > *ve)