Functions | |
| int | ShieldPlaneToIndex (int Plane) |
| int | ShieldIndexToPlane (int index) |
| const char * | UnderSection (double MinZ, double MaxZ) |
| bool | UnderSection (int Section, double MinZ, double MaxZ) |
| const char * | OldUnderSection (double MinZ, double MaxZ) |
| bool | OldUnderSection (int Section, double MinZ, double MaxZ) |
| const char * | OldUnderSection (int MinPlane, int MaxPlane) |
| bool | OldUnderSection (int Section, int MinPlane, int MaxPlane) |
| short | ShieldPMT (int Plane, int &Section, char &Side, int &PMT) |
| short | ShieldPMTId (int Plane) |
| short | ShieldPMTFromId (short Id, int &Section, char &Side, int &PMT) |
| bool | ShieldPlanesAdjacent (int Plane1, int Plane2) |
Variables | |
| const double | ShieldSection1MinZCoverage = -1. |
| const double | ShieldSection1MaxZCoverage = 8.63 |
| const double | ShieldSection2MinZCoverage = 6.88 |
| const double | ShieldSection2MaxZCoverage = 16.46 |
| const double | ShieldSection3MinZCoverage = 14.30 |
| const double | ShieldSection3MaxZCoverage = 24.34 |
| const double | ShieldSection4MinZCoverage = 21.08 |
| const double | ShieldSection4MaxZCoverage = 31. |
| const double | ShSectZCoverage [] |
|
||||||||||||||||
|
Definition at line 114 of file UtilShield.cxx. 00115 {
00116 if(Section==1 && MaxPlane>= 0 && MinPlane<=136) return true;
00117 if(Section==2 && MaxPlane>=126 && MinPlane<=249) return true;
00118 if(Section==3 && MaxPlane>=249 && MinPlane<=375) return true;
00119 if(Section==4 && MaxPlane>=359 && MinPlane<=485) return true;
00120 return false;
00121 }
|
|
||||||||||||
|
Definition at line 102 of file UtilShield.cxx. 00103 {
00104 if(MaxPlane<=126) return "Section 1";
00105 if(MinPlane<=134) return "Section 1 and 2";
00106 if(MaxPlane<=249) return "Section 2";
00107
00108 if(MaxPlane<=359) return "Section 3";
00109 if(MinPlane<=375) return "Section 3 and 4";
00110 if(MaxPlane<=486) return "Section 4";
00111 return "WTF";
00112 }
|
|
||||||||||||||||
|
Definition at line 93 of file UtilShield.cxx. 00094 {
00095 if(Section==1 && MaxZ> 0.0 && MinZ< 8.0) return true;
00096 if(Section==2 && MaxZ> 7.5 && MinZ<15.4) return true;
00097 if(Section==3 && MaxZ>15.4 && MinZ<23.4) return true;
00098 if(Section==4 && MaxZ>22.4 && MinZ<31.0) return true;
00099 return false;
00100 }
|
|
||||||||||||
|
Definition at line 81 of file UtilShield.cxx. 00082 {
00083 if(MaxZ<7.5) return "Section 1";
00084 if(MinZ<8.0) return "Section 1 and 2";
00085 if(MaxZ<15.4) return "Section 2";
00086
00087 if(MaxZ<22.4) return "Section 3";
00088 if(MinZ<23.4) return "Section 3 and 4";
00089 if(MaxZ<31.) return "Section 4";
00090 return "WTF";
00091 }
|
|
|
Definition at line 24 of file UtilShield.cxx. 00025 {
00026 if(index<0 || 167<index) return -1;
00027 int Plane = index + 528;
00028 if(index > 31) Plane += 3;
00029 if(index > 37) Plane += 3;
00030 if(index > 41) Plane += 16;
00031 if(index > 73) Plane += 3;
00032 if(index > 79) Plane += 3;
00033 if(index > 83) Plane += 16;
00034 if(index > 115) Plane += 3;
00035 if(index > 121) Plane += 3;
00036 if(index > 125) Plane += 16;
00037 if(index > 157) Plane += 3;
00038 if(index > 163) Plane += 3;
00039 return Plane;
00040 }
|
|
||||||||||||
|
Definition at line 214 of file UtilShield.cxx. 00215 {
00216 //To save later ugliness
00217 if(Plane2 == Plane1) return true;
00218
00219 //Find the higher and lower of the two planes
00220 int PlaneH(0), PlaneL(0);
00221 if (Plane2 > Plane1) {PlaneH = Plane2; PlaneL = Plane1;}
00222 else {PlaneH = Plane1; PlaneL = Plane2;}
00223
00224 //Make sure these are shield planes
00225 if(PlaneH > 767 || PlaneL < 528) return false;
00226
00227 //Adjacent planes should be +1 away from each other
00228 if(PlaneH != PlaneL+1) return false;
00229
00230 //Lower Wall Sub-Section
00231 if(PlaneL==558 || PlaneL==567 || //Section 1 East and West
00232 PlaneL==622 || PlaneL==631 || //Section 2 East and West
00233 PlaneL==686 || PlaneL==695 || //Section 3 East and West
00234 PlaneL==750 || PlaneL==759) //Section 4 East and West
00235 return true;
00236
00237 //Upper Wall Sub-Section
00238 if((PlaneL>=563 && PlaneH<=566) || (PlaneL>=572 && PlaneH<=575) ||
00239 (PlaneL>=627 && PlaneH<=630) || (PlaneL>=636 && PlaneH<=639) ||
00240 (PlaneL>=691 && PlaneH<=694) || (PlaneL>=700 && PlaneH<=703) ||
00241 (PlaneL>=755 && PlaneH<=758) || (PlaneL>=764 && PlaneH<=767))
00242 return true;
00243
00244 //Top Shield Sub-Section
00245 if((PlaneL>=528 && PlaneH<=542) || (PlaneL>=543 && PlaneH<=557) ||
00246 (PlaneL>=592 && PlaneH<=606) || (PlaneL>=607 && PlaneH<=621) ||
00247 (PlaneL>=656 && PlaneH<=670) || (PlaneL>=671 && PlaneH<=685) ||
00248 (PlaneL>=720 && PlaneH<=734) || (PlaneL>=735 && PlaneH<=749))
00249 return true;
00250
00251 return false;
00252 }
|
|
|
Definition at line 6 of file UtilShield.cxx. 00007 {
00008 if(Plane<528 || 767<Plane) return -1;
00009 int index = Plane - 528;
00010 if(Plane > 559) index -= 3;
00011 if(Plane > 568) index -= 3;
00012 if(Plane > 575) index -= 16;
00013 if(Plane > 623) index -= 3;
00014 if(Plane > 632) index -= 3;
00015 if(Plane > 639) index -= 16;
00016 if(Plane > 687) index -= 3;
00017 if(Plane > 696) index -= 3;
00018 if(Plane > 703) index -= 16;
00019 if(Plane > 751) index -= 3;
00020 if(Plane > 760) index -= 3;
00021 return index;
00022 }
|
|
||||||||||||||||||||
|
Definition at line 124 of file UtilShield.cxx. Referenced by ShieldPMTId(). 00125 {
00126 if (Plane < 528 || Plane > 767) {
00127 Section = -1;
00128 Side = '0';
00129 PMT = -1;
00130 return -1;
00131 }
00132
00133 if(Plane>=528 && Plane < 592) Section = 1;
00134 if(Plane>=592 && Plane < 656) Section = 2;
00135 if(Plane>=656 && Plane < 720) Section = 3;
00136 if(Plane>=720) Section = 4;
00137
00138 switch (Plane) {
00139 case 558: case 559: case 563: case 564: case 565: case 566: //Section 1
00140 case 622: case 623: case 627: case 628: case 629: case 630: //Section 2
00141 case 686: case 687: case 691: case 692: case 693: case 694: //Section 3
00142 case 750: case 751: case 755: case 756: case 757: case 758: //Section 4
00143 Side='E'; PMT=0; break;
00144 case 533: case 534: case 535: case 548: case 549: //Section 2
00145 case 597: case 598: case 599: case 612: case 613: //Section 1
00146 case 661: case 662: case 663: case 676: case 677: //Section 3
00147 case 725: case 726: case 727: case 740: case 741: //Section 4
00148 Side='E'; PMT=1; break;
00149 case 543: case 544: case 545: case 546: case 547: //Section 1
00150 case 607: case 608: case 609: case 610: case 611: //Section 2
00151 case 671: case 672: case 673: case 674: case 675: //Section 3
00152 case 735: case 736: case 737: case 738: case 739: //Section 4
00153 Side='E'; PMT=2; break;
00154 case 528: case 529: case 530: case 531: case 532: //Section 1
00155 case 592: case 593: case 594: case 595: case 596: //Section 2
00156 case 656: case 657: case 658: case 659: case 660: //Section 3
00157 case 720: case 721: case 722: case 723: case 724: //Section 4
00158 Side='E'; PMT=3; break;
00159
00160 case 567: case 568: case 572: case 573: case 574: case 575: //Section 1
00161 case 631: case 632: case 636: case 637: case 638: case 639: //Section 2
00162 case 695: case 696: case 700: case 701: case 702: case 703: //Section 3
00163 case 759: case 760: case 764: case 765: case 766: case 767: //Section 4
00164 Side='W'; PMT=0; break;
00165 case 536: case 537: case 550: case 551: case 552: //Section 1
00166 case 600: case 601: case 614: case 615: case 616: //Section 2
00167 case 664: case 665: case 678: case 679: case 680: //Section 3
00168 case 728: case 729: case 742: case 743: case 744: //Section 4
00169 Side='W'; PMT=1; break;
00170 case 553: case 554: case 555: case 556: case 557: //Section 1
00171 case 617: case 618: case 619: case 620: case 621: //Section 2
00172 case 681: case 682: case 683: case 684: case 685: //Section 3
00173 case 745: case 746: case 747: case 748: case 749: //Section 4
00174 Side='W'; PMT=2; break;
00175 case 538: case 539: case 540: case 541: case 542: //Section 1
00176 case 602: case 603: case 604: case 605: case 606: //Section 2
00177 case 666: case 667: case 668: case 669: case 670: //Section 3
00178 case 730: case 731: case 732: case 733: case 734: //Section 4
00179 Side='W'; PMT=3; break;
00180 default:
00181 Section=-1; Side='0'; PMT=-1; break;
00182 }
00183
00184 short BitPackedId = 0;
00185 if (Section>0 && Section<5 && PMT>-1 && PMT<4 && (Side=='E' || Side=='W')) {
00186 BitPackedId += Section-1;
00187 BitPackedId += (PMT<<2);
00188 if(Side == 'E') BitPackedId += (1<<4);
00189 }
00190
00191 return BitPackedId;
00192 }
|
|
||||||||||||||||||||
|
Definition at line 204 of file UtilShield.cxx. 00205 {
00206 Section = (Id&3)+1;
00207 PMT = (Id>>2)&3;
00208 Side = (Id>>4)&1 ? 'E' : 'W';
00209
00210 return Id;
00211 }
|
|
|
Definition at line 195 of file UtilShield.cxx. References ShieldPMT(). 00196 {
00197 int Section(0), PMT(0);
00198 char Side;
00199
00200 return ShieldPMT(Plane, Section, Side, PMT);
00201 }
|
|
||||||||||||||||
|
Definition at line 73 of file UtilShield.cxx. References ShSectZCoverage. 00074 {
00075 int isectminz = (Section-1) * 2;
00076 int isectmaxz = isectminz + 1;
00077 return ((MaxZ>ShSectZCoverage[isectminz]) ||
00078 (MinZ<ShSectZCoverage[isectmaxz]));
00079 }
|
|
||||||||||||
|
Definition at line 61 of file UtilShield.cxx. 00062 {
00063 if(MaxZ<ShieldSection2MinZCoverage) return "Section 1";
00064 if(MinZ<ShieldSection1MaxZCoverage) return "Section 1 and 2";
00065 if(MaxZ<ShieldSection3MinZCoverage) return "Section 2";
00066 if(MinZ<ShieldSection2MaxZCoverage) return "Section 2 and 3";
00067 if(MaxZ<ShieldSection4MinZCoverage) return "Section 3";
00068 if(MinZ<ShieldSection3MaxZCoverage) return "Section 3 and 4";
00069 if(MaxZ<ShieldSection4MaxZCoverage) return "Section 4";
00070 return "WTF";
00071 }
|
|
|
Definition at line 44 of file UtilShield.cxx. |
|
|
Definition at line 43 of file UtilShield.cxx. |
|
|
Definition at line 47 of file UtilShield.cxx. |
|
|
Definition at line 46 of file UtilShield.cxx. |
|
|
Definition at line 50 of file UtilShield.cxx. |
|
|
Definition at line 49 of file UtilShield.cxx. |
|
|
Definition at line 53 of file UtilShield.cxx. |
|
|
Definition at line 52 of file UtilShield.cxx. |
|
|
Initial value:
{ShieldSection1MinZCoverage, ShieldSection1MaxZCoverage,
ShieldSection2MinZCoverage, ShieldSection2MaxZCoverage,
ShieldSection3MinZCoverage, ShieldSection3MaxZCoverage,
ShieldSection4MinZCoverage, ShieldSection4MaxZCoverage}
Definition at line 55 of file UtilShield.cxx. Referenced by UnderSection(). |
1.3.9.1