CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {
17 public:
37  const LinearizationPointFinder & seeder =
39  float revive_below = -1. );
42 
43  typedef std::pair < reco::TransientTrack, float > TrackAndWeight;
44  typedef std::map < int , double > SeedToWeightMap;
45  typedef std::map < reco::TransientTrack, SeedToWeightMap > TrackAndSeedToWeightMap;
46 
52  std::vector < CachingVertex<5> > vertices (
53  const std::vector < std::vector < reco::TransientTrack > > &,
54  const std::vector < reco::TransientTrack > & primaries =
55  std::vector < reco::TransientTrack > () );
56 
64  std::vector < CachingVertex<5> > vertices (
65  const std::vector < std::vector < TrackAndWeight > > &,
66  const std::vector < reco::TransientTrack > & primaries =
67  std::vector < reco::TransientTrack > () );
68 
74  std::vector < CachingVertex<5> > vertices (
75  const std::vector < CachingVertex<5> > &,
76  const std::vector < reco::TransientTrack > & primaries =
77  std::vector < reco::TransientTrack > () );
78 
82  std::vector < CachingVertex<5> > vertices ( const std::vector < TransientVertex > &,
83  const std::vector < reco::TransientTrack > & primaries =
84  std::vector < reco::TransientTrack > () );
85 
86 private:
87  std::vector < CachingVertex<5> > fit();
88  void lostVertexClaimer();
89  void updateWeights();
90  bool updateSeeds();
91 
92  void clear();
93  void createSeed ( const std::vector < reco::TransientTrack > & tracks );
94  void createSeed ( const std::vector < TrackAndWeight > & tracks );
95  void createPrimaries ( const std::vector < reco::TransientTrack > &tracks );
96  void printWeights() const;
97  void printWeights( const reco::TransientTrack & ) const;
98  void printSeeds() const;
99 
100  int seedNr();
101  void resetSeedNr();
102 
103 private:
104 
107 
108  // vertex seeds. Come with a seed number
109  // makes the weight table simpler, faster,
110  // and more reliable (I hope)
111  std::vector < std::pair < int, CachingVertex<5> > > theVertexStates;
114  std::vector < reco::TransientTrack > theTracks;
115  std::set < reco::TransientTrack > thePrimaries;
120 };
121 
122 #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.)
std::pair< reco::TransientTrack, float > TrackAndWeight
std::map< reco::TransientTrack, SeedToWeightMap > TrackAndSeedToWeightMap
void printWeights() const
void createPrimaries(const std::vector< reco::TransientTrack > &tracks)
LinearizationPointFinder * theSeeder
std::set< reco::TransientTrack > thePrimaries
std::vector< reco::TransientTrack > theTracks
LinTrackCache theCache
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
std::vector< std::pair< int, CachingVertex< 5 > > > theVertexStates
tuple tracks
Definition: testEve_cfg.py:39
void printSeeds() const
void createSeed(const std::vector< reco::TransientTrack > &tracks)
CachingVertex< 5 >::RefCountedVertexTrack RefCountedVertexTrack
std::vector< CachingVertex< 5 > > fit()
AnnealingSchedule * theAssComp
TrackAndSeedToWeightMap theWeights
std::map< int, double > SeedToWeightMap