RecoMTD
TransientTrackingRecHit
src
MTDTransientTrackingRecHitBuilder.cc
Go to the documentation of this file.
1
13
#include "
RecoMTD/TransientTrackingRecHit/interface/MTDTransientTrackingRecHitBuilder.h
"
14
#include "
DataFormats/ForwardDetId/interface/ForwardSubdetector.h
"
15
16
MTDTransientTrackingRecHitBuilder::MTDTransientTrackingRecHitBuilder
(
17
edm::ESHandle<GlobalTrackingGeometry>
trackingGeometry)
18
: theTrackingGeometry(trackingGeometry) {}
19
20
MTDTransientTrackingRecHitBuilder::RecHitPointer
MTDTransientTrackingRecHitBuilder::build
(
21
const
TrackingRecHit
*
p
,
edm::ESHandle<GlobalTrackingGeometry>
trackingGeometry)
const
{
22
if
(
p
->geographicalId().det() ==
DetId::Forward
&&
p
->geographicalId().subdetId() ==
FastTime
) {
23
return
p
->cloneSH();
24
}
25
26
return
RecHitPointer
();
27
}
28
29
MTDTransientTrackingRecHitBuilder::RecHitPointer
MTDTransientTrackingRecHitBuilder::build
(
30
const
TrackingRecHit
*
p
)
const
{
31
if
(
theTrackingGeometry
.
isValid
())
32
return
build
(
p
,
theTrackingGeometry
);
33
else
34
throw
cms::Exception
(
"MTD|RecoMTD|MTDTransientTrackingRecHitBuilder"
)
35
<<
"ERROR! You are trying to build a MTDTransientTrackingRecHit with a non valid GlobalTrackingGeometry"
;
36
}
37
38
MTDTransientTrackingRecHitBuilder::ConstRecHitContainer
MTDTransientTrackingRecHitBuilder::build
(
39
const
trackingRecHit_iterator
&
start
,
const
trackingRecHit_iterator
& stop)
const
{
40
ConstRecHitContainer
result
;
41
for
(
trackingRecHit_iterator
hit
=
start
;
hit
!= stop; ++
hit
)
42
result
.push_back(
build
(&**
hit
));
43
44
return
result
;
45
}
start
Definition:
start.py:1
Exception
Definition:
hltDiff.cc:245
mps_fire.result
result
Definition:
mps_fire.py:311
MTDTransientTrackingRecHitBuilder.h
ForwardSubdetector.h
TrackingRecHit
Definition:
TrackingRecHit.h:21
MTDTransientTrackingRecHitBuilder::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition:
MTDTransientTrackingRecHitBuilder.h:30
MTDTransientTrackingRecHitBuilder::MTDTransientTrackingRecHitBuilder
MTDTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=nullptr)
Definition:
MTDTransientTrackingRecHitBuilder.cc:16
edm::ESHandle< GlobalTrackingGeometry >
MTDTransientTrackingRecHitBuilder::RecHitPointer
TransientTrackingRecHit::RecHitPointer RecHitPointer
Definition:
MTDTransientTrackingRecHitBuilder.h:14
MTDTransientTrackingRecHitBuilder::build
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MTDTransientTrackingRecHit::specificBuild.
Definition:
MTDTransientTrackingRecHitBuilder.cc:20
edm::ESHandleBase::isValid
bool isValid() const
Definition:
ESHandle.h:44
FastTime
Definition:
ForwardSubdetector.h:6
DetId::Forward
Definition:
DetId.h:30
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
edm::OwnVector::const_iterator
Definition:
OwnVector.h:41
MTDTransientTrackingRecHitBuilder::ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
Definition:
MTDTransientTrackingRecHitBuilder.h:15
AlCaHLTBitMon_ParallelJobs.p
def p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
Generated for CMSSW Reference Manual by
1.8.14