13 int side = cmssw_numbering.
side();
14 int tmpBlade = cmssw_numbering.
blade();
29 if (tmpBlade >= 7 && tmpBlade <= 17) {
32 }
else if (tmpBlade >= 32 && tmpBlade <= 48) {
35 }
else if (tmpBlade <= 6) {
37 }
else if (tmpBlade >= 18 && tmpBlade <= 31) {
39 }
else if (tmpBlade >= 49 && tmpBlade <= 56) {
43 if (side == 1 && outer)
45 else if (side == 1 && !outer)
47 else if (side == 2 && outer)
49 else if (side == 2 && !outer)
63 if ((name.substr(0, 5) !=
"FPix_") || (name.find(
"_B") == string::npos) || (name.find(
"_D") == string::npos) ||
64 (name.find(
"_BLD") == string::npos) || (name.find(
"_PNL") == string::npos) ||
65 (name.find(
"_PLQ") == string::npos)) {
67 <<
"Bad name string in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " <<
name;
71 if (name.find(
"_ROC") != string::npos)
72 name = name.substr(0, name.find(
"_ROC"));
74 string hcString = name.substr(name.find(
"_B") + 2, name.find(
"_D") - name.find(
"_B") - 2);
77 else if (hcString ==
"mI")
79 else if (hcString ==
"pO")
81 else if (hcString ==
"pI")
85 <<
"Unable to determine half cylinder in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " <<
name;
88 string diskString = name.substr(name.find(
"_D") + 2, name.find(
"_BLD") - name.find(
"_D") - 2);
89 if (diskString ==
"1")
91 else if (diskString ==
"2")
93 else if (diskString ==
"3")
97 <<
"Unable to determine disk number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " <<
name;
100 string bladeString = name.substr(name.find(
"_BLD") + 4, name.find(
"_PNL") - name.find(
"_BLD") - 4);
102 if (bladeString ==
"1")
104 else if (bladeString ==
"2")
106 else if (bladeString ==
"3")
108 else if (bladeString ==
"4")
110 else if (bladeString ==
"5")
112 else if (bladeString ==
"6")
114 else if (bladeString ==
"7")
116 else if (bladeString ==
"8")
118 else if (bladeString ==
"9")
120 else if (bladeString ==
"10")
122 else if (bladeString ==
"11")
124 else if (bladeString ==
"12")
126 else if (bladeString ==
"13")
128 else if (bladeString ==
"14")
130 else if (bladeString ==
"15")
132 else if (bladeString ==
"16")
134 else if (bladeString ==
"17")
138 <<
"Unable to determine blade number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " <<
name;
141 string panelString = name.substr(name.find(
"_PNL") + 4, name.find(
"_PLQ") - name.find(
"_PNL") - 4);
142 if (panelString ==
"1")
144 else if (panelString ==
"2")
148 <<
"Unable to determine panel number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " <<
name;
151 string plaquetteString = name.substr(name.find(
"_PLQ") + 4, name.size() - name.find(
"_PLQ") - 4);
152 if (plaquetteString ==
"1")
156 <<
"Unable to determine plaquette number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 186 std::ostringstream stm;
225 if (hc ==
mO || hc ==
mI)
227 else if (hc ==
pO || hc ==
pI)
231 disk =
static_cast<uint32_t
>(
diskName());
232 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
238 outer = (hc ==
mO) || (hc ==
pO);
247 if (tmpBlade >= 7 && tmpBlade <= 17)
249 else if (tmpBlade >= 32 && tmpBlade <= 48)
254 else if (tmpBlade >= 18 && tmpBlade <= 31)
256 else if (tmpBlade >= 49 && tmpBlade <= 56)
261 return PXFDetId(side, disk, blade, panel, module);
std::ostream & operator<<(std::ostream &out, const PixelEndcapNameUpgrade::HalfCylinder &t)
PixelModuleName::ModuleType moduleType() const override
module Type
unsigned int panel() const
panel id
PXFDetId getDetId()
return DetId
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
int plaquetteName() const
plaquetteId (in pannel)
unsigned int blade() const
blade id
PixelEndcapNameUpgrade(const DetId &)
ctor from DetId
std::string name() const override
from base class
unsigned int module() const
det id
int bladeName() const
blade id
unsigned int disk() const
disk id
int diskName() const
disk id
virtual bool isBarrel() const
true for barrel modules
unsigned int side() const
positive or negative id
HalfCylinder halfCylinder() const
int pannelName() const
pannel id