CMS 3D CMS Logo

ConfigurableVertexFitter.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 
6 namespace {
7  void errorNoFitter(const string& finder) {
8  cout << "[ConfigurableVertexFitter] got no fitter for \"" << finder << "\"" << endl;
9  std::vector<std::string> valid = VertexFitterManager::Instance().getNames();
10  cout << " Valid fitters are:";
11  for (const auto& i : valid) {
12  cout << " " << i;
13  }
14  cout << endl;
15  throw std::string(finder + " not available!");
16  }
17 } // namespace
18 
20  string fitter = p.getParameter<string>("fitter");
21  theFitter = VertexFitterManager::Instance().get(fitter).release();
22  if (!theFitter) {
23  errorNoFitter(fitter);
24  }
26 }
27 
29 
31  : theFitter(o.theFitter->clone()) {}
32 
34 
35 CachingVertex<5> ConfigurableVertexFitter::vertex(const std::vector<reco::TransientTrack>& t) const {
36  return theFitter->vertex(t);
37 }
38 
39 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<RefCountedVertexTrack>& tracks) const {
40  return theFitter->vertex(tracks);
41 }
42 
43 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<RefCountedVertexTrack>& tracks,
44  const reco::BeamSpot& spot) const {
45  return theFitter->vertex(tracks, spot);
46 }
47 
48 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<reco::TransientTrack>& tracks,
49  const GlobalPoint& linPoint) const {
50  return theFitter->vertex(tracks, linPoint);
51 }
52 
53 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<reco::TransientTrack>& tracks,
54  const GlobalPoint& priorPos,
55  const GlobalError& priorError) const {
56  return theFitter->vertex(tracks, priorPos, priorError);
57 }
58 
59 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<reco::TransientTrack>& tracks,
60  const reco::BeamSpot& beamSpot) const {
61  return theFitter->vertex(tracks, beamSpot);
62 }
63 
64 CachingVertex<5> ConfigurableVertexFitter::vertex(const vector<RefCountedVertexTrack>& tracks,
65  const GlobalPoint& priorPos,
66  const GlobalError& priorError) const {
67  return theFitter->vertex(tracks, priorPos, priorError);
68 }
ConfigurableVertexFitter(const edm::ParameterSet &)
virtual void configure(const edm::ParameterSet &)=0
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
std::unique_ptr< AbstractConfFitter > get(const std::string &) const
std::vector< std::string > getNames() const
ConfigurableVertexFitter * clone() const override
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
static VertexFitterManager & Instance()