#include <MultiRecHitCollectorESProducer.h>
Public Member Functions | |
MultiRecHitCollectorESProducer (const edm::ParameterSet &p) | |
boost::shared_ptr < MultiRecHitCollector > | produce (const MultiRecHitRecord &) |
virtual | ~MultiRecHitCollectorESProducer () |
Private Attributes | |
boost::shared_ptr < MultiRecHitCollector > | _collector |
edm::ParameterSet | pset_ |
Definition at line 11 of file MultiRecHitCollectorESProducer.h.
MultiRecHitCollectorESProducer::MultiRecHitCollectorESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 18 of file MultiRecHitCollectorESProducer.cc.
References edm::ParameterSet::getParameter(), and L1TEmulatorMonitor_cff::p.
{ std::string myname = p.getParameter<std::string>("ComponentName"); pset_ = p; setWhatProduced(this,myname); }
MultiRecHitCollectorESProducer::~MultiRecHitCollectorESProducer | ( | ) | [virtual] |
Definition at line 25 of file MultiRecHitCollectorESProducer.cc.
{}
boost::shared_ptr< MultiRecHitCollector > MultiRecHitCollectorESProducer::produce | ( | const MultiRecHitRecord & | iRecord | ) |
Definition at line 28 of file MultiRecHitCollectorESProducer.cc.
References edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), mode, and edm::ESHandle< T >::product().
{ std::string mode = "Grouped"; if (pset_.getParameter<std::string>("Mode")=="Simple") mode = "Simple"; std::string mrhupdator = pset_.getParameter<std::string>("MultiRecHitUpdator"); std::string propagatorAlongName = pset_.getParameter<std::string>("propagatorAlong"); std::string estimatorName = pset_.getParameter<std::string>("estimator"); std::string measurementTrackerName = pset_.getParameter<std::string>("MeasurementTrackerName"); ESHandle<SiTrackerMultiRecHitUpdator> mrhuhandle; iRecord.get(mrhupdator, mrhuhandle); ESHandle<Propagator> propagatorhandle; iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackingComponentsRecord>().get(propagatorAlongName, propagatorhandle); ESHandle<Chi2MeasurementEstimatorBase> estimatorhandle; iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackingComponentsRecord>().get(estimatorName, estimatorhandle); ESHandle<MeasurementTracker> measurementhandle; iRecord.getRecord<CkfComponentsRecord>().get(measurementTrackerName, measurementhandle); if (mode == "Grouped"){ std::string propagatorOppositeName = pset_.getParameter<std::string>("propagatorOpposite"); ESHandle<Propagator> propagatorOppositehandle; iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackingComponentsRecord>().get(propagatorOppositeName, propagatorOppositehandle); _collector = boost::shared_ptr<MultiRecHitCollector>(new GroupedDAFHitCollector(measurementhandle.product(), mrhuhandle.product(), estimatorhandle.product(), propagatorhandle.product(), propagatorOppositehandle.product())); } else { _collector = boost::shared_ptr<MultiRecHitCollector>(new SimpleDAFHitCollector(measurementhandle.product(), mrhuhandle.product(), estimatorhandle.product(), propagatorhandle.product())); } return _collector; }
boost::shared_ptr<MultiRecHitCollector> MultiRecHitCollectorESProducer::_collector [private] |
Definition at line 17 of file MultiRecHitCollectorESProducer.h.
Definition at line 18 of file MultiRecHitCollectorESProducer.h.