CMS 3D CMS Logo

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< TransientVertexvertices (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.

References vertices().

Referenced by clone().

6  :
7  theFitter ( f.release() )
8 {}
double f[11][100]
const AbstractConfFitter * theFitter
ReconstructorFromFitter::ReconstructorFromFitter ( const ReconstructorFromFitter o)

Definition at line 46 of file ReconstructorFromFitter.cc.

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

Definition at line 41 of file ReconstructorFromFitter.cc.

References theFitter.

42 {
43  delete theFitter;
44 }
const AbstractConfFitter * theFitter

Member Function Documentation

ReconstructorFromFitter * ReconstructorFromFitter::clone ( void  ) const
overridevirtual

Implements AbstractConfReconstructor.

Definition at line 60 of file ReconstructorFromFitter.cc.

References ReconstructorFromFitter().

61 {
62  return new ReconstructorFromFitter ( *this );
63 }
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 55 of file ReconstructorFromFitter.cc.

References theFitter.

56 {
57  const_cast < AbstractConfFitter *> (theFitter)->configure (s );
58 }
void configure(const edm::ParameterSet &) override
const AbstractConfFitter * theFitter
edm::ParameterSet ReconstructorFromFitter::defaults ( ) const
overridevirtual

Implements AbstractConfReconstructor.

Definition at line 50 of file ReconstructorFromFitter.cc.

References AbstractConfFitter::defaults(), and theFitter.

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

Reconstruct vertices

Implements VertexReconstructor.

Definition at line 11 of file ReconstructorFromFitter.cc.

References MillePedeFileConverter_cfg::e, CachingVertex< N >::isValid(), theFitter, tmp, AbstractConfFitter::vertex(), and VertexException::what().

Referenced by ReconstructorFromFitter().

12 {
13  vector < TransientVertex > ret;
14  // cout << "[ReconstructorFromFitter] debug: fitting without bs!" << endl;
15  try {
17  if ( tmp.isValid() ) ret.push_back ( tmp );
18  } catch ( VertexException & e ) {
19  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
20  }
21  return ret;
22 }
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Common base class.
const char * what() const override
const AbstractConfFitter * theFitter
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool isValid() const
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 25 of file ReconstructorFromFitter.cc.

References MillePedeFileConverter_cfg::e, CachingVertex< N >::isValid(), theFitter, tmp, AbstractConfFitter::vertex(), and VertexException::what().

26 {
27  vector < TransientVertex > ret;
28  try {
29  /*
30  cout << "[ReconstructorFromFitter] debug: fitting with s: " << s.BeamWidth()
31  << " sz=" << s.sigmaZ() << endl;
32  */
34  if ( tmp.isValid() ) ret.push_back ( tmp );
35  } catch ( VertexException & e ) {
36  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
37  }
38  return ret;
39 }
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Common base class.
const char * what() const override
const AbstractConfFitter * theFitter
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool isValid() const

Member Data Documentation

const AbstractConfFitter* ReconstructorFromFitter::theFitter
private

Definition at line 27 of file ReconstructorFromFitter.h.

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