File indexing completed on 2024-04-06 12:29:14
0001 #ifndef _MultiVertexFitter_H_
0002 #define _MultiVertexFitter_H_
0003
0004 #include <vector>
0005 #include <set>
0006 #include <utility>
0007 #include <map>
0008 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h"
0009 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0010 #include "RecoVertex/MultiVertexFit/interface/DefaultMVFAnnealing.h"
0011 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0012 #include "RecoVertex/LinearizationPointFinders/interface/DefaultLinearizationPointFinder.h"
0013 #include "RecoVertex/MultiVertexFit/interface/LinTrackCache.h"
0014
0015 class MultiVertexFitter {
0016 public:
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 MultiVertexFitter(const AnnealingSchedule &sched = DefaultMVFAnnealing(),
0036 const LinearizationPointFinder &seeder = DefaultLinearizationPointFinder(),
0037 float revive_below = -1.);
0038 MultiVertexFitter(const MultiVertexFitter &);
0039 ~MultiVertexFitter();
0040
0041 typedef std::pair<reco::TransientTrack, float> TrackAndWeight;
0042 typedef std::map<int, double> SeedToWeightMap;
0043 typedef std::map<reco::TransientTrack, SeedToWeightMap> TrackAndSeedToWeightMap;
0044
0045
0046
0047
0048
0049
0050 std::vector<CachingVertex<5> > vertices(
0051 const std::vector<std::vector<reco::TransientTrack> > &,
0052 const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
0053
0054
0055
0056
0057
0058
0059
0060
0061 std::vector<CachingVertex<5> > vertices(
0062 const std::vector<std::vector<TrackAndWeight> > &,
0063 const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
0064
0065
0066
0067
0068
0069
0070 std::vector<CachingVertex<5> > vertices(
0071 const std::vector<CachingVertex<5> > &,
0072 const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
0073
0074
0075
0076
0077 std::vector<CachingVertex<5> > vertices(
0078 const std::vector<TransientVertex> &,
0079 const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
0080
0081 private:
0082 std::vector<CachingVertex<5> > fit();
0083 void lostVertexClaimer();
0084 void updateWeights();
0085 bool updateSeeds();
0086
0087 void clear();
0088 void createSeed(const std::vector<reco::TransientTrack> &tracks);
0089 void createSeed(const std::vector<TrackAndWeight> &tracks);
0090 void createPrimaries(const std::vector<reco::TransientTrack> &tracks);
0091 void printWeights() const;
0092 void printWeights(const reco::TransientTrack &) const;
0093 void printSeeds() const;
0094
0095 int seedNr();
0096 void resetSeedNr();
0097
0098 private:
0099 typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
0100 typedef ReferenceCountingPointer<LinearizedTrackState<5> > RefCountedLinearizedTrackState;
0101
0102
0103
0104
0105 std::vector<std::pair<int, CachingVertex<5> > > theVertexStates;
0106 int theVertexStateNr;
0107 float theReviveBelow;
0108 std::vector<reco::TransientTrack> theTracks;
0109 std::set<reco::TransientTrack> thePrimaries;
0110 AnnealingSchedule *theAssComp;
0111 LinearizationPointFinder *theSeeder;
0112 TrackAndSeedToWeightMap theWeights;
0113 LinTrackCache theCache;
0114 };
0115
0116 #endif