11 const bool pilot_blade =
false;
16 :
PixelModuleName(
false), thePart(mO), theDisk(0), theBlade(0), thePannel(0), thePlaquette(0), phase1(phase) {
28 if (tmpBlade >= 7 && tmpBlade <= 17) {
33 }
else if (tmpBlade <= 6) {
37 }
else if (tmpBlade >= 18 && tmpBlade <= 22) {
41 }
else if (tmpBlade >= 32 && tmpBlade <= 48) {
46 }
else if (tmpBlade >= 23 && tmpBlade <= 31) {
50 }
else if (tmpBlade >= 49 && tmpBlade <= 56) {
61 if (pilot_blade &&
theDisk == 3) {
63 if (tmpBlade >= 1 && tmpBlade <= 4) {
74 if (tmpBlade >= 7 && tmpBlade <= 18) {
77 }
else if (tmpBlade <= 6) {
79 }
else if (tmpBlade >= 19) {
87 if (side == 1 && outer)
89 else if (side == 1 && !outer)
91 else if (side == 2 && outer)
93 else if (side == 2 && !outer)
101 int side = cmssw_numbering.
side();
102 int tmpBlade = cmssw_numbering.
blade();
111 if (tmpBlade >= 7 && tmpBlade <= 17) {
116 }
else if (tmpBlade <= 6) {
120 }
else if (tmpBlade >= 18 && tmpBlade <= 22) {
124 }
else if (tmpBlade >= 32 && tmpBlade <= 48) {
129 }
else if (tmpBlade >= 23 && tmpBlade <= 31) {
133 }
else if (tmpBlade >= 49 && tmpBlade <= 56) {
144 if (pilot_blade &&
theDisk == 3) {
145 if (tmpBlade >= 1 && tmpBlade <= 4) {
156 if (tmpBlade >= 7 && tmpBlade <= 18) {
159 }
else if (tmpBlade <= 6) {
161 }
else if (tmpBlade >= 19) {
169 if (side == 1 && outer)
171 else if (side == 1 && !outer)
173 else if (side == 2 && outer)
175 else if (side == 2 && !outer)
185 if ((name.substr(0, 5) !=
"FPix_") || (name.find(
"_B") == string::npos) || (name.find(
"_D") == string::npos) ||
186 (name.find(
"_BLD") == string::npos) || (name.find(
"_PNL") == string::npos) ||
187 ((
phase1 && name.find(
"_RNG") == string::npos)) || ((!
phase1 && name.find(
"_PLQ") == string::npos))) {
189 <<
"Bad name string in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
194 if (name.find(
"_ROC") != string::npos)
195 name = name.substr(0, name.find(
"_ROC"));
198 string hcString = name.substr(name.find(
"_B") + 2, name.find(
"_D") - name.find(
"_B") - 2);
199 if (hcString ==
"mO")
201 else if (hcString ==
"mI")
203 else if (hcString ==
"pO")
205 else if (hcString ==
"pI")
209 <<
"Unable to determine half cylinder in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
213 string diskString = name.substr(name.find(
"_D") + 2, name.find(
"_BLD") - name.find(
"_D") - 2);
214 if (diskString ==
"1")
216 else if (diskString ==
"2")
218 else if (diskString ==
"3")
222 <<
"Unable to determine disk number in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
226 string bladeString = name.substr(name.find(
"_BLD") + 4, name.find(
"_PNL") - name.find(
"_BLD") - 4);
228 if (bladeString ==
"1")
230 else if (bladeString ==
"2")
232 else if (bladeString ==
"3")
234 else if (bladeString ==
"4")
236 else if (bladeString ==
"5")
238 else if (bladeString ==
"6")
240 else if (bladeString ==
"7")
242 else if (bladeString ==
"8")
244 else if (bladeString ==
"9")
246 else if (bladeString ==
"10")
248 else if (bladeString ==
"11")
250 else if (bladeString ==
"12")
252 else if (bladeString ==
"13")
254 else if (bladeString ==
"14")
256 else if (bladeString ==
"15")
258 else if (bladeString ==
"16")
260 else if (bladeString ==
"17")
264 <<
"Unable to determine blade number in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
270 panelString = name.substr(name.find(
"_PNL") + 4, name.find(
"_RNG") - name.find(
"_PNL") - 4);
272 panelString = name.substr(name.find(
"_PNL") + 4, name.find(
"_PLQ") - name.find(
"_PNL") - 4);
274 if (panelString ==
"1")
276 else if (panelString ==
"2")
280 <<
"Unable to determine panel number in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
286 string ringString = name.substr(name.find(
"_RNG") + 4, name.size() - name.find(
"_RNG") - 4);
287 if (ringString ==
"1")
289 else if (ringString ==
"2")
293 <<
"Unable to determine ring number in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
299 string plaquetteString = name.substr(name.find(
"_PLQ") + 4, name.size() - name.find(
"_PLQ") - 4);
300 if (plaquetteString ==
"1")
302 else if (plaquetteString ==
"2")
304 else if (plaquetteString ==
"3")
306 else if (plaquetteString ==
"4")
310 <<
"Unable to determine plaquette number in PixelEndcapName::PixelEndcapName(std::string): " <<
name;
347 if (pilot_blade &&
theDisk == 3) {
366 std::ostringstream stm;
412 if (hc ==
mO || hc ==
mI)
414 else if (hc ==
pO || hc ==
pI)
418 disk =
static_cast<uint32_t
>(
diskName());
419 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
424 outer = (hc ==
mO) || (hc ==
pO);
432 if (tmpBlade >= 1 && tmpBlade <= 11)
433 blade = tmpBlade + 6;
436 blade = 7 - tmpBlade;
438 blade = 29 - tmpBlade;
441 }
else if (ring == 2) {
443 if (tmpBlade >= 1 && tmpBlade <= 17)
444 blade = tmpBlade + 31;
447 blade = 32 - tmpBlade;
449 blade = 66 - tmpBlade;
456 blade = tmpBlade + 6;
459 blade = 7 - tmpBlade;
460 else if (tmpBlade <= 12)
461 blade = 31 - tmpBlade;
465 if (pilot_blade &&
theDisk == 3) {
494 if (hc ==
mO || hc ==
mI)
496 else if (hc ==
pO || hc ==
pI)
500 disk =
static_cast<uint32_t
>(
diskName());
501 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
506 outer = (hc ==
mO) || (hc ==
pO);
514 if (tmpBlade >= 1 && tmpBlade <= 11)
515 blade = tmpBlade + 6;
518 blade = 7 - tmpBlade;
520 blade = 29 - tmpBlade;
523 }
else if (ring == 2) {
525 if (tmpBlade >= 1 && tmpBlade <= 17)
526 blade = tmpBlade + 31;
529 blade = 32 - tmpBlade;
531 blade = 66 - tmpBlade;
538 blade = tmpBlade + 6;
541 blade = 7 - tmpBlade;
542 else if (tmpBlade <= 12)
543 blade = 31 - tmpBlade;
547 if (pilot_blade &&
theDisk == 3) {
560 return PXFDetId(side, disk, blade, panel, module);
int plaquetteName() const
plaquetteId (in pannel)
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
unsigned int panel() const
panel id
unsigned int pxfDisk(const DetId &id) const
DetId pxfDetId(uint32_t side, uint32_t disk, uint32_t blade, uint32_t panel, uint32_t module) const
std::string name() const override
from base class
unsigned int blade() const
blade id
int bladeName() const
blade id
unsigned int module() const
det id
unsigned int disk() const
disk id
PXFDetId getDetId()
return DetId
unsigned int pxfModule(const DetId &id) const
virtual bool isBarrel() const
true for barrel modules
PixelEndcapName(const DetId &, bool phase=false)
ctor from DetId
PixelModuleName::ModuleType moduleType() const override
module Type
int pannelName() const
pannel id
unsigned int side() const
positive or negative id
unsigned int pxfSide(const DetId &id) const
int diskName() const
disk id
std::ostream & operator<<(std::ostream &out, const PixelEndcapName::HalfCylinder &t)
int ringName() const
ring Id
HalfCylinder halfCylinder() const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const