CMS 3D CMS Logo

SmartPropagatorESProducer Class Reference

ES producer needed to put the SmartPropagator inside the EventSetup. More...

#include <TrackingTools/Producers/interface/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>
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(), oppositeToMomentum, edm::ESProducer::setWhatProduced(), theEpsilon, theMuonPropagatorName, thePropagationDirection, and theTrackerPropagatorName.

00028 {
00029   string myname = parameterSet.getParameter<string>("ComponentName");
00030 
00031   string propDir = parameterSet.getParameter<string>("PropagationDirection");
00032   
00033   if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
00034   else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
00035   else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
00036   else
00037     throw cms::Exception("SmartPropagatorESProducer") 
00038       << "Wrong fit direction chosen in SmartPropagatorESProducer";
00039 
00040 
00041   theEpsilon = parameterSet.getParameter<double>("Epsilon");
00042   
00043   theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator");
00044   theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator");
00045 
00046   setWhatProduced(this,myname);
00047 }

SmartPropagatorESProducer::~SmartPropagatorESProducer (  )  [virtual]

Destructor.

Definition at line 49 of file SmartPropagatorESProducer.cc.

00049 {}


Member Function Documentation

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

Definition at line 52 of file SmartPropagatorESProducer.cc.

References edm::eventsetup::EventSetupRecordImplementation< T >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), SmartPropagator_cfi::SmartPropagator, theEpsilon, theMuonPropagatorName, thePropagationDirection, thePropagator, and theTrackerPropagatorName.

00052                                                                          { 
00053 
00054   ESHandle<MagneticField> magField;
00055   iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
00056   
00057   ESHandle<Propagator> trackerPropagator;
00058   iRecord.get(theTrackerPropagatorName,trackerPropagator);
00059 
00060   ESHandle<Propagator> muonPropagator;
00061   iRecord.get(theMuonPropagatorName,muonPropagator);
00062   
00063   
00064   thePropagator  = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator,
00065                                                                      &*magField,
00066                                                                      thePropagationDirection, 
00067                                                                      theEpsilon));
00068   return thePropagator;
00069 }


Member Data Documentation

double SmartPropagatorESProducer::theEpsilon [private]

Definition at line 42 of file SmartPropagatorESProducer.h.

Referenced by produce(), and SmartPropagatorESProducer().

std::string SmartPropagatorESProducer::theMuonPropagatorName [private]

Definition at line 41 of file SmartPropagatorESProducer.h.

Referenced by produce(), and SmartPropagatorESProducer().

PropagationDirection SmartPropagatorESProducer::thePropagationDirection [private]

Definition at line 39 of file SmartPropagatorESProducer.h.

Referenced by produce(), and SmartPropagatorESProducer().

boost::shared_ptr<Propagator> SmartPropagatorESProducer::thePropagator [private]

Definition at line 38 of file SmartPropagatorESProducer.h.

Referenced by produce().

std::string SmartPropagatorESProducer::theTrackerPropagatorName [private]

Definition at line 40 of file SmartPropagatorESProducer.h.

Referenced by produce(), and SmartPropagatorESProducer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:39 2009 for CMSSW by  doxygen 1.5.4