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 
32  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
33  std::string particleName = pset_.getParameter<std::string>("ParticleName");
34  const char* part = particleName.c_str();
35 
37 
38  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
39  if (pdir == "alongMomentum") dir = alongMomentum;
40  if (pdir == "anyDirection") dir = anyDirection;
41 
42  _propagator = boost::shared_ptr<Propagator>(new Geant4ePropagator(&(*magfield),part,dir));
43  return _propagator;
44 }
45 
46 
T getParameter(std::string const &) const
tuple magfield
Definition: HLT_ES_cff.py:2311
PropagationDirection
part
Definition: HCALResponse.h:20
GeantPropagatorESProducer(const edm::ParameterSet &p)
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
dbl *** dir
Definition: mlp_gen.cc:35