CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SteppingHelixPropagatorESProducer Class Reference
Inheritance diagram for SteppingHelixPropagatorESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::unique_ptr< Propagatorproduce (const TrackingComponentsRecord &)
 
 SteppingHelixPropagatorESProducer (const edm::ParameterSet &p)
 
 ~SteppingHelixPropagatorESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagToken_
 
const edm::ParameterSet pset_
 
const bool setVBFPointer_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordvbMagToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 19 of file SteppingHelixPropagatorESProducer.cc.

Constructor & Destructor Documentation

◆ SteppingHelixPropagatorESProducer()

SteppingHelixPropagatorESProducer::SteppingHelixPropagatorESProducer ( const edm::ParameterSet p)

Definition at line 34 of file SteppingHelixPropagatorESProducer.cc.

35  : pset_{p}, setVBFPointer_{pset_.getParameter<bool>("SetVBFPointer")} {
36  std::string myname = p.getParameter<std::string>("ComponentName");
37  auto c = setWhatProduced(this, myname);
38  c.setConsumes(magToken_);
39  if (setVBFPointer_) {
40  c.setConsumes(vbMagToken_, edm::ESInputTag("", pset_.getParameter<std::string>("VBFName")));
41  }
42 }

References AlCaHLTBitMon_ParallelJobs::p.

◆ ~SteppingHelixPropagatorESProducer()

SteppingHelixPropagatorESProducer::~SteppingHelixPropagatorESProducer ( )
override

Definition at line 44 of file SteppingHelixPropagatorESProducer.cc.

44 {}

Member Function Documentation

◆ produce()

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

Definition at line 46 of file SteppingHelixPropagatorESProducer.cc.

46  {
47  // if (_propagator){
48  // delete _propagator;
49  // _propagator = 0;
50  // }
51  auto const& magfield = iRecord.get(magToken_);
52 
53  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
54 
56 
57  if (pdir == "oppositeToMomentum")
59  if (pdir == "alongMomentum")
61  if (pdir == "anyDirection")
62  dir = anyDirection;
63 
64  std::unique_ptr<SteppingHelixPropagator> shProp;
65  shProp.reset(new SteppingHelixPropagator(&magfield, dir));
66 
67  bool useInTeslaFromMagField = pset_.getParameter<bool>("useInTeslaFromMagField");
68  bool useMagVolumes = pset_.getParameter<bool>("useMagVolumes");
69 
70  // if useMagVolumes == true and an alternate VBF field is not specified with setVBFPointer_,
71  // Force "useInTeslaFromMagField=true" for a B=0 VBF map.
72  if (useMagVolumes == true && !useInTeslaFromMagField && !setVBFPointer_ && magfield.nominalValue() == 0) {
73  const VolumeBasedMagneticField* vbfCPtr = dynamic_cast<const VolumeBasedMagneticField*>(&magfield);
74  if (vbfCPtr == nullptr) {
75  edm::LogWarning("SteppingHelixPropagator")
76  << "Config specifies useMagVolumes==True but no VBF field available: SHP has no access to yoke material "
77  "properties. Use setVBFPointer=true and VBFName cards to set a VBF field, otherwise set "
78  "useMagVolumes==False."
79  << std::endl;
80  } else {
81  edm::LogInfo("SteppingHelixPropagator")
82  << "Config specifies useMagVolumes==true and VBF field available: Forcing useInTeslaFromMagField = True."
83  << std::endl;
85  }
86  }
87 
88  if (setVBFPointer_) {
89  auto const& vbfField = iRecord.get(vbMagToken_);
90  const VolumeBasedMagneticField* vbfCPtr = dynamic_cast<const VolumeBasedMagneticField*>(&vbfField);
91  shProp->setVBFPointer(vbfCPtr);
92  }
93 
94  shProp->setUseInTeslaFromMagField(useInTeslaFromMagField);
95 
96  bool haveX0Corr = pset_.getParameter<bool>("ApplyRadX0Correction");
97  shProp->applyRadX0Correction(haveX0Corr);
98 
99  bool assumeNoMaterial = pset_.getParameter<bool>("AssumeNoMaterial");
100  shProp->setMaterialMode(assumeNoMaterial);
101 
102  bool noErrorPropagation = pset_.getParameter<bool>("NoErrorPropagation");
103  shProp->setNoErrorPropagation(noErrorPropagation);
104 
105  bool debugMode = pset_.getParameter<bool>("debug");
106  shProp->setDebug(debugMode);
107 
108  shProp->setUseMagVolumes(useMagVolumes);
109 
110  bool useMatVolumes = pset_.getParameter<bool>("useMatVolumes");
111  shProp->setUseMatVolumes(useMatVolumes);
112 
113  bool useIsYokeFlag = pset_.getParameter<bool>("useIsYokeFlag");
114  shProp->setUseIsYokeFlag(useIsYokeFlag);
115 
116  bool returnTangentPlane = pset_.getParameter<bool>("returnTangentPlane");
117  shProp->setReturnTangentPlane(returnTangentPlane);
118 
119  bool sendLogWarning = pset_.getParameter<bool>("sendLogWarning");
120  shProp->setSendLogWarning(sendLogWarning);
121 
122  bool useTuningForL2Speed = pset_.getParameter<bool>("useTuningForL2Speed");
123  shProp->setUseTuningForL2Speed(useTuningForL2Speed);
124 
125  bool useECoffsets = pset_.getParameter<bool>("useEndcapShiftsInZ");
126  if (useECoffsets) {
127  double valPos = pset_.getParameter<double>("endcapShiftInZPos");
128  double valNeg = pset_.getParameter<double>("endcapShiftInZNeg");
129  shProp->setEndcapShiftsInZPosNeg(valPos, valNeg);
130  }
131 
132  return shProp;
133 }

