CMS 3D CMS Logo

MuonTransientTrackingRecHitBuilder.cc
Go to the documentation of this file.
1 
15 
17  theTrackingGeometry(trackingGeometry)
18 {}
19 
20 
23  edm::ESHandle<GlobalTrackingGeometry> trackingGeometry) const {
24 
25  if ( p->geographicalId().det() == DetId::Muon ) {
26  return MuonTransientTrackingRecHit::specificBuild(trackingGeometry->idToDet(p->geographicalId()),p);
27  }
28 
29  return RecHitPointer();
30 
31 }
32 
36  else
37  throw cms::Exception("Muon|RecoMuon|MuonTransientTrackingRecHitBuilder")
38  <<"ERROR! You are trying to build a MuonTransientTrackingRecHit with a non valid GlobalTrackingGeometry";
39 }
40 
43 
45  for(trackingRecHit_iterator hit = start; hit != stop; ++hit )
46  result.push_back(build(&**hit));
47 
48  return result;
49 }
50 
Definition: start.py:1
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
TransientTrackingRecHit::RecHitPointer RecHitPointer
MuonTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=0)
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
const GeomDet * idToDet(DetId) const override
DetId geographicalId() const
bool isValid() const
Definition: ESHandle.h:45
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39