File indexing completed on 2023-03-17 10:40:50
0001 #ifndef Alignment_TrackerAlignment_TrackerGeometryAnalyzer_h
0002 #define Alignment_TrackerAlignment_TrackerGeometryAnalyzer_h
0003
0004
0005
0006
0007
0008 #include <set>
0009 #include <iostream>
0010 #include <sstream>
0011
0012
0013 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017
0018
0019 #include "CondFormats/GeometryObjects/interface/PTrackerParameters.h"
0020 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0021 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0022 #include "Geometry/Records/interface/PTrackerParametersRcd.h"
0023 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0024 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeomBuilderFromGeometricDet.h"
0025 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0026 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0027
0028
0029 #include "Alignment/CommonAlignment/interface/AlignableObjectId.h"
0030
0031 class Alignable;
0032
0033 class TrackerGeometryAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0034
0035 public:
0036 TrackerGeometryAnalyzer(const edm::ParameterSet&);
0037 virtual ~TrackerGeometryAnalyzer(){};
0038
0039 virtual void beginRun(const edm::Run&, const edm::EventSetup&) override;
0040 virtual void analyze(const edm::Event&, const edm::EventSetup&) override{};
0041 virtual void endRun(const edm::Run&, const edm::EventSetup&) override{};
0042
0043
0044 private:
0045 void setTrackerTopology(const edm::EventSetup&);
0046 void setTrackerGeometry(const edm::EventSetup&);
0047
0048 void analyzeTrackerAlignables();
0049 void analyzeAlignableDetUnits(Alignable*);
0050 void analyzeCompositeAlignables(Alignable*);
0051 int countCompositeAlignables(Alignable*);
0052 void printAlignableStructure(Alignable*, std::ostringstream&, int indent);
0053
0054 void analyzeTrackerGeometry();
0055 void analyzeTrackerGeometryVersion(std::ostringstream&);
0056 void analyzePXBDetUnit(DetId& detId, std::ostringstream&);
0057 void analyzePXB();
0058 void analyzePXEDetUnit(DetId& detId, std::ostringstream&);
0059 void analyzePXE();
0060 void analyzeTIBDetUnit(DetId& detId, std::ostringstream&);
0061 void analyzeTIB();
0062 void analyzeTIDDetUnit(DetId& detId, std::ostringstream&);
0063 void analyzeTID();
0064 void analyzeTOBDetUnit(DetId& detId, std::ostringstream&);
0065 void analyzeTOB();
0066 void analyzeTECDetUnit(DetId& detId, std::ostringstream&);
0067 void analyzeTEC();
0068
0069
0070
0071
0072
0073 const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
0074 const edm::ESGetToken<GeometricDet, IdealGeometryRecord> geomDetToken_;
0075 const edm::ESGetToken<PTrackerParameters, PTrackerParametersRcd> ptpToken_;
0076
0077
0078 const bool analyzeAlignables_;
0079 const bool printTrackerStructure_;
0080 const int maxPrintDepth_;
0081 const bool analyzeGeometry_;
0082 const bool analyzePXB_;
0083 const bool analyzePXE_;
0084 const bool analyzeTIB_;
0085 const bool analyzeTID_;
0086 const bool analyzeTOB_;
0087 const bool analyzeTEC_;
0088
0089
0090 const TrackerTopology* trackerTopology;
0091 const TrackerGeometry* trackerGeometry;
0092
0093
0094 AlignableObjectId alignableObjectId_;
0095
0096
0097 int numPXBDetUnits = 0;
0098 int numPXEDetUnits = 0;
0099 int numTIBDetUnits = 0;
0100 int numTIDDetUnits = 0;
0101 int numTOBDetUnits = 0;
0102 int numTECDetUnits = 0;
0103
0104
0105 std::set<unsigned int> pxbLayerIDs;
0106 std::set<unsigned int> pxbLadderIDs;
0107 std::set<unsigned int> pxbModuleIDs;
0108
0109
0110 std::set<unsigned int> pxeSideIDs;
0111 std::set<unsigned int> pxeDiskIDs;
0112 std::set<unsigned int> pxeBladeIDs;
0113 std::set<unsigned int> pxePanelIDs;
0114 std::set<unsigned int> pxeModuleIDs;
0115
0116
0117 std::set<unsigned int> tibSideIDs;
0118 std::set<unsigned int> tibLayerIDs;
0119 std::set<unsigned int> tibStringIDs;
0120 std::set<unsigned int> tibModuleIDs;
0121
0122
0123 std::set<unsigned int> tidSideIDs;
0124 std::set<unsigned int> tidWheelIDs;
0125 std::set<unsigned int> tidRingIDs;
0126 std::set<unsigned int> tidModuleIDs;
0127
0128
0129 std::set<unsigned int> tobLayerIDs;
0130 std::set<unsigned int> tobSideIDs;
0131 std::set<unsigned int> tobRodIDs;
0132 std::set<unsigned int> tobModuleIDs;
0133
0134
0135 std::set<unsigned int> tecSideIDs;
0136 std::set<unsigned int> tecWheelIDs;
0137 std::set<unsigned int> tecPetalIDs;
0138 std::set<unsigned int> tecRingIDs;
0139 std::set<unsigned int> tecModuleIDs;
0140 };
0141
0142
0143 DEFINE_FWK_MODULE(TrackerGeometryAnalyzer);
0144
0145 #endif