CMS 3D CMS Logo

Public Member Functions | Private Attributes

StraightLinePropagatorESProducer Class Reference

#include <StraightLinePropagatorESProducer.h>

Inheritance diagram for StraightLinePropagatorESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

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

Private Attributes

boost::shared_ptr< Propagator_propagator
edm::ParameterSet pset_

Detailed Description

Definition at line 10 of file StraightLinePropagatorESProducer.h.


Constructor & Destructor Documentation

StraightLinePropagatorESProducer::StraightLinePropagatorESProducer ( const edm::ParameterSet p)
StraightLinePropagatorESProducer::~StraightLinePropagatorESProducer ( ) [virtual]

Definition at line 22 of file StraightLinePropagatorESProducer.cc.

{}

Member Function Documentation

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

Definition at line 25 of file StraightLinePropagatorESProducer.cc.

References alongMomentum, anyDirection, dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HLT_ES_cff::magfield, oppositeToMomentum, StraightLinePropagator_cfi::StraightLinePropagator, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                                 { 
//   if (_propagator){
//     delete _propagator;
//     _propagator = 0;
//   }
  ESHandle<MagneticField> magfield;
  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
 std::string pdir = pset_.getParameter<std::string>("PropagationDirection");

  PropagationDirection dir = alongMomentum;

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

Member Data Documentation

Definition at line 16 of file StraightLinePropagatorESProducer.h.

Definition at line 17 of file StraightLinePropagatorESProducer.h.