CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
TrackerGeometryUtils Namespace Reference

Functions

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

Function Documentation

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

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