test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SmartPropagatorESProducer.cc
Go to the documentation of this file.
1 
8 
14 
17 
20 
21 
22 using namespace edm;
23 using namespace std;
24 
26 {
27  string myname = parameterSet.getParameter<string>("ComponentName");
28 
29  string propDir = parameterSet.getParameter<string>("PropagationDirection");
30 
31  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
32  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
33  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
34  else
35  throw cms::Exception("SmartPropagatorESProducer")
36  << "Wrong fit direction chosen in SmartPropagatorESProducer";
37 
38 
39  theEpsilon = parameterSet.getParameter<double>("Epsilon");
40 
41  theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator");
42  theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator");
43 
44  setWhatProduced(this,myname);
45 }
46 
48 
49 boost::shared_ptr<Propagator>
51 
52  ESHandle<MagneticField> magField;
53  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
54 
55  ESHandle<Propagator> trackerPropagator;
56  iRecord.get(theTrackerPropagatorName,trackerPropagator);
57 
58  ESHandle<Propagator> muonPropagator;
59  iRecord.get(theMuonPropagatorName,muonPropagator);
60 
61 
62  thePropagator = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator,
63  &*magField,
64  thePropagationDirection,
65  theEpsilon));
66  return thePropagator;
67 }
T getParameter(std::string const &) const
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
virtual ~SmartPropagatorESProducer()
Destructor.
void get(HolderT &iHolder) const
SmartPropagatorESProducer(const edm::ParameterSet &)
Constructor.
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11