18 int side = cmssw_numbering.
side();
19 int tmpBlade = cmssw_numbering.
blade();
34 if (tmpBlade>=7 && tmpBlade<=17) {
37 }
else if (tmpBlade>=32 && tmpBlade<=48) {
40 }
else if( tmpBlade<=6 ) {
42 }
else if( tmpBlade>=18 && tmpBlade<=31 ) {
44 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
49 else if( side == 1 && !outer )
thePart =
mI;
50 else if( side == 2 && outer )
thePart =
pO;
51 else if( side == 2 && !outer )
thePart =
pI;
67 if ( (name.substr(0, 5) !=
"FPix_") ||
68 (name.find(
"_B") == string::npos) ||
69 (name.find(
"_D") == string::npos) ||
70 (name.find(
"_BLD") == string::npos) ||
71 (name.find(
"_PNL") == string::npos) ||
72 (name.find(
"_PLQ") == string::npos) ) {
74 <<
"Bad name string in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 79 if (name.find(
"_ROC") != string::npos)
80 name = name.substr(0, name.find(
"_ROC"));
82 string hcString = name.substr(name.find(
"_B")+2, name.find(
"_D")-name.find(
"_B")-2);
89 <<
"Unable to determine half cylinder in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 93 string diskString = name.substr(name.find(
"_D")+2, name.find(
"_BLD")-name.find(
"_D")-2);
94 if (diskString ==
"1")
theDisk = 1;
95 else if (diskString ==
"2")
theDisk = 2;
96 else if (diskString ==
"3")
theDisk = 3;
99 <<
"Unable to determine disk number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 103 string bladeString = name.substr(name.find(
"_BLD")+4, name.find(
"_PNL")-name.find(
"_BLD")-4);
105 if (bladeString ==
"1")
theBlade = 1;
106 else if (bladeString ==
"2")
theBlade = 2;
107 else if (bladeString ==
"3")
theBlade = 3;
108 else if (bladeString ==
"4")
theBlade = 4;
109 else if (bladeString ==
"5")
theBlade = 5;
110 else if (bladeString ==
"6")
theBlade = 6;
111 else if (bladeString ==
"7")
theBlade = 7;
112 else if (bladeString ==
"8")
theBlade = 8;
113 else if (bladeString ==
"9")
theBlade = 9;
114 else if (bladeString ==
"10")
theBlade = 10;
115 else if (bladeString ==
"11")
theBlade = 11;
116 else if (bladeString ==
"12")
theBlade = 12;
117 else if (bladeString ==
"13")
theBlade = 13;
118 else if (bladeString ==
"14")
theBlade = 14;
119 else if (bladeString ==
"15")
theBlade = 15;
120 else if (bladeString ==
"16")
theBlade = 16;
121 else if (bladeString ==
"17")
theBlade = 17;
124 <<
"Unable to determine blade number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 128 string panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_PLQ")-name.find(
"_PNL")-4);
130 else if (panelString ==
"2")
thePannel = 2;
133 <<
"Unable to determine panel number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 137 string plaquetteString = name.substr(name.find(
"_PLQ")+4, name.size()-name.find(
"_PLQ")-4);
141 <<
"Unable to determine plaquette number in PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(std::string): " 176 std::ostringstream stm;
188 default: out <<
"unknown";
205 if (hc ==
mO || hc ==
mI) side = 1;
206 else if (hc ==
pO || hc ==
pI) side = 2;
209 disk =
static_cast<uint32_t
>(
diskName());
210 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
216 outer = (hc ==
mO) || (hc ==
pO);
225 if (tmpBlade>=7 && tmpBlade<=17)
theBlade = tmpBlade+6;
226 else if (tmpBlade>=32 && tmpBlade<=48)
theBlade = 60-tmpBlade;
228 if (tmpBlade<=6 )
theBlade = 7-tmpBlade;
229 else if (tmpBlade>=18 && tmpBlade<=31)
theBlade = 38-tmpBlade;
230 else if (tmpBlade>=49 && tmpBlade<=56)
theBlade = 77-tmpBlade;
234 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