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";
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());
172 mapIdToDet::const_iterator
p =
theMap.find(
s.rawId());
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)
unsigned int numberOfLayers(int subdet) const
DetIdContainer theDetUnitIds
DetTypeContainer theDetTypes
std::string const & name() const
const DetContainer & detsBTL() const
const DetContainer & detsETL() const
float getDetectorThickness(DetId) const
ModuleType moduleType(const std::string &name) const
void addType(GeomDetType const *p)
ConstGeometricTimingDetContainer deepComponents() const
int mtdSubDetector() const
unsigned int theNumberOfLayers[2]
Log< level::Error, false > LogError
Detector identifier base class for the MIP Timing Layer.
const MTDGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
bool isThere(GeomDetEnumerators::SubDetector subdet) const
std::vector< const GeomDet * > DetContainer
ConstGeometricTimingDetContainer & components()
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
mapIdToDetUnit theMapUnit
const MTDGeomDet * idToDet(DetId) const override
MTDGeometry(GeometricTimingDet const *gd=nullptr)
ModuleType getDetectorType(DetId) const
static constexpr detId_t invalidDet
Log< level::Info, false > LogInfo
constexpr uint32_t rawId() const
get the raw id
void addDet(GeomDet const *p)
void addDetUnitId(DetId p)
void fillTestMap(const GeometricTimingDet *gd)
GeomDetEnumerators::SubDetector theSubDetTypeMap[2]
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
std::vector< std::tuple< DetId, MTDGeometry::ModuleType, float > > theDetTypetList
std::unique_ptr< Bounds > bounds() const
DetId geographicalId() const
void addDetUnit(GeomDet const *p)