CMS 3D CMS Logo

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

◆ CandCommonVertexFitter()

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)) {}

Member Function Documentation

◆ fit()

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.

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  }

References beam_dqm_sourceclient-live_cfg::cerr, runTheMatrix::err, cppFunctionSkipper::exception, CandCommonVertexFitter< Fitter >::fitter_, PDWG_EXOHSCP_cff::tracks, and bphysicsOniaDQM_cfi::vertex.

Referenced by trackingPlots.Iteration::modules().

Member Data Documentation

◆ fitter_

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

Definition at line 62 of file CandCommonVertexFitter.h.

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

PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
CandCommonVertexFitterBase::CandCommonVertexFitterBase
CandCommonVertexFitterBase(const edm::ParameterSet &)
Definition: CandCommonVertexFitter.h:22
runTheMatrix.err
err
Definition: runTheMatrix.py:288
beam_dqm_sourceclient-live_cfg.cerr
cerr
Definition: beam_dqm_sourceclient-live_cfg.py:17
looper.cfg
cfg
Definition: looper.py:297
CandCommonVertexFitter::fitter_
Fitter fitter_
Definition: CandCommonVertexFitter.h:62