CMS 3D CMS Logo

Public Member Functions | Private Attributes

AnalyticalPropagatorESProducer Class Reference

#include <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(), and AlCaHLTBitMon_ParallelJobs::p.

{
  std::string myname = p.getParameter<std::string>("ComponentName");
  pset_ = p;
  setWhatProduced(this,myname);
}
AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer ( ) [virtual]

Definition at line 22 of file AnalyticalPropagatorESProducer.cc.

{}

Member Function Documentation

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

Definition at line 25 of file AnalyticalPropagatorESProducer.cc.

References alongMomentum, AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HLT_ES_cff::magfield, and oppositeToMomentum.

                                                                               { 
//   if (_propagator){
//     delete _propagator;
//     _propagator = 0;
//   }
  ESHandle<MagneticField> magfield;
  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );

  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
  double dphiCut   = pset_.getParameter<double>("MaxDPhi");   

  PropagationDirection dir = alongMomentum;
  
  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
  if (pdir == "alongMomentum") dir = alongMomentum;
  if (pdir == "anyDirection") dir = anyDirection;
  
  _propagator  = boost::shared_ptr<Propagator>(new AnalyticalPropagator(&(*magfield), dir,dphiCut));
  return _propagator;
}

Member Data Documentation

Definition at line 16 of file AnalyticalPropagatorESProducer.h.

Definition at line 17 of file AnalyticalPropagatorESProducer.h.