Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
TrackingTools
MaterialEffects
plugins
PropagatorWithMaterialESProducer.cc
Go to the documentation of this file.
1
#include "
PropagatorWithMaterialESProducer.h
"
2
#include "
TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.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
PropagatorWithMaterialESProducer::PropagatorWithMaterialESProducer
(
const
edm::ParameterSet
&
p
)
17
{
18
std::string myname = p.
getParameter
<std::string>(
"ComponentName"
);
19
pset_ =
p
;
20
setWhatProduced(
this
,myname);
21
}
22
23
PropagatorWithMaterialESProducer::~PropagatorWithMaterialESProducer
() {}
24
25
boost::shared_ptr<Propagator>
26
PropagatorWithMaterialESProducer::produce
(
const
TrackingComponentsRecord
& iRecord){
27
// if (_propagator){
28
// delete _propagator;
29
// _propagator = 0;
30
// }
31
ESHandle<MagneticField>
magfield
;
32
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(magfield );
33
34
35
std::string pdir = pset_.getParameter<std::string>(
"PropagationDirection"
);
36
double
mass = pset_.getParameter<
double
>(
"Mass"
);
37
double
maxDPhi = pset_.getParameter<
double
>(
"MaxDPhi"
);
38
bool
useRK = pset_.getParameter<
bool
>(
"useRungeKutta"
);
39
double
ptMin
= pset_.existsAs<
double
>(
"ptMin"
) ? pset_.getParameter<
double
>(
"ptMin"
) : -1.0;
40
41
PropagationDirection
dir
=
alongMomentum
;
42
43
if
(pdir ==
"oppositeToMomentum"
) dir =
oppositeToMomentum
;
44
if
(pdir ==
"alongMomentum"
) dir =
alongMomentum
;
45
if
(pdir ==
"anyDirection"
) dir =
anyDirection
;
46
47
_propagator = boost::shared_ptr<Propagator>(
new
PropagatorWithMaterial
(dir, mass, &(*magfield),maxDPhi,useRK,ptMin));
48
return
_propagator;
49
}
50
51
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PropagatorWithMaterial.h
anyDirection
Definition:
PropagationDirection.h:4
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:13
EventSetup.h
alongMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
PropagationDirection
PropagationDirection
Definition:
PropagationDirection.h:4
PropagatorWithMaterialESProducer.h
MagneticField.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:46
edm::ESHandle< MagneticField >
ESHandle.h
PropagatorWithMaterialESProducer::produce
boost::shared_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition:
PropagatorWithMaterialESProducer.cc:26
PtMinSelector_cfg.ptMin
tuple ptMin
Definition:
PtMinSelector_cfg.py:44
PropagatorWithMaterialESProducer::PropagatorWithMaterialESProducer
PropagatorWithMaterialESProducer(const edm::ParameterSet &p)
Definition:
PropagatorWithMaterialESProducer.cc:16
autoMagneticFieldProducer_cfi.magfield
tuple magfield
Definition:
autoMagneticFieldProducer_cfi.py:6
L1TEmulatorMonitor_cff.p
tuple p
Definition:
L1TEmulatorMonitor_cff.py:48
ESProducer.h
PropagatorWithMaterial
Definition:
PropagatorWithMaterial.h:25
edm::ParameterSet
Definition:
ParameterSet.h:32
ModuleFactory.h
PropagatorWithMaterialESProducer::~PropagatorWithMaterialESProducer
virtual ~PropagatorWithMaterialESProducer()
Definition:
PropagatorWithMaterialESProducer.cc:23
dir
dbl *** dir
Definition:
mlp_gen.cc:35
oppositeToMomentum
Definition:
PropagationDirection.h:4
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.5