CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MTDTransientTrackingRecHitBuilder.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::Forward && p->geographicalId().subdetId() == FastTime) {
23  return p->cloneSH();
24  }
25 
26  return RecHitPointer();
27 }
28 
30  const TrackingRecHit* p) const {
32  return build(p, theTrackingGeometry);
33  else
34  throw cms::Exception("MTD|RecoMTD|MTDTransientTrackingRecHitBuilder")
35  << "ERROR! You are trying to build a MTDTransientTrackingRecHit 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 }
virtual RecHitPointer cloneSH() const
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
tuple result
Definition: mps_fire.py:311
MTDTransientTrackingRecHitBuilder(edm::ESHandle< GlobalTrackingGeometry > trackingGeometry=nullptr)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
TransientTrackingRecHit::RecHitPointer RecHitPointer
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MTDTransientTrackingRecHit::specificBuild.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
DetId geographicalId() const
bool isValid() const
Definition: ESHandle.h:44
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46