CMS 3D CMS Logo

Public Member Functions | Private Attributes

PropagatorWithMaterialESProducer Class Reference

#include <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)
PropagatorWithMaterialESProducer::~PropagatorWithMaterialESProducer ( ) [virtual]

Definition at line 23 of file PropagatorWithMaterialESProducer.cc.

{}

Member Function Documentation

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

Definition at line 26 of file PropagatorWithMaterialESProducer.cc.

References alongMomentum, anyDirection, dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HLT_ES_cff::magfield, oppositeToMomentum, PtMinSelector_cfg::ptMin, 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");
  double mass      = pset_.getParameter<double>("Mass");
  double maxDPhi   = pset_.getParameter<double>("MaxDPhi");
  bool useRK       = pset_.getParameter<bool>("useRungeKutta");
  bool useOldAnalPropLogic = pset_.existsAs<bool>("useOldAnalPropLogic") ? 
    pset_.getParameter<bool>("useOldAnalPropLogic") : true;
  double ptMin     = pset_.existsAs<double>("ptMin") ? pset_.getParameter<double>("ptMin") : -1.0;

  PropagationDirection dir = alongMomentum;
  
  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
  if (pdir == "alongMomentum") dir = alongMomentum;
  if (pdir == "anyDirection") dir = anyDirection;
  
  _propagator  = boost::shared_ptr<Propagator>(new PropagatorWithMaterial(dir, mass, &(*magfield),
                                                                          maxDPhi,useRK,ptMin,
                                                                          useOldAnalPropLogic));
  return _propagator;
}

Member Data Documentation

Definition at line 24 of file PropagatorWithMaterialESProducer.h.

Definition at line 25 of file PropagatorWithMaterialESProducer.h.