CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
BeamHaloPropagatorESProducer Class Reference

#include <BeamHaloPropagatorESProducer.h>

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

Public Member Functions

 BeamHaloPropagatorESProducer (const edm::ParameterSet &)
 Constructor. More...
 
std::unique_ptr< Propagatorproduce (const TrackingComponentsRecord &)
 
 ~BeamHaloPropagatorESProducer () override
 Destructor. More...
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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

std::string myname
 
std::string theCrossingTrackerPropagatorName
 
std::string theEndCapTrackerPropagatorName
 
PropagationDirection thePropagationDirection
 

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
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- 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())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 BeamHaloPropagator inside the EventSetup

Author
Jean-Roch VLIMANT UCSB

Definition at line 22 of file BeamHaloPropagatorESProducer.h.

Constructor & Destructor Documentation

BeamHaloPropagatorESProducer::BeamHaloPropagatorESProducer ( const edm::ParameterSet parameterSet)

Constructor.

Definition at line 26 of file BeamHaloPropagatorESProducer.cc.

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

27 {
28  myname = parameterSet.getParameter<string>("ComponentName");
29 
30  string propDir = parameterSet.getParameter<string>("PropagationDirection");
31 
32  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
33  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
34  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
35  else
36  throw cms::Exception("BeamHaloPropagatorESProducer")
37  << "Wrong fit direction ("<< propDir <<")chosen in BeamHaloPropagatorESProducer";
38 
39  theEndCapTrackerPropagatorName = parameterSet.getParameter<string>("EndCapTrackerPropagator");
40  theCrossingTrackerPropagatorName = parameterSet.getParameter<string>("CrossingTrackerPropagator");
41 
42  setWhatProduced(this,myname);
43 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
BeamHaloPropagatorESProducer::~BeamHaloPropagatorESProducer ( )
override

Destructor.

Definition at line 45 of file BeamHaloPropagatorESProducer.cc.

45 {}

Member Function Documentation

std::unique_ptr< Propagator > BeamHaloPropagatorESProducer::produce ( const TrackingComponentsRecord iRecord)

Definition at line 48 of file BeamHaloPropagatorESProducer.cc.

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

48  {
49 
50  ESHandle<MagneticField> magField;
51  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
52 
53  ESHandle<Propagator> endcapPropagator;
54  iRecord.get(theEndCapTrackerPropagatorName,endcapPropagator);
55 
56  ESHandle<Propagator> crossPropagator;
57  iRecord.get(theCrossingTrackerPropagatorName,crossPropagator);
58 
59  LogDebug("BeamHaloPropagator")<<"Creating a BeamHaloPropagator: "<<myname
60  <<"\n with EndCap Propagator: "<<theEndCapTrackerPropagatorName
61  <<"\n with Crossing Propagator: "<<theCrossingTrackerPropagatorName;
62 
63  return std::make_unique<BeamHaloPropagator>(*endcapPropagator,*crossPropagator,
64  &*magField,
66 }
#define LogDebug(id)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const

Member Data Documentation

std::string BeamHaloPropagatorESProducer::myname
private

Definition at line 37 of file BeamHaloPropagatorESProducer.h.

std::string BeamHaloPropagatorESProducer::theCrossingTrackerPropagatorName
private

Definition at line 39 of file BeamHaloPropagatorESProducer.h.

std::string BeamHaloPropagatorESProducer::theEndCapTrackerPropagatorName
private

Definition at line 38 of file BeamHaloPropagatorESProducer.h.

PropagationDirection BeamHaloPropagatorESProducer::thePropagationDirection
private

Definition at line 36 of file BeamHaloPropagatorESProducer.h.