CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
ReconstructorFromFitter Class Reference

#include <ReconstructorFromFitter.h>

Inheritance diagram for ReconstructorFromFitter:
AbstractConfReconstructor VertexReconstructor

Public Member Functions

ReconstructorFromFitterclone () const override
 
void configure (const edm::ParameterSet &) override
 
edm::ParameterSet defaults () const override
 
 ReconstructorFromFitter (std::unique_ptr< AbstractConfFitter > &&)
 
 ReconstructorFromFitter (const ReconstructorFromFitter &o)
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &) const override
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override
 
 ~ReconstructorFromFitter () override
 
- Public Member Functions inherited from AbstractConfReconstructor
 ~AbstractConfReconstructor () override
 
- Public Member Functions inherited from VertexReconstructor
 VertexReconstructor ()
 
virtual std::vector
< TransientVertex
vertices (const std::vector< reco::TransientTrack > &primaries, const std::vector< reco::TransientTrack > &tracks, const reco::BeamSpot &spot) const
 
virtual ~VertexReconstructor ()
 

Private Attributes

const AbstractConfFittertheFitter
 

Detailed Description

Wrap any VertexFitter into the VertexReconstructor interface

Definition at line 12 of file ReconstructorFromFitter.h.

Constructor & Destructor Documentation

ReconstructorFromFitter::ReconstructorFromFitter ( std::unique_ptr< AbstractConfFitter > &&  f)
explicit

Definition at line 6 of file ReconstructorFromFitter.cc.

Referenced by clone().

6 : theFitter(f.release()) {}
const AbstractConfFitter * theFitter
ReconstructorFromFitter::ReconstructorFromFitter ( const ReconstructorFromFitter o)

Definition at line 40 of file ReconstructorFromFitter.cc.

40 : theFitter(o.theFitter->clone()) {}
const AbstractConfFitter * theFitter
AbstractConfFitter * clone() const override=0
ReconstructorFromFitter::~ReconstructorFromFitter ( )
override

Definition at line 38 of file ReconstructorFromFitter.cc.

References theFitter.

38 { delete theFitter; }
const AbstractConfFitter * theFitter

Member Function Documentation

ReconstructorFromFitter * ReconstructorFromFitter::clone ( void  ) const
overridevirtual

Implements AbstractConfReconstructor.

Definition at line 49 of file ReconstructorFromFitter.cc.

References ReconstructorFromFitter().

49 { return new ReconstructorFromFitter(*this); }
ReconstructorFromFitter(std::unique_ptr< AbstractConfFitter > &&)
void ReconstructorFromFitter::configure ( const edm::ParameterSet )
overridevirtual

The configure method configures the vertex reconstructor. It also should also write all its applied defaults back into the map,

Implements AbstractConfReconstructor.

Definition at line 44 of file ReconstructorFromFitter.cc.

References theFitter.

44  {
45  //this looks better than changing the data member to be non-const ptr and allow changes in all calls
46  const_cast<AbstractConfFitter*>(theFitter)->configure(s);
47 }
void configure(const edm::ParameterSet &) override
const AbstractConfFitter * theFitter
edm::ParameterSet ReconstructorFromFitter::defaults ( ) const
overridevirtual

Implements AbstractConfReconstructor.

Definition at line 42 of file ReconstructorFromFitter.cc.

References AbstractConfFitter::defaults(), and theFitter.

42 { return theFitter->defaults(); }
const AbstractConfFitter * theFitter
virtual edm::ParameterSet defaults() const =0
vector< TransientVertex > ReconstructorFromFitter::vertices ( const std::vector< reco::TransientTrack > &  ) const
overridevirtual

Reconstruct vertices

Implements VertexReconstructor.

Definition at line 8 of file ReconstructorFromFitter.cc.

References alignCSCRings::e, CachingVertex< N >::isValid(), runTheMatrix::ret, theFitter, createJobs::tmp, AbstractConfFitter::vertex(), and VertexException::what().

8  {
9  vector<TransientVertex> ret;
10  // cout << "[ReconstructorFromFitter] debug: fitting without bs!" << endl;
11  try {
13  if (tmp.isValid())
14  ret.push_back(tmp);
15  } catch (VertexException& e) {
16  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
17  }
18  return ret;
19 }
tuple ret
prodAgent to be discontinued
Common base class.
const AbstractConfFitter * theFitter
bool isValid() const
const char * what() const override
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Log< level::Warning, false > LogWarning
tmp
align.sh
Definition: createJobs.py:716
vector< TransientVertex > ReconstructorFromFitter::vertices ( const std::vector< reco::TransientTrack > &  t,
const reco::BeamSpot  
) const
overridevirtual

Reconstruct vertices, exploiting the beamspot constraint for the primary vertex

Reimplemented from VertexReconstructor.

Definition at line 21 of file ReconstructorFromFitter.cc.

References alignCSCRings::e, CachingVertex< N >::isValid(), runTheMatrix::ret, theFitter, createJobs::tmp, AbstractConfFitter::vertex(), and VertexException::what().

22  {
23  vector<TransientVertex> ret;
24  try {
25  /*
26  cout << "[ReconstructorFromFitter] debug: fitting with s: " << s.BeamWidth()
27  << " sz=" << s.sigmaZ() << endl;
28  */
30  if (tmp.isValid())
31  ret.push_back(tmp);
32  } catch (VertexException& e) {
33  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
34  }
35  return ret;
36 }
tuple ret
prodAgent to be discontinued
Common base class.
const AbstractConfFitter * theFitter
bool isValid() const
const char * what() const override
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Log< level::Warning, false > LogWarning
tmp
align.sh
Definition: createJobs.py:716

Member Data Documentation

const AbstractConfFitter* ReconstructorFromFitter::theFitter
private

Definition at line 25 of file ReconstructorFromFitter.h.

Referenced by configure(), defaults(), vertices(), and ~ReconstructorFromFitter().