Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
FastSimulation
ParticlePropagator
plugins
MagneticFieldMapESProducer.cc
Go to the documentation of this file.
1
#include "
FastSimulation/ParticlePropagator/plugins/MagneticFieldMapESProducer.h
"
2
#include "
FastSimulation/TrackerSetup/interface/TrackerInteractionGeometryRecord.h
"
3
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
4
5
#include "
FWCore/Framework/interface/ESHandle.h
"
6
#include "
FWCore/Framework/interface/ModuleFactory.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
9
#include <memory>
10
11
MagneticFieldMapESProducer::MagneticFieldMapESProducer
(
const
edm::ParameterSet
&
p
) {
12
setWhatProduced
(
this
);
13
_label
= p.
getUntrackedParameter
<
std::string
>(
"trackerGeometryLabel"
,
""
);
14
15
// theTrackerMaterial = p.getParameter<edm::ParameterSet>("TrackerMaterial");
16
}
17
18
MagneticFieldMapESProducer::~MagneticFieldMapESProducer
() {}
19
20
std::unique_ptr<MagneticFieldMap>
MagneticFieldMapESProducer::produce
(
const
MagneticFieldMapRecord
& iRecord) {
21
edm::ESHandle<TrackerInteractionGeometry>
theInteractionGeometry;
22
edm::ESHandle<MagneticField>
theMagneticField;
23
24
iRecord.
getRecord
<
TrackerInteractionGeometryRecord
>().
get
(
_label
, theInteractionGeometry);
25
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(theMagneticField);
26
27
return
std::make_unique<MagneticFieldMap>(&(*theMagneticField), &(*theInteractionGeometry));
28
}
29
30
DEFINE_FWK_EVENTSETUP_MODULE
(
MagneticFieldMapESProducer
);
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ParameterSet.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:50
edm::ESHandle
Definition:
DTSurvey.h:22
MagneticFieldMapRecord
Definition:
MagneticFieldMapRecord.h:27
ESHandle.h
MagneticFieldMapESProducer::MagneticFieldMapESProducer
MagneticFieldMapESProducer(const edm::ParameterSet &p)
Definition:
MagneticFieldMapESProducer.cc:11
MagneticFieldMapESProducer::_label
std::string _label
Definition:
MagneticFieldMapESProducer.h:17
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
TrackerInteractionGeometryRecord
Definition:
TrackerInteractionGeometryRecord.h:26
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
MagneticFieldMapESProducer::~MagneticFieldMapESProducer
~MagneticFieldMapESProducer() override
Definition:
MagneticFieldMapESProducer.cc:18
MagneticFieldMapESProducer::produce
std::unique_ptr< MagneticFieldMap > produce(const MagneticFieldMapRecord &)
Definition:
MagneticFieldMapESProducer.cc:20
edm::ParameterSet
Definition:
ParameterSet.h:47
ModuleFactory.h
MagneticFieldMapESProducer
Definition:
MagneticFieldMapESProducer.h:10
TrackerInteractionGeometryRecord.h
MagneticFieldMapESProducer.h
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.5