CMS 3D CMS Logo

MuonTransientTrackingRecHitBuilder.cc
Go to the documentation of this file.
1 
15 
18  : theTrackingGeometry(trackingGeometry) {}
19 
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 
30  const TrackingRecHit* p) const {
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 
39  const trackingRecHit_iterator& start, const trackingRecHit_iterator& stop) const {
41  for (trackingRecHit_iterator hit = start; hit != stop; ++hit)
42  result.push_back(build(&**hit));
43 
44  return result;
45 }
Definition: start.py:1
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
TransientTrackingRecHit::RecHitPointer RecHitPointer
const GeomDet * idToDet(DetId) const override
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
MuonTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=nullptr)
bool isValid() const
Definition: ESHandle.h:44
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)