25 if (gdenum == GeometricTimingDet::GTDEnumType::BTL)
27 if (gdenum == GeometricTimingDet::GTDEnumType::ETL)
32 class DetIdComparator {
43 for (
unsigned int i = 0;
i < 2; ++
i) {
51 <<
"MTD GeometricTimingDet and GeomDetEnumerators enumerator values of the subdetectors" << std::endl;
53 for (
unsigned int i = 0;
i < subdetgd.size(); ++
i) {
54 MTDDetId mtdid(subdetgd[
i]->geographicalId());
59 LogTrace(
"BuildingSubDetTypeMap") <<
"MTD subdet " <<
i <<
" Geometric Det type " << subdetgd[
i]->type()
61 << std::hex << subdetgd[
i]->geographicalId().rawId() <<
std::dec <<
" subdetid "
63 << subdetgd[
i]->components().size();
68 debugstr <<
"MTD Content of theSubDetTypeMap"
70 for (
unsigned int i = 1;
i <= 2; ++
i) {
75 debugstr <<
"MTD Content of theNumberOfLayers"
77 for (
unsigned int i = 1;
i <= 2; ++
i) {
82 std::vector<const GeometricTimingDet*> deepcomp;
85 sort(deepcomp.begin(), deepcomp.end(), DetIdComparator());
88 edm::LogInfo(
"ThicknessAndType") <<
"MTD Total Number of Detectors " << deepcomp.size() << std::endl;
89 edm::LogInfo(
"ThicknessAndType") <<
"MTD Dump of sensors names and bounds" << std::endl;
91 for (
const auto& det : deepcomp) {
93 debugstr << std::hex << det->geographicalId().rawId() <<
std::dec <<
" " << det->name() <<
" "
94 << det->bounds()->thickness() <<
"\n";
100 debugstr <<
" DetId " << std::get<0>(iVal).rawId() <<
" Type "
102 << std::get<2>(iVal) <<
"\n";
110 delete const_cast<GeomDet*>(
d);
112 delete const_cast<GeomDetType*>(
d);
141 const_cast<GeomDet*>(
p)->setGdetIndex(
theDets.size());
143 theMap.insert(std::make_pair(
p->geographicalId().rawId(),
p));
145 switch (
id.mtdSubDetector()) {
153 edm::LogError(
"MTDGeometry") <<
"ERROR - I was expecting a MTD Subdetector, I got a " <<
id.mtdSubDetector();
164 mapIdToDetUnit::const_iterator
p =
theMapUnit.find(
s.rawId());
166 return static_cast<const MTDGeomDet*>(
p->second);
172 mapIdToDet::const_iterator
p =
theMap.find(
s.rawId());
174 return static_cast<const MTDGeomDet*>(
p->second);
180 if (subdet >= 1 && subdet <= 2) {
183 throw cms::Exception(
"WrongTrackerSubDet") <<
"Subdetector " << subdet;
188 if (subdet >= 1 && subdet <= 2) {
191 throw cms::Exception(
"WrongTrackerSubDet") <<
"Subdetector " << subdet;
196 for (
unsigned int i = 1;
i <= 2; ++
i) {
214 if (std::get<1>(
t) != mtype)
217 if (detid > std::get<0>(
t))
218 std::get<0>(
t) = detid;
225 DetId detid_max = std::get<0>(iVal);
235 DetId detid_max = std::get<0>(iVal);
237 return std::get<2>(iVal);
243 if (
name.find(
"Timing") != std::string::npos) {
244 if (
name.find(
"BModule") != std::string::npos)
246 else if (
name.find(
"EModule") != std::string::npos)