Main Page
Namespaces
Classes
Package Documentation
src
RecoTracker
TransientTrackingRecHit
plugins
TkTransientTrackingRecHitBuilderESProducer.cc
Go to the documentation of this file.
1
#include "
RecoTracker/TransientTrackingRecHit/plugins/TkTransientTrackingRecHitBuilderESProducer.h
"
2
#include "
RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h
"
3
#include "
MagneticField/Engine/interface/MagneticField.h
"
4
#include "
Geometry/Records/interface/TrackerDigiGeometryRecord.h
"
5
6
#include "
RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPE.h
"
7
8
#include "
FWCore/Framework/interface/EventSetup.h
"
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
#include "
FWCore/Framework/interface/ModuleFactory.h
"
11
#include "
FWCore/Framework/interface/ESProducer.h
"
12
13
#include <string>
14
#include <memory>
15
16
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
17
18
using namespace
edm
;
19
20
TkTransientTrackingRecHitBuilderESProducer::TkTransientTrackingRecHitBuilderESProducer
(
const
edm::ParameterSet
&
p
)
21
{
22
std::string
myname = p.
getParameter
<
std::string
>(
"ComponentName"
);
23
pset_ =
p
;
24
setWhatProduced(
this
,myname);
25
}
26
27
TkTransientTrackingRecHitBuilderESProducer::~TkTransientTrackingRecHitBuilderESProducer
() {}
28
29
std::unique_ptr<TransientTrackingRecHitBuilder>
30
TkTransientTrackingRecHitBuilderESProducer::produce
(
const
TransientRecHitRecord
& iRecord){
31
// if (_propagator){
32
// delete _propagator;
33
// _propagator = 0;
34
// }
35
36
std::string
sname
= pset_.getParameter<
std::string
>(
"StripCPE"
);
37
std::string
pname
= pset_.getParameter<
std::string
>(
"PixelCPE"
);
38
std::string
mname = pset_.getParameter<
std::string
>(
"Matcher"
);
39
40
41
edm::ESHandle<StripClusterParameterEstimator>
se;
42
edm::ESHandle<PixelClusterParameterEstimator>
pe;
43
edm::ESHandle<SiStripRecHitMatcher>
me;
44
const
StripClusterParameterEstimator
* sp ;
45
const
PixelClusterParameterEstimator
*
pp
;
46
const
SiStripRecHitMatcher
* mp ;
47
48
if
(sname ==
"Fake"
) {
49
sp =
nullptr
;
50
}
else
{
51
iRecord.
getRecord
<
TkStripCPERecord
>().
get
( sname, se );
52
sp = se.product();
53
}
54
55
if
(pname ==
"Fake"
) {
56
pp =
nullptr
;
57
}
else
{
58
iRecord.
getRecord
<
TkPixelCPERecord
>().
get
( pname, pe );
59
pp = pe.
product
();
60
}
61
62
if
(mname ==
"Fake"
) {
63
mp =
nullptr
;
64
}
else
{
65
iRecord.
getRecord
<
TkStripCPERecord
>().
get
( mname, me );
66
mp = me.
product
();
67
}
68
69
bool
computeCoarseLocalPositionFromDisk = pset_.getParameter<
bool
>(
"ComputeCoarseLocalPositionFromDisk"
);
70
if
(computeCoarseLocalPositionFromDisk)
71
edm::LogWarning
(
"TkTransientTrackingRecHitBuilderESProducer"
)<<
" The tracking rec hit positions and errors are not a persistent in data formats.\n"
72
<<
" They are not available from disk.\n"
73
<<
" However, TkTransientTrackingRecHitBuilderESProducer::ComputeCoarseLocalPositionFromDisk=True \n"
74
<<
" will make the coarse estimation of this position/error available without track refit.\n"
75
<<
" Position/error obtained from rechit with already defined position/error are not recomputed.\n"
76
<<
" Position/error obtained from track refit are precise."
;
77
78
edm::ESHandle<TrackerGeometry>
pDD;
79
iRecord.
getRecord
<
TrackerDigiGeometryRecord
>().
get
( pDD );
80
81
//For Phase2 upgrade
82
std::string
p2OTname =
""
;
83
if
(pset_.existsAs<
std::string
>(
"Phase2StripCPE"
)){
84
p2OTname = pset_.getParameter<
std::string
>(
"Phase2StripCPE"
);
85
}
86
edm::ESHandle<ClusterParameterEstimator<Phase2TrackerCluster1D>
> p2OTe;
87
const
ClusterParameterEstimator<Phase2TrackerCluster1D>
* p2OTp;
88
89
if
(p2OTname !=
""
) {
90
iRecord.
getRecord
<
TkStripCPERecord
>().
get
( p2OTname, p2OTe );
91
p2OTp = p2OTe.product();
92
return
std::make_unique<TkTransientTrackingRecHitBuilder>(pDD.
product
(),
pp
, p2OTp);
93
}
94
return
std::make_unique<TkTransientTrackingRecHitBuilder>(pDD.
product
(),
pp
, sp, mp, computeCoarseLocalPositionFromDisk);
95
96
}
97
98
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TrackerDigiGeometryRecord.h
MessageLogger.h
ClusterParameterEstimator< Phase2TrackerCluster1D >
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EventSetup.h
edm::LogWarning
Definition:
MessageLogger.h:141
TkTransientTrackingRecHitBuilderESProducer::~TkTransientTrackingRecHitBuilderESProducer
~TkTransientTrackingRecHitBuilderESProducer() override
Definition:
TkTransientTrackingRecHitBuilderESProducer.cc:27
TkTransientTrackingRecHitBuilderESProducer::produce
std::unique_ptr< TransientTrackingRecHitBuilder > produce(const TransientRecHitRecord &)
Definition:
TkTransientTrackingRecHitBuilderESProducer.cc:30
TransientRecHitRecord
Definition:
TransientRecHitRecord.h:14
MagneticField.h
Phase2StripCPE.h
TkTransientTrackingRecHitBuilderESProducer.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
edm::ESHandle< StripClusterParameterEstimator >
TkTransientTrackingRecHitBuilder.h
ESHandle.h
BPhysicsValidation_cfi.pname
pname
Definition:
BPhysicsValidation_cfi.py:7
TkTransientTrackingRecHitBuilderESProducer::TkTransientTrackingRecHitBuilderESProducer
TkTransientTrackingRecHitBuilderESProducer(const edm::ParameterSet &p)
Definition:
TkTransientTrackingRecHitBuilderESProducer.cc:20
TkPixelCPERecord
Definition:
TkPixelCPERecord.h:17
PixelClusterParameterEstimator
Definition:
PixelClusterParameterEstimator.h:15
ESProducer.h
SiStripRecHitMatcher
Definition:
SiStripRecHitMatcher.h:26
edm
HLT enums.
Definition:
AlignableModifier.h:17
createTree.pp
pp
Definition:
createTree.py:17
StripClusterParameterEstimator
Definition:
StripClusterParameterEstimator.h:26
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
TkStripCPERecord
Definition:
TkStripCPERecord.h:14
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:15
lumiContext.sname
sname
Definition:
lumiContext.py:193
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
Generated for CMSSW Reference Manual by
1.8.11