Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
TrackPropagation
Geant4e
plugins
GeantPropagatorESProducer.cc
Go to the documentation of this file.
1
#include "
GeantPropagatorESProducer.h
"
2
#include "
TrackPropagation/Geant4e/interface/Geant4ePropagator.h
"
3
#include "
MagneticField/Engine/interface/MagneticField.h
"
4
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
5
6
#include "
FWCore/Framework/interface/EventSetup.h
"
7
#include "
FWCore/Framework/interface/ESHandle.h
"
8
#include "
FWCore/Framework/interface/ModuleFactory.h
"
9
#include "
FWCore/Framework/interface/ESProducer.h
"
10
11
#include <string>
12
#include <memory>
13
14
using namespace
edm;
15
16
GeantPropagatorESProducer::GeantPropagatorESProducer
(
const
edm::ParameterSet
&
p
)
17
{
18
std::string
myname = p.
getParameter
<
std::string
>(
"ComponentName"
);
19
pset_ =
p
;
20
setWhatProduced(
this
,myname);
21
}
22
23
GeantPropagatorESProducer::~GeantPropagatorESProducer
() {}
24
25
boost::shared_ptr<Propagator>
26
GeantPropagatorESProducer::produce
(
const
TrackingComponentsRecord
& iRecord){
27
28
ESHandle<MagneticField>
magfield
;
29
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(magfield );
30
31
std::string
pdir = pset_.getParameter<
std::string
>(
"PropagationDirection"
);
32
std::string
particleName = pset_.getParameter<
std::string
>(
"ParticleName"
);
33
34
PropagationDirection
dir
=
alongMomentum
;
35
36
if
(pdir ==
"oppositeToMomentum"
) dir =
oppositeToMomentum
;
37
if
(pdir ==
"alongMomentum"
) dir =
alongMomentum
;
38
if
(pdir ==
"anyDirection"
) dir =
anyDirection
;
39
40
_propagator = boost::shared_ptr<Propagator>(
new
Geant4ePropagator
(&(*magfield),particleName,dir));
41
return
_propagator;
42
}
43
44
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
anyDirection
Definition:
PropagationDirection.h:4
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:13
EventSetup.h
HLT_ES_cff.magfield
tuple magfield
Definition:
HLT_ES_cff.py:2311
alongMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
GeantPropagatorESProducer.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
MagneticField.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:46
Geant4ePropagator.h
edm::ESHandle< MagneticField >
ESHandle.h
GeantPropagatorESProducer::~GeantPropagatorESProducer
virtual ~GeantPropagatorESProducer() override
Definition:
GeantPropagatorESProducer.cc:23
ESProducer.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
GeantPropagatorESProducer::GeantPropagatorESProducer
GeantPropagatorESProducer(const edm::ParameterSet &p)
Definition:
GeantPropagatorESProducer.cc:16
GeantPropagatorESProducer::produce
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
GeantPropagatorESProducer.cc:26
edm::ParameterSet
Definition:
ParameterSet.h:35
ModuleFactory.h
dir
dbl *** dir
Definition:
mlp_gen.cc:35
Geant4ePropagator_cfi.Geant4ePropagator
tuple Geant4ePropagator
Definition:
Geant4ePropagator_cfi.py:7
oppositeToMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.5