CMS 3D CMS Logo

Public Member Functions | Private Attributes

KFTrajectoryFitterESProducer Class Reference

#include <KFTrajectoryFitterESProducer.h>

Inheritance diagram for KFTrajectoryFitterESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 KFTrajectoryFitterESProducer (const edm::ParameterSet &p)
boost::shared_ptr
< TrajectoryFitter
produce (const TrajectoryFitterRecord &)
virtual ~KFTrajectoryFitterESProducer ()

Private Attributes

boost::shared_ptr
< TrajectoryFitter
_fitter
edm::ParameterSet pset_

Detailed Description

ESProducer for the KFTrajectoryFitter.

Date:
2009/07/03 01:10:26
Revision:
1.3
Author:
cerati

Definition at line 19 of file KFTrajectoryFitterESProducer.h.


Constructor & Destructor Documentation

KFTrajectoryFitterESProducer::KFTrajectoryFitterESProducer ( const edm::ParameterSet p)

Definition at line 20 of file KFTrajectoryFitterESProducer.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_ParallelJobs::p.

{
  std::string myname = p.getParameter<std::string>("ComponentName");
  pset_ = p;
  setWhatProduced(this,myname);
}
KFTrajectoryFitterESProducer::~KFTrajectoryFitterESProducer ( ) [virtual]

Definition at line 27 of file KFTrajectoryFitterESProducer.cc.

{}

Member Function Documentation

boost::shared_ptr< TrajectoryFitter > KFTrajectoryFitterESProducer::produce ( const TrajectoryFitterRecord iRecord)

Definition at line 30 of file KFTrajectoryFitterESProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), KFTrajectoryFitterESProducer_cfi::KFTrajectoryFitter, and edm::ESHandle< T >::product().

                                                                           { 

  std::string pname = pset_.getParameter<std::string>("Propagator");
  std::string uname = pset_.getParameter<std::string>("Updator");
  std::string ename = pset_.getParameter<std::string>("Estimator");
  std::string gname = pset_.getParameter<std::string>("RecoGeometry");
  int minHits = pset_.getParameter<int>("minHits");

  edm::ESHandle<Propagator> prop;
  edm::ESHandle<TrajectoryStateUpdator> upd;
  edm::ESHandle<Chi2MeasurementEstimatorBase> est;
  edm::ESHandle<DetLayerGeometry> geo;

  iRecord.getRecord<TrackingComponentsRecord>().get(pname, prop);
  iRecord.getRecord<TrackingComponentsRecord>().get(uname, upd);
  iRecord.getRecord<TrackingComponentsRecord>().get(ename, est);
  iRecord.getRecord<RecoGeometryRecord>().get(gname,geo);

  _fitter  = boost::shared_ptr<TrajectoryFitter>(new KFTrajectoryFitter(prop.product(),
                                                                        upd.product(),
                                                                        est.product(),
                                                                        minHits,
                                                                        geo.product() ));
  return _fitter;
}

Member Data Documentation

Definition at line 25 of file KFTrajectoryFitterESProducer.h.

Definition at line 26 of file KFTrajectoryFitterESProducer.h.