Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-01-21 00:19:09

0001 // Original Author:  Max Stark
0002 //         Created:  Thu, 14 Jan 2016 11:35:07 CET
0003 
0004 #include "TrackerGeometryAnalyzer.h"
0005 
0006 // for creation of TrackerGeometry
0007 #include "CondFormats/GeometryObjects/interface/PTrackerParameters.h"
0008 #include "Geometry/Records/interface/PTrackerParametersRcd.h"
0009 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0010 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0011 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeomBuilderFromGeometricDet.h"
0012 
0013 // for creation of TrackerTopology
0014 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0015 
0016 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0017 
0018 // tracker-alignables aka AlignableTracker
0019 #include "Alignment/TrackerAlignment/interface/AlignableTracker.h"
0020 #include "Alignment/TrackerAlignment/interface/AlignableSiStripDet.h"
0021 
0022 //=============================================================================
0023 //===   PUBLIC METHOD IMPLEMENTATION                                        ===
0024 //=============================================================================
0025 
0026 //_____________________________________________________________________________
0027 TrackerGeometryAnalyzer ::TrackerGeometryAnalyzer(const edm::ParameterSet& config)
0028     : tTopoToken_(esConsumes()),
0029       geomDetToken_(esConsumes()),
0030       ptpToken_(esConsumes()),
0031       analyzeAlignables_(config.getParameter<bool>("analyzeAlignables")),
0032       printTrackerStructure_(config.getParameter<bool>("printTrackerStructure")),
0033       maxPrintDepth_(config.getParameter<int>("maxPrintDepth")),
0034       analyzeGeometry_(config.getParameter<bool>("analyzeGeometry")),
0035       analyzePXB_(config.getParameter<bool>("analyzePXB")),
0036       analyzePXE_(config.getParameter<bool>("analyzePXE")),
0037       analyzeTIB_(config.getParameter<bool>("analyzeTIB")),
0038       analyzeTID_(config.getParameter<bool>("analyzeTID")),
0039       analyzeTOB_(config.getParameter<bool>("analyzeTOB")),
0040       analyzeTEC_(config.getParameter<bool>("analyzeTEC")),
0041 
0042       trackerTopology(0),
0043       trackerGeometry(0),
0044       // will be reset once the geometry is known:
0045       alignableObjectId_{AlignableObjectId::Geometry::General} {}
0046 
0047 //_____________________________________________________________________________
0048 void TrackerGeometryAnalyzer ::beginRun(const edm::Run& /* run */, const edm::EventSetup& setup) {
0049   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::beginRun"
0050                                           << "Initializing TrackerGeometryAnalyzer";
0051 
0052   setTrackerTopology(setup);
0053   setTrackerGeometry(setup);
0054 
0055   if (analyzeAlignables_)
0056     analyzeTrackerAlignables();
0057   if (analyzeGeometry_)
0058     analyzeTrackerGeometry();
0059 }
0060 
0061 //=============================================================================
0062 //===   PRIVATE METHOD IMPLEMENTATION                                       ===
0063 //=============================================================================
0064 
0065 //_____________________________________________________________________________
0066 void TrackerGeometryAnalyzer ::setTrackerTopology(const edm::EventSetup& setup) {
0067   trackerTopology = &setup.getData(tTopoToken_);
0068 }
0069 
0070 //_____________________________________________________________________________
0071 void TrackerGeometryAnalyzer ::setTrackerGeometry(const edm::EventSetup& setup) {
0072   edm::ESHandle<GeometricDet> geometricDet = setup.getHandle(geomDetToken_);
0073   edm::ESHandle<PTrackerParameters> trackerParams = setup.getHandle(ptpToken_);
0074 
0075   TrackerGeomBuilderFromGeometricDet trackerGeometryBuilder;
0076   trackerGeometry = trackerGeometryBuilder.build(&(*geometricDet), *trackerParams, trackerTopology);
0077   alignableObjectId_ = AlignableObjectId{trackerGeometry, nullptr, nullptr, nullptr};
0078 }
0079 
0080 //_____________________________________________________________________________
0081 void TrackerGeometryAnalyzer ::analyzeTrackerAlignables() {
0082   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzeTrackerAlignables"
0083                                           << "Building and analyzing TrackerAlignables aka AlignableTracker";
0084 
0085   AlignableTracker* trackerAlignables = new AlignableTracker(trackerGeometry, trackerTopology);
0086 
0087   if (trackerAlignables) {
0088     analyzeAlignableDetUnits(trackerAlignables);
0089     analyzeCompositeAlignables(trackerAlignables);
0090 
0091     if (printTrackerStructure_) {
0092       std::ostringstream ss;
0093 
0094       ss << "\n\n===========================================================\n";
0095       ss << "TrackerAlignable-structure:\n\n";
0096       printAlignableStructure(trackerAlignables, ss, 0);
0097       ss << "\n===========================================================\n\n";
0098 
0099       edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::printAlignableStructure" << ss.str();
0100     }
0101 
0102   } else {
0103     edm::LogError("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzeTrackerAlignables"
0104                                              << "Failed to built AlignableTracker";
0105   }
0106 
0107   delete trackerAlignables;
0108 }
0109 
0110 //_____________________________________________________________________________
0111 void TrackerGeometryAnalyzer ::analyzeAlignableDetUnits(Alignable* trackerAlignables) {
0112   int numPXB = 0, numPXE = 0, numTIB = 0, numTID = 0, numTOB = 0, numTEC = 0;
0113 
0114   auto allAlignableDetUnits = trackerAlignables->deepComponents();
0115 
0116   for (auto* alignable : allAlignableDetUnits) {
0117     int num = alignable->deepComponents().size();
0118 
0119     int subdetId = alignable->geomDetId().subdetId();
0120     switch (subdetId) {
0121       case PixelSubdetector::PixelBarrel:
0122         numPXB += num;
0123         break;
0124       case PixelSubdetector::PixelEndcap:
0125         numPXE += num;
0126         break;
0127       case StripSubdetector::TIB:
0128         numTIB += num;
0129         break;
0130       case StripSubdetector::TID:
0131         numTID += num;
0132         break;
0133       case StripSubdetector::TOB:
0134         numTOB += num;
0135         break;
0136       case StripSubdetector::TEC:
0137         numTEC += num;
0138         break;
0139     }
0140   }
0141 
0142   int numDetUnits = numPXB + numPXE + numTIB + numTID + numTOB + numTEC;
0143 
0144   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzeAlignableDetUnits"
0145                                           << "AlignableDetUnits: " << allAlignableDetUnits.size() << "\n"
0146                                           << "   PXB AlignableDetUnits: " << numPXB << "\n"
0147                                           << "   PXE AlignableDetUnits: " << numPXE << "\n"
0148                                           << "   TIB AlignableDetUnits: " << numTIB << "\n"
0149                                           << "   TID AlignableDetUnits: " << numTID << "\n"
0150                                           << "   TID AlignableDetUnits: " << numTOB << "\n"
0151                                           << "   TEC AlignableDetUnits: " << numTEC << "\n"
0152                                           << "                        ========"
0153                                           << "\n"
0154                                           << "                          " << numDetUnits;
0155 }
0156 
0157 //_____________________________________________________________________________
0158 void TrackerGeometryAnalyzer ::analyzeCompositeAlignables(Alignable* trackerAlignables) {
0159   int numPXBComposites = countCompositeAlignables(
0160                              // PixelBarrel Alignables
0161                              trackerAlignables->components()[0]->components()[0]) +
0162                          1;  // + 1 for the Barrel itself
0163   int numPXEComposites = countCompositeAlignables(
0164                              // PixelEndcap+ Alignables
0165                              trackerAlignables->components()[0]->components()[1]) +
0166                          1 +
0167                          countCompositeAlignables(
0168                              // PixelEndcap- Alignables
0169                              trackerAlignables->components()[0]->components()[2]) +
0170                          1;
0171   int numTIBComposites = countCompositeAlignables(
0172                              // TIB Alignables
0173                              trackerAlignables->components()[1]->components()[0]) +
0174                          1;
0175   int numTIDComposites = countCompositeAlignables(
0176                              // TID+ Alignables
0177                              trackerAlignables->components()[1]->components()[1]) +
0178                          1 +
0179                          countCompositeAlignables(
0180                              // TID- Alignables
0181                              trackerAlignables->components()[1]->components()[2]) +
0182                          1;
0183   int numTOBComposites = countCompositeAlignables(
0184                              // TOB Alignables
0185                              trackerAlignables->components()[1]->components()[3]) +
0186                          1;
0187   int numTECComposites = countCompositeAlignables(
0188                              // TEC+ Alignables
0189                              trackerAlignables->components()[1]->components()[4]) +
0190                          1 +
0191                          countCompositeAlignables(
0192                              // TEC- Alignables
0193                              trackerAlignables->components()[1]->components()[5]) +
0194                          1;
0195 
0196   int numComposites =
0197       numPXBComposites + numPXEComposites + numTIBComposites + numTIDComposites + numTOBComposites + numTECComposites;
0198 
0199   edm::LogInfo("TrackerGeometryAnalyzer")
0200       << "@SUB=TrackerGeometryAnalyzer::analyzeCompositeAlignables"
0201       << "AlignableComposites: " << countCompositeAlignables(trackerAlignables) << "\n"
0202       << "   CompositeAlignable in PXB: " << numPXBComposites << "\n"
0203       << "   CompositeAlignable in PXE: " << numPXEComposites << "\n"
0204       << "   CompositeAlignable in TIB: " << numTIBComposites << "\n"
0205       << "   CompositeAlignable in TID: " << numTIDComposites << "\n"
0206       << "   CompositeAlignable in TOB: " << numTOBComposites << "\n"
0207       << "   CompositeAlignable in TEC: " << numTECComposites << "\n"
0208       << "                            ========"
0209       << "\n"
0210       << "                              " << numComposites << "\n"
0211       << "     + 1 Alignable for Pixel: 1"
0212       << "\n"
0213       << "     + 1 Alignable for Strip: 1"
0214       << "\n"
0215       << "                            ========"
0216       << "\n"
0217       << "                              " << numComposites + 2;
0218 }
0219 
0220 //_____________________________________________________________________________
0221 int TrackerGeometryAnalyzer ::countCompositeAlignables(Alignable* compositeAlignable) {
0222   int num = 0;
0223 
0224   for (auto* alignable : compositeAlignable->components()) {
0225     // We don't count AlignableSiStripDets as CompositeAlignables, but they
0226     // consist of (usually 2) multiple AlignableDetUnits, hence alignable->
0227     // components().size() is > 0. To check if we have an AlignableSiStripDet
0228     // we simple cast it and see if the cast fails or not.
0229     AlignableSiStripDet* isSiStripDet = dynamic_cast<AlignableSiStripDet*>(alignable);
0230     if (!isSiStripDet) {
0231       if (alignable->components().size()) {
0232         ++num;
0233         num += countCompositeAlignables(alignable);
0234       }
0235     }
0236   }
0237 
0238   return num;
0239 }
0240 
0241 //_____________________________________________________________________________
0242 void TrackerGeometryAnalyzer ::printAlignableStructure(Alignable* compositeAlignable,
0243                                                        std::ostringstream& ss,
0244                                                        int indent) {
0245   if (indent == maxPrintDepth_)
0246     return;
0247 
0248   for (auto* alignable : compositeAlignable->components()) {
0249     if (alignable->components().size()) {
0250       for (int i = 0; i < (3 * indent); ++i)
0251         ss << " ";
0252 
0253       auto type = alignableObjectId_.idToString(alignable->alignableObjectId());
0254       ss << type;
0255 
0256       int len = (6 * maxPrintDepth_) - (3 * indent) - strlen(type);
0257       for (int i = 0; i < len; ++i)
0258         ss << " ";
0259 
0260       ss << " >> consists of " << alignable->components().size() << " Alignable(s)"
0261          << "\n";
0262 
0263       printAlignableStructure(alignable, ss, indent + 1);
0264     }
0265   }
0266 }
0267 
0268 //_____________________________________________________________________________
0269 void TrackerGeometryAnalyzer ::analyzeTrackerGeometry() {
0270   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzeTrackerGeometry"
0271                                           << "Analyzing TrackerGeometry";
0272   std::ostringstream ss;
0273 
0274   analyzeTrackerGeometryVersion(ss);
0275 
0276   for (auto& det : trackerGeometry->dets()) {
0277     auto detId = det->geographicalId();
0278 
0279     if (detId.det() == DetId::Tracker) {
0280       switch (detId.subdetId()) {
0281         case PixelSubdetector::PixelBarrel:
0282           if (analyzePXB_)
0283             analyzePXBDetUnit(detId, ss);
0284           break;
0285         case PixelSubdetector::PixelEndcap:
0286           if (analyzePXE_)
0287             analyzePXEDetUnit(detId, ss);
0288           break;
0289         case StripSubdetector::TIB:
0290           if (analyzeTIB_)
0291             analyzeTIBDetUnit(detId, ss);
0292           break;
0293         case StripSubdetector::TID:
0294           if (analyzeTID_)
0295             analyzeTIDDetUnit(detId, ss);
0296           break;
0297         case StripSubdetector::TOB:
0298           if (analyzeTOB_)
0299             analyzeTOBDetUnit(detId, ss);
0300           break;
0301         case StripSubdetector::TEC:
0302           if (analyzeTEC_)
0303             analyzeTECDetUnit(detId, ss);
0304           break;
0305       }
0306     }
0307   }
0308 
0309   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzeTrackerGeometry" << ss.str();
0310 
0311   if (analyzePXB_)
0312     analyzePXB();
0313   if (analyzePXE_)
0314     analyzePXE();
0315   if (analyzeTIB_)
0316     analyzeTIB();
0317   if (analyzeTID_)
0318     analyzeTID();
0319   if (analyzeTOB_)
0320     analyzeTOB();
0321   if (analyzeTEC_)
0322     analyzeTEC();
0323 }
0324 
0325 //_____________________________________________________________________________
0326 void TrackerGeometryAnalyzer ::analyzeTrackerGeometryVersion(std::ostringstream& ss) {
0327   // PixelBarrel
0328   if (trackerGeometry->isThere(GeomDetEnumerators::PixelBarrel)) {
0329     ss << "(PXB) PixelBarrel geometry from Run I"
0330        << "\n";
0331   } else if (trackerGeometry->isThere(GeomDetEnumerators::P1PXB)) {
0332     ss << "(PXB) P1PXB geometry from Phase-I "
0333        << "\n";
0334   } else if (trackerGeometry->isThere(GeomDetEnumerators::P2PXB)) {
0335     ss << "(PXB) P2PXB geometry from Phase-II"
0336        << "\n";
0337   } else {
0338     ss << "(PXB) Geometry is unknown"
0339        << "\n";
0340   }
0341 
0342   // PixelEndcap
0343   if (trackerGeometry->isThere(GeomDetEnumerators::PixelEndcap)) {
0344     ss << "(PXE) PixelEndcap geometry from Run I"
0345        << "\n";
0346   } else if (trackerGeometry->isThere(GeomDetEnumerators::P1PXEC)) {
0347     ss << "(PXE) P1PXEC geometry from Phase-I"
0348        << "\n";
0349   } else if (trackerGeometry->isThere(GeomDetEnumerators::P2PXEC)) {
0350     ss << "(PXE) P2PXEC geometry from Phase-II"
0351        << "\n";
0352   } else {
0353     ss << "(PXE) Geometry is unknown"
0354        << "\n";
0355   }
0356 
0357   // TIB
0358   if (trackerGeometry->isThere(GeomDetEnumerators::TIB)) {
0359     ss << "(TIB) TIB geometry from Run I and Phase-I"
0360        << "\n";
0361   } else if (trackerGeometry->isThere(GeomDetEnumerators::invalidDet)) {
0362     ss << "(TIB) No TIB geometry since Phase-II"
0363        << "\n";
0364   } else {
0365     ss << "(TIB) Geometry is unknown"
0366        << "\n";
0367   }
0368 
0369   // TID
0370   if (trackerGeometry->isThere(GeomDetEnumerators::TID)) {
0371     ss << "(TID) TID geometry from Run I and Phase-I"
0372        << "\n";
0373   } else if (trackerGeometry->isThere(GeomDetEnumerators::P2OTEC)) {
0374     ss << "(TID) P2OTEC geometry from Phase-II"
0375        << "\n";
0376   } else {
0377     ss << "(TID) Geometry is unknown"
0378        << "\n";
0379   }
0380 
0381   // TOB
0382   if (trackerGeometry->isThere(GeomDetEnumerators::TOB)) {
0383     ss << "(TOB) TOB geometry from Run I and Phase-I"
0384        << "\n";
0385   } else if (trackerGeometry->isThere(GeomDetEnumerators::P2OTB)) {
0386     ss << "(TOB) P2OTB geometry from Phase-II"
0387        << "\n";
0388   } else {
0389     ss << "(TOB) Geometry is unknown"
0390        << "\n";
0391   }
0392 
0393   // TEC
0394   if (trackerGeometry->isThere(GeomDetEnumerators::TEC)) {
0395     ss << "(TEC) TEC geometry from Run I and Phase-I"
0396        << "\n";
0397   } else if (trackerGeometry->isThere(GeomDetEnumerators::invalidDet)) {
0398     ss << "(TEC) No TEC geometry since Phase-II"
0399        << "\n";
0400   } else {
0401     ss << "(TEC) Geometry is unknown"
0402        << "\n";
0403   }
0404 }
0405 
0406 //_____________________________________________________________________________
0407 void TrackerGeometryAnalyzer ::analyzePXBDetUnit(DetId& detId, std::ostringstream& ss) {
0408   auto layerID = trackerTopology->pxbLayer(detId);
0409   auto ladderID = trackerTopology->pxbLadder(detId);
0410   auto moduleID = trackerTopology->module(detId);
0411 
0412   ss << "Topology info for - TPBModule - with DetId " << detId.rawId() << ": "
0413      << "   layerID: " << layerID << "   ladderID: " << ladderID << "   moduleID: " << moduleID << "\n";
0414 
0415   pxbLayerIDs.insert(layerID);
0416   pxbLadderIDs.insert(ladderID);
0417   pxbModuleIDs.insert(moduleID);
0418 
0419   ++numPXBDetUnits;
0420 }
0421 
0422 void TrackerGeometryAnalyzer ::analyzePXB() {
0423   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzePXB"
0424                                           << "   number of PXBModules:              " << numPXBDetUnits << "\n"
0425                                           << "   max. number of modules per ladder: " << pxbModuleIDs.size() << "\n"
0426                                           << "   max. number of ladders per layer:  " << pxbLadderIDs.size() << "\n"
0427                                           << "   max. number of layers  in PXB:     " << pxbLayerIDs.size();
0428 
0429   std::vector<std::vector<int> > numPXBModules(pxbLayerIDs.size(), std::vector<int>(pxbLadderIDs.size(), 0));
0430 
0431   for (auto& det : trackerGeometry->dets()) {
0432     auto detId = det->geographicalId();
0433 
0434     if (detId.det() == DetId::Tracker) {
0435       if (detId.subdetId() == PixelSubdetector::PixelBarrel) {
0436         auto layerID = trackerTopology->pxbLayer(detId);
0437         auto ladderID = trackerTopology->pxbLadder(detId);
0438 
0439         numPXBModules[layerID - 1][ladderID - 1]++;
0440       }
0441     }
0442   }
0443 
0444   std::ostringstream ss;
0445   ss << "analyzing PixelBarrel modules\n";
0446 
0447   for (unsigned int i = 0; i < pxbLayerIDs.size(); ++i) {
0448     for (unsigned int j = 0; j < pxbLadderIDs.size(); ++j) {
0449       if (numPXBModules[i][j] > 0) {
0450         ss << "   number of modules in layer-" << i + 1 << " ladder-" << j + 1 << ": " << numPXBModules[i][j] << "\n";
0451       }
0452     }
0453   }
0454 
0455   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzePXB" << ss.str();
0456 }
0457 
0458 //_____________________________________________________________________________
0459 void TrackerGeometryAnalyzer ::analyzePXEDetUnit(DetId& detId, std::ostringstream& ss) {
0460   auto sideID = trackerTopology->pxfSide(detId);
0461   auto diskID = trackerTopology->pxfDisk(detId);
0462   auto bladeID = trackerTopology->pxfBlade(detId);
0463   auto panelID = trackerTopology->pxfPanel(detId);
0464   auto moduleID = trackerTopology->module(detId);
0465 
0466   ss << "Topology info for - TPEModule - with DetId " << detId.rawId() << ": "
0467      << "   sideID: " << sideID << "   diskID: " << diskID << "   bladeID: " << bladeID << "   panelID: " << panelID
0468      << "   moduleID: " << moduleID << "\n";
0469 
0470   pxeSideIDs.insert(sideID);
0471   pxeDiskIDs.insert(diskID);
0472   pxeBladeIDs.insert(bladeID);
0473   pxePanelIDs.insert(panelID);
0474   pxeModuleIDs.insert(moduleID);
0475 
0476   numPXEDetUnits++;
0477 }
0478 
0479 //_____________________________________________________________________________
0480 void TrackerGeometryAnalyzer ::analyzePXE() {
0481   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzePXE"
0482                                           << "   number of PXEModules:             " << numPXEDetUnits << "\n"
0483                                           << "   max. number of modules per panel: " << pxeModuleIDs.size() << "\n"
0484                                           << "   max. number of panels  per blade: " << pxePanelIDs.size() << "\n"
0485                                           << "   max. number of blades  per disk:  " << pxeBladeIDs.size() << "\n"
0486                                           << "   max. number of disks   per side:  " << pxeDiskIDs.size() << "\n"
0487                                           << "   max. number of sides in PXE:      " << pxeSideIDs.size();
0488 
0489   std::vector<std::vector<std::vector<std::vector<int> > > > numAlignablesPXE(
0490       pxeSideIDs.size(),
0491       std::vector<std::vector<std::vector<int> > >(
0492           pxeDiskIDs.size(),
0493           std::vector<std::vector<int> >(
0494               pxeBladeIDs.size(), std::vector<int>(pxePanelIDs.size(), 0)  // initialize everything with 0
0495               )));
0496 
0497   for (auto& det : trackerGeometry->dets()) {
0498     auto detId = det->geographicalId();
0499 
0500     if (detId.det() == DetId::Tracker) {
0501       if (detId.subdetId() == PixelSubdetector::PixelEndcap) {
0502         auto sideID = trackerTopology->pxfSide(detId);
0503         auto diskID = trackerTopology->pxfDisk(detId);
0504         auto bladeID = trackerTopology->pxfBlade(detId);
0505         auto panelID = trackerTopology->pxfPanel(detId);
0506         //auto moduleID = trackerTopology->module(detId);
0507 
0508         numAlignablesPXE[sideID - 1][diskID - 1][bladeID - 1][panelID - 1]++;
0509       }
0510     }
0511   }
0512 
0513   std::ostringstream ss;
0514   ss << "analyzing PixelEndcap modules\n";
0515 
0516   for (unsigned int i = 0; i < pxeSideIDs.size(); ++i) {
0517     for (unsigned int j = 0; j < pxeDiskIDs.size(); ++j) {
0518       for (unsigned int k = 0; k < pxeBladeIDs.size(); ++k) {
0519         for (unsigned int l = 0; l < pxePanelIDs.size(); ++l) {
0520           if (numAlignablesPXE[i][j][k][l] > 0) {
0521             ss << "   number of modules in side-" << i + 1 << " disk-" << j + 1 << " blade-" << k + 1 << " panel-"
0522                << l + 1 << ": " << numAlignablesPXE[i][j][k][l] << "\n";
0523           }
0524         }
0525       }
0526     }
0527   }
0528 
0529   edm::LogInfo("TrackerGeometryAnalyzer") << "@SUB=TrackerGeometryAnalyzer::analyzePXE" << ss.str();
0530 }
0531 
0532 //_____________________________________________________________________________
0533 void TrackerGeometryAnalyzer ::analyzeTIBDetUnit(DetId& detId, std::ostringstream& ss) {
0534   auto sideID = trackerTopology->tibSide(detId);
0535   auto layerID = trackerTopology->tibLayer(detId);
0536   auto stringID = trackerTopology->tibString(detId);
0537   auto moduleID = trackerTopology->module(detId);
0538 
0539   ss << "Topology info for - TIBModule - with DetId " << detId.rawId() << ": "
0540      << "   sideID: " << sideID << "   layerID: " << layerID << "   stringID: " << stringID
0541      << "   moduleID: " << moduleID << "\n";
0542 
0543   tibSideIDs.insert(sideID);
0544   tibLayerIDs.insert(layerID);
0545   tibStringIDs.insert(stringID);
0546   tibModuleIDs.insert(moduleID);
0547 
0548   ++numTIBDetUnits;
0549 }
0550 
0551 //_____________________________________________________________________________
0552 void TrackerGeometryAnalyzer ::analyzeTIB() {
0553   // TODO: not yet implemented
0554 }
0555 
0556 //_____________________________________________________________________________
0557 void TrackerGeometryAnalyzer ::analyzeTIDDetUnit(DetId& detId, std::ostringstream& ss) {
0558   auto sideID = trackerTopology->tidSide(detId);
0559   auto wheelID = trackerTopology->tidWheel(detId);
0560   auto ringID = trackerTopology->tidRing(detId);
0561   auto moduleID = trackerTopology->module(detId);
0562 
0563   ss << "Topology info for - TIDModule - with DetId " << detId.rawId() << ": "
0564      << "   sideID: " << sideID << "   wheelID: " << wheelID << "   ringID: " << ringID << "   moduleID: " << moduleID
0565      << "\n";
0566 
0567   tidSideIDs.insert(sideID);
0568   tidWheelIDs.insert(wheelID);
0569   tidRingIDs.insert(ringID);
0570   tidModuleIDs.insert(moduleID);
0571 
0572   ++numTIDDetUnits;
0573 }
0574 
0575 //_____________________________________________________________________________
0576 void TrackerGeometryAnalyzer ::analyzeTID() {
0577   // TODO: not yet implemented
0578 }
0579 
0580 //_____________________________________________________________________________
0581 void TrackerGeometryAnalyzer ::analyzeTOBDetUnit(DetId& detId, std::ostringstream& ss) {
0582   auto layerID = trackerTopology->tobLayer(detId);
0583   auto sideID = trackerTopology->tobSide(detId);
0584   auto rodID = trackerTopology->tobRod(detId);
0585   auto moduleID = trackerTopology->module(detId);
0586 
0587   ss << "Topology info for - TOBModule - with DetId " << detId.rawId() << ": "
0588      << "   layerID: " << layerID << "   sideID: " << sideID << "   rodID: " << rodID << "   moduleID: " << moduleID
0589      << "\n";
0590 
0591   tobLayerIDs.insert(layerID);
0592   tobSideIDs.insert(sideID);
0593   tobRodIDs.insert(rodID);
0594   tobModuleIDs.insert(moduleID);
0595 
0596   ++numTOBDetUnits;
0597 }
0598 
0599 //_____________________________________________________________________________
0600 void TrackerGeometryAnalyzer ::analyzeTOB() {
0601   // TODO: not yet implemented
0602 }
0603 
0604 //_____________________________________________________________________________
0605 void TrackerGeometryAnalyzer ::analyzeTECDetUnit(DetId& detId, std::ostringstream& ss) {
0606   auto sideID = trackerTopology->tecSide(detId);
0607   auto wheelID = trackerTopology->tecWheel(detId);
0608   auto petalID = trackerTopology->tecPetalNumber(detId);
0609   auto ringID = trackerTopology->tecRing(detId);
0610   auto moduleID = trackerTopology->module(detId);
0611 
0612   ss << "Topology info for - TECModule - with DetId " << detId.rawId() << ": "
0613      << "   sideID: " << sideID << "   wheelID: " << wheelID << "   petalID: " << petalID << "   ringID: " << ringID
0614      << "   moduleID: " << moduleID << "\n";
0615 
0616   tecSideIDs.insert(sideID);
0617   tecWheelIDs.insert(wheelID);
0618   tecPetalIDs.insert(petalID);
0619   tecRingIDs.insert(ringID);
0620   tecModuleIDs.insert(moduleID);
0621 
0622   ++numTECDetUnits;
0623 }
0624 
0625 //_____________________________________________________________________________
0626 void TrackerGeometryAnalyzer ::analyzeTEC() {
0627   // TODO: not yet implemented
0628 }