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
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 override
 
- 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 45 of file CandCommonVertexFitter.h.

Constructor & Destructor Documentation

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

Definition at line 47 of file CandCommonVertexFitter.h.

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

Member Function Documentation

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

Implements CandCommonVertexFitterBase.

Definition at line 49 of file CandCommonVertexFitter.h.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, submitPVValidationJobs::err, cppFunctionSkipper::exception, CandCommonVertexFitter< Fitter >::fitter_, and TransientVertex::isValid().

Referenced by trackingPlots.Iteration::modules().

49  {
50  try {
51  vertex = fitter_.vertex(tracks);
52  } catch (std::exception &err) {
53  std::cerr << ">>> exception thrown by KalmanVertexFitter:\n"
54  << err.what() << "\n"
55  << ">>> candidate not fitted to common vertex" << std::endl;
56  return false;
57  }
58  return vertex.isValid();
59  }
auto const & tracks
cannot be loose
bool isValid() const

Member Data Documentation

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

Definition at line 62 of file CandCommonVertexFitter.h.

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