CMS 3D CMS Logo

Public Member Functions | Private Attributes

SmartPropagatorESProducer Class Reference

#include <SmartPropagatorESProducer.h>

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

List of all members.

Public Member Functions

boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
 SmartPropagatorESProducer (const edm::ParameterSet &)
 Constructor.
virtual ~SmartPropagatorESProducer ()
 Destructor.

Private Attributes

double theEpsilon
std::string theMuonPropagatorName
PropagationDirection thePropagationDirection
boost::shared_ptr< PropagatorthePropagator
std::string theTrackerPropagatorName

Detailed Description

ES producer needed to put the SmartPropagator inside the EventSetup

Date:
2007/01/17 19:28:40
Revision:
1.1
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>

ES producer needed to put the SmartPropagator inside the EventSetup

Date:
2007/03/07 18:25:16
Revision:
1.3
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>

Definition at line 24 of file SmartPropagatorESProducer.h.


Constructor & Destructor Documentation

SmartPropagatorESProducer::SmartPropagatorESProducer ( const edm::ParameterSet parameterSet)

Constructor.

Definition at line 27 of file SmartPropagatorESProducer.cc.

References alongMomentum, anyDirection, Exception, edm::ParameterSet::getParameter(), and oppositeToMomentum.

{
  string myname = parameterSet.getParameter<string>("ComponentName");

  string propDir = parameterSet.getParameter<string>("PropagationDirection");
  
  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
  else
    throw cms::Exception("SmartPropagatorESProducer") 
      << "Wrong fit direction chosen in SmartPropagatorESProducer";


  theEpsilon = parameterSet.getParameter<double>("Epsilon");
  
  theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator");
  theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator");

  setWhatProduced(this,myname);
}
SmartPropagatorESProducer::~SmartPropagatorESProducer ( ) [virtual]

Destructor.

Definition at line 49 of file SmartPropagatorESProducer.cc.

{}

Member Function Documentation

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

Definition at line 52 of file SmartPropagatorESProducer.cc.

References edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and SmartPropagator_cfi::SmartPropagator.

                                                                         { 

  ESHandle<MagneticField> magField;
  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
  
  ESHandle<Propagator> trackerPropagator;
  iRecord.get(theTrackerPropagatorName,trackerPropagator);

  ESHandle<Propagator> muonPropagator;
  iRecord.get(theMuonPropagatorName,muonPropagator);
  
  
  thePropagator  = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator,
                                                                     &*magField,
                                                                     thePropagationDirection, 
                                                                     theEpsilon));
  return thePropagator;
}

Member Data Documentation

Definition at line 42 of file SmartPropagatorESProducer.h.

Definition at line 41 of file SmartPropagatorESProducer.h.

Definition at line 39 of file SmartPropagatorESProducer.h.

Definition at line 38 of file SmartPropagatorESProducer.h.

Definition at line 40 of file SmartPropagatorESProducer.h.