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  bool useOldAnalPropLogic = pset_.existsAs<bool>("useOldAnalPropLogic") ?
40  pset_.getParameter<bool>("useOldAnalPropLogic") : true;
41  double ptMin = pset_.existsAs<double>("ptMin") ? pset_.getParameter<double>("ptMin") : -1.0;
42 
44 
45  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
46  if (pdir == "alongMomentum") dir = alongMomentum;
47  if (pdir == "anyDirection") dir = anyDirection;
48 
49  _propagator = boost::shared_ptr<Propagator>(new PropagatorWithMaterial(dir, mass, &(*magfield),
50  maxDPhi,useRK,ptMin,
51  useOldAnalPropLogic));
52  return _propagator;
53 }
54 
55 
T getParameter(std::string const &) const
tuple magfield
Definition: HLT_ES_cff.py:2311
PropagationDirection
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
PropagatorWithMaterialESProducer(const edm::ParameterSet &p)
tuple mass
Definition: scaleCards.py:27
dbl *** dir
Definition: mlp_gen.cc:35