CMS 3D CMS Logo

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 std::unique_ptr<Propagator>
27 // if (_propagator){
28 // delete _propagator;
29 // _propagator = 0;
30 // }
31  ESHandle<MagneticField> magfield;
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  return std::make_unique<AnalyticalPropagator>(&(*magfield), dir,dphiCut);
49 }
50 
51 
T getParameter(std::string const &) const
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
PropagationDirection
AnalyticalPropagatorESProducer(const edm::ParameterSet &p)
HLT enums.
dbl *** dir
Definition: mlp_gen.cc:35