CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AnalyticalPropagatorESProducer.cc
Go to the documentation of this file.
4 
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  std::string mfName = "";
33  if (pset_.exists("SimpleMagneticField"))
34  mfName = pset_.getParameter<std::string>("SimpleMagneticField");
35  iRecord.getRecord<IdealMagneticFieldRecord>().get(mfName,magfield);
36  // edm::ESInputTag mfESInputTag(mfName);
37  // iRecord.getRecord<IdealMagneticFieldRecord>().get(mfESInputTag,magfield);
38 
39  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
40  double dphiCut = pset_.getParameter<double>("MaxDPhi");
41 
43 
44  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
45  if (pdir == "alongMomentum") dir = alongMomentum;
46  if (pdir == "anyDirection") dir = anyDirection;
47 
48  _propagator = boost::shared_ptr<Propagator>(new AnalyticalPropagator(&(*magfield), dir,dphiCut));
49  return _propagator;
50 }
51 
52 
T getParameter(std::string const &) const
tuple magfield
Definition: HLT_ES_cff.py:2311
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
PropagationDirection
AnalyticalPropagatorESProducer(const edm::ParameterSet &p)
dbl *** dir
Definition: mlp_gen.cc:35