test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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
{
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
MagneticFieldMapESProducer::produce
std::shared_ptr< MagneticFieldMap > produce(const MagneticFieldMapRecord &)
Definition:
MagneticFieldMapESProducer.cc:23
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
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:47
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
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
MagneticFieldMapESProducer
Definition:
MagneticFieldMapESProducer.h:10
TrackerInteractionGeometryRecord.h
MagneticFieldMapESProducer.h
IdealMagneticFieldRecord.h
MagneticFieldMapESProducer::~MagneticFieldMapESProducer
virtual ~MagneticFieldMapESProducer()
Definition:
MagneticFieldMapESProducer.cc:20
Generated for CMSSW Reference Manual by
1.8.5