Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
TrackPropagation
Geant4e
plugins
GeantPropagatorESProducer.cc
Go to the documentation of this file.
1
#include "
GeantPropagatorESProducer.h
"
2
3
#include "
TrackPropagation/Geant4e/interface/Geant4ePropagator.h
"
4
5
#include "
FWCore/Framework/interface/ESHandle.h
"
6
#include "
FWCore/Framework/interface/ESProducer.h
"
7
#include "
FWCore/Framework/interface/EventSetup.h
"
8
#include "
FWCore/Framework/interface/ModuleFactory.h
"
9
10
#include <memory>
11
#include <string>
12
13
using namespace
edm;
14
15
GeantPropagatorESProducer::GeantPropagatorESProducer
(
const
edm::ParameterSet
&
p
)
16
: magFieldToken_(setWhatProduced(this, p.getParameter<std::
string
>(
"ComponentName"
))
17
.consumesFrom<
MagneticField
,
IdealMagneticFieldRecord
>(edm::
ESInputTag
(
""
,
""
))) {
18
pset_
=
p
;
19
plimit_
=
pset_
.
getParameter
<
double
>(
"PropagationPtotLimit"
);
20
}
21
22
GeantPropagatorESProducer::~GeantPropagatorESProducer
() {}
23
24
std::unique_ptr<Propagator>
GeantPropagatorESProducer::produce
(
const
TrackingComponentsRecord
&iRecord) {
25
std::string
pdir =
pset_
.
getParameter
<
std::string
>(
"PropagationDirection"
);
26
std::string
particleName =
pset_
.
getParameter
<
std::string
>(
"ParticleName"
);
27
28
PropagationDirection
dir
=
alongMomentum
;
29
30
if
(pdir ==
"oppositeToMomentum"
) {
31
dir =
oppositeToMomentum
;
32
}
else
if
(pdir ==
"alongMomentum"
) {
33
dir =
alongMomentum
;
34
}
else
if
(pdir ==
"anyDirection"
) {
35
dir =
anyDirection
;
36
}
37
38
return
std::make_unique<Geant4ePropagator>(&(iRecord.
get
(
magFieldToken_
)), particleName, dir,
plimit_
);
39
}
anyDirection
Definition:
PropagationDirection.h:4
edm::ESInputTag
Definition:
ESInputTag.h:87
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:12
EventSetup.h
alongMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
MagneticField
Definition:
MagneticField.h:19
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
GeantPropagatorESProducer.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:103
Geant4ePropagator.h
DeadROC_duringRun.dir
string dir
Definition:
DeadROC_duringRun.py:23
ESHandle.h
GeantPropagatorESProducer::produce
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
GeantPropagatorESProducer.cc:24
GeantPropagatorESProducer::~GeantPropagatorESProducer
~GeantPropagatorESProducer() override
Definition:
GeantPropagatorESProducer.cc:22
GeantPropagatorESProducer::plimit_
double plimit_
Definition:
GeantPropagatorESProducer.h:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ESProducer.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
GeantPropagatorESProducer::pset_
edm::ParameterSet pset_
Definition:
GeantPropagatorESProducer.h:27
GeantPropagatorESProducer::GeantPropagatorESProducer
GeantPropagatorESProducer(const edm::ParameterSet &p)
Definition:
GeantPropagatorESProducer.cc:15
edm::ParameterSet
Definition:
ParameterSet.h:47
ModuleFactory.h
GeantPropagatorESProducer::magFieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition:
GeantPropagatorESProducer.h:28
oppositeToMomentum
Definition:
PropagationDirection.h:4
Generated for CMSSW Reference Manual by
1.8.5