17 int oldModule = cmssw_numbering.
module() - 4;
21 int oldLadder = cmssw_numbering.
ladder();
25 oldLadder = 4 - oldLadder;
26 else if (oldLadder >= 4 && oldLadder <= 9)
27 oldLadder = 3 - oldLadder;
28 else if (oldLadder >= 10)
29 oldLadder = 16 - oldLadder;
32 oldLadder = 8 - oldLadder;
33 else if (oldLadder >= 8 && oldLadder <= 21)
34 oldLadder = 7 - oldLadder;
35 else if (oldLadder >= 22)
36 oldLadder = 36 - oldLadder;
39 oldLadder = 12 - oldLadder;
40 else if (oldLadder >= 12 && oldLadder <= 33)
41 oldLadder = 11 - oldLadder;
42 else if (oldLadder >= 34)
43 oldLadder = 56 - oldLadder;
46 oldLadder = 17 - oldLadder;
47 else if (oldLadder >= 17 && oldLadder <= 48)
48 oldLadder = 16 - oldLadder;
49 else if (oldLadder >= 49)
50 oldLadder = 81 - oldLadder;
56 if (oldModule < 0 && oldLadder < 0)
58 else if (oldModule > 0 && oldLadder < 0)
60 else if (oldModule < 0 && oldLadder > 0)
62 else if (oldModule > 0 && oldLadder > 0)
84 if ((
name.substr(0, 5) !=
"BPix_") || (
name.find(
"_B") == string::npos) || (
name.find(
"_LYR") == string::npos) ||
85 (
name.find(
"_LDR") == string::npos) || (
name.find(
"_MOD") == string::npos)) {
87 <<
"Bad name string in PixelBarrelNameUpgrade::PixelBarrelName(std::string): " <<
name;
92 if (
name.find(
"_ROC") != string::npos)
96 string shellString =
name.substr(
name.find(
"_B") + 2,
name.find(
"_SEC") -
name.find(
"_B") - 2);
97 if (shellString ==
"mO")
99 else if (shellString ==
"mI")
101 else if (shellString ==
"pO")
103 else if (shellString ==
"pI")
107 <<
"Unable to determine shell in PixelBarrelNameUpgrade::PixelBarrelName(std::string): " <<
name;
111 string layerString =
name.substr(
name.find(
"_LYR") + 4,
name.find(
"_LDR") -
name.find(
"_LYR") - 4);
112 if (layerString ==
"1")
114 else if (layerString ==
"2")
116 else if (layerString ==
"3")
118 else if (layerString ==
"4")
122 <<
"Unable to determine layer in PixelBarrelNameUpgrade::PixelBarrelName(std::string): " <<
name;
126 string ladderString =
name.substr(
name.find(
"_LDR") + 4,
name.find(
"_MOD") -
name.find(
"_LDR") - 4);
127 if (ladderString.substr(ladderString.size() - 1, 1) ==
"F") {
128 int ladderNum = atoi(ladderString.substr(0, ladderString.size() - 1).c_str());
129 if (
theLayer == 1 && ladderNum >= 1 && ladderNum <= 6)
131 else if (
theLayer == 2 && ladderNum >= 1 && ladderNum <= 14)
133 else if (
theLayer == 3 && ladderNum >= 1 && ladderNum <= 22)
135 else if (
theLayer == 4 && ladderNum >= 1 && ladderNum <= 32)
139 <<
"Unable to determine ladder in PixelBarrelNameUpgrade::PixelBarrelName(std::string): " <<
name;
144 <<
"Unable to determine ladder in PixelBarrelNameUpgrade::PixelBarrelName(std::string): " <<
name;
148 string moduleString =
name.substr(
name.find(
"_MOD") + 4,
name.size() -
name.find(
"_MOD") - 4);
149 if (moduleString ==
"1")
151 else if (moduleString ==
"2")
153 else if (moduleString ==
"3")
155 else if (moduleString ==
"4")
159 <<
"Unable to determine module in PixelBarrelNameUpgrade::PixelBarrelName(std::string): " <<
name;
354 bool halfModule =
false;
376 std::ostringstream stm;
425 else if (tmpLadder <= 6)
428 else if (layer == 2) {
431 else if (tmpLadder <= 14)
434 else if (layer == 3) {
437 else if (tmpLadder <= 22)
440 else if (layer == 4) {
443 else if (tmpLadder <= 32)