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.

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 }

References a, b, GeometricDet::deepComponents(), mps_fire::end, PixelSubdetector::PixelEndcap, and align::Tracker.

Referenced by fakeOTLA::produceRecord().

◆ 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.

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 }

References a, b, GeometricDet::deepComponents(), mps_fire::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().

PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
SiStripSubdetector::TEC
Definition: SiStripEnums.h:5
align::Tracker
Definition: StructureType.h:70
DetId
Definition: DetId.h:17
mps_fire.end
end
Definition: mps_fire.py:242
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
GeometricDet::deepComponents
ConstGeometricDetContainer deepComponents() const
Definition: GeometricDet.cc:252
SiStripSubdetector::TIB
Definition: SiStripEnums.h:5