CMS 3D CMS Logo

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

std::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 ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- 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 () noexcept(false)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- 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::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_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, 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

std::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(), outInSeedsFromStandaloneMuons_cfi::muonPropagator, and outInSeedsFromStandaloneMuons_cfi::trackerPropagator.

50  {
51 
52  ESHandle<MagneticField> magField;
53  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
54 
56  iRecord.get(theTrackerPropagatorName,trackerPropagator);
57 
59  iRecord.get(theMuonPropagatorName,muonPropagator);
60 
61 
62  thePropagator = std::make_shared<SmartPropagator>(*trackerPropagator, *muonPropagator,
63  &*magField,
65  theEpsilon);
66  return thePropagator;
67 }
muonPropagator
Propagator to go from muon state to TOB/TEC.
PropagationDirection thePropagationDirection
trackerPropagator
Propagator used searching for hits.
void get(HolderT &iHolder) const
std::shared_ptr< Propagator > thePropagator

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.

std::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.