CMS 3D CMS Logo

Functions
TrackerGeometryUtils Namespace Reference

Functions

std::vector< uint32_t > getOuterTrackerDetIds (const GeometricDet &geomDet)
 
std::vector< uint32_t > getSiStripDetIds (const GeometricDet &geomDet)
 

Function Documentation

◆ getOuterTrackerDetIds()

std::vector< uint32_t > TrackerGeometryUtils::getOuterTrackerDetIds ( const GeometricDet geomDet)

A helper method to get the full list of OuterTracker DetIds from the GeometricDet

The DetIds are sorted by subdetector, but otherwise keep the ordering from GeometricDet::deepComponents (for compatibility with SiStripDetInfoFileReader)

Definition at line 20 of file utils.cc.

References a, b, GeometricDet::deepComponents(), hcalRecHitTable_cff::detId, PixelSubdetector::PixelEndcap, and align::Tracker.

Referenced by fakeOTLA::produceRecord().

20  {
21  std::vector<const GeometricDet*> deepComp;
22  geomDet.deepComponents(deepComp);
23  std::vector<uint32_t> OTDetIds;
24  for (const auto* dep : deepComp) {
25  const auto detId = dep->geographicalId();
26  if ((detId.det() == DetId::Detector::Tracker) && (detId.subdetId() > PixelSubdetector::PixelEndcap)) {
27  OTDetIds.push_back(detId);
28  }
29  }
30  std::stable_sort(
31  std::begin(OTDetIds), std::end(OTDetIds), [](DetId a, DetId b) { return a.subdetId() < b.subdetId(); });
32  return OTDetIds;
33 }
Definition: DetId.h:17
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
ConstGeometricDetContainer deepComponents() const

◆ getSiStripDetIds()

std::vector< uint32_t > TrackerGeometryUtils::getSiStripDetIds ( const GeometricDet geomDet)

A helper method to get the full list of SiStrip DetIds from the GeometricDet

The DetIds are sorted by subdetector, but otherwise keep the ordering from GeometricDet::deepComponents (for compatibility with SiStripDetInfoFileReader)

Definition at line 5 of file utils.cc.

References a, b, GeometricDet::deepComponents(), hcalRecHitTable_cff::detId, SiStripSubdetector::TEC, and SiStripSubdetector::TIB.

Referenced by SiStripDetVOffTkMapPlotter::analyze(), SiStripDetVOffTrendPlotter::analyze(), DetIdSelectorTest::analyze(), SiStripTrackerMapCreator::createInfoFile(), SiStripHashedDetIdFakeESSource::produce(), TkDetMapESProducer::produce(), SiStripBackPlaneCorrectionFakeESSource::produce(), and SiStripLorentzAngleFakeESSource::produce().

5  {
6  std::vector<const GeometricDet*> deepComp;
7  geomDet.deepComponents(deepComp);
8  std::vector<uint32_t> stripDetIds;
9  for (const auto* dep : deepComp) {
10  const auto detId = dep->geographicalId();
11  if ((detId.subdetId() >= SiStripSubdetector::TIB) && (detId.subdetId() <= SiStripSubdetector::TEC)) {
12  stripDetIds.push_back(detId);
13  }
14  }
15  std::stable_sort(
16  std::begin(stripDetIds), std::end(stripDetIds), [](DetId a, DetId b) { return a.subdetId() < b.subdetId(); });
17  return stripDetIds;
18 }
Definition: DetId.h:17
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
ConstGeometricDetContainer deepComponents() const