20 const uint32_t nLevels(baseNumber.
getLevels());
23 std::ostringstream st1;
24 for (uint32_t
k = 0;
k < nLevels; ++
k)
26 edm::LogVerbatim(
"EcalGeom") <<
"ECalBarrelNumberingScheme geometry levels = " << nLevels << st1.str();
29 edm::LogWarning(
"EcalGeom") <<
"ECalBarrelNumberingScheme::getUnitID(): "
30 <<
"Not enough levels found in EcalBaseNumber ( " << nLevels <<
") Returning 0";
36 const int cryType(::atoi(cryName.c_str() + 5));
38 uint32_t wallCopy(0), hawCopy(0), fawCopy(0), supmCopy(0);
39 const int off(13 < nLevels ? 3 : 0);
41 if ((nLevels != 11) && (nLevels != 14)) {
48 wallCopy = num1.second;
51 fawCopy = num2.second;
52 supmCopy = num2.first;
55 edm::LogVerbatim(
"EcalGeom") << nLevels <<
" off: " << off <<
" cryType: " << cryType <<
" wallCopy: " << wallCopy
56 <<
" hawCopy: " << hawCopy <<
" fawCopy: " << fawCopy <<
" supmCopy: " << supmCopy;
60 if (1 > cryType || 17 < cryType) {
61 edm::LogWarning(
"EdalGeom") <<
"ECalBarrelNumberingScheme::getUnitID(): "
62 <<
"****************** Bad crystal name = " << cryName
67 if (1 > wallCopy || 5 < wallCopy) {
68 edm::LogWarning(
"EcalGeom") <<
"ECalBarrelNumberingScheme::getUnitID(): "
69 <<
"****************** Bad wall copy = " << wallCopy
74 if (1 > hawCopy || 2 < hawCopy) {
75 edm::LogWarning(
"EcalGeom") <<
"ECalBarrelNumberingScheme::getUnitID(): "
76 <<
"****************** Bad haw copy = " << hawCopy
81 if (1 > fawCopy || 10 < fawCopy) {
82 edm::LogWarning(
"EcalGeom") <<
"ECalBarrelNumberingScheme::getUnitID(): "
83 <<
"****************** Bad faw copy = " << fawCopy
88 if (1 > supmCopy || 36 < supmCopy) {
89 edm::LogWarning(
"EcalGeom") <<
"ECalBarrelNumberingScheme::getUnitID(): "
90 <<
"****************** Bad supermodule copy = " << supmCopy
97 const int32_t zsign(18 < supmCopy ? -1 : 1);
99 const int32_t
eta(5 * (cryType - 1) + wallCopy);
101 const int32_t
phi(18 < supmCopy ? 20 * (supmCopy - 19) + 2 * (10 - fawCopy) + 3 - hawCopy
102 : 20 * (supmCopy - 1) + 2 * (fawCopy - 1) + hawCopy);
117 <<
"supmCopy = " << supmCopy <<
", fawCopy = " << fawCopy <<
", hawCopy = " << hawCopy
118 <<
", wallCopy = " << wallCopy <<
", cryType = " << cryType
119 <<
"\n zsign = " << zsign <<
", eta = " << eta <<
", phi = " <<
phi
120 <<
", packed index = 0x" << std::hex << intindex <<
std::dec;
Log< level::Info, true > LogVerbatim
std::string const & getLevelName(int level) const
int getCopyNumber(int level) const
std::pair< int, int > numbers(const std::string &) const
Log< level::Warning, false > LogWarning