CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SmartPropagatorESProducer Class Reference

#include <SmartPropagatorESProducer.h>

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

Public Member Functions

boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
 
 SmartPropagatorESProducer (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~SmartPropagatorESProducer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

ES producer needed to put the SmartPropagator inside the EventSetup

Author
R. Bellan - INFN Torino ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 22 of file SmartPropagatorESProducer.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file SmartPropagatorESProducer.cc.

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

26 {
27  string myname = parameterSet.getParameter<string>("ComponentName");
28 
29  string propDir = parameterSet.getParameter<string>("PropagationDirection");
30 
31  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
32  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
33  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
34  else
35  throw cms::Exception("SmartPropagatorESProducer")
36  << "Wrong fit direction chosen in SmartPropagatorESProducer";
37 
38 
39  theEpsilon = parameterSet.getParameter<double>("Epsilon");
40 
41  theTrackerPropagatorName = parameterSet.getParameter<string>("TrackerPropagator");
42  theMuonPropagatorName = parameterSet.getParameter<string>("MuonPropagator");
43 
44  setWhatProduced(this,myname);
45 }
T getParameter(std::string const &) const
PropagationDirection thePropagationDirection
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
SmartPropagatorESProducer::~SmartPropagatorESProducer ( )
virtual

Destructor.

Definition at line 47 of file SmartPropagatorESProducer.cc.

47 {}

Member Function Documentation

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

Definition at line 50 of file SmartPropagatorESProducer.cc.

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

50  {
51 
52  ESHandle<MagneticField> magField;
53  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
54 
55  ESHandle<Propagator> trackerPropagator;
56  iRecord.get(theTrackerPropagatorName,trackerPropagator);
57 
58  ESHandle<Propagator> muonPropagator;
59  iRecord.get(theMuonPropagatorName,muonPropagator);
60 
61 
62  thePropagator = boost::shared_ptr<Propagator>(new SmartPropagator(*trackerPropagator, *muonPropagator,
63  &*magField,
65  theEpsilon));
66  return thePropagator;
67 }
PropagationDirection thePropagationDirection
boost::shared_ptr< Propagator > thePropagator
void get(HolderT &iHolder) const

Member Data Documentation

double SmartPropagatorESProducer::theEpsilon
private

Definition at line 40 of file SmartPropagatorESProducer.h.

std::string SmartPropagatorESProducer::theMuonPropagatorName
private

Definition at line 39 of file SmartPropagatorESProducer.h.

PropagationDirection SmartPropagatorESProducer::thePropagationDirection
private

Definition at line 37 of file SmartPropagatorESProducer.h.

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

Definition at line 36 of file SmartPropagatorESProducer.h.

std::string SmartPropagatorESProducer::theTrackerPropagatorName
private

Definition at line 38 of file SmartPropagatorESProducer.h.