CMS 3D CMS Logo

PropagatorWithMaterialESProducer Class Reference

ESProducer for PropagatorWithMaterial. More...

#include <TrackingTools/MaterialEffects/plugins/PropagatorWithMaterialESProducer.h>

Inheritance diagram for PropagatorWithMaterialESProducer:

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

List of all members.

Public Member Functions

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

Private Attributes

boost::shared_ptr< Propagator_propagator
edm::ParameterSet pset_


Detailed Description

ESProducer for PropagatorWithMaterial.

Date
2007/05/09 14:11:36
Revision
1.2
Author:
cerati

Definition at line 18 of file PropagatorWithMaterialESProducer.h.


Constructor & Destructor Documentation

PropagatorWithMaterialESProducer::PropagatorWithMaterialESProducer ( const edm::ParameterSet p  ) 

Definition at line 16 of file PropagatorWithMaterialESProducer.cc.

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

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

PropagatorWithMaterialESProducer::~PropagatorWithMaterialESProducer (  )  [virtual]

Definition at line 23 of file PropagatorWithMaterialESProducer.cc.

00023 {}


Member Function Documentation

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

Definition at line 26 of file PropagatorWithMaterialESProducer.cc.

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

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


Member Data Documentation

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

Definition at line 24 of file PropagatorWithMaterialESProducer.h.

Referenced by produce().

edm::ParameterSet PropagatorWithMaterialESProducer::pset_ [private]

Definition at line 25 of file PropagatorWithMaterialESProducer.h.

Referenced by produce(), and PropagatorWithMaterialESProducer().


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