CMS 3D CMS Logo

Functions
TrackerGeometryUtils Namespace Reference

Functions

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

Function Documentation

◆ 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 4 of file utils.cc.

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

References a, b, begin, GeometricDet::deepComponents(), end, SiStripSubdetector::TEC, and SiStripSubdetector::TIB.

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

SiStripSubdetector::TEC
Definition: SiStripEnums.h:5
end
#define end
Definition: vmac.h:39
DetId
Definition: DetId.h:17
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
GeometricDet::deepComponents
ConstGeometricDetContainer deepComponents() const
Definition: GeometricDet.cc:184
SiStripSubdetector::TIB
Definition: SiStripEnums.h:5
begin
#define begin
Definition: vmac.h:32