10 const bool pilot_blade =
true;
28 if (tmpBlade>=7 && tmpBlade<=17) {
31 }
else if (tmpBlade>=32 && tmpBlade<=48) {
34 }
else if( tmpBlade<=6 ) {
36 }
else if( tmpBlade>=18 && tmpBlade<=31 ) {
38 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
48 if(pilot_blade &&
theDisk==3 ) {
50 if(tmpBlade>=1 && tmpBlade<=4) {
52 if(tmpBlade<3) tmpBlade +=3;
60 if (tmpBlade >= 7 && tmpBlade <= 18) {
63 }
else if( tmpBlade <=6 ) {
65 }
else if( tmpBlade >= 19) {
74 else if( side == 1 && !outer )
thePart =
mI;
75 else if( side == 2 && outer )
thePart =
pO;
76 else if( side == 2 && !outer )
thePart =
pI;
84 int side = cmssw_numbering.
side();
85 int tmpBlade = cmssw_numbering.
blade();
92 if (tmpBlade>=7 && tmpBlade<=17) {
95 }
else if (tmpBlade>=32 && tmpBlade<=48) {
98 }
else if( tmpBlade<=6 ) {
100 }
else if( tmpBlade>=18 && tmpBlade<=31 ) {
102 }
else if( tmpBlade>=49 && tmpBlade<=56 ) {
111 if(pilot_blade &&
theDisk==3 ) {
112 if(tmpBlade>=1 && tmpBlade<=4) {
114 if(tmpBlade<3) tmpBlade +=3;
122 if (tmpBlade >= 7 && tmpBlade <= 18) {
125 }
else if( tmpBlade <=6 ) {
127 }
else if( tmpBlade >= 19) {
136 else if( side == 1 && !outer )
thePart =
mI;
137 else if( side == 2 && outer )
thePart =
pO;
138 else if( side == 2 && !outer )
thePart =
pI;
145 theBlade(0), thePannel(0), thePlaquette(0) {
150 if ( (name.substr(0, 5) !=
"FPix_") ||
151 (name.find(
"_B") == string::npos) ||
152 (name.find(
"_D") == string::npos) ||
153 (name.find(
"_BLD") == string::npos) ||
154 (name.find(
"_PNL") == string::npos) ||
155 ( (
phase1 && name.find(
"_RNG") == string::npos) ) ||
156 ( (!
phase1 && name.find(
"_PLQ") == string::npos) ) ) {
158 <<
"Bad name string in PixelEndcapName::PixelEndcapName(std::string): "
164 if (name.find(
"_ROC") != string::npos)
165 name = name.substr(0, name.find(
"_ROC"));
168 string hcString = name.substr(name.find(
"_B")+2, name.find(
"_D")-name.find(
"_B")-2);
175 <<
"Unable to determine half cylinder in PixelEndcapName::PixelEndcapName(std::string): "
180 string diskString = name.substr(name.find(
"_D")+2, name.find(
"_BLD")-name.find(
"_D")-2);
181 if (diskString ==
"1")
theDisk = 1;
182 else if (diskString ==
"2")
theDisk = 2;
183 else if (diskString ==
"3")
theDisk = 3;
186 <<
"Unable to determine disk number in PixelEndcapName::PixelEndcapName(std::string): "
191 string bladeString = name.substr(name.find(
"_BLD")+4, name.find(
"_PNL")-name.find(
"_BLD")-4);
193 if (bladeString ==
"1")
theBlade = 1;
194 else if (bladeString ==
"2")
theBlade = 2;
195 else if (bladeString ==
"3")
theBlade = 3;
196 else if (bladeString ==
"4")
theBlade = 4;
197 else if (bladeString ==
"5")
theBlade = 5;
198 else if (bladeString ==
"6")
theBlade = 6;
199 else if (bladeString ==
"7")
theBlade = 7;
200 else if (bladeString ==
"8")
theBlade = 8;
201 else if (bladeString ==
"9")
theBlade = 9;
202 else if (bladeString ==
"10")
theBlade = 10;
203 else if (bladeString ==
"11")
theBlade = 11;
204 else if (bladeString ==
"12")
theBlade = 12;
205 else if (bladeString ==
"13")
theBlade = 13;
206 else if (bladeString ==
"14")
theBlade = 14;
207 else if (bladeString ==
"15")
theBlade = 15;
208 else if (bladeString ==
"16")
theBlade = 16;
209 else if (bladeString ==
"17")
theBlade = 17;
212 <<
"Unable to determine blade number in PixelEndcapName::PixelEndcapName(std::string): "
218 string ringString = name.substr(name.find(
"_RNG")+4, name.size()-name.find(
"_RNG")-4);
220 else if (ringString ==
"2")
thePannel = 2;
223 <<
"Unable to determine ring number in PixelEndcapName::PixelEndcapName(std::string): "
230 string panelString = name.substr(name.find(
"_PNL")+4, name.find(
"_PLQ")-name.find(
"_PNL")-4);
232 else if (panelString ==
"2")
thePannel = 2;
235 <<
"Unable to determine panel number in PixelEndcapName::PixelEndcapName(std::string): "
241 string plaquetteString = name.substr(name.find(
"_PLQ")+4, name.size()-name.find(
"_PLQ")-4);
248 <<
"Unable to determine plaquette number in PixelEndcapName::PixelEndcapName(std::string): "
300 std::ostringstream stm;
313 default: out <<
"unknown";
329 if (hc ==
mO || hc ==
mI) side = 1;
330 else if (hc ==
pO || hc ==
pI) side = 2;
333 disk =
static_cast<uint32_t
>(
diskName());
334 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
339 outer = (hc ==
mO) || (hc ==
pO);
345 if (tmpBlade>=7 && tmpBlade<=17)
theBlade = tmpBlade+6;
346 else if (tmpBlade>=32 && tmpBlade<=48)
theBlade = 60-tmpBlade;
348 if (tmpBlade<=6 )
theBlade = 7-tmpBlade;
349 else if (tmpBlade>=18 && tmpBlade<=31)
theBlade = 38-tmpBlade;
350 else if (tmpBlade>=49 && tmpBlade<=56)
theBlade = 77-tmpBlade;
353 module =
static_cast<uint32_t
>(
ringName());
358 blade = tmpBlade + 6;
360 if (tmpBlade <= 6) blade = 7 - tmpBlade;
361 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
365 if(pilot_blade &&
theDisk==3 ) {
367 if(blade<=5) blade -=3;
395 if (hc ==
mO || hc ==
mI) side = 1;
396 else if (hc ==
pO || hc ==
pI) side = 2;
399 disk =
static_cast<uint32_t
>(
diskName());
400 uint32_t tmpBlade =
static_cast<uint32_t
>(
bladeName());
405 outer = (hc ==
mO) || (hc ==
pO);
411 if (tmpBlade>=7 && tmpBlade<=17)
theBlade = tmpBlade+6;
412 else if (tmpBlade>=32 && tmpBlade<=48)
theBlade = 60-tmpBlade;
414 if (tmpBlade<=6 )
theBlade = 7-tmpBlade;
415 else if (tmpBlade>=18 && tmpBlade<=31)
theBlade = 38-tmpBlade;
416 else if (tmpBlade>=49 && tmpBlade<=56)
theBlade = 77-tmpBlade;
419 module =
static_cast<uint32_t
>(
ringName());
423 blade = tmpBlade + 6;
425 if (tmpBlade <= 6) blade = 7 - tmpBlade;
426 else if (tmpBlade <= 12) blade = 31 - tmpBlade;
430 if(pilot_blade &&
theDisk==3 ) {
432 if(blade<=5) blade -=3;
441 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