CMS 3D CMS Logo

GeantPropagatorESProducer.cc
Go to the documentation of this file.
5 
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 std::unique_ptr<Propagator>
27 
28  ESHandle<MagneticField> magfield;
29  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
30 
31  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
32  std::string particleName = pset_.getParameter<std::string>("ParticleName");
33 
35 
36  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
37  if (pdir == "alongMomentum") dir = alongMomentum;
38  if (pdir == "anyDirection") dir = anyDirection;
39 
40  return std::make_unique<Geant4ePropagator>(&(*magfield),particleName,dir);
41 }
42 
43 
T getParameter(std::string const &) const
PropagationDirection
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
HLT enums.
GeantPropagatorESProducer(const edm::ParameterSet &p)
dbl *** dir
Definition: mlp_gen.cc:35