CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PropagatorWithMaterialESProducer.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 // if (_propagator){
28 // delete _propagator;
29 // _propagator = 0;
30 // }
32  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
33 
34 
35  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
36  double mass = pset_.getParameter<double>("Mass");
37  double maxDPhi = pset_.getParameter<double>("MaxDPhi");
38  bool useRK = pset_.getParameter<bool>("useRungeKutta");
39  double ptMin = pset_.existsAs<double>("ptMin") ? pset_.getParameter<double>("ptMin") : -1.0;
40 
42 
43  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
44  if (pdir == "alongMomentum") dir = alongMomentum;
45  if (pdir == "anyDirection") dir = anyDirection;
46 
47  _propagator = boost::shared_ptr<Propagator>(new PropagatorWithMaterial(dir, mass, &(*magfield),maxDPhi,useRK,ptMin));
48  return _propagator;
49 }
50 
51 
T getParameter(std::string const &) const
PropagationDirection
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
PropagatorWithMaterialESProducer(const edm::ParameterSet &p)
dbl *** dir
Definition: mlp_gen.cc:35