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 
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 
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
TransientTrackingRecHit::RecHitPointer RecHitPointer
tuple result
Definition: mps_fire.py:84
MuonTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=0)
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
DetId geographicalId() const
bool isValid() const
Definition: ESHandle.h:47
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection