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 
11 
12 #include <string>
13 #include <memory>
14 
15 using namespace edm;
16 
18 {
19  std::string myname = p.getParameter<std::string>("ComponentName");
20  pset_ = p;
21  setWhatProduced(this,myname);
22 }
23 
25 
26 boost::shared_ptr<Propagator>
28 // if (_propagator){
29 // delete _propagator;
30 // _propagator = 0;
31 // }
32 
33  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
34  double mass = pset_.getParameter<double>("Mass");
35  double maxDPhi = pset_.getParameter<double>("MaxDPhi");
36  bool useRK = pset_.getParameter<bool>("useRungeKutta");
37  bool useOldAnalPropLogic = pset_.existsAs<bool>("useOldAnalPropLogic") ?
38  pset_.getParameter<bool>("useOldAnalPropLogic") : true;
39  double ptMin = pset_.existsAs<double>("ptMin") ? pset_.getParameter<double>("ptMin") : -1.0;
40 
42  std::string mfName = "";
43  if (pset_.exists("SimpleMagneticField"))
44  mfName = pset_.getParameter<std::string>("SimpleMagneticField");
45  iRecord.getRecord<IdealMagneticFieldRecord>().get(mfName,magfield);
46  // edm::ESInputTag mfESInputTag(mfName);
47  // iRecord.getRecord<IdealMagneticFieldRecord>().get(mfESInputTag,magfield);
48  //fixme check that useRK is false when using SimpleMagneticField
49 
51 
52  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
53  if (pdir == "alongMomentum") dir = alongMomentum;
54  if (pdir == "anyDirection") dir = anyDirection;
55 
56  _propagator = boost::shared_ptr<Propagator>(new PropagatorWithMaterial(dir, mass, &(*magfield),
57  maxDPhi,useRK,ptMin,
58  useOldAnalPropLogic));
59  return _propagator;
60 }
61 
62 
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)
dbl *** dir
Definition: mlp_gen.cc:35