CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeantPropagatorESProducer.cc
Go to the documentation of this file.
5 
10 
11 #include <string>
12 #include <memory>
13 
14 using namespace edm;
15 
17 {
18  std::string myname = p.getParameter<std::string>("ComponentName");
19  pset_ = p;
20  setWhatProduced(this,myname);
21 }
22 
24 
25 boost::shared_ptr<Propagator>
27 
29  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
30 
31  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
32  std::string particleName = pset_.getParameter<std::string>("ParticleName");
33 
35 
36  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
37  if (pdir == "alongMomentum") dir = alongMomentum;
38  if (pdir == "anyDirection") dir = anyDirection;
39 
40  _propagator = boost::shared_ptr<Propagator>(new Geant4ePropagator(&(*magfield),particleName,dir));
41  return _propagator;
42 }
43 
44 
T getParameter(std::string const &) const
tuple magfield
Definition: HLT_ES_cff.py:2311
PropagationDirection
virtual ~GeantPropagatorESProducer() override
GeantPropagatorESProducer(const edm::ParameterSet &p)
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
dbl *** dir
Definition: mlp_gen.cc:35