CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/TrackingTools/KalmanUpdators/plugins/Chi2MeasurementEstimatorESProducer.cc

Go to the documentation of this file.
00001 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorESProducer.h"
00002 #include "MagneticField/Engine/interface/MagneticField.h"
00003 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00004 
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 #include "FWCore/Framework/interface/ModuleFactory.h"
00008 #include "FWCore/Framework/interface/ESProducer.h"
00009 
00010 #include <string>
00011 #include <memory>
00012 
00013 using namespace edm;
00014 
00015 Chi2MeasurementEstimatorESProducer::Chi2MeasurementEstimatorESProducer(const edm::ParameterSet & p) 
00016 {
00017   std::string myname = p.getParameter<std::string>("ComponentName");
00018   pset_ = p;
00019   setWhatProduced(this,myname);
00020 }
00021 
00022 Chi2MeasurementEstimatorESProducer::~Chi2MeasurementEstimatorESProducer() {}
00023 
00024 boost::shared_ptr<Chi2MeasurementEstimatorBase> 
00025 Chi2MeasurementEstimatorESProducer::produce(const TrackingComponentsRecord & iRecord){ 
00026 //   if (_updator){
00027 //     delete _updator;
00028 //     _updator = 0;
00029 //   }
00030   double maxChi2 = pset_.getParameter<double>("MaxChi2");
00031   double nSigma = pset_.getParameter<double>("nSigma");
00032 
00033   
00034   _estimator = boost::shared_ptr<Chi2MeasurementEstimatorBase>(new Chi2MeasurementEstimator(maxChi2,nSigma));
00035   return _estimator;
00036 }
00037 
00038