Main Page
Namespaces
Classes
Package Documentation
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
{
13
setWhatProduced
(
this
);
14
_label
= p.
getUntrackedParameter
<
std::string
>(
"trackerGeometryLabel"
,
""
);
15
16
// theTrackerMaterial = p.getParameter<edm::ParameterSet>("TrackerMaterial");
17
18
}
19
20
MagneticFieldMapESProducer::~MagneticFieldMapESProducer
() {}
21
22
std::unique_ptr<MagneticFieldMap>
23
MagneticFieldMapESProducer::produce
(
const
MagneticFieldMapRecord
& iRecord){
24
25
edm::ESHandle<TrackerInteractionGeometry>
theInteractionGeometry;
26
edm::ESHandle<MagneticField>
theMagneticField;
27
28
iRecord.
getRecord
<
TrackerInteractionGeometryRecord
>().
get
(
_label
, theInteractionGeometry );
29
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(theMagneticField );
30
31
return
std::make_unique<MagneticFieldMap>(&(*theMagneticField),&(*theInteractionGeometry));
32
33
}
34
35
36
DEFINE_FWK_EVENTSETUP_MODULE
(
MagneticFieldMapESProducer
);
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:124
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
ParameterSet.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
edm::ESHandle
Definition:
DTSurvey.h:22
MagneticFieldMapRecord
Definition:
MagneticFieldMapRecord.h:27
ESHandle.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
MagneticFieldMapESProducer::MagneticFieldMapESProducer
MagneticFieldMapESProducer(const edm::ParameterSet &p)
Definition:
MagneticFieldMapESProducer.cc:11
MagneticFieldMapESProducer::_label
std::string _label
Definition:
MagneticFieldMapESProducer.h:16
TrackerInteractionGeometryRecord
Definition:
TrackerInteractionGeometryRecord.h:26
MagneticFieldMapESProducer::~MagneticFieldMapESProducer
~MagneticFieldMapESProducer() override
Definition:
MagneticFieldMapESProducer.cc:20
MagneticFieldMapESProducer::produce
std::unique_ptr< MagneticFieldMap > produce(const MagneticFieldMapRecord &)
Definition:
MagneticFieldMapESProducer.cc:23
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
MagneticFieldMapESProducer
Definition:
MagneticFieldMapESProducer.h:10
TrackerInteractionGeometryRecord.h
MagneticFieldMapESProducer.h
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.11