Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-22 06:26:43

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