49 string myname = parameterSet.
getParameter<
string>(
"ComponentName");
51 string propDir = parameterSet.
getParameter<
string>(
"PropagationDirection");
53 if (propDir ==
"oppositeToMomentum")
55 else if (propDir ==
"alongMomentum")
57 else if (propDir ==
"anyDirection")
60 throw cms::Exception(
"SmartPropagatorESProducer") <<
"Wrong fit direction chosen in SmartPropagatorESProducer";
62 theEpsilon = parameterSet.
getParameter<
double>(
"Epsilon");
64 auto cc = setWhatProduced(
this, myname);
73 return std::make_unique<SmartPropagator>(
74 iRecord.
get(trackerToken_), iRecord.
get(muonToken_), &iRecord.
get(
magToken_), thePropagationDirection, theEpsilon);
edm::ESGetToken< Propagator, TrackingComponentsRecord > trackerToken_
PropagationDirection thePropagationDirection
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
SmartPropagatorESProducer(const edm::ParameterSet &)
Constructor.
~SmartPropagatorESProducer() override
Destructor.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magToken_
edm::ESGetToken< Propagator, TrackingComponentsRecord > muonToken_
T getParameter(std::string const &) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)