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::shared_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
_map
= std::make_shared<MagneticFieldMap>(&(*theMagneticField),&(*theInteractionGeometry));
32
33
return
_map
;
34
35
}
36
37
38
DEFINE_FWK_EVENTSETUP_MODULE
(
MagneticFieldMapESProducer
);
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
MagneticFieldMapESProducer::produce
std::shared_ptr< MagneticFieldMap > produce(const MagneticFieldMapRecord &)
Definition:
MagneticFieldMapESProducer.cc:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
edm::ESProducer::setWhatProduced
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition:
ESProducer.h:115
ParameterSet.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:48
edm::ESHandle
Definition:
DTSurvey.h:22
MagneticFieldMapRecord
Definition:
MagneticFieldMapRecord.h:27
ESHandle.h
MagneticFieldMapESProducer::_map
std::shared_ptr< MagneticFieldMap > _map
Definition:
MagneticFieldMapESProducer.h:16
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
MagneticFieldMapESProducer::~MagneticFieldMapESProducer
~MagneticFieldMapESProducer() override
Definition:
MagneticFieldMapESProducer.cc:20
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