CMS 3D CMS Logo

MultiVertexReconstructor.cc File Reference

#include "RecoVertex/MultiVertexFit/interface/MultiVertexReconstructor.h"

Go to the source code of this file.

Typedefs

typedef
MultiVertexFitter::TrackAndWeight 
TrackAndWeight

Functions

vector< vector< TrackAndWeight > > recover (const vector< TransientVertex > &vtces, const vector< reco::TransientTrack > &trks)
void remove (vector< TransientVertex > &vtces, const vector< reco::TransientTrack > &trks)
int verbose ()


Typedef Documentation

typedef MultiVertexFitter::TrackAndWeight TrackAndWeight [static]

Definition at line 6 of file MultiVertexReconstructor.cc.


Function Documentation

vector< vector < TrackAndWeight > > @15053::recover ( const vector< TransientVertex > &  vtces,
const vector< reco::TransientTrack > &  trks 
) [static]

Definition at line 20 of file MultiVertexReconstructor.cc.

References e, i, st, tmp, and w.

00022   {
00023     set < reco::TransientTrack > st;
00024     for ( vector< reco::TransientTrack >::const_iterator i=trks.begin(); 
00025           i!=trks.end() ; ++i )
00026     {
00027       st.insert ( *i );
00028     }
00029     
00030     vector < vector < TrackAndWeight > > bundles;
00031     for ( vector< TransientVertex >::const_iterator vtx=vtces.begin();
00032           vtx!=vtces.end() ; ++vtx )
00033     {
00034       vector < reco::TransientTrack > trks = vtx->originalTracks();
00035       vector < TrackAndWeight > tnws;
00036       for ( vector< reco::TransientTrack >::const_iterator trk=trks.begin(); 
00037             trk!=trks.end() ; ++trk )
00038       {
00039         float w = vtx->trackWeight ( *trk ); 
00040         if ( w > 1e-5 )
00041         {
00042           TrackAndWeight tmp ( *trk, w );
00043           set < reco::TransientTrack >::iterator pos = st.find( *trk );
00044           if ( pos != st.end() )
00045           {
00046             st.erase ( pos  );
00047           }
00048           tnws.push_back ( tmp );
00049         };
00050       };
00051       bundles.push_back ( tnws );
00052     };
00053 
00054     if ( bundles.size() == 0 ) return bundles;
00055 
00056     // now add not-yet assigned tracks
00057     for ( set < reco::TransientTrack >::const_iterator i=st.begin(); 
00058           i!=st.end() ; ++i )
00059     {
00060       // cout << "[MultiVertexReconstructor] recovering " << i->id() << endl;
00061       TrackAndWeight tmp ( *i, 0. );
00062       bundles[0].push_back ( tmp );
00063     }
00064     return bundles;
00065   }

void @15053::remove ( vector< TransientVertex > &  vtces,
const vector< reco::TransientTrack > &  trks 
) [static]

Definition at line 13 of file MultiVertexReconstructor.cc.

References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().

00015   {
00016     cout << "[MultiVertexReconstructor] fixme remove not yet implemented" << endl;
00017     // remove trks from vtces
00018   }

int @15053::verbose (  )  [static]

Definition at line 8 of file MultiVertexReconstructor.cc.

00009   {
00010     return 0;
00011   }


Generated on Tue Jun 9 17:55:41 2009 for CMSSW by  doxygen 1.5.4