Main Page
Namespaces
Classes
Package Documentation
TrackPropagation
Geant4e
plugins
GeantPropagatorESProducer.cc
Go to the documentation of this file.
1
#include "
GeantPropagatorESProducer.h
"
2
#include "
MagneticField/Engine/interface/MagneticField.h
"
3
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
4
#include "
TrackPropagation/Geant4e/interface/Geant4ePropagator.h
"
5
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
#include "
FWCore/Framework/interface/ESProducer.h
"
8
#include "
FWCore/Framework/interface/EventSetup.h
"
9
#include "
FWCore/Framework/interface/ModuleFactory.h
"
10
11
#include <memory>
12
#include <string>
13
14
using namespace
edm
;
15
16
GeantPropagatorESProducer::GeantPropagatorESProducer
(
const
edm::ParameterSet
&
p
) {
17
std::string
myname = p.
getParameter
<
std::string
>(
"ComponentName"
);
18
pset_ =
p
;
19
plimit_ = pset_.getParameter<
double
>(
"PropagationPtotLimit"
);
20
setWhatProduced(
this
, myname);
21
}
22
23
GeantPropagatorESProducer::~GeantPropagatorESProducer
() {}
24
25
std::unique_ptr<Propagator>
GeantPropagatorESProducer::produce
(
const
TrackingComponentsRecord
&iRecord) {
26
ESHandle<MagneticField>
magfield;
27
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(magfield);
28
29
std::string
pdir = pset_.getParameter<
std::string
>(
"PropagationDirection"
);
30
std::string
particleName
= pset_.getParameter<
std::string
>(
"ParticleName"
);
31
32
PropagationDirection
dir
=
alongMomentum
;
33
34
if
(pdir ==
"oppositeToMomentum"
)
35
dir =
oppositeToMomentum
;
36
else
if
(pdir ==
"alongMomentum"
)
37
dir =
alongMomentum
;
38
else
if
(pdir ==
"anyDirection"
)
39
dir =
anyDirection
;
40
41
return
std::make_unique<Geant4ePropagator>(&(*magfield),
particleName
,
dir
, plimit_);
42
}
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
anyDirection
Definition:
PropagationDirection.h:4
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:13
EventSetup.h
alongMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
GeantPropagatorESProducer.h
HiggsValidation_cfi.particleName
particleName
Definition:
HiggsValidation_cfi.py:7
MagneticField.h
Geant4ePropagator.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
edm::ESHandle< MagneticField >
ESHandle.h
GeantPropagatorESProducer::produce
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
GeantPropagatorESProducer.cc:25
GeantPropagatorESProducer::~GeantPropagatorESProducer
~GeantPropagatorESProducer() override
Definition:
GeantPropagatorESProducer.cc:23
ESProducer.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
GeantPropagatorESProducer::GeantPropagatorESProducer
GeantPropagatorESProducer(const edm::ParameterSet &p)
Definition:
GeantPropagatorESProducer.cc:16
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
dir
dbl *** dir
Definition:
mlp_gen.cc:35
oppositeToMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.11