Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:13

0001 #include "Geometry/TrackerNumberingBuilder/interface/utils.h"
0002 #include "DataFormats/SiStripDetId/interface/SiStripEnums.h"
0003 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
0004 
0005 std::vector<uint32_t> TrackerGeometryUtils::getSiStripDetIds(const GeometricDet& geomDet) {
0006   std::vector<const GeometricDet*> deepComp;
0007   geomDet.deepComponents(deepComp);
0008   std::vector<uint32_t> stripDetIds;
0009   for (const auto* dep : deepComp) {
0010     const auto detId = dep->geographicalId();
0011     if ((detId.subdetId() >= SiStripSubdetector::TIB) && (detId.subdetId() <= SiStripSubdetector::TEC)) {
0012       stripDetIds.push_back(detId);
0013     }
0014   }
0015   std::stable_sort(
0016       std::begin(stripDetIds), std::end(stripDetIds), [](DetId a, DetId b) { return a.subdetId() < b.subdetId(); });
0017   return stripDetIds;
0018 }
0019 
0020 std::vector<uint32_t> TrackerGeometryUtils::getOuterTrackerDetIds(const GeometricDet& geomDet) {
0021   std::vector<const GeometricDet*> deepComp;
0022   geomDet.deepComponents(deepComp);
0023   std::vector<uint32_t> OTDetIds;
0024   for (const auto* dep : deepComp) {
0025     const auto detId = dep->geographicalId();
0026     if ((detId.det() == DetId::Detector::Tracker) && (detId.subdetId() > PixelSubdetector::PixelEndcap)) {
0027       OTDetIds.push_back(detId);
0028     }
0029   }
0030   std::stable_sort(
0031       std::begin(OTDetIds), std::end(OTDetIds), [](DetId a, DetId b) { return a.subdetId() < b.subdetId(); });
0032   return OTDetIds;
0033 }