#include <BeamHaloPropagatorESProducer.h>
Public Member Functions | |
BeamHaloPropagatorESProducer (const edm::ParameterSet &) | |
Constructor. | |
boost::shared_ptr< Propagator > | produce (const TrackingComponentsRecord &) |
virtual | ~BeamHaloPropagatorESProducer () |
Destructor. | |
Private Attributes | |
std::string | myname |
std::string | theCrossingTrackerPropagatorName |
std::string | theEndCapTrackerPropagatorName |
PropagationDirection | thePropagationDirection |
boost::shared_ptr< Propagator > | thePropagator |
ES producer needed to put the BeamHaloPropagator inside the EventSetup
Definition at line 22 of file BeamHaloPropagatorESProducer.h.
BeamHaloPropagatorESProducer::BeamHaloPropagatorESProducer | ( | const edm::ParameterSet & | parameterSet | ) |
Constructor.
Definition at line 26 of file BeamHaloPropagatorESProducer.cc.
References alongMomentum, anyDirection, Exception, edm::ParameterSet::getParameter(), and oppositeToMomentum.
{ myname = parameterSet.getParameter<string>("ComponentName"); string propDir = parameterSet.getParameter<string>("PropagationDirection"); if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum; else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum; else if (propDir == "anyDirection") thePropagationDirection = anyDirection; else throw cms::Exception("BeamHaloPropagatorESProducer") << "Wrong fit direction ("<< propDir <<")chosen in BeamHaloPropagatorESProducer"; theEndCapTrackerPropagatorName = parameterSet.getParameter<string>("EndCapTrackerPropagator"); theCrossingTrackerPropagatorName = parameterSet.getParameter<string>("CrossingTrackerPropagator"); setWhatProduced(this,myname); }
BeamHaloPropagatorESProducer::~BeamHaloPropagatorESProducer | ( | ) | [virtual] |
boost::shared_ptr< Propagator > BeamHaloPropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 48 of file BeamHaloPropagatorESProducer.cc.
References edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and LogDebug.
{ ESHandle<MagneticField> magField; iRecord.getRecord<IdealMagneticFieldRecord>().get(magField); ESHandle<Propagator> endcapPropagator; iRecord.get(theEndCapTrackerPropagatorName,endcapPropagator); ESHandle<Propagator> crossPropagator; iRecord.get(theCrossingTrackerPropagatorName,crossPropagator); LogDebug("BeamHaloPropagator")<<"Creating a BeamHaloPropagator: "<<myname <<"\n with EndCap Propagator: "<<theEndCapTrackerPropagatorName <<"\n with Crossing Propagator: "<<theCrossingTrackerPropagatorName; thePropagator = boost::shared_ptr<Propagator>(new BeamHaloPropagator(*endcapPropagator,*crossPropagator, &*magField, thePropagationDirection)); return thePropagator; }
std::string BeamHaloPropagatorESProducer::myname [private] |
Definition at line 38 of file BeamHaloPropagatorESProducer.h.
std::string BeamHaloPropagatorESProducer::theCrossingTrackerPropagatorName [private] |
Definition at line 40 of file BeamHaloPropagatorESProducer.h.
std::string BeamHaloPropagatorESProducer::theEndCapTrackerPropagatorName [private] |
Definition at line 39 of file BeamHaloPropagatorESProducer.h.
Definition at line 37 of file BeamHaloPropagatorESProducer.h.
boost::shared_ptr<Propagator> BeamHaloPropagatorESProducer::thePropagator [private] |
Definition at line 36 of file BeamHaloPropagatorESProducer.h.