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 }
start
Definition: start.py:1
MuonTransientTrackingRecHit::specificBuild
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
Definition: MuonTransientTrackingRecHit.h:75
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
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
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:245
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: GlobalTrackingGeometry.cc:44
mps_fire.result
result
Definition: mps_fire.py:311
DetId::Muon
Definition: DetId.h:26
hit
Definition: SiStripHitEffFromCalibTree.cc:88