Main Page
Namespaces
Classes
Package Documentation
src
RecoLocalTracker
SiPixelRecHits
plugins
PixelCPETemplateRecoESProducer.cc
Go to the documentation of this file.
1
#include "
RecoLocalTracker/SiPixelRecHits/interface/PixelCPETemplateRecoESProducer.h
"
2
#include "
RecoLocalTracker/SiPixelRecHits/interface/PixelCPETemplateReco.h
"
3
#include "
MagneticField/Engine/interface/MagneticField.h
"
4
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
5
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h
"
6
#include "
Geometry/Records/interface/TrackerDigiGeometryRecord.h
"
7
#include "
Geometry/Records/interface/TrackerTopologyRcd.h
"
8
#include "
DataFormats/TrackerCommon/interface/TrackerTopology.h
"
9
10
#include "
FWCore/Framework/interface/EventSetup.h
"
11
#include "
FWCore/Framework/interface/ESHandle.h
"
12
#include "
FWCore/Framework/interface/ModuleFactory.h
"
13
#include "
FWCore/Framework/interface/ESProducer.h
"
14
15
16
17
#include <string>
18
#include <memory>
19
20
using namespace
edm
;
21
22
PixelCPETemplateRecoESProducer::PixelCPETemplateRecoESProducer
(
const
edm::ParameterSet
&
p
)
23
{
24
std::string
myname = p.
getParameter
<
std::string
>(
"ComponentName"
);
25
26
//DoLorentz_ = p.getParameter<bool>("DoLorentz"); // True when LA from alignment is used
27
DoLorentz_ = p.
existsAs
<
bool
>(
"DoLorentz"
)?p.
getParameter
<
bool
>(
"DoLorentz"
):
false
;
28
29
pset_ =
p
;
30
setWhatProduced(
this
,myname);
31
32
//std::cout<<" from ES Producer Templates "<<myname<<" "<<DoLorentz_<<std::endl; //dk
33
34
}
35
36
PixelCPETemplateRecoESProducer::~PixelCPETemplateRecoESProducer
() {}
37
38
std::unique_ptr<PixelClusterParameterEstimator>
39
PixelCPETemplateRecoESProducer::produce
(
const
TkPixelCPERecord
& iRecord){
40
41
ESHandle<MagneticField>
magfield;
42
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(magfield );
43
44
edm::ESHandle<TrackerGeometry>
pDD;
45
iRecord.
getRecord
<
TrackerDigiGeometryRecord
>().
get
( pDD );
46
47
edm::ESHandle<TrackerTopology>
hTT;
48
iRecord.
getRecord
<
TrackerDigiGeometryRecord
>().getRecord<TrackerTopologyRcd>().
get
(hTT);
49
50
edm::ESHandle<SiPixelLorentzAngle>
lorentzAngle;
51
const
SiPixelLorentzAngle
* lorentzAngleProduct =
nullptr
;
52
if
(DoLorentz_) {
// LA correction from alignment
53
iRecord.
getRecord
<
SiPixelLorentzAngleRcd
>().
get
(
"fromAlignment"
,lorentzAngle);
54
lorentzAngleProduct = lorentzAngle.
product
();
55
}
else
{
// Normal, deafult LA actually is NOT needed
56
//iRecord.getRecord<SiPixelLorentzAngleRcd>().get(lorentzAngle);
57
lorentzAngleProduct=
nullptr
;
// null is ok becuse LA is not use by templates in this mode
58
}
59
60
ESHandle<SiPixelTemplateDBObject>
templateDBobject;
61
iRecord.
getRecord
<
SiPixelTemplateDBObjectESProducerRcd
>().
get
(templateDBobject);
62
63
return
std::make_unique<PixelCPETemplateReco>(pset_,magfield.
product
(),*pDD.
product
(),*hTT.
product
(),lorentzAngleProduct,templateDBobject.
product
() );
64
}
65
66
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TrackerDigiGeometryRecord.h
PixelCPETemplateRecoESProducer.h
edm::ParameterSet::existsAs
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition:
ParameterSet.h:161
PixelCPETemplateReco.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EventSetup.h
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
SiPixelTemplateDBObjectESProducerRcd
Definition:
SiPixelTemplateDBObjectESProducerRcd.h:11
MagneticField.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:110
PixelCPETemplateRecoESProducer::produce
std::unique_ptr< PixelClusterParameterEstimator > produce(const TkPixelCPERecord &)
Definition:
PixelCPETemplateRecoESProducer.cc:39
SiPixelLorentzAngleRcd
Definition:
SiPixelLorentzAngleRcd.h:24
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
edm::ESHandle< MagneticField >
ESHandle.h
TrackerTopologyRcd.h
PixelCPETemplateRecoESProducer::~PixelCPETemplateRecoESProducer
~PixelCPETemplateRecoESProducer() override
Definition:
PixelCPETemplateRecoESProducer.cc:36
TkPixelCPERecord
Definition:
TkPixelCPERecord.h:17
ESProducer.h
SiPixelLorentzAngle
Definition:
SiPixelLorentzAngle.h:12
PixelCPETemplateRecoESProducer::PixelCPETemplateRecoESProducer
PixelCPETemplateRecoESProducer(const edm::ParameterSet &p)
Definition:
PixelCPETemplateRecoESProducer.cc:22
edm
HLT enums.
Definition:
AlignableModifier.h:17
TrackerGeometry.h
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
TrackerTopology.h
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:15
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.11