References alongMomentum, anyDirection, beampixel_dqm_sourceclient-live_cfg::debugMode, DeadROC_duringRun::dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::ParameterSet::getParameter(), volumeBasedMagneticField_160812_cfi::magfield, magToken_, oppositeToMomentum, pset_, HLT_2018_cff::returnTangentPlane, HLT_2018_cff::sendLogWarning, setVBFPointer_, SteppingHelixPropagator_cfi::SteppingHelixPropagator, AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::useInTeslaFromMagField, HLT_2018_cff::useIsYokeFlag, HLT_2018_cff::useMagVolumes, HLT_2018_cff::useMatVolumes, HLT_2018_cff::useTuningForL2Speed, and vbMagToken_.

Member Data Documentation

◆ magToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> SteppingHelixPropagatorESProducer::magToken_
private

Definition at line 27 of file SteppingHelixPropagatorESProducer.cc.

Referenced by produce().

◆ pset_

const edm::ParameterSet SteppingHelixPropagatorESProducer::pset_
private

Definition at line 26 of file SteppingHelixPropagatorESProducer.cc.

Referenced by produce().

◆ setVBFPointer_

const bool SteppingHelixPropagatorESProducer::setVBFPointer_
private

Definition at line 29 of file SteppingHelixPropagatorESProducer.cc.

Referenced by produce().

◆ vbMagToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> SteppingHelixPropagatorESProducer::vbMagToken_
private

Definition at line 28 of file SteppingHelixPropagatorESProducer.cc.

Referenced by produce().

anyDirection
Definition: PropagationDirection.h:4
edm::ESInputTag
Definition: ESInputTag.h:87
HLT_2018_cff.useTuningForL2Speed
useTuningForL2Speed
Definition: HLT_2018_cff.py:5248
HLT_2018_cff.useInTeslaFromMagField
useInTeslaFromMagField
Definition: HLT_2018_cff.py:5254
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
VolumeBasedMagneticField
Definition: VolumeBasedMagneticField.h:18
edm::LogInfo
Definition: MessageLogger.h:254
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
oppositeToMomentum
Definition: PropagationDirection.h:4
SteppingHelixPropagatorESProducer::setVBFPointer_
const bool setVBFPointer_
Definition: SteppingHelixPropagatorESProducer.cc:29
SteppingHelixPropagator_cfi.SteppingHelixPropagator
SteppingHelixPropagator
Definition: SteppingHelixPropagator_cfi.py:3
HLT_2018_cff.sendLogWarning
sendLogWarning
Definition: HLT_2018_cff.py:5257
SteppingHelixPropagatorESProducer::magToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magToken_
Definition: SteppingHelixPropagatorESProducer.cc:27
SteppingHelixPropagatorESProducer::vbMagToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > vbMagToken_
Definition: SteppingHelixPropagatorESProducer.cc:28
HLT_2018_cff.useMagVolumes
useMagVolumes
Definition: HLT_2018_cff.py:5261
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
HLT_2018_cff.useIsYokeFlag
useIsYokeFlag
Definition: HLT_2018_cff.py:5249
HLT_2018_cff.returnTangentPlane
returnTangentPlane
Definition: HLT_2018_cff.py:5253
HLT_2018_cff.useMatVolumes
useMatVolumes
Definition: HLT_2018_cff.py:5258
SteppingHelixPropagatorESProducer::pset_
const edm::ParameterSet pset_
Definition: SteppingHelixPropagatorESProducer.cc:26
beampixel_dqm_sourceclient-live_cfg.debugMode
debugMode
Definition: beampixel_dqm_sourceclient-live_cfg.py:135
volumeBasedMagneticField_160812_cfi.magfield
magfield
Definition: volumeBasedMagneticField_160812_cfi.py:11
alongMomentum
Definition: PropagationDirection.h:4
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23