10 const bool pilot_blade =
true;
16 theBlade(0), thePannel(0), thePlaquette(0), phase1(phase) {
30 if (tmpBlade>=7 && tmpBlade<=17) {
35 }
else if( tmpBlade<=6 ) {
39 }
else if( tmpBlade>=18 && tmpBlade<=22 ) {
43 }
else if (tmpBlade>=32 && tmpBlade<=48) {
48 }
else if( tmpBlade>=23 && tmpBlade<=31 ) {
52 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
64 if(pilot_blade &&
theDisk==3 ) {
66 if(tmpBlade>=1 && tmpBlade<=4) {
68 if(tmpBlade<3) tmpBlade +=3;
76 if (tmpBlade >= 7 && tmpBlade <= 18) {
79 }
else if( tmpBlade <=6 ) {
81 }
else if( tmpBlade >= 19) {
90 else if( side == 1 && !outer )
thePart =
mI;
91 else if( side == 2 && outer )
thePart =
pO;
92 else if( side == 2 && !outer )
thePart =
pI;
99 theBlade(0), thePannel(0), thePlaquette(0), phase1(phase) {
102 int side = cmssw_numbering.
side();
103 int tmpBlade = cmssw_numbering.
blade();
112 if (tmpBlade>=7 && tmpBlade<=17) {
117 }
else if( tmpBlade<=6 ) {
121 }
else if( tmpBlade>=18 && tmpBlade<=22 ) {
125 }
else if (tmpBlade>=32 && tmpBlade<=48) {
130 }
else if( tmpBlade>=23 && tmpBlade<=31 ) {
134 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
145 if(pilot_blade &&
theDisk==3 ) {
146 if(tmpBlade>=1 && tmpBlade<=4) {
148 if(tmpBlade<3) tmpBlade +=3;
156 if (tmpBlade >= 7 && tmpBlade <= 18) {
159 }
else if( tmpBlade <=6 ) {
161 }
else if( tmpBlade >= 19) {
170 else if( side == 1 && !outer )
thePart =
mI;
171 else if( side == 2 && outer )
thePart =
pO;
172 else if( side == 2 && !outer )
thePart =
pI;
179 theBlade(0), thePannel(0), thePlaquette(0), phase1(phase) {
184 if ( (name.substr(0, 5) !=
"FPix_") ||
185 (name.find(
"_B") == string::npos) ||
186 (name.find(
"_D") == string::npos) ||
187 (name.find(
"_BLD") == string::npos) ||
188 (name.find(
"_PNL") == string::npos) ||
189 ( (
phase1 && name.find(
"_RNG") == string::npos) ) ||
190 ( (!
phase1 && name.find(
"_PLQ") == string::npos) ) ) {
192 <<
"Bad name string in PixelEndcapName::PixelEndcapName(std::string): "
198 if (name.find(
"_ROC") != string::npos)
199 name = name.substr(0, name.find(
"_ROC"));
202 string hcString = name.substr(name.find(
"_B")+2, name.find(
"_D")-name.find(
"_B")-2);
209 <<
"Unable to determine half cylinder in PixelEndcapName::PixelEndcapName(std::string): "
214 string diskString = name.substr(name.find(
"_D")+2, name.find(
"_BLD")-name.find(
"_D")-2);
215 if (diskString ==
"1")
theDisk = 1;
216 else if (diskString ==
"2")
theDisk = 2;
217 else if (diskString ==
"3")
theDisk = 3;
220 <<
"Unable to determine disk number in PixelEndcapName::PixelEndcapName(std::string): "
225 string bladeString = name.substr(name.find(
"_BLD")+4, name.find(
"_PNL")-name.find(
"_BLD")-4);
227 if (bladeString ==
"1")
theBlade = 1;
228 else if (bladeString ==
"2")
theBlade = 2;
229 else if (bladeString ==
"3")
theBlade = 3;
230 else if (bladeString ==
"4")
theBlade = 4;
231 else if (bladeString ==
"5")
theBlade = 5;
232 else if (bladeString ==
"6")
theBlade = 6;
233 else if (bladeString ==
"7")
theBlade = 7;
234 else if (bladeString ==
"8")
theBlade = 8;
235 else if (bladeString ==
"9")
theBlade = 9;
236 else if (bladeString ==
"10")
theBlade = 10;
237 else if (bladeString ==
"11")
theBlade = 11;
238 else if (bladeString ==
"12")
theBlade = 12;
239 else if (bladeString ==
"13")
theBlade = 13;
240 else if (bladeString ==
"14")
theBlade = 14;
241 else if (bladeString ==
"15")
theBlade = 15;
242 else if (bladeString ==
"16")
theBlade = 16;
243 else if (bladeString ==
"17")
theBlade = 17;
246 <<
"Unable to determine blade number in PixelEndcapName::PixelEndcapName(std::string): "
252 if(
phase1) panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_RNG")-name.find(
"_PNL")-4);
253 else panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_PLQ")-name.find(
"_PNL")-4);
256 else if (panelString ==
"2")
thePannel = 2;
259 <<
"Unable to determine panel number in PixelEndcapName::PixelEndcapName(std::string): "
266 string ringString = name.substr(name.find(
"_RNG")+4, name.size()-name.find(
"_RNG")-4);
271 <<
"Unable to determine ring number in PixelEndcapName::PixelEndcapName(std::string): "
278 string plaquetteString = name.substr(name.find(
"_PLQ")+4, name.size()-name.find(
"_PLQ")-4);
285 <<
"Unable to determine plaquette number in PixelEndcapName::PixelEndcapName(std::string): "
339 std::ostringstream stm;
356 default: out <<
"unknown";
372 if (hc ==
mO || hc ==
mI) side = 1;
373 else if (hc ==
pO || hc ==
pI) side = 2;
376 disk =
static_cast<uint32_t
>(
diskName());
377 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
382 outer = (hc ==
mO) || (hc ==
pO);
390 if (tmpBlade>=1 && tmpBlade<=11) blade = tmpBlade+6;
392 if (tmpBlade<=6 ) blade = 7-tmpBlade;
393 else blade = 29-tmpBlade;
396 }
else if (ring==2) {
398 if (tmpBlade>=1 && tmpBlade<=17) blade = tmpBlade+31;
400 if (tmpBlade<=9 ) blade = 32-tmpBlade;
401 else blade = 66-tmpBlade;
408 blade = tmpBlade + 6;
410 if (tmpBlade <= 6) blade = 7 - tmpBlade;
411 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
415 if(pilot_blade &&
theDisk==3 ) {
417 if(blade<=5) blade -=3;
445 if (hc ==
mO || hc ==
mI) side = 1;
446 else if (hc ==
pO || hc ==
pI) side = 2;
449 disk =
static_cast<uint32_t
>(
diskName());
450 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
455 outer = (hc ==
mO) || (hc ==
pO);
463 if (tmpBlade>=1 && tmpBlade<=11) blade = tmpBlade+6;
465 if (tmpBlade<=6 ) blade = 7-tmpBlade;
466 else blade = 29-tmpBlade;
469 }
else if (ring==2) {
471 if (tmpBlade>=1 && tmpBlade<=17) blade = tmpBlade+31;
473 if (tmpBlade<=9 ) blade = 32-tmpBlade;
474 else blade = 66-tmpBlade;
481 blade = tmpBlade + 6;
483 if (tmpBlade <= 6) blade = 7 - tmpBlade;
484 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
488 if(pilot_blade &&
theDisk==3 ) {
490 if(blade<=5) blade -=3;
499 return PXFDetId(side, disk, blade, panel, module);
int plaquetteName() const
plaquetteId (in pannel)
unsigned int panel() const
panel id
unsigned int pxfDisk(const DetId &id) const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
DetId pxfDetId(uint32_t side, uint32_t disk, uint32_t blade, uint32_t panel, uint32_t module) const
unsigned int blade() const
blade id
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
unsigned int pxfModule(const DetId &id) const
virtual bool isBarrel() const
true for barrel modules
PixelEndcapName(const DetId &, bool phase=false)
ctor from DetId
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
unsigned int pxfSide(const DetId &id) const
int diskName() const
disk id
volatile std::atomic< bool > shutdown_flag false
int ringName() const
ring Id
HalfCylinder halfCylinder() const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const