#include <TrackingTools/Producers/interface/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 |
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(), myname, oppositeToMomentum, edm::ESProducer::setWhatProduced(), theCrossingTrackerPropagatorName, theEndCapTrackerPropagatorName, and thePropagationDirection.
00027 { 00028 myname = parameterSet.getParameter<string>("ComponentName"); 00029 00030 string propDir = parameterSet.getParameter<string>("PropagationDirection"); 00031 00032 if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum; 00033 else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum; 00034 else if (propDir == "anyDirection") thePropagationDirection = anyDirection; 00035 else 00036 throw cms::Exception("BeamHaloPropagatorESProducer") 00037 << "Wrong fit direction ("<< propDir <<")chosen in BeamHaloPropagatorESProducer"; 00038 00039 theEndCapTrackerPropagatorName = parameterSet.getParameter<string>("EndCapTrackerPropagator"); 00040 theCrossingTrackerPropagatorName = parameterSet.getParameter<string>("CrossingTrackerPropagator"); 00041 00042 setWhatProduced(this,myname); 00043 }
BeamHaloPropagatorESProducer::~BeamHaloPropagatorESProducer | ( | ) | [virtual] |
boost::shared_ptr< Propagator > BeamHaloPropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 48 of file BeamHaloPropagatorESProducer.cc.
References edm::eventsetup::EventSetupRecordImplementation< T >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), LogDebug, myname, theCrossingTrackerPropagatorName, theEndCapTrackerPropagatorName, thePropagationDirection, and thePropagator.
00048 { 00049 00050 ESHandle<MagneticField> magField; 00051 iRecord.getRecord<IdealMagneticFieldRecord>().get(magField); 00052 00053 ESHandle<Propagator> endcapPropagator; 00054 iRecord.get(theEndCapTrackerPropagatorName,endcapPropagator); 00055 00056 ESHandle<Propagator> crossPropagator; 00057 iRecord.get(theCrossingTrackerPropagatorName,crossPropagator); 00058 00059 LogDebug("BeamHaloPropagator")<<"Creating a BeamHaloPropagator: "<<myname 00060 <<"\n with EndCap Propagator: "<<theEndCapTrackerPropagatorName 00061 <<"\n with Crossing Propagator: "<<theCrossingTrackerPropagatorName; 00062 00063 thePropagator = boost::shared_ptr<Propagator>(new BeamHaloPropagator(*endcapPropagator,*crossPropagator, 00064 &*magField, 00065 thePropagationDirection)); 00066 return thePropagator; 00067 }
std::string BeamHaloPropagatorESProducer::myname [private] |
Definition at line 38 of file BeamHaloPropagatorESProducer.h.
Referenced by BeamHaloPropagatorESProducer(), and produce().
std::string BeamHaloPropagatorESProducer::theCrossingTrackerPropagatorName [private] |
Definition at line 40 of file BeamHaloPropagatorESProducer.h.
Referenced by BeamHaloPropagatorESProducer(), and produce().
std::string BeamHaloPropagatorESProducer::theEndCapTrackerPropagatorName [private] |
Definition at line 39 of file BeamHaloPropagatorESProducer.h.
Referenced by BeamHaloPropagatorESProducer(), and produce().
Definition at line 37 of file BeamHaloPropagatorESProducer.h.
Referenced by BeamHaloPropagatorESProducer(), and produce().
boost::shared_ptr<Propagator> BeamHaloPropagatorESProducer::thePropagator [private] |