11 inline void remove(vector<TransientVertex>& vtces,
const vector<reco::TransientTrack>&
trks) {
12 cout <<
"[MultiVertexReconstructor] fixme remove not yet implemented" << endl;
17 vector<vector<TrackAndWeight> > recover(
const vector<TransientVertex>& vtces,
18 const vector<reco::TransientTrack>&
trks) {
19 set<reco::TransientTrack> st;
20 for (vector<reco::TransientTrack>::const_iterator
i =
trks.begin();
i !=
trks.end(); ++
i) {
24 vector<vector<TrackAndWeight> > bundles;
25 for (vector<TransientVertex>::const_iterator
vtx = vtces.begin();
vtx != vtces.end(); ++
vtx) {
26 vector<reco::TransientTrack>
trks =
vtx->originalTracks();
27 vector<TrackAndWeight> tnws;
28 for (vector<reco::TransientTrack>::const_iterator trk =
trks.begin(); trk !=
trks.end(); ++trk) {
29 float w =
vtx->trackWeight(*trk);
31 TrackAndWeight
tmp(*trk,
w);
32 set<reco::TransientTrack>::iterator
pos = st.find(*trk);
33 if (
pos != st.end()) {
39 bundles.push_back(tnws);
46 for (set<reco::TransientTrack>::const_iterator
i = st.begin();
i != st.end(); ++
i) {
48 TrackAndWeight
tmp(*
i, 0.);
49 bundles[0].push_back(
tmp);
65 : theOldReconstructor(
o.theOldReconstructor->
clone()), theFitter(
o.theFitter) {}
73 const vector<reco::TransientTrack>& primaries,
89 cout <<
"[MultiVertexReconstructor] non-freezing seeder found " <<
tmp.size() <<
" vertices from " <<
trks.size()
90 <<
" tracks." << endl;
92 vector<vector<TrackAndWeight> > rc = recover(
tmp,
trks);
94 vector<TransientVertex>
ret;
100 cout <<
"[MultiVertexReconstructor] input " <<
tmp.size() <<
" vertices, output " <<
ret.size() <<
" vertices." 107 const vector<reco::TransientTrack>& primaries)
const {
113 map<reco::TransientTrack, bool> st;
115 vector<reco::TransientTrack>
total =
trks;
116 for (vector<reco::TransientTrack>::const_iterator
i =
trks.begin();
i !=
trks.end(); ++
i) {
121 for (vector<reco::TransientTrack>::const_iterator
i = primaries.begin();
i != primaries.end(); ++
i) {
130 cout <<
"[MultiVertexReconstructor] freezing seeder found " <<
tmp.size() <<
" vertices from " <<
total.size()
131 <<
" tracks." << endl;
133 vector<vector<TrackAndWeight> > rc = recover(
tmp,
trks);
136 vector<TransientVertex>
ret;
141 cout <<
"[MultiVertexReconstructor] input " <<
tmp.size() <<
" vertices, output " <<
ret.size() <<
" vertices." std::vector< CachingVertex< 5 > > vertices(const std::vector< std::vector< reco::TransientTrack > > &, const std::vector< reco::TransientTrack > &primaries=std::vector< reco::TransientTrack >())
~MultiVertexReconstructor() override
ret
prodAgent to be discontinued
MultiVertexFitter theFitter
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
VertexReconstructor * theOldReconstructor
VertexReconstructor * reconstructor() const
std::pair< reco::TransientTrack, float > TrackAndWeight
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override
MultiVertexReconstructor(const VertexReconstructor &, const AnnealingSchedule &s=DefaultMVFAnnealing(), float revive=-1.)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
MultiVertexReconstructor * clone() const override