CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConfigurableVertexFitter.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 
6 namespace {
7  void errorNoFitter( const string & finder )
8  {
9  cout << "[ConfigurableVertexFitter] got no fitter for \""
10  << finder << "\"" << endl;
11  map < string, AbstractConfFitter * > valid =
13  cout << " Valid fitters are:";
14  for ( map < string, AbstractConfFitter * >::const_iterator i=valid.begin();
15  i!=valid.end() ; ++i )
16  {
17  if ( i->second ) cout << " " << i->first;
18  }
19  cout << endl;
20  throw std::string ( finder + " not available!" );
21  }
22 }
23 
25  const edm::ParameterSet & p ) : theFitter ( 0 )
26 {
27  string fitter=p.getParameter<string>("fitter");
29  if (!theFitter)
30  {
31  errorNoFitter ( fitter );
32  }
33  theFitter->configure ( p );
34 }
35 
37 {
38 }
39 
42  theFitter ( o.theFitter->clone() )
43 {}
44 
45 
47 {
48  return new ConfigurableVertexFitter ( *this );
49 }
50 
51 
53  const std::vector < reco::TransientTrack > & t ) const
54 {
55  return theFitter->vertex ( t );
56 }
57 
59  const vector<RefCountedVertexTrack> & tracks) const
60 {
61  return theFitter->vertex ( tracks );
62 }
63 
65  const vector<RefCountedVertexTrack> & tracks,
66  const reco::BeamSpot & spot ) const
67 {
68  return theFitter->vertex ( tracks, spot );
69 }
70 
71 
73  const vector<reco::TransientTrack> & tracks, const GlobalPoint& linPoint) const
74 {
75  return theFitter->vertex ( tracks, linPoint );
76 }
77 
79  const vector<reco::TransientTrack> & tracks, const GlobalPoint& priorPos,
80  const GlobalError& priorError) const
81 {
82  return theFitter->vertex ( tracks, priorPos, priorError );
83 }
84 
86  const vector<reco::TransientTrack> & tracks, const reco::BeamSpot& beamSpot) const
87 {
88  return theFitter->vertex ( tracks, beamSpot );
89 }
90 
91 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<RefCountedVertexTrack> & tracks,
92  const GlobalPoint& priorPos, const GlobalError& priorError) const
93 {
94  return theFitter->vertex ( tracks, priorPos, priorError );
95 }
96 
ConfigurableVertexFitter(const edm::ParameterSet &)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const
AbstractConfFitter * get(const std::string &)
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const
AbstractConfFitter * clone() const =0
ConfigurableVertexFitter * clone() const
tuple tracks
Definition: testEve_cfg.py:39
tuple cout
Definition: gather_cfg.py:41
static VertexFitterManager & Instance()