Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
10
#include <string>
11
#include <memory>
12
13
using namespace
edm;
14
15
AnalyticalPropagatorESProducer::AnalyticalPropagatorESProducer
(
const
edm::ParameterSet
&
p
)
16
{
17
std::string myname = p.
getParameter
<std::string>(
"ComponentName"
);
18
pset_ =
p
;
19
setWhatProduced(
this
,myname);
20
}
21
22
AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer
() {}
23
24
boost::shared_ptr<Propagator>
25
AnalyticalPropagatorESProducer::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
33
std::string pdir = pset_.getParameter<std::string>(
"PropagationDirection"
);
34
double
dphiCut = pset_.getParameter<
double
>(
"MaxDPhi"
);
35
36
PropagationDirection
dir
=
alongMomentum
;
37
38
if
(pdir ==
"oppositeToMomentum"
) dir =
oppositeToMomentum
;
39
if
(pdir ==
"alongMomentum"
) dir =
alongMomentum
;
40
if
(pdir ==
"anyDirection"
) dir =
anyDirection
;
41
42
_propagator = boost::shared_ptr<Propagator>(
new
AnalyticalPropagator
(&(*magfield), dir,dphiCut));
43
return
_propagator;
44
}
45
46
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
AnalyticalPropagatorESProducer::~AnalyticalPropagatorESProducer
virtual ~AnalyticalPropagatorESProducer()
Definition:
AnalyticalPropagatorESProducer.cc:22
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
AnalyticalPropagatorESProducer::produce
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
AnalyticalPropagatorESProducer.cc:25
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
MagneticField.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:46
edm::ESHandle< MagneticField >
ESHandle.h
ESProducer.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
AnalyticalPropagatorESProducer::AnalyticalPropagatorESProducer
AnalyticalPropagatorESProducer(const edm::ParameterSet &p)
Definition:
AnalyticalPropagatorESProducer.cc:15
AnalyticalPropagatorESProducer.h
edm::ParameterSet
Definition:
ParameterSet.h:35
ModuleFactory.h
dir
dbl *** dir
Definition:
mlp_gen.cc:35
oppositeToMomentum
Definition:
PropagationDirection.h:4
AnalyticalPropagator_cfi.AnalyticalPropagator
tuple AnalyticalPropagator
Definition:
AnalyticalPropagator_cfi.py:3
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.5