CMS 3D CMS Logo

Public Member Functions | Private Attributes

CandCommonVertexFitter< Fitter > Class Template Reference

#include <CandCommonVertexFitter.h>

Inheritance diagram for CandCommonVertexFitter< Fitter >:
CandCommonVertexFitterBase

List of all members.

Public Member Functions

 CandCommonVertexFitter (const edm::ParameterSet &cfg)
bool fit (TransientVertex &vertex, const std::vector< reco::TransientTrack > &tracks) const

Private Attributes

Fitter fitter_

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.

                                                      : 
    CandCommonVertexFitterBase(cfg),
    fitter_(reco::modules::make<Fitter>(cfg)) { 
  }

Member Function Documentation

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

Implements CandCommonVertexFitterBase.

Definition at line 50 of file CandCommonVertexFitter.h.

References dtNoiseDBValidation_cfg::cerr, exception, CandCommonVertexFitter< Fitter >::fitter_, and TransientVertex::isValid().

                                                               {
    try {
      vertex = fitter_.vertex(tracks);
    } catch (std::exception & err) {
      std::cerr << ">>> exception thrown by KalmanVertexFitter:\n"
                << err.what() << "\n"
                << ">>> candidate not fitted to common vertex" << std::endl;
      return false;
    }
    return vertex.isValid();
  }

Member Data Documentation

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

Definition at line 63 of file CandCommonVertexFitter.h.

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