CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonTransientTrackingRecHitBuilder.cc
Go to the documentation of this file.
1 
17 
19  theTrackingGeometry(trackingGeometry)
20 {}
21 
22 
25  edm::ESHandle<GlobalTrackingGeometry> trackingGeometry) const {
26 
27  if ( p->geographicalId().det() == DetId::Muon ) {
28  return (MuonTransientTrackingRecHit::specificBuild(trackingGeometry->idToDet(p->geographicalId()),p).get());
29  }
30 
31  return 0;
32 
33 }
34 
38  else
39  throw cms::Exception("Muon|RecoMuon|MuonTransientTrackingRecHitBuilder")
40  <<"ERROR! You are trying to build a MuonTransientTrackingRecHit with a non valid GlobalTrackingGeometry";
41 }
42 
45 
47  for(trackingRecHit_iterator hit = start; hit != stop; ++hit )
48  result.push_back(build(&**hit));
49 
50  return result;
51 }
52 
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
tuple result
Definition: query.py:137
MuonTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=0)
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
DetId geographicalId() const
bool isValid() const
Definition: ESHandle.h:37
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)