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
CandCommonVertexFitter< Fitter > Class Template Reference

#include <CandCommonVertexFitter.h>

Inheritance diagram for CandCommonVertexFitter< Fitter >:
CandCommonVertexFitterBase

Public Member Functions

 CandCommonVertexFitter (const edm::ParameterSet &cfg)
 
bool fit (TransientVertex &vertex, const std::vector< reco::TransientTrack > &tracks) const
 
- Public Member Functions inherited from CandCommonVertexFitterBase
 CandCommonVertexFitterBase (const edm::ParameterSet &)
 
void set (const MagneticField *bField)
 
void set (reco::VertexCompositeCandidate &) const
 
virtual ~CandCommonVertexFitterBase ()
 

Private Attributes

Fitter fitter_
 

Additional Inherited Members

- Public Types inherited from CandCommonVertexFitterBase
typedef
reco::Vertex::CovarianceMatrix 
CovarianceMatrix
 
- Protected Member Functions inherited from CandCommonVertexFitterBase
void fill (std::vector< reco::TransientTrack > &, std::vector< reco::Candidate * > &, std::vector< reco::RecoCandidate::TrackType > &, reco::Candidate &) const
 
- Protected Attributes inherited from CandCommonVertexFitterBase
const MagneticFieldbField_
 
double chi2_
 chi-sqared More...
 
CovarianceMatrix cov_
 covariance matrix (3x3) More...
 
double ndof_
 number of degrees of freedom More...
 

Detailed Description

template<typename Fitter>
class CandCommonVertexFitter< Fitter >

Definition at line 44 of file CandCommonVertexFitter.h.

Constructor & Destructor Documentation

template<typename Fitter>
CandCommonVertexFitter< Fitter >::CandCommonVertexFitter ( const edm::ParameterSet cfg)
inline

Definition at line 46 of file CandCommonVertexFitter.h.

46  :
48  fitter_(reco::modules::make<Fitter>(cfg)) {
49  }
CandCommonVertexFitterBase(const edm::ParameterSet &)

Member Function Documentation

template<typename Fitter>
bool CandCommonVertexFitter< Fitter >::fit ( TransientVertex vertex,
const std::vector< reco::TransientTrack > &  tracks 
) const
inlinevirtual

Implements CandCommonVertexFitterBase.

Definition at line 50 of file CandCommonVertexFitter.h.

References ecal_dqm_sourceclient-live_cfg::cerr, cppFunctionSkipper::exception, CandCommonVertexFitter< Fitter >::fitter_, and TransientVertex::isValid().

51  {
52  try {
53  vertex = fitter_.vertex(tracks);
54  } catch (std::exception & err) {
55  std::cerr << ">>> exception thrown by KalmanVertexFitter:\n"
56  << err.what() << "\n"
57  << ">>> candidate not fitted to common vertex" << std::endl;
58  return false;
59  }
60  return vertex.isValid();
61  }
tuple tracks
Definition: testEve_cfg.py:39
bool isValid() const

Member Data Documentation

template<typename Fitter>
Fitter CandCommonVertexFitter< Fitter >::fitter_
private

Definition at line 63 of file CandCommonVertexFitter.h.

Referenced by CandCommonVertexFitter< Fitter >::fit().