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 
10 
16 
19 
22 
23 
24 using namespace edm;
25 using namespace std;
26 
28 {
29  string myname = parameterSet.getParameter<string>("ComponentName");
30 
31  string propDir = parameterSet.getParameter<string>("PropagationDirection");
32 
33  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
34  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
35  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
36  else
37  throw cms::Exception("SmartPropagatorESProducer")
38  << "Wrong fit direction chosen in SmartPropagatorESProducer";
39 
40 
41  theEpsilon = parameterSet.getParameter<double>("Epsilon");
42 
43  theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator");
44  theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator");
45 
46  setWhatProduced(this,myname);
47 }
48 
50 
51 boost::shared_ptr<Propagator>
53 
54  ESHandle<MagneticField> magField;
55  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
56 
57  ESHandle<Propagator> trackerPropagator;
58  iRecord.get(theTrackerPropagatorName,trackerPropagator);
59 
60  ESHandle<Propagator> muonPropagator;
61  iRecord.get(theMuonPropagatorName,muonPropagator);
62 
63 
64  thePropagator = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator,
65  &*magField,
66  thePropagationDirection,
67  theEpsilon));
68  return thePropagator;
69 }
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.