20 assert( ieta>0 && ieta<=85 );
21 if( iphi<0 ) iphi+=360;
22 assert( iphi>0 && iphi<=360 );
32 assert( ieta>0 && ieta<=85 );
36 if( iphi_>360 ) iphi_-=360;
37 assert( iphi_>0 && iphi_<=360 );
39 int ism = (iphi_-1)/20 + 1;
40 assert( ism>=1 && ism<=18 );
42 if( iz==-1 ) ism += 18;
50 int ism = sm( ieta, iphi );
51 return dccFromSm( ism );
57 assert( ism>=1 && ism<=36 );
61 assert( ism>=1 && ism<=18 );
63 if( iz==+1 ) idcc+=18;
70 if( idcc>600 ) idcc-=600;
71 assert( idcc>=10 && idcc<=45 );
81 assert( ism>=1 && ism<=36 );
95 std::pair<EBLocalCoord,EBLocalCoord> ixy = localCoord( ieta, iphi );
96 return lm_channel( ixy.first/5, ixy.second/5 );
102 std::pair<EBLocalCoord,EBLocalCoord> ixy = localCoord( ieta, iphi );
103 return tt_channel( ixy.first/5, ixy.second/5 );
109 std::pair<EBLocalCoord,EBLocalCoord> ixy = localCoord( ieta, iphi );
110 return crystal_channel( ixy.first, ixy.second );
116 int ilmmod = lmmod( ieta, iphi );
117 return (ilmmod%2==0)?1:0;
123 int idcc = dcc( ieta, iphi );
125 int iside = side( ieta, iphi );
126 int ilmr = 1 + 2*(ism-1) + iside;
130 std::pair< MEEBGeom::EBLocalCoord, MEEBGeom::EBLocalCoord >
136 assert( ieta>0 && ieta<=85 );
140 if( iphi_>360 ) iphi_-=360;
141 assert( iphi_>0 && iphi_<=360 );
145 int iy = (iphi_-1)%20;
146 if( iz==-1 ) iy = 19-iy;
149 return std::pair< EBLocalCoord, EBLocalCoord >(ix,iy);
152 std::pair< MEEBGeom::EBLocalCoord, MEEBGeom::EBLocalCoord >
155 assert( icr>=1 && icr<=1700 );
157 int iy = 19 - (icr-1)%20;
158 return std::pair< EBLocalCoord, EBLocalCoord >(ix,iy);
161 std::pair< MEEBGeom::EBGlobalCoord, MEEBGeom::EBGlobalCoord >
164 assert( ism>=1 && ism<=36 );
174 if( iz==-1 ) iy = 19-iy;
180 int iphi = 1 + iy + 20*(ism-1);
182 return std::pair< EBGlobalCoord, EBGlobalCoord >(ieta,iphi);
185 std::pair< float, float >
188 assert( ism>=1 && ism<=36 );
195 if( iz==-1 ) y = 19-y;
200 float phi = 1 + y + 20*(ism-1);
202 return std::pair< float, float >(
eta,phi);
205 std::pair< MEEBGeom::EBGlobalCoord, MEEBGeom::EBGlobalCoord >
208 assert( ism>=1 && ism<=36 );
209 assert( icr>=1 && icr<=1700 );
212 int iy = 19 - (icr-1)%20;
214 return globalCoord( ism, ix, iy );
224 1, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8,
225 1, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8,
226 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9,
227 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9
231 int iym, ixm, il, ic,
ii;
239 if(ii < 0 || ii > (
int)(
sizeof(idx_)/
sizeof(
int))) {
return -1; };
250 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2,
251 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2,
252 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2,
253 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2
257 int iym, ixm, il, ic,
ii;
265 if(ii < 0 || ii > (
int)(
sizeof(idx_)/
sizeof(
int))) {
return -1; };
276 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33,
277 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33,
278 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34,
279 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34
283 int iym, ixm, il, ic,
ii;
291 if(ii < 0 || ii > (
int)(
sizeof(idx_)/
sizeof(
int))) {
return -1; };
302 1, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16,
303 1, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16,
304 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17,
305 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17
309 int iym, ixm, il, ic,
ii;
317 if(ii < 0 || ii > (
int)(
sizeof(idx_)/
sizeof(
int))) {
return -1; };
335 int icr = 20*ix + 19-iy + 1;
345 int itt = tt_channel( iX, iY );
346 int type = tt_type( iX, iY );
350 if( iVFE%2==1 ) islot = 6-islot;
351 int icr = 5*(iVFE-1)+(islot-1);
366 if( type==iSuperModule )
370 else if( type==iLMRegion )
382 if( global ) ism = ism_;
397 if( type==iSuperModule )
411 else if( type==iLMRegion )
423 iy[0] = iymin+10-0.5;
429 iy[3] = iymin+10-0.5;
443 iy[3] = iymax-10+0.5;
445 iy[4] = iymax-10+0.5;
457 std::pair<float,float>
xy = globalCoord( ism, ix[
ii], iy[ii] );
475 return new TGraph( n, ix, iy );
478 std::pair< int, int >
483 case 1:
return std::pair<int,int>( 0, 5 );
484 case 2:
return std::pair<int,int>( 1, 6 );
485 case 3:
return std::pair<int,int>( 1, 6 );
486 case 4:
return std::pair<int,int>( 2, 7 );
487 case 5:
return std::pair<int,int>( 2, 7 );
488 case 6:
return std::pair<int,int>( 3, 8 );
489 case 7:
return std::pair<int,int>( 3, 8 );
490 case 8:
return std::pair<int,int>( 4, 9 );
491 case 9:
return std::pair<int,int>( 4, 9 );
495 return std::pair<int,int>(-1,-1);
502 int idcc = dccAndSide_.first;
503 return std::pair<int,int>( idcc, idcc );
510 int iside = dccAndSide_.second;
511 std::vector< int > vec;
512 for(
int ilmmod=1; ilmmod<=9; ilmmod++ )
514 if( (ilmmod+iside)%2==1 ) vec.push_back(ilmmod);
554 std::vector< int > vec;
557 case 1: vec.push_back(0); vec.push_back(24);
break;
558 case 2: vec.push_back(0); vec.push_back(24);
break;
559 case 3: vec.push_back(0); vec.push_back(24);
break;
560 case 4: vec.push_back(0); vec.push_back(24);
break;
561 case 5: vec.push_back(0); vec.push_back(24);
break;
562 case 6: vec.push_back(0); vec.push_back(24);
break;
563 case 7: vec.push_back(0); vec.push_back(24);
break;
564 case 8: vec.push_back(0); vec.push_back(24);
break;
565 case 9: vec.push_back(0); vec.push_back(24);
break;
static XYCoord localCoord(int icr)
static int smFromDcc(int idcc)
static std::vector< int > apdRefChannels(int ilmmod)
static TString smName(int ism)
static int crystal(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
static int tt_type(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
static std::pair< int, int > pn(int ilmmod)
static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy)
static TGraph * getGraphBoundary(int type, int num, bool global=false)
static std::pair< int, int > dccAndSide(int ilmr)
static int apdRefTower(int ilmmod)
static int lv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
static std::pair< int, int > memFromLmr(int ilmr)
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int hv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Geom::Phi< T > phi() const
static int barrel(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int sm(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int dcc(EBGlobalCoord ieta, EBGlobalCoord iphi)
int ism(int ieta, int iphi)
static int dccFromSm(int ism)
static int tt(EBGlobalCoord ieta, EBGlobalCoord iphi)
static std::vector< int > lmmodFromLmr(int ilmr)