CMS 3D CMS Logo

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 std::shared_ptr<Propagator>
26 // if (_propagator){
27 // delete _propagator;
28 // _propagator = 0;
29 // }
30  ESHandle<MagneticField> magfield;
31  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
32  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
33 
35 
36  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
37  else if (pdir == "anyDirection") dir = anyDirection;
38  _propagator = std::make_shared<StraightLinePropagator>(&(*magfield),dir);
39  return _propagator;
40 }
41 
42 
T getParameter(std::string const &) const
PropagationDirection
StraightLinePropagatorESProducer(const edm::ParameterSet &p)
std::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
HLT enums.
dbl *** dir
Definition: mlp_gen.cc:35