Go to the documentation of this file.00001 #ifndef _MultiVertexFitter_H_
00002 #define _MultiVertexFitter_H_
00003
00004 #include <vector>
00005 #include <set>
00006 #include <utility>
00007 #include <map>
00008 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h"
00009 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00010 #include "RecoVertex/MultiVertexFit/interface/DefaultMVFAnnealing.h"
00011 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00012 #include "RecoVertex/LinearizationPointFinders/interface/DefaultLinearizationPointFinder.h"
00013 #include "RecoVertex/MultiVertexFit/interface/LinTrackCache.h"
00014
00015 class MultiVertexFitter
00016 {
00017 public:
00036 MultiVertexFitter( const AnnealingSchedule & sched = DefaultMVFAnnealing(),
00037 const LinearizationPointFinder & seeder =
00038 DefaultLinearizationPointFinder(),
00039 float revive_below = -1. );
00040 MultiVertexFitter( const MultiVertexFitter & );
00041 ~MultiVertexFitter();
00042
00043 typedef std::pair < reco::TransientTrack, float > TrackAndWeight;
00044 typedef std::map < int , double > SeedToWeightMap;
00045 typedef std::map < reco::TransientTrack, SeedToWeightMap > TrackAndSeedToWeightMap;
00046
00052 std::vector < CachingVertex<5> > vertices (
00053 const std::vector < std::vector < reco::TransientTrack > > &,
00054 const std::vector < reco::TransientTrack > & primaries =
00055 std::vector < reco::TransientTrack > () );
00056
00064 std::vector < CachingVertex<5> > vertices (
00065 const std::vector < std::vector < TrackAndWeight > > &,
00066 const std::vector < reco::TransientTrack > & primaries =
00067 std::vector < reco::TransientTrack > () );
00068
00074 std::vector < CachingVertex<5> > vertices (
00075 const std::vector < CachingVertex<5> > &,
00076 const std::vector < reco::TransientTrack > & primaries =
00077 std::vector < reco::TransientTrack > () );
00078
00082 std::vector < CachingVertex<5> > vertices ( const std::vector < TransientVertex > &,
00083 const std::vector < reco::TransientTrack > & primaries =
00084 std::vector < reco::TransientTrack > () );
00085
00086 private:
00087 std::vector < CachingVertex<5> > fit();
00088 void lostVertexClaimer();
00089 void updateWeights();
00090 bool updateSeeds();
00091
00092 void clear();
00093 void createSeed ( const std::vector < reco::TransientTrack > & tracks );
00094 void createSeed ( const std::vector < TrackAndWeight > & tracks );
00095 void createPrimaries ( const std::vector < reco::TransientTrack > tracks );
00096 void printWeights() const;
00097 void printWeights( const reco::TransientTrack & ) const;
00098 void printSeeds() const;
00099
00100 int seedNr();
00101 void resetSeedNr();
00102
00103 private:
00104
00105 typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
00106 typedef ReferenceCountingPointer<LinearizedTrackState<5> > RefCountedLinearizedTrackState;
00107
00108
00109
00110
00111 std::vector < std::pair < int, CachingVertex<5> > > theVertexStates;
00112 int theVertexStateNr;
00113 float theReviveBelow;
00114 std::vector < reco::TransientTrack > theTracks;
00115 std::set < reco::TransientTrack > thePrimaries;
00116 AnnealingSchedule * theAssComp;
00117 LinearizationPointFinder * theSeeder;
00118 mutable TrackAndSeedToWeightMap theWeights;
00119 LinTrackCache theCache;
00120 };
00121
00122 #endif