CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StraightLinePropagatorESProducer.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  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
33 
35 
36  if (pdir == "oppositeToMomentum, alongMomentum, anyDirection")
37  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
38  if (pdir == "alongMomentum") dir = alongMomentum;
39  if (pdir == "anyDirection") dir = anyDirection;
40  _propagator = boost::shared_ptr<Propagator>(new StraightLinePropagator(&(*magfield),dir));
41  return _propagator;
42 }
43 
44 
T getParameter(std::string const &) const
tuple magfield
Definition: HLT_ES_cff.py:2311
PropagationDirection
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
StraightLinePropagatorESProducer(const edm::ParameterSet &p)
dbl *** dir
Definition: mlp_gen.cc:35