15 int side = cmssw_numbering.
side();
17 int tmpBlade = cmssw_numbering.
blade();
19 if (tmpBlade >= 7 && tmpBlade <= 18) {
22 }
else if( tmpBlade <=6 ) {
24 }
else if( tmpBlade >= 19) {
30 else if( side == 1 && !outer )
thePart =
mI;
31 else if( side == 2 && outer )
thePart =
pO;
32 else if( side == 2 && !outer )
thePart =
pI;
43 theBlade(0), thePannel(0), thePlaquette(0) {
48 if ( (name.substr(0, 5) !=
"FPix_") ||
49 (name.find(
"_B") == string::npos) ||
50 (name.find(
"_D") == string::npos) ||
51 (name.find(
"_BLD") == string::npos) ||
52 (name.find(
"_PNL") == string::npos) ||
53 (name.find(
"_PLQ") == string::npos) ) {
55 <<
"Bad name string in PixelEndcapName::PixelEndcapName(std::string): "
61 if (name.find(
"_ROC") != string::npos)
62 name = name.substr(0, name.find(
"_ROC"));
65 string hcString = name.substr(name.find(
"_B")+2, name.find(
"_D")-name.find(
"_B")-2);
72 <<
"Unable to determine half cylinder in PixelEndcapName::PixelEndcapName(std::string): "
77 string diskString = name.substr(name.find(
"_D")+2, name.find(
"_BLD")-name.find(
"_D")-2);
78 if (diskString ==
"1")
theDisk = 1;
79 else if (diskString ==
"2")
theDisk = 2;
80 else if (diskString ==
"3")
theDisk = 3;
83 <<
"Unable to determine disk number in PixelEndcapName::PixelEndcapName(std::string): "
88 string bladeString = name.substr(name.find(
"_BLD")+4, name.find(
"_PNL")-name.find(
"_BLD")-4);
90 if (bladeString ==
"1")
theBlade = 1;
91 else if (bladeString ==
"2")
theBlade = 2;
92 else if (bladeString ==
"3")
theBlade = 3;
93 else if (bladeString ==
"4")
theBlade = 4;
94 else if (bladeString ==
"5")
theBlade = 5;
95 else if (bladeString ==
"6")
theBlade = 6;
96 else if (bladeString ==
"7")
theBlade = 7;
97 else if (bladeString ==
"8")
theBlade = 8;
98 else if (bladeString ==
"9")
theBlade = 9;
99 else if (bladeString ==
"10")
theBlade = 10;
100 else if (bladeString ==
"11")
theBlade = 11;
101 else if (bladeString ==
"12")
theBlade = 12;
104 <<
"Unable to determine blade number in PixelEndcapName::PixelEndcapName(std::string): "
109 string panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_PLQ")-name.find(
"_PNL")-4);
111 else if (panelString ==
"2")
thePannel = 2;
114 <<
"Unable to determine panel number in PixelEndcapName::PixelEndcapName(std::string): "
119 string plaquetteString = name.substr(name.find(
"_PLQ")+4, name.size()-name.find(
"_PLQ")-4);
126 <<
"Unable to determine plaquette number in PixelEndcapName::PixelEndcapName(std::string): "
165 std::ostringstream stm;
177 default: out <<
"unknown";
193 if (hc ==
mO || hc ==
mI) side = 1;
194 else if (hc ==
pO || hc ==
pI) side = 2;
197 disk =
static_cast<uint32_t
>(
diskName());
198 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
204 outer = (hc ==
mO) || (hc ==
pO);
206 blade = tmpBlade + 6;
209 if (tmpBlade <= 6) blade = 7 - tmpBlade;
210 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
214 return PXFDetId(side, disk, blade, panel, module);
int plaquetteName() const
plaquetteId (in pannel)
unsigned int panel() const
panel id
std::ostream & operator<<(std::ostream &out, const ALILine &li)
unsigned int blade() const
blade id
PixelEndcapName(const DetId &)
ctor from DetId
int bladeName() const
blade id
virtual bool operator==(const PixelModuleName &) const
check equality of modules from datamemebers
unsigned int module() const
det id
unsigned int disk() const
disk id
PXFDetId getDetId()
return DetId
virtual bool isBarrel() const
true for barrel modules
virtual PixelModuleName::ModuleType moduleType() const
module Type
virtual std::string name() const
from base class
int pannelName() const
pannel id
unsigned int side() const
positive or negative id
int diskName() const
disk id
HalfCylinder halfCylinder() const