21 const uint32_t nLevels(baseNumber.
getLevels());
24 edm::LogInfo(
"MTDGeom") <<
"ETLNumberingScheme geometry levels = " << nLevels;
29 <<
"Not enough levels found in MTDBaseNumber ( " << nLevels <<
") Returning 0";
35 const bool preTDR = (baseNumber.
getLevelName(3).find(
"Ring") != std::string::npos);
42 int ringCopy(::atoi(baseName.data() + 4));
44 uint32_t discN, sectorS, sectorN;
46 discN = (baseNumber.
getLevelName(4).find(
"Disc1") != std::string::npos) ? 0 : 1;
47 sectorS = (baseNumber.
getLevelName(3).find(
"Front") != std::string::npos) ? 0 : 1;
51 ringCopy =
static_cast<int>(tmpId.
encodeSector(discN, sectorS, sectorN));
53 modtyp = (baseNumber.
getLevelName(2).find(
"_Left") != std::string::npos) ? 1 : 2;
58 const std::string_view& sideName(baseNumber.
getLevelName(nSide));
60 if (sideName.find(
"CALOECTSFront") != std::string::npos) {
64 const uint32_t
zside(sideCopy == 1 ? 1 : 0);
77 if ((modtyp != 0 && preTDR) || (modtyp == 0 && !preTDR)) {
79 <<
"****************** Bad module name = " << modtyp
85 (!preTDR && (1 > modCopy ||
88 <<
"****************** Bad module copy = " << modCopy
96 <<
"****************** Bad ring copy = " << ringCopy
104 const uint32_t intindex = thisETLdetid.rawId();
108 <<
" ring = " << ringCopy <<
" zside = " <<
zside <<
" module = " << modCopy
109 <<
" modtyp = " << modtyp <<
" Raw Id = " << intindex << thisETLdetid;
112 ETLDetId altETLdetid(
zside, discN, sectorS, sectorN, modCopy, modtyp);
113 const uint32_t altintindex = altETLdetid.rawId();
114 if (intindex != altintindex) {
116 <<
"disc = " << discN <<
" disc side = " << sectorS <<
" sector = " << sectorN <<
"\n" int getCopyNumber(int level) const
static constexpr int kETLv4maxModule
static constexpr int kETLv1maxModule
uint32_t encodeSector(uint32_t &disc, uint32_t &discside, uint32_t §or) const
std::string_view const & getLevelName(int level) const
static constexpr int kETLv1maxRing
Log< level::Info, false > LogInfo
Detector identifier class for the Endcap Timing Layer.
Log< level::Warning, false > LogWarning
static constexpr int kETLv5maxModule
static constexpr int kETLv4maxRing