#include <GeantPropagatorESProducer.h>
Public Member Functions | |
GeantPropagatorESProducer (const edm::ParameterSet &p) | |
boost::shared_ptr< Propagator > | produce (const TrackingComponentsRecord &) |
virtual | ~GeantPropagatorESProducer () |
Private Attributes | |
boost::shared_ptr< Propagator > | _propagator |
edm::ParameterSet | pset_ |
Definition at line 10 of file GeantPropagatorESProducer.h.
GeantPropagatorESProducer::GeantPropagatorESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 16 of file GeantPropagatorESProducer.cc.
References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_ParallelJobs::p.
{ std::string myname = p.getParameter<std::string>("ComponentName"); pset_ = p; setWhatProduced(this,myname); }
GeantPropagatorESProducer::~GeantPropagatorESProducer | ( | ) | [virtual] |
Definition at line 23 of file GeantPropagatorESProducer.cc.
{}
boost::shared_ptr< Propagator > GeantPropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 26 of file GeantPropagatorESProducer.cc.
References alongMomentum, anyDirection, dir, Geant4ePropagator_cfi::Geant4ePropagator, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), autoMagneticFieldProducer_cfi::magfield, and oppositeToMomentum.
{ ESHandle<MagneticField> magfield; iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield ); std::string pdir = pset_.getParameter<std::string>("PropagationDirection"); std::string particleName = pset_.getParameter<std::string>("ParticleName"); const char* part = particleName.c_str(); PropagationDirection dir = alongMomentum; if (pdir == "oppositeToMomentum") dir = oppositeToMomentum; if (pdir == "alongMomentum") dir = alongMomentum; if (pdir == "anyDirection") dir = anyDirection; _propagator = boost::shared_ptr<Propagator>(new Geant4ePropagator(&(*magfield),part,dir)); return _propagator; }
boost::shared_ptr<Propagator> GeantPropagatorESProducer::_propagator [private] |
Definition at line 16 of file GeantPropagatorESProducer.h.
Definition at line 17 of file GeantPropagatorESProducer.h.