CMS 3D CMS Logo

AnalyticalPropagatorESProducer Class Reference

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

Inheritance diagram for AnalyticalPropagatorESProducer:

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

List of all members.

Public Member Functions

 AnalyticalPropagatorESProducer (const edm::ParameterSet &p)
boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
virtual ~AnalyticalPropagatorESProducer ()

Private Attributes

boost::shared_ptr< Propagator_propagator
edm::ParameterSet pset_


Detailed Description

Definition at line 10 of file AnalyticalPropagatorESProducer.h.


Constructor & Destructor Documentation

AnalyticalPropagatorESProducer::AnalyticalPropagatorESProducer ( const edm::ParameterSet p  ) 

Definition at line 15 of file AnalyticalPropagatorESProducer.cc.

References edm::ParameterSet::getParameter(), pset_, and edm::ESProducer::setWhatProduced().

00016 {
00017   std::string myname = p.getParameter<std::string>("ComponentName");
00018   pset_ = p;
00019   setWhatProduced(this,myname);
00020 }

AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer (  )  [virtual]

Definition at line 22 of file AnalyticalPropagatorESProducer.cc.

00022 {}


Member Function Documentation

boost::shared_ptr< Propagator > AnalyticalPropagatorESProducer::produce ( const TrackingComponentsRecord iRecord  ) 

Definition at line 25 of file AnalyticalPropagatorESProducer.cc.

References _propagator, alongMomentum, AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, dir, edm::ParameterSet::getParameter(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), volumeBasedMagneticField_1103l_cfi::magfield, oppositeToMomentum, and pset_.

00025                                                                                { 
00026 //   if (_propagator){
00027 //     delete _propagator;
00028 //     _propagator = 0;
00029 //   }
00030   ESHandle<MagneticField> magfield;
00031   iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
00032 
00033   std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
00034   double dphiCut   = pset_.getParameter<double>("MaxDPhi");   
00035 
00036   PropagationDirection dir = alongMomentum;
00037   
00038   if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
00039   if (pdir == "alongMomentum") dir = alongMomentum;
00040   if (pdir == "anyDirection") dir = anyDirection;
00041   
00042   _propagator  = boost::shared_ptr<Propagator>(new AnalyticalPropagator(&(*magfield), dir,dphiCut));
00043   return _propagator;
00044 }


Member Data Documentation

boost::shared_ptr<Propagator> AnalyticalPropagatorESProducer::_propagator [private]

Definition at line 16 of file AnalyticalPropagatorESProducer.h.

Referenced by produce().

edm::ParameterSet AnalyticalPropagatorESProducer::pset_ [private]

Definition at line 17 of file AnalyticalPropagatorESProducer.h.

Referenced by AnalyticalPropagatorESProducer(), and produce().


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