#include <AnalyticalPropagatorESProducer.h>
Public Member Functions | |
AnalyticalPropagatorESProducer (const edm::ParameterSet &p) | |
boost::shared_ptr< Propagator > | produce (const TrackingComponentsRecord &) |
virtual | ~AnalyticalPropagatorESProducer () |
Private Attributes | |
boost::shared_ptr< Propagator > | _propagator |
edm::ParameterSet | pset_ |
Definition at line 10 of file AnalyticalPropagatorESProducer.h.
AnalyticalPropagatorESProducer::AnalyticalPropagatorESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 15 of file AnalyticalPropagatorESProducer.cc.
References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_ParallelJobs::p.
{ std::string myname = p.getParameter<std::string>("ComponentName"); pset_ = p; setWhatProduced(this,myname); }
AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer | ( | ) | [virtual] |
Definition at line 22 of file AnalyticalPropagatorESProducer.cc.
{}
boost::shared_ptr< Propagator > AnalyticalPropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 25 of file AnalyticalPropagatorESProducer.cc.
References alongMomentum, AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HLT_ES_cff::magfield, and oppositeToMomentum.
{ // if (_propagator){ // delete _propagator; // _propagator = 0; // } ESHandle<MagneticField> magfield; iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield ); std::string pdir = pset_.getParameter<std::string>("PropagationDirection"); double dphiCut = pset_.getParameter<double>("MaxDPhi"); PropagationDirection dir = alongMomentum; if (pdir == "oppositeToMomentum") dir = oppositeToMomentum; if (pdir == "alongMomentum") dir = alongMomentum; if (pdir == "anyDirection") dir = anyDirection; _propagator = boost::shared_ptr<Propagator>(new AnalyticalPropagator(&(*magfield), dir,dphiCut)); return _propagator; }
boost::shared_ptr<Propagator> AnalyticalPropagatorESProducer::_propagator [private] |
Definition at line 16 of file AnalyticalPropagatorESProducer.h.
Definition at line 17 of file AnalyticalPropagatorESProducer.h.