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 
9 
10 #include <string>
11 #include <memory>
12 
13 using namespace edm;
14 
16 {
17  std::string myname = p.getParameter<std::string>("ComponentName");
18  pset_ = p;
19  setWhatProduced(this,myname);
20 }
21 
23 
24 boost::shared_ptr<Propagator>
26 // if (_propagator){
27 // delete _propagator;
28 // _propagator = 0;
29 // }
31  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
32 
33  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
34  double dphiCut = pset_.getParameter<double>("MaxDPhi");
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 AnalyticalPropagator(&(*magfield), dir,dphiCut));
43  return _propagator;
44 }
45 
46 
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