![]() |
![]() |
#include <TrackingTools/MaterialEffects/plugins/PropagatorWithMaterialESProducer.h>
Public Member Functions | |
boost::shared_ptr< Propagator > | produce (const TrackingComponentsRecord &) |
PropagatorWithMaterialESProducer (const edm::ParameterSet &p) | |
virtual | ~PropagatorWithMaterialESProducer () |
Private Attributes | |
boost::shared_ptr< Propagator > | _propagator |
edm::ParameterSet | pset_ |
Definition at line 18 of file PropagatorWithMaterialESProducer.h.
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] |
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 }
boost::shared_ptr<Propagator> PropagatorWithMaterialESProducer::_propagator [private] |
Definition at line 25 of file PropagatorWithMaterialESProducer.h.
Referenced by produce(), and PropagatorWithMaterialESProducer().