Main Page
Namespaces
Classes
Package Documentation
TrackingTools
Producers
src
StraightLinePropagatorESProducer.cc
Go to the documentation of this file.
1
#include "
TrackingTools/Producers/interface/StraightLinePropagatorESProducer.h
"
2
#include "
MagneticField/Engine/interface/MagneticField.h
"
3
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
4
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
#include "
FWCore/Framework/interface/ModuleFactory.h
"
8
#include "
FWCore/Framework/interface/ESProducer.h
"
9
10
#include <string>
11
#include <memory>
12
13
using namespace
edm
;
14
15
StraightLinePropagatorESProducer::StraightLinePropagatorESProducer
(
const
edm::ParameterSet
&
p
)
16
{
17
std::string
myname = p.
getParameter
<
std::string
>(
"ComponentName"
);
18
pset_ =
p
;
19
setWhatProduced(
this
,myname);
20
}
21
22
StraightLinePropagatorESProducer::~StraightLinePropagatorESProducer
() {}
23
24
std::unique_ptr<Propagator>
25
StraightLinePropagatorESProducer::produce
(
const
TrackingComponentsRecord
& iRecord){
26
// if (_propagator){
27
// delete _propagator;
28
// _propagator = 0;
29
// }
30
ESHandle<MagneticField>
magfield;
31
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(magfield );
32
std::string
pdir = pset_.getParameter<
std::string
>(
"PropagationDirection"
);
33
34
PropagationDirection
dir
=
alongMomentum
;
35
36
if
(pdir ==
"oppositeToMomentum"
) dir =
oppositeToMomentum
;
37
else
if
(pdir ==
"anyDirection"
) dir =
anyDirection
;
38
return
std::make_unique<StraightLinePropagator>(&(*magfield),
dir
);
39
}
40
41
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
StraightLinePropagatorESProducer::produce
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
StraightLinePropagatorESProducer.cc:25
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
MagneticField.h
StraightLinePropagatorESProducer::~StraightLinePropagatorESProducer
~StraightLinePropagatorESProducer() override
Definition:
StraightLinePropagatorESProducer.cc:22
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
edm::ESHandle< MagneticField >
StraightLinePropagatorESProducer::StraightLinePropagatorESProducer
StraightLinePropagatorESProducer(const edm::ParameterSet &p)
Definition:
StraightLinePropagatorESProducer.cc:15
StraightLinePropagatorESProducer.h
ESHandle.h
ESProducer.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
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