#include <TrackingTools/Producers/interface/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 |
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(), oppositeToMomentum, edm::ESProducer::setWhatProduced(), theEpsilon, theMuonPropagatorName, thePropagationDirection, and theTrackerPropagatorName.
00028 { 00029 string myname = parameterSet.getParameter<string>("ComponentName"); 00030 00031 string propDir = parameterSet.getParameter<string>("PropagationDirection"); 00032 00033 if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum; 00034 else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum; 00035 else if (propDir == "anyDirection") thePropagationDirection = anyDirection; 00036 else 00037 throw cms::Exception("SmartPropagatorESProducer") 00038 << "Wrong fit direction chosen in SmartPropagatorESProducer"; 00039 00040 00041 theEpsilon = parameterSet.getParameter<double>("Epsilon"); 00042 00043 theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator"); 00044 theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator"); 00045 00046 setWhatProduced(this,myname); 00047 }
SmartPropagatorESProducer::~SmartPropagatorESProducer | ( | ) | [virtual] |
boost::shared_ptr< Propagator > SmartPropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 52 of file SmartPropagatorESProducer.cc.
References edm::eventsetup::EventSetupRecordImplementation< T >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), SmartPropagator_cfi::SmartPropagator, theEpsilon, theMuonPropagatorName, thePropagationDirection, thePropagator, and theTrackerPropagatorName.
00052 { 00053 00054 ESHandle<MagneticField> magField; 00055 iRecord.getRecord<IdealMagneticFieldRecord>().get(magField); 00056 00057 ESHandle<Propagator> trackerPropagator; 00058 iRecord.get(theTrackerPropagatorName,trackerPropagator); 00059 00060 ESHandle<Propagator> muonPropagator; 00061 iRecord.get(theMuonPropagatorName,muonPropagator); 00062 00063 00064 thePropagator = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator, 00065 &*magField, 00066 thePropagationDirection, 00067 theEpsilon)); 00068 return thePropagator; 00069 }
double SmartPropagatorESProducer::theEpsilon [private] |
Definition at line 42 of file SmartPropagatorESProducer.h.
Referenced by produce(), and SmartPropagatorESProducer().
std::string SmartPropagatorESProducer::theMuonPropagatorName [private] |
Definition at line 41 of file SmartPropagatorESProducer.h.
Referenced by produce(), and SmartPropagatorESProducer().
Definition at line 39 of file SmartPropagatorESProducer.h.
Referenced by produce(), and SmartPropagatorESProducer().
boost::shared_ptr<Propagator> SmartPropagatorESProducer::thePropagator [private] |
std::string SmartPropagatorESProducer::theTrackerPropagatorName [private] |
Definition at line 40 of file SmartPropagatorESProducer.h.
Referenced by produce(), and SmartPropagatorESProducer().