14 inline void remove ( vector < TransientVertex > & vtces,
15 const vector < reco::TransientTrack > & trks )
17 cout <<
"[MultiVertexReconstructor] fixme remove not yet implemented" << endl;
22 vector < vector < TrackAndWeight > > recover (
23 const vector < TransientVertex > & vtces,
const vector < reco::TransientTrack > & trks )
25 set < reco::TransientTrack > st;
26 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
32 vector < vector < TrackAndWeight > > bundles;
33 for ( vector< TransientVertex >::const_iterator vtx=vtces.begin();
34 vtx!=vtces.end() ; ++vtx )
36 vector < reco::TransientTrack > trks = vtx->originalTracks();
37 vector < TrackAndWeight > tnws;
38 for ( vector< reco::TransientTrack >::const_iterator trk=trks.begin();
39 trk!=trks.end() ; ++trk )
41 float w = vtx->trackWeight ( *trk );
44 TrackAndWeight
tmp ( *trk, w );
45 set < reco::TransientTrack >::iterator pos = st.find( *trk );
46 if ( pos != st.end() )
50 tnws.push_back (
tmp );
53 bundles.push_back ( tnws );
56 if ( bundles.size() == 0 )
return bundles;
59 for ( set < reco::TransientTrack >::const_iterator
i=st.begin();
63 TrackAndWeight
tmp ( *
i, 0. );
64 bundles[0].push_back (
tmp );
72 theOldReconstructor ( o.
clone() ), theFitter (
89 theOldReconstructor ( o.theOldReconstructor->
clone() ),
90 theFitter ( o.theFitter )
94 const vector < reco::TransientTrack > & trks,
101 const vector < reco::TransientTrack > & trks,
102 const vector < reco::TransientTrack > & primaries,
105 return vertices ( trks, primaries );
110 const vector < reco::TransientTrack > & trks )
const
123 cout <<
"[MultiVertexReconstructor] non-freezing seeder found " << tmp.size()
124 <<
" vertices from " << trks.size() <<
" tracks." << endl;
126 vector < vector < TrackAndWeight > > rc = recover ( tmp, trks );
128 vector < TransientVertex >
ret;
130 i!=cvts.end() ; ++
i )
132 ret.push_back ( *
i );
137 cout <<
"[MultiVertexReconstructor] input " << tmp.size()
138 <<
" vertices, output " << ret.size() <<
" vertices."
145 const vector < reco::TransientTrack > & trks,
146 const vector < reco::TransientTrack > & primaries )
const
153 map < reco::TransientTrack, bool > st;
155 vector < reco::TransientTrack >
total = trks;
156 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
157 i!=trks.end() ; ++
i )
163 for ( vector< reco::TransientTrack >::const_iterator
i=primaries.begin();
164 i!=primaries.end() ; ++
i )
168 total.push_back ( *
i );
176 cout <<
"[MultiVertexReconstructor] freezing seeder found " << tmp.size()
177 <<
" vertices from " << total.size() <<
" tracks." << endl;
179 vector < vector < TrackAndWeight > > rc = recover ( tmp, trks );
182 vector < TransientVertex >
ret;
184 i!=cvts.end() ; ++
i )
186 ret.push_back ( *
i );
190 cout <<
"[MultiVertexReconstructor] input " << tmp.size()
191 <<
" 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