RecoMuon
TransientTrackingRecHit
src
MuonTransientTrackingRecHitBuilder.cc
Go to the documentation of this file.
1
13
#include "
RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHitBuilder.h
"
14
#include "
RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h
"
15
16
MuonTransientTrackingRecHitBuilder::MuonTransientTrackingRecHitBuilder
(
17
edm::ESHandle<GlobalTrackingGeometry>
trackingGeometry)
18
: theTrackingGeometry(trackingGeometry) {}
19
20
MuonTransientTrackingRecHitBuilder::RecHitPointer
MuonTransientTrackingRecHitBuilder::build
(
21
const
TrackingRecHit
*
p
,
edm::ESHandle<GlobalTrackingGeometry>
trackingGeometry)
const
{
22
if
(
p
->geographicalId().det() ==
DetId::Muon
) {
23
return
MuonTransientTrackingRecHit::specificBuild
(trackingGeometry->
idToDet
(
p
->geographicalId()),
p
);
24
}
25
26
return
RecHitPointer
();
27
}
28
29
MuonTransientTrackingRecHitBuilder::RecHitPointer
MuonTransientTrackingRecHitBuilder::build
(
30
const
TrackingRecHit
*
p
)
const
{
31
if
(
theTrackingGeometry
.
isValid
())
32
return
build
(
p
,
theTrackingGeometry
);
33
else
34
throw
cms::Exception
(
"Muon|RecoMuon|MuonTransientTrackingRecHitBuilder"
)
35
<<
"ERROR! You are trying to build a MuonTransientTrackingRecHit with a non valid GlobalTrackingGeometry"
;
36
}
37
38
MuonTransientTrackingRecHitBuilder::ConstRecHitContainer
MuonTransientTrackingRecHitBuilder::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
MuonTransientTrackingRecHit::specificBuild
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
Definition:
MuonTransientTrackingRecHit.h:75
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
MuonTransientTrackingRecHitBuilder::ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
Definition:
MuonTransientTrackingRecHitBuilder.h:15
MuonTransientTrackingRecHit.h
MuonTransientTrackingRecHitBuilder::RecHitPointer
TransientTrackingRecHit::RecHitPointer RecHitPointer
Definition:
MuonTransientTrackingRecHitBuilder.h:14
edm::ESHandle< GlobalTrackingGeometry >
edm::OwnVector::const_iterator
Definition:
OwnVector.h:41
MuonTransientTrackingRecHitBuilder::build
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
Definition:
MuonTransientTrackingRecHitBuilder.cc:20
edm::ESHandleBase::isValid
bool isValid() const
Definition:
ESHandle.h:44
MuonTransientTrackingRecHitBuilder::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition:
MuonTransientTrackingRecHitBuilder.h:30
TrackingRecHit
Definition:
TrackingRecHit.h:21
MuonTransientTrackingRecHitBuilder::MuonTransientTrackingRecHitBuilder
MuonTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=nullptr)
Definition:
MuonTransientTrackingRecHitBuilder.cc:16
MuonTransientTrackingRecHitBuilder.h
Exception
Definition:
hltDiff.cc:246
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition:
GlobalTrackingGeometry.cc:44
mps_fire.result
result
Definition:
mps_fire.py:303
DetId::Muon
Definition:
DetId.h:26
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
Generated for CMSSW Reference Manual by
1.8.16