13 void remove ( vector < TransientVertex > & vtces,
14 const vector < reco::TransientTrack > & trks )
16 cout <<
"[MultiVertexReconstructor] fixme remove not yet implemented" << endl;
20 vector < vector < TrackAndWeight > > recover (
21 const vector < TransientVertex > & vtces,
const vector < reco::TransientTrack > & trks )
23 set < reco::TransientTrack > st;
24 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
30 vector < vector < TrackAndWeight > > bundles;
31 for ( vector< TransientVertex >::const_iterator vtx=vtces.begin();
32 vtx!=vtces.end() ; ++vtx )
34 vector < reco::TransientTrack > trks = vtx->originalTracks();
35 vector < TrackAndWeight > tnws;
36 for ( vector< reco::TransientTrack >::const_iterator trk=trks.begin();
37 trk!=trks.end() ; ++trk )
39 float w = vtx->trackWeight ( *trk );
42 TrackAndWeight
tmp ( *trk, w );
43 set < reco::TransientTrack >::iterator
pos = st.find( *trk );
44 if ( pos != st.end() )
48 tnws.push_back (
tmp );
51 bundles.push_back ( tnws );
54 if ( bundles.size() == 0 )
return bundles;
57 for ( set < reco::TransientTrack >::const_iterator
i=st.begin();
61 TrackAndWeight
tmp ( *
i, 0. );
62 bundles[0].push_back (
tmp );
70 theOldReconstructor ( o.
clone() ), theFitter (
87 theOldReconstructor ( o.theOldReconstructor->
clone() ),
88 theFitter ( o.theFitter )
92 const vector < reco::TransientTrack > & trks,
99 const vector < reco::TransientTrack > & trks,
100 const vector < reco::TransientTrack > & primaries,
103 return vertices ( trks, primaries );
108 const vector < reco::TransientTrack > & trks )
const
121 cout <<
"[MultiVertexReconstructor] non-freezing seeder found " << tmp.size()
122 <<
" vertices from " << trks.size() <<
" tracks." << endl;
124 vector < vector < TrackAndWeight > > rc = recover ( tmp, trks );
126 vector < TransientVertex >
ret;
128 i!=cvts.end() ; ++
i )
130 ret.push_back ( *
i );
135 cout <<
"[MultiVertexReconstructor] input " << tmp.size()
136 <<
" vertices, output " << ret.size() <<
" vertices."
143 const vector < reco::TransientTrack > & trks,
144 const vector < reco::TransientTrack > & primaries )
const
151 map < reco::TransientTrack, bool > st;
153 vector < reco::TransientTrack >
total = trks;
154 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
155 i!=trks.end() ; ++
i )
161 for ( vector< reco::TransientTrack >::const_iterator
i=primaries.begin();
162 i!=primaries.end() ; ++
i )
166 total.push_back ( *
i );
174 cout <<
"[MultiVertexReconstructor] freezing seeder found " << tmp.size()
175 <<
" vertices from " << total.size() <<
" tracks." << endl;
177 vector < vector < TrackAndWeight > > rc = recover ( tmp, trks );
180 vector < TransientVertex >
ret;
182 i!=cvts.end() ; ++
i )
184 ret.push_back ( *
i );
188 cout <<
"[MultiVertexReconstructor] input " << tmp.size()
189 <<
" 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()
std::pair< reco::TransientTrack, float > TrackAndWeight
MultiVertexFitter theFitter
VertexReconstructor * reconstructor() const
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
VertexReconstructor * theOldReconstructor
MultiVertexReconstructor * clone() const
MultiVertexReconstructor(const VertexReconstructor &, const AnnealingSchedule &s=DefaultMVFAnnealing(), float revive=-1.)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
std::vector< std::vector< double > > tmp
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const