CMS 3D CMS Logo

Public Member Functions | Private Attributes

PFCandCommonVertexFitter< Fitter > Class Template Reference

#include <PFCandCommonVertexFitter.h>

Inheritance diagram for PFCandCommonVertexFitter< Fitter >:
PFCandCommonVertexFitterBase

List of all members.

Public Member Functions

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

Private Attributes

Fitter fitter_

Detailed Description

template<typename Fitter>
class PFCandCommonVertexFitter< Fitter >

Definition at line 50 of file PFCandCommonVertexFitter.h.


Constructor & Destructor Documentation

template<typename Fitter >
PFCandCommonVertexFitter< Fitter >::PFCandCommonVertexFitter ( const edm::ParameterSet cfg) [inline]

Definition at line 52 of file PFCandCommonVertexFitter.h.

                                                        : 
    PFCandCommonVertexFitterBase(cfg),
//    fitter_(reco::modules::make<Fitter>(cfg)) { 
    fitter_(Fitter(cfg, true)) { 
  }

Member Function Documentation

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

Implements PFCandCommonVertexFitterBase.

Definition at line 57 of file PFCandCommonVertexFitter.h.

References benchmark_cfg::cerr, exception, PFCandCommonVertexFitter< 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 PFCandCommonVertexFitter< Fitter >::fitter_ [private]

Definition at line 70 of file PFCandCommonVertexFitter.h.

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