CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
 
void configure (const edm::ParameterSet &)
 
edm::ParameterSet defaults () const
 
 ReconstructorFromFitter (std::unique_ptr< AbstractConfFitter > &&)
 
 ReconstructorFromFitter (const ReconstructorFromFitter &o)
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &) const
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const
 
 ~ReconstructorFromFitter ()
 
- Public Member Functions inherited from AbstractConfReconstructor
virtual ~AbstractConfReconstructor ()
 
- 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  :
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 {}
AbstractConfFitter * clone() const =0
const AbstractConfFitter * theFitter
ReconstructorFromFitter::~ReconstructorFromFitter ( )

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
virtual

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 )
virtual

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 }
const AbstractConfFitter * theFitter
void configure(const edm::ParameterSet &)
edm::ParameterSet ReconstructorFromFitter::defaults ( ) const
virtual

Implements AbstractConfReconstructor.

Definition at line 50 of file ReconstructorFromFitter.cc.

References AbstractConfFitter::defaults(), and theFitter.

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

Reconstruct vertices

Implements VertexReconstructor.

Definition at line 11 of file ReconstructorFromFitter.cc.

References alignCSCRings::e, CachingVertex< N >::isValid(), run_regression::ret, tmp, and VertexException::what().

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
Common base class.
virtual const char * what() const
const AbstractConfFitter * theFitter
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool isValid() const
Definition: CachingVertex.h:96
vector< TransientVertex > ReconstructorFromFitter::vertices ( const std::vector< reco::TransientTrack > &  t,
const reco::BeamSpot  
) const
virtual

Reconstruct vertices, exploiting the beamspot constraint for the primary vertex

Reimplemented from VertexReconstructor.

Definition at line 25 of file ReconstructorFromFitter.cc.

References alignCSCRings::e, CachingVertex< N >::isValid(), run_regression::ret, tmp, 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
Common base class.
virtual const char * what() const
const AbstractConfFitter * theFitter
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool isValid() const
Definition: CachingVertex.h:96

Member Data Documentation

const AbstractConfFitter* ReconstructorFromFitter::theFitter
private

Definition at line 27 of file ReconstructorFromFitter.h.

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