CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MultiVertexFitter.h
Go to the documentation of this file.
1 #ifndef _MultiVertexFitter_H_
2 #define _MultiVertexFitter_H_
3 
4 #include <vector>
5 #include <set>
6 #include <utility>
7 #include <map>
14 
16 public:
37  float revive_below = -1.);
40 
41  typedef std::pair<reco::TransientTrack, float> TrackAndWeight;
42  typedef std::map<int, double> SeedToWeightMap;
43  typedef std::map<reco::TransientTrack, SeedToWeightMap> TrackAndSeedToWeightMap;
44 
50  std::vector<CachingVertex<5> > vertices(
51  const std::vector<std::vector<reco::TransientTrack> > &,
52  const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
53 
61  std::vector<CachingVertex<5> > vertices(
62  const std::vector<std::vector<TrackAndWeight> > &,
63  const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
64 
70  std::vector<CachingVertex<5> > vertices(
71  const std::vector<CachingVertex<5> > &,
72  const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
73 
77  std::vector<CachingVertex<5> > vertices(
78  const std::vector<TransientVertex> &,
79  const std::vector<reco::TransientTrack> &primaries = std::vector<reco::TransientTrack>());
80 
81 private:
82  std::vector<CachingVertex<5> > fit();
83  void lostVertexClaimer();
84  void updateWeights();
85  bool updateSeeds();
86 
87  void clear();
88  void createSeed(const std::vector<reco::TransientTrack> &tracks);
89  void createSeed(const std::vector<TrackAndWeight> &tracks);
90  void createPrimaries(const std::vector<reco::TransientTrack> &tracks);
91  void printWeights() const;
92  void printWeights(const reco::TransientTrack &) const;
93  void printSeeds() const;
94 
95  int seedNr();
96  void resetSeedNr();
97 
98 private:
101 
102  // vertex seeds. Come with a seed number
103  // makes the weight table simpler, faster,
104  // and more reliable (I hope)
105  std::vector<std::pair<int, CachingVertex<5> > > theVertexStates;
108  std::vector<reco::TransientTrack> theTracks;
109  std::set<reco::TransientTrack> thePrimaries;
114 };
115 
116 #endif
std::vector< CachingVertex< 5 > > vertices(const std::vector< std::vector< reco::TransientTrack > > &, const std::vector< reco::TransientTrack > &primaries=std::vector< reco::TransientTrack >())
MultiVertexFitter(const AnnealingSchedule &sched=DefaultMVFAnnealing(), const LinearizationPointFinder &seeder=DefaultLinearizationPointFinder(), float revive_below=-1.)
void printWeights() const
void createPrimaries(const std::vector< reco::TransientTrack > &tracks)
auto const & tracks
cannot be loose
LinearizationPointFinder * theSeeder
std::set< reco::TransientTrack > thePrimaries
LinTrackCache theCache
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
std::vector< std::pair< int, CachingVertex< 5 > > > theVertexStates
std::pair< reco::TransientTrack, float > TrackAndWeight
std::map< int, double > SeedToWeightMap
void printSeeds() const
void createSeed(const std::vector< reco::TransientTrack > &tracks)
CachingVertex< 5 >::RefCountedVertexTrack RefCountedVertexTrack
std::vector< CachingVertex< 5 > > fit()
std::vector< reco::TransientTrack > theTracks
AnnealingSchedule * theAssComp
std::map< reco::TransientTrack, SeedToWeightMap > TrackAndSeedToWeightMap
TrackAndSeedToWeightMap theWeights