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 }
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition: mps_fire.py:428
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
AbstractConfFitter::vertex
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Definition: AbstractConfFitter.cc:14
HLT_FULL_cff.finder
finder
Definition: HLT_FULL_cff.py:51990
CachingVertex< 5 >
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
reco::BeamSpot
Definition: BeamSpot.h:21
VertexFitterManager::get
std::unique_ptr< AbstractConfFitter > get(const std::string &) const
Definition: VertexFitterManager.cc:57
Point3DBase< float, GlobalTag >
ConfigurableVertexFitter.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
ConfigurableVertexFitter::ConfigurableVertexFitter
ConfigurableVertexFitter(const edm::ParameterSet &)
Definition: ConfigurableVertexFitter.cc:19
ConfigurableVertexFitter::~ConfigurableVertexFitter
~ConfigurableVertexFitter() override
Definition: ConfigurableVertexFitter.cc:28
GlobalErrorBase< double, ErrorMatrixTag >
ConfigurableVertexFitter::vertex
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Definition: ConfigurableVertexFitter.cc:35
VertexFitterManager::getNames
std::vector< std::string > getNames() const
Definition: VertexFitterManager.cc:65
ConfigurableVertexFitter::theFitter
AbstractConfFitter * theFitter
Definition: ConfigurableVertexFitter.h:41
std
Definition: JetResolutionObject.h:76
VertexFitterManager.h
VertexFitterManager::Instance
static VertexFitterManager & Instance()
Definition: VertexFitterManager.cc:49
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
AbstractConfFitter::configure
virtual void configure(const edm::ParameterSet &)=0
ConfigurableVertexFitter::clone
ConfigurableVertexFitter * clone() const override
Definition: ConfigurableVertexFitter.cc:33
ConfigurableVertexFitter
Definition: ConfigurableVertexFitter.h:17