CMS 3D CMS Logo

BeamHaloPropagatorESProducer Class Reference

ES producer needed to put the BeamHaloPropagator inside the EventSetup. More...

#include <TrackingTools/Producers/interface/BeamHaloPropagatorESProducer.h>

Inheritance diagram for BeamHaloPropagatorESProducer:

edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 BeamHaloPropagatorESProducer (const edm::ParameterSet &)
 Constructor.
boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
virtual ~BeamHaloPropagatorESProducer ()
 Destructor.

Private Attributes

std::string myname
std::string theCrossingTrackerPropagatorName
std::string theEndCapTrackerPropagatorName
PropagationDirection thePropagationDirection
boost::shared_ptr< PropagatorthePropagator


Detailed Description

ES producer needed to put the BeamHaloPropagator inside the EventSetup.

Author:
Jean-Roch VLIMANT UCSB

Definition at line 22 of file BeamHaloPropagatorESProducer.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 45 of file BeamHaloPropagatorESProducer.cc.

00045 {}


Member Function Documentation

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 }


Member Data Documentation

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().

PropagationDirection BeamHaloPropagatorESProducer::thePropagationDirection [private]

Definition at line 37 of file BeamHaloPropagatorESProducer.h.

Referenced by BeamHaloPropagatorESProducer(), and produce().

boost::shared_ptr<Propagator> BeamHaloPropagatorESProducer::thePropagator [private]

Definition at line 36 of file BeamHaloPropagatorESProducer.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:00 2009 for CMSSW by  doxygen 1.5.4