CMS 3D CMS Logo

Functions
TrackerGeometryUtils Namespace Reference

Functions

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

Function Documentation

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.

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

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

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 }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
#define end
Definition: vmac.h:39
Definition: DetId.h:17
double b
Definition: hdecay.h:118
ConstGeometricDetContainer deepComponents() const
#define begin
Definition: vmac.h:32
double a
Definition: hdecay.h:119