#include <SmartPropagatorESProducer.h>
Public Member Functions | |
boost::shared_ptr< Propagator > | produce (const TrackingComponentsRecord &) |
SmartPropagatorESProducer (const edm::ParameterSet &) | |
Constructor. | |
virtual | ~SmartPropagatorESProducer () |
Destructor. | |
Private Attributes | |
double | theEpsilon |
std::string | theMuonPropagatorName |
PropagationDirection | thePropagationDirection |
boost::shared_ptr< Propagator > | thePropagator |
std::string | theTrackerPropagatorName |
ES producer needed to put the SmartPropagator inside the EventSetup
ES producer needed to put the SmartPropagator inside the EventSetup
Definition at line 24 of file SmartPropagatorESProducer.h.
SmartPropagatorESProducer::SmartPropagatorESProducer | ( | const edm::ParameterSet & | parameterSet | ) |
Constructor.
Definition at line 27 of file SmartPropagatorESProducer.cc.
References alongMomentum, anyDirection, Exception, edm::ParameterSet::getParameter(), and oppositeToMomentum.
{ string myname = parameterSet.getParameter<string>("ComponentName"); string propDir = parameterSet.getParameter<string>("PropagationDirection"); if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum; else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum; else if (propDir == "anyDirection") thePropagationDirection = anyDirection; else throw cms::Exception("SmartPropagatorESProducer") << "Wrong fit direction chosen in SmartPropagatorESProducer"; theEpsilon = parameterSet.getParameter<double>("Epsilon"); theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator"); theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator"); setWhatProduced(this,myname); }
SmartPropagatorESProducer::~SmartPropagatorESProducer | ( | ) | [virtual] |
boost::shared_ptr< Propagator > SmartPropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 52 of file SmartPropagatorESProducer.cc.
References edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and SmartPropagator_cfi::SmartPropagator.
{ ESHandle<MagneticField> magField; iRecord.getRecord<IdealMagneticFieldRecord>().get(magField); ESHandle<Propagator> trackerPropagator; iRecord.get(theTrackerPropagatorName,trackerPropagator); ESHandle<Propagator> muonPropagator; iRecord.get(theMuonPropagatorName,muonPropagator); thePropagator = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator, &*magField, thePropagationDirection, theEpsilon)); return thePropagator; }
double SmartPropagatorESProducer::theEpsilon [private] |
Definition at line 42 of file SmartPropagatorESProducer.h.
std::string SmartPropagatorESProducer::theMuonPropagatorName [private] |
Definition at line 41 of file SmartPropagatorESProducer.h.
Definition at line 39 of file SmartPropagatorESProducer.h.
boost::shared_ptr<Propagator> SmartPropagatorESProducer::thePropagator [private] |
Definition at line 38 of file SmartPropagatorESProducer.h.
std::string SmartPropagatorESProducer::theTrackerPropagatorName [private] |
Definition at line 40 of file SmartPropagatorESProducer.h.