11 const bool pilot_blade =
false;
17 theBlade(0), thePannel(0), thePlaquette(0), phase1(phase) {
31 if (tmpBlade>=7 && tmpBlade<=17) {
36 }
else if( tmpBlade<=6 ) {
40 }
else if( tmpBlade>=18 && tmpBlade<=22 ) {
44 }
else if (tmpBlade>=32 && tmpBlade<=48) {
49 }
else if( tmpBlade>=23 && tmpBlade<=31 ) {
53 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
65 if(pilot_blade &&
theDisk==3 ) {
67 if(tmpBlade>=1 && tmpBlade<=4) {
69 if(tmpBlade<3) tmpBlade +=3;
77 if (tmpBlade >= 7 && tmpBlade <= 18) {
80 }
else if( tmpBlade <=6 ) {
82 }
else if( tmpBlade >= 19) {
91 else if( side == 1 && !outer )
thePart =
mI;
92 else if( side == 2 && outer )
thePart =
pO;
93 else if( side == 2 && !outer )
thePart =
pI;
103 int side = cmssw_numbering.
side();
104 int tmpBlade = cmssw_numbering.
blade();
113 if (tmpBlade>=7 && tmpBlade<=17) {
118 }
else if( tmpBlade<=6 ) {
122 }
else if( tmpBlade>=18 && tmpBlade<=22 ) {
126 }
else if (tmpBlade>=32 && tmpBlade<=48) {
131 }
else if( tmpBlade>=23 && tmpBlade<=31 ) {
135 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
146 if(pilot_blade &&
theDisk==3 ) {
147 if(tmpBlade>=1 && tmpBlade<=4) {
149 if(tmpBlade<3) tmpBlade +=3;
157 if (tmpBlade >= 7 && tmpBlade <= 18) {
160 }
else if( tmpBlade <=6 ) {
162 }
else if( tmpBlade >= 19) {
171 else if( side == 1 && !outer )
thePart =
mI;
172 else if( side == 2 && outer )
thePart =
pO;
173 else if( side == 2 && !outer )
thePart =
pI;
185 if ( (name.substr(0, 5) !=
"FPix_") ||
186 (name.find(
"_B") == string::npos) ||
187 (name.find(
"_D") == string::npos) ||
188 (name.find(
"_BLD") == string::npos) ||
189 (name.find(
"_PNL") == string::npos) ||
190 ( (
phase1 && name.find(
"_RNG") == string::npos) ) ||
191 ( (!
phase1 && name.find(
"_PLQ") == string::npos) ) ) {
193 <<
"Bad name string in PixelEndcapName::PixelEndcapName(std::string): " 199 if (name.find(
"_ROC") != string::npos)
200 name = name.substr(0, name.find(
"_ROC"));
203 string hcString = name.substr(name.find(
"_B")+2, name.find(
"_D")-name.find(
"_B")-2);
210 <<
"Unable to determine half cylinder in PixelEndcapName::PixelEndcapName(std::string): " 215 string diskString = name.substr(name.find(
"_D")+2, name.find(
"_BLD")-name.find(
"_D")-2);
216 if (diskString ==
"1")
theDisk = 1;
217 else if (diskString ==
"2")
theDisk = 2;
218 else if (diskString ==
"3")
theDisk = 3;
221 <<
"Unable to determine disk number in PixelEndcapName::PixelEndcapName(std::string): " 226 string bladeString = name.substr(name.find(
"_BLD")+4, name.find(
"_PNL")-name.find(
"_BLD")-4);
228 if (bladeString ==
"1")
theBlade = 1;
229 else if (bladeString ==
"2")
theBlade = 2;
230 else if (bladeString ==
"3")
theBlade = 3;
231 else if (bladeString ==
"4")
theBlade = 4;
232 else if (bladeString ==
"5")
theBlade = 5;
233 else if (bladeString ==
"6")
theBlade = 6;
234 else if (bladeString ==
"7")
theBlade = 7;
235 else if (bladeString ==
"8")
theBlade = 8;
236 else if (bladeString ==
"9")
theBlade = 9;
237 else if (bladeString ==
"10")
theBlade = 10;
238 else if (bladeString ==
"11")
theBlade = 11;
239 else if (bladeString ==
"12")
theBlade = 12;
240 else if (bladeString ==
"13")
theBlade = 13;
241 else if (bladeString ==
"14")
theBlade = 14;
242 else if (bladeString ==
"15")
theBlade = 15;
243 else if (bladeString ==
"16")
theBlade = 16;
244 else if (bladeString ==
"17")
theBlade = 17;
247 <<
"Unable to determine blade number in PixelEndcapName::PixelEndcapName(std::string): " 253 if(
phase1) panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_RNG")-name.find(
"_PNL")-4);
254 else panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_PLQ")-name.find(
"_PNL")-4);
257 else if (panelString ==
"2")
thePannel = 2;
260 <<
"Unable to determine panel number in PixelEndcapName::PixelEndcapName(std::string): " 267 string ringString = name.substr(name.find(
"_RNG")+4, name.size()-name.find(
"_RNG")-4);
272 <<
"Unable to determine ring number in PixelEndcapName::PixelEndcapName(std::string): " 279 string plaquetteString = name.substr(name.find(
"_PLQ")+4, name.size()-name.find(
"_PLQ")-4);
286 <<
"Unable to determine plaquette number in PixelEndcapName::PixelEndcapName(std::string): " 340 std::ostringstream stm;
357 default: out <<
"unknown";
373 if (hc ==
mO || hc ==
mI) side = 1;
374 else if (hc ==
pO || hc ==
pI) side = 2;
377 disk =
static_cast<uint32_t
>(
diskName());
378 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
383 outer = (hc ==
mO) || (hc ==
pO);
391 if (tmpBlade>=1 && tmpBlade<=11) blade = tmpBlade+6;
393 if (tmpBlade<=6 ) blade = 7-tmpBlade;
394 else blade = 29-tmpBlade;
397 }
else if (ring==2) {
399 if (tmpBlade>=1 && tmpBlade<=17) blade = tmpBlade+31;
401 if (tmpBlade<=9 ) blade = 32-tmpBlade;
402 else blade = 66-tmpBlade;
409 blade = tmpBlade + 6;
411 if (tmpBlade <= 6) blade = 7 - tmpBlade;
412 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
416 if(pilot_blade &&
theDisk==3 ) {
418 if(blade<=5) blade -=3;
446 if (hc ==
mO || hc ==
mI) side = 1;
447 else if (hc ==
pO || hc ==
pI) side = 2;
450 disk =
static_cast<uint32_t
>(
diskName());
451 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
456 outer = (hc ==
mO) || (hc ==
pO);
464 if (tmpBlade>=1 && tmpBlade<=11) blade = tmpBlade+6;
466 if (tmpBlade<=6 ) blade = 7-tmpBlade;
467 else blade = 29-tmpBlade;
470 }
else if (ring==2) {
472 if (tmpBlade>=1 && tmpBlade<=17) blade = tmpBlade+31;
474 if (tmpBlade<=9 ) blade = 32-tmpBlade;
475 else blade = 66-tmpBlade;
482 blade = tmpBlade + 6;
484 if (tmpBlade <= 6) blade = 7 - tmpBlade;
485 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
489 if(pilot_blade &&
theDisk==3 ) {
491 if(blade<=5) blade -=3;
500 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