#include <TrackingTools/TrackFitters/plugins/KFFittingSmootherESProducer.h>
Public Member Functions | |
KFFittingSmootherESProducer (const edm::ParameterSet &p) | |
boost::shared_ptr < TrajectoryFitter > | produce (const TrackingComponentsRecord &) |
virtual | ~KFFittingSmootherESProducer () |
Private Attributes | |
boost::shared_ptr < TrajectoryFitter > | _fitter |
edm::ParameterSet | pset_ |
Definition at line 18 of file KFFittingSmootherESProducer.h.
KFFittingSmootherESProducer::KFFittingSmootherESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 20 of file KFFittingSmootherESProducer.cc.
References edm::ParameterSet::getParameter(), pset_, and edm::ESProducer::setWhatProduced().
00021 { 00022 std::string myname = p.getParameter<std::string>("ComponentName"); 00023 pset_ = p; 00024 setWhatProduced(this,myname); 00025 }
KFFittingSmootherESProducer::~KFFittingSmootherESProducer | ( | ) | [virtual] |
boost::shared_ptr< TrajectoryFitter > KFFittingSmootherESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 30 of file KFFittingSmootherESProducer.cc.
References _fitter, mergeAndRegister_online::fname, edm::eventsetup::EventSetupRecordImplementation< T >::get(), edm::ParameterSet::getParameter(), KFFittingSmootherESProducer_cfi::KFFittingSmoother, edm::ESHandle< T >::product(), pset_, and smooth.
00030 { 00031 00032 std::string fname = pset_.getParameter<std::string>("Fitter"); 00033 std::string sname = pset_.getParameter<std::string>("Smoother"); 00034 double theEstimateCut = pset_.getParameter<double>("EstimateCut"); 00035 int theMinNumberOfHits = pset_.getParameter<int>("MinNumberOfHits"); 00036 bool rejectTracksFlag = pset_.getParameter<bool>("RejectTracks"); 00037 bool breakTrajWith2ConsecutiveMissing = pset_.getParameter<bool>("BreakTrajWith2ConsecutiveMissing"); 00038 bool noInvalidHitsBeginEnd = pset_.getParameter<bool>("NoInvalidHitsBeginEnd"); 00039 00040 edm::ESHandle<TrajectoryFitter> fit; 00041 edm::ESHandle<TrajectorySmoother> smooth; 00042 00043 iRecord.get(fname, fit); 00044 iRecord.get(sname, smooth); 00045 00046 _fitter = boost::shared_ptr<TrajectoryFitter>(new KFFittingSmoother(*fit.product(), *smooth.product(), 00047 theEstimateCut,theMinNumberOfHits,rejectTracksFlag, 00048 breakTrajWith2ConsecutiveMissing,noInvalidHitsBeginEnd)); 00049 return _fitter; 00050 }
boost::shared_ptr<TrajectoryFitter> KFFittingSmootherESProducer::_fitter [private] |
Definition at line 25 of file KFFittingSmootherESProducer.h.
Referenced by KFFittingSmootherESProducer(), and produce().