Main Page
Namespaces
Classes
Package Documentation
TrackingTools
Producers
src
AnalyticalPropagatorESProducer.cc
Go to the documentation of this file.
1
#include "
TrackingTools/Producers/interface/AnalyticalPropagatorESProducer.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
#include <
FWCore/Utilities/interface/ESInputTag.h
>
10
11
#include <string>
12
#include <memory>
13
14
using namespace
edm
;
15
16
AnalyticalPropagatorESProducer::AnalyticalPropagatorESProducer
(
const
edm::ParameterSet
&
p
)
17
{
18
std::string
myname = p.
getParameter
<
std::string
>(
"ComponentName"
);
19
pset_ =
p
;
20
setWhatProduced(
this
,myname);
21
}
22
23
AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer
() {}
24
25
std::unique_ptr<Propagator>
26
AnalyticalPropagatorESProducer::produce
(
const
TrackingComponentsRecord
& iRecord){
27
// if (_propagator){
28
// delete _propagator;
29
// _propagator = 0;
30
// }
31
ESHandle<MagneticField>
magfield;
32
std::string
mfName =
""
;
33
if
(pset_.exists(
"SimpleMagneticField"
))
34
mfName = pset_.getParameter<
std::string
>(
"SimpleMagneticField"
);
35
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(mfName,magfield);
36
// edm::ESInputTag mfESInputTag(mfName);
37
// iRecord.getRecord<IdealMagneticFieldRecord>().get(mfESInputTag,magfield);
38
39
std::string
pdir = pset_.getParameter<
std::string
>(
"PropagationDirection"
);
40
double
dphiCut = pset_.getParameter<
double
>(
"MaxDPhi"
);
41
42
PropagationDirection
dir
=
alongMomentum
;
43
44
if
(pdir ==
"oppositeToMomentum"
) dir =
oppositeToMomentum
;
45
if
(pdir ==
"alongMomentum"
) dir =
alongMomentum
;
46
if
(pdir ==
"anyDirection"
) dir =
anyDirection
;
47
48
return
std::make_unique<AnalyticalPropagator>(&(*magfield),
dir
,dphiCut);
49
}
50
51
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
AnalyticalPropagatorESProducer::produce
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
AnalyticalPropagatorESProducer.cc:26
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
ESInputTag.h
alongMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
MagneticField.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:48
edm::ESHandle< MagneticField >
ESHandle.h
ESProducer.h
AnalyticalPropagatorESProducer::AnalyticalPropagatorESProducer
AnalyticalPropagatorESProducer(const edm::ParameterSet &p)
Definition:
AnalyticalPropagatorESProducer.cc:16
edm
HLT enums.
Definition:
AlignableModifier.h:17
AnalyticalPropagatorESProducer.h
AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer
~AnalyticalPropagatorESProducer() override
Definition:
AnalyticalPropagatorESProducer.cc:23
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