CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BeamHaloPropagatorESProducer.cc
Go to the documentation of this file.
1 
8 
14 
17 
20 
22 
23 using namespace edm;
24 using namespace std;
25 
27 {
28  myname = parameterSet.getParameter<string>("ComponentName");
29 
30  string propDir = parameterSet.getParameter<string>("PropagationDirection");
31 
32  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
33  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
34  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
35  else
36  throw cms::Exception("BeamHaloPropagatorESProducer")
37  << "Wrong fit direction ("<< propDir <<")chosen in BeamHaloPropagatorESProducer";
38 
39  theEndCapTrackerPropagatorName = parameterSet.getParameter<string>("EndCapTrackerPropagator");
40  theCrossingTrackerPropagatorName = parameterSet.getParameter<string>("CrossingTrackerPropagator");
41 
42  setWhatProduced(this,myname);
43 }
44 
46 
47 boost::shared_ptr<Propagator>
49 
50  ESHandle<MagneticField> magField;
51  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
52 
53  ESHandle<Propagator> endcapPropagator;
54  iRecord.get(theEndCapTrackerPropagatorName,endcapPropagator);
55 
56  ESHandle<Propagator> crossPropagator;
57  iRecord.get(theCrossingTrackerPropagatorName,crossPropagator);
58 
59  LogDebug("BeamHaloPropagator")<<"Creating a BeamHaloPropagator: "<<myname
60  <<"\n with EndCap Propagator: "<<theEndCapTrackerPropagatorName
61  <<"\n with Crossing Propagator: "<<theCrossingTrackerPropagatorName;
62 
63  thePropagator = boost::shared_ptr<Propagator>(new BeamHaloPropagator(*endcapPropagator,*crossPropagator,
64  &*magField,
65  thePropagationDirection));
66  return thePropagator;
67 }
#define LogDebug(id)
T getParameter(std::string const &) const
BeamHaloPropagatorESProducer(const edm::ParameterSet &)
Constructor.
void get(HolderT &iHolder) const
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
virtual ~BeamHaloPropagatorESProducer()
Destructor.