#include <DataFormats/EcalDetId/interface/EEDetId.h>
Public Types | |
enum | { Subdet = EcalEndcap } |
Public Member Functions | |
EEDetId (const DetId &id) | |
Constructor from a generic cell id. | |
EEDetId (int i, int j, int iz, int mode=XYMODE) | |
Constructor from crystal ix,iy,iz (iz=+1/-1) or from sc,cr,iz. | |
EEDetId (uint32_t rawid) | |
Constructor from a raw value. | |
EEDetId () | |
Constructor of a null id. | |
int | hashedIndex () const |
get a compact index for arrays | |
int | ic () const |
get crystal number inside SuperCrystal | |
int | iPhiOuterRing () const |
int | iquadrant () const |
get the quadrant of the DetId | |
int | isc () const |
get the SuperCrystal number | |
int | ix () const |
get the crystal ix | |
int | iy () const |
get the crystal iy | |
EEDetId & | operator= (const DetId &id) |
assignment operator | |
bool | positiveZ () const |
int | zside () const |
get the z-side of the crystal (1/-1) | |
Static Public Member Functions | |
static EEDetId | idOuterRing (int iPhi, int zEnd) |
static bool | isNextToBoundary (EEDetId id) |
static bool | isNextToDBoundary (EEDetId id) |
static bool | isNextToRingBoundary (EEDetId id) |
static EcalSubdetector | subdet () |
get the subdetector | |
static EEDetId | unhashIndex (int hi) |
get a DetId from a compact index for arrays | |
static bool | validDetId (int i, int j, int iz) |
check if a valid index combination | |
static bool | validHashIndex (int i) |
check if a valid hash index | |
Static Public Attributes | |
static const int | ICR_FD = 3870 |
static const int | ICR_FEE = 7740 |
static const int | ICR_MAX = 25 |
static const int | ICR_MIN = 1 |
static const int | ISC_MAX = 316 |
static const int | ISC_MIN = 1 |
static const int | IX_MAX = 100 |
static const int | IX_MIN = 1 |
static const int | IY_MAX = 100 |
static const int | IY_MIN = 1 |
static const int | MAX_HASH = 2*ICR_FEE-1 |
static const int | MIN_HASH = 0 |
static const int | SCCRYSTALMODE = 1 |
static const int | SIZE_HASH = 2*ICR_FEE |
static const int | XYMODE = 0 |
Private Member Functions | |
bool | isOuterRing () const |
int | ix (int iSC, int iCrys) const |
int | ixQuadrantOne () const |
int | iy (int iSC, int iCrys) const |
int | iyQuadrantOne () const |
Static Private Member Functions | |
static bool | isOuterRingXY (int ax, int ay) |
Static Private Attributes | |
static const int | iYoffset [nCols+1] = { 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0 } |
static const int | nBegin [IX_MAX] = { 41, 41, 41, 36, 36, 26, 26, 26, 21, 21, 21, 21, 21, 16, 16, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 16, 16, 21, 21, 21, 21, 21, 26, 26, 26, 36, 36, 41, 41, 41 } |
static const int | nCols = 10 |
static const int | nCrys = 5 |
static const int | nIntegral [IX_MAX] = { 0, 20, 40, 60, 90, 120, 170, 220, 270, 330, 390, 450, 510, 570, 640, 710, 784, 858, 932, 1006, 1080, 1164, 1248, 1332, 1416, 1500, 1590, 1680, 1770, 1860, 1950, 2040, 2130, 2220, 2310, 2400, 2494, 2588, 2682, 2776, 2870, 2970, 3070, 3170, 3270, 3370, 3470, 3570, 3670, 3770, 3870, 3970, 4070, 4170, 4270, 4370, 4470, 4570, 4670, 4770, 4870, 4964, 5058, 5152, 5246, 5340, 5430, 5520, 5610, 5700, 5790, 5880, 5970, 6060, 6150, 6240, 6324, 6408, 6492, 6576, 6660, 6734, 6808, 6882, 6956, 7030, 7100, 7170, 7230, 7290, 7350, 7410, 7470, 7520, 7570, 7620, 7650, 7680, 7700, 7720 } |
static const int | QuadColLimits [nCols+1] = { 0, 8,17,27,36,45,54,62,70,76,79 } |
Definition at line 17 of file EEDetId.h.
anonymous enum |
EEDetId::EEDetId | ( | ) | [inline] |
Constructor of a null id.
Definition at line 21 of file EEDetId.h.
Referenced by idOuterRing(), and unhashIndex().
EEDetId::EEDetId | ( | uint32_t | rawid | ) | [inline] |
Constructor from crystal ix,iy,iz (iz=+1/-1) or from sc,cr,iz.
Definition at line 14 of file EEDetId.cc.
References Exception, DetId::id_, ix(), iy(), SCCRYSTALMODE, validDetId(), and XYMODE.
00014 : DetId( Ecal, EcalEndcap ) 00015 { 00016 int crystal_ix=0; 00017 int crystal_iy=0; 00018 if (mode == XYMODE) 00019 { 00020 crystal_ix = index1; 00021 crystal_iy = index2; 00022 } 00023 else if (mode == SCCRYSTALMODE) 00024 { 00025 int SC = index1; 00026 int crystal = index2; 00027 // std::cout << "iz " << iz << " SC " << index1 << "crystal " << index2 << std::endl; 00028 00029 crystal_ix=iz*ix(SC,crystal); 00030 if (crystal_ix<0) 00031 crystal_ix++; 00032 crystal_ix+=50; 00033 crystal_iy=iy(SC,crystal); 00034 if (crystal_iy<0) 00035 crystal_iy++; 00036 crystal_iy+=50; 00037 00038 } 00039 else 00040 { 00041 throw cms::Exception("InvalidDetId") << "EEDetId: Cannot create object. Unknown mode for (int, int, int) constructor."; 00042 } 00043 00044 if (!validDetId(crystal_ix,crystal_iy,iz)) 00045 { 00046 throw cms::Exception("InvalidDetId") << "EEDetId: Cannot create object. Indexes out of bounds \n" 00047 << "x = " << crystal_ix << " y = " << crystal_iy << " z = " << iz; 00048 } 00049 00050 id_|=(crystal_iy&0x7f)|((crystal_ix&0x7f)<<7)|((iz>0)?(0x4000):(0)); 00051 }
EEDetId::EEDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id.
Definition at line 53 of file EEDetId.cc.
References DetId::det(), DetId::Ecal, EcalEndcap, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
00054 { 00055 if (!gen.null() && (gen.det()!=Ecal || gen.subdetId()!=EcalEndcap)) { 00056 throw cms::Exception("InvalidDetId"); 00057 } 00058 id_ = gen.rawId(); 00059 }
int EEDetId::hashedIndex | ( | ) | const [inline] |
get a compact index for arrays
Definition at line 56 of file EEDetId.h.
References ICR_FEE, ix(), iy(), nBegin, nIntegral, and positiveZ().
Referenced by EcalURecHitHists::analyze(), EcalGetLaserData::analyze(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), popcon::EcalPedestalsHandler::getNewObjectsH2(), and EcalMipGraphs::selectEEHits().
00057 { 00058 return ( iy() - nBegin[ ix() - 1 ] + 00059 nIntegral[ ix() - 1 ] + 00060 ( positiveZ() ? ICR_FEE : 0 ) ) ; 00061 }
int EEDetId::ic | ( | ) | const |
get crystal number inside SuperCrystal
Definition at line 279 of file EEDetId.cc.
References iquadrant(), ixQuadrantOne(), iyQuadrantOne(), and nCrys.
Referenced by EcalURecHitHists::analyze(), and DetIdInfo::info().
00280 { 00281 /* 00282 * Return crystal number from (x,y) coordinates. 00283 * 00284 * Author : B W Kennedy 00285 * Version : 1.00 00286 * Created : 5 May 2006 00287 * Last Mod : 00288 * 00289 * Input : ix, iy - (x,y) position of crystal 00290 */ 00291 00292 /* Useful constants . */ 00293 int iQuadrant = iquadrant(); 00294 int icrCol=-1; 00295 int icrRow=-1; 00296 00297 if (iQuadrant == 1 || iQuadrant == 3) 00298 { 00299 icrCol=(ixQuadrantOne()-1) % nCrys; 00300 icrRow=(iyQuadrantOne()-1) % nCrys; 00301 } 00302 00303 else if (iQuadrant == 2 || iQuadrant == 4) 00304 { 00305 icrRow=(ixQuadrantOne()-1) % nCrys; 00306 icrCol=(iyQuadrantOne()-1) % nCrys; 00307 } 00308 00309 int icrys = 5*icrCol + icrRow + 1; 00310 00311 return icrys; 00312 }
Definition at line 390 of file EEDetId.cc.
References EEDetId(), IX_MAX, and IY_MAX.
Referenced by EcalBarrelGeometry::getClosestEndcapCells().
00391 { 00392 iPhi -= 10 ; // phi=1 in barrel is at -10deg 00393 while( iPhi < 1 ) iPhi+=360 ; 00394 while( iPhi > 360 ) iPhi-=360 ; 00395 00396 const int index1 ( iPhi - 1 ) ; 00397 const int quad ( index1/90 ) ; 00398 int indexq ( index1 - quad*90 + 1 ) ; 00399 if( 0==quad || 2==quad ) indexq = 91 - indexq ; 00400 const int indexh ( indexq > 45 ? 91 - indexq : indexq ) ; 00401 const int axh ( indexh<=10 ? indexh : 00402 ( indexh<=12 ? 10 : 00403 ( indexh<=17 ? indexh - 2 : 00404 ( indexh<=18 ? 15 : 00405 ( indexh<=28 ? indexh - 3 : 00406 ( indexh<=30 ? 25 : 00407 ( indexh<=35 ? indexh - 5 : 00408 ( indexh<=39 ? 30 : 00409 ( indexh<=44 ? indexh - 9 : 35 ))))))))) ; 00410 const int ayh ( indexh<=10 ? 50 : 00411 ( indexh<=12 ? 60 - indexh : 00412 ( indexh<=17 ? 47 : 00413 ( indexh<=18 ? 64 - indexh : 00414 ( indexh<=28 ? 45 : 00415 ( indexh<=30 ? 73 - indexh : 00416 ( indexh<=35 ? 42 : 00417 ( indexh<=39 ? 77 - indexh : 00418 ( indexh<=44 ? 37 : 36 ))))))))) ; 00419 const int bxh ( indexq>45 ? ayh : axh ) ; 00420 const int byh ( indexq>45 ? axh : ayh ) ; 00421 const int cx ( ( quad==0 || quad==3 ? bxh : -bxh+1 ) + IX_MAX/2 ) ; 00422 const int cy ( ( quad==0 || quad==1 ? byh : -byh+1 ) + IY_MAX/2 ) ; 00423 00424 return EEDetId( cx, cy, ( zEnd > 0 ? 1 : -1 ) ) ; 00425 }
int EEDetId::iPhiOuterRing | ( | ) | const |
Definition at line 343 of file EEDetId.cc.
References funct::abs(), iquadrant(), isOuterRing(), ix(), IX_MAX, iy(), and IY_MAX.
Referenced by PFRecHitProducerECAL::stdsimplemove().
00344 { 00345 int returnValue ( 0 ) ; 00346 if( isOuterRing() ) 00347 { 00348 const int ax ( abs( ix() - IX_MAX/2 ) ) ; 00349 const int ay ( abs( iy() - IY_MAX/2 ) ) ; 00350 returnValue = ax + 50 - ay ; 00351 if( ay <= 47 ) --returnValue ; 00352 if( ay <= 45 ) --returnValue ; 00353 if( ay <= 42 ) --returnValue ; 00354 if( ay <= 37 ) --returnValue ; 00355 if( ay <= 35 ) --returnValue ; 00356 if( ay <= 30 ) --returnValue ; 00357 if( ay <= 25 ) --returnValue ; 00358 if( ay <= 15 ) --returnValue ; 00359 if( ay <= 10 ) --returnValue ; 00360 const int iq ( iquadrant() ) ; 00361 if( 1==iq ) 00362 { 00363 returnValue = 91 - returnValue ; 00364 } 00365 else 00366 { 00367 if( 2==iq ) 00368 { 00369 returnValue += 90 ; 00370 } 00371 else 00372 { 00373 if( 3==iq ) 00374 { 00375 returnValue = 271 - returnValue ; 00376 } 00377 else 00378 { 00379 returnValue += 270 ; 00380 } 00381 } 00382 } 00383 returnValue = 1 + ( 360 + returnValue - 10 -1 )%360 ; 00384 } 00385 // if( positiveZ() ) returnValue += 360 ; 00386 return returnValue ; 00387 }
int EEDetId::iquadrant | ( | ) | const |
get the quadrant of the DetId
Definition at line 227 of file EEDetId.cc.
Referenced by EcalTrigTowerConstituentsMap::changeEEDetIdQuadrantAndZ(), EcalBarrelGeometry::getClosestEndcapCells(), ic(), DetIdInfo::info(), iPhiOuterRing(), isc(), ixQuadrantOne(), iyQuadrantOne(), and EcalTrigTowerConstituentsMap::wrapEEDetId().
00228 { 00229 if (ix()>50) 00230 { 00231 if(iy()>50) 00232 return 1; 00233 else 00234 return 4; 00235 } 00236 else 00237 { 00238 if(iy()>50) 00239 return 2; 00240 else 00241 return 3; 00242 } 00243 //Should never be reached 00244 return -1; 00245 }
int EEDetId::isc | ( | ) | const |
get the SuperCrystal number
Definition at line 247 of file EEDetId.cc.
References int, iquadrant(), ixQuadrantOne(), iYoffset, iyQuadrantOne(), nCols, nCrys, and QuadColLimits.
Referenced by DetIdInfo::info().
00248 { 00249 /* 00250 * Return SC number from (x,y) coordinates. 00251 * 00252 * Author : B W Kennedy 00253 * Version : 1.00 00254 * Created : 5 May 2006 00255 * Last Mod : 00256 * 00257 * Input : ix, iy - (x,y) position of crystal 00258 */ 00259 00260 int iCol = int((ixQuadrantOne() - 1)/nCrys) + 1; 00261 int iRow = int((iyQuadrantOne() - 1)/nCrys) + 1; 00262 int nSCinQuadrant = QuadColLimits[nCols]; 00263 int iSC; 00264 00265 if (iRow <= iYoffset[iCol]) 00266 return -1; 00267 else 00268 iSC = QuadColLimits[iCol-1] + iRow - iYoffset[iCol]; 00269 00270 if (iSC > QuadColLimits[iCol]) 00271 return -2; 00272 00273 if (iSC>0) 00274 iSC += nSCinQuadrant*(iquadrant()-1); 00275 00276 return iSC; 00277 }
Definition at line 316 of file EEDetId.cc.
References isNextToDBoundary(), and isNextToRingBoundary().
00317 { 00318 return isNextToDBoundary( id ) || isNextToRingBoundary( id ) ; 00319 }
Definition at line 322 of file EEDetId.cc.
Referenced by isNextToBoundary().
00323 { 00324 // hardcoded values for D boundary 00325 return id.ix() == 50 || id.ix() == 51 ; 00326 }
Definition at line 330 of file EEDetId.cc.
References i, ix(), iy(), j, validDetId(), and zside().
Referenced by isNextToBoundary().
00331 { 00332 for (int i = -1; i <= 1; ++i) { 00333 for (int j = -1; j <= 1; ++j) { 00334 if ( ! validDetId( id.ix() + i, id.iy() + j, id.zside() ) ) { 00335 return true; 00336 } 00337 } 00338 } 00339 return false; 00340 }
bool EEDetId::isOuterRing | ( | ) | const [private] |
Definition at line 428 of file EEDetId.cc.
References isOuterRingXY(), ix(), IX_MAX, iy(), and IY_MAX.
Referenced by iPhiOuterRing().
00429 { 00430 const int kx ( ix() ) ; 00431 const int ky ( iy() ) ; 00432 const int ax ( kx>IX_MAX/2 ? kx-IX_MAX/2 : IX_MAX/2 + 1 - kx ) ; 00433 const int ay ( ky>IY_MAX/2 ? ky-IY_MAX/2 : IY_MAX/2 + 1 - ky ) ; 00434 return ( isOuterRingXY( ax, ay ) || 00435 isOuterRingXY( ay, ax ) ) ; 00436 }
Definition at line 439 of file EEDetId.cc.
Referenced by isOuterRing().
00440 { 00441 return ( ( ax<=10 && ay==50 ) || 00442 ( ax==10 && ay>=48 ) || 00443 ( ax<=15 && ax>=11 && ay==47 ) || 00444 ( ax==15 && ay==46 ) || 00445 ( ax<=25 && ax>=16 && ay==45 ) || 00446 ( ax==25 && ay<=44 && ay>=43 ) || 00447 ( ax<=30 && ax>=26 && ay==42 ) || 00448 ( ax==30 && ay<=41 && ay>=38 ) || 00449 ( ax<=35 && ax>=31 && ay==37 ) || 00450 ( ax==35 && ay==36 ) ) ; 00451 }
Definition at line 80 of file EEDetId.cc.
References exception, nCols, and QuadColLimits.
00081 { 00082 /* 00083 * ix() return individual crystal x-coordinate 00084 * 00085 * Author : B W Kennedy 00086 * Version : 1.00 00087 * Created : 21 December 2005 00088 * Last Mod : 31 January 2006 00089 * 00090 * Input : iSC, iCrys - Supercrystal and crystal ids 00091 */ 00092 00093 00094 int nSCinQuadrant = QuadColLimits[nCols]; 00095 00096 if (iSC > 4*nSCinQuadrant || iSC < 1) 00097 { 00098 throw new std::exception(); 00099 } 00100 00101 // Map SC number into (x>0,y>0) quadrant. 00102 int iSCmap, iqx,iq; 00103 if (iSC > 3*nSCinQuadrant) 00104 { 00105 iSCmap = iSC - 3*nSCinQuadrant; 00106 iqx = 1; 00107 iq=4; 00108 } 00109 else if (iSC > 2*nSCinQuadrant) 00110 { 00111 iSCmap = iSC - 2*nSCinQuadrant; 00112 iqx = -1; 00113 iq=3; 00114 } 00115 else if (iSC > nSCinQuadrant) 00116 { 00117 iSCmap = iSC - nSCinQuadrant; 00118 iqx = -1; 00119 iq=2; 00120 } 00121 else 00122 { 00123 iSCmap = iSC; 00124 iqx = 1; 00125 iq=1; 00126 } 00127 00128 // Decide which column the SC is in 00129 int iCol = 0 ; 00130 while (iSCmap > QuadColLimits[iCol++]) ; 00131 iCol-- ; 00132 00133 int ixCrys=-1; 00134 if (iq == 1 || iq == 3) 00135 ixCrys = iqx*(5*(iCol-1) + (int)(iCrys+4)/5); 00136 else if (iq == 2 || iq == 4) 00137 ixCrys = iqx*(5*(iCol-1) + (iCrys-1)%5 + 1); 00138 00139 // returning a value from 1 to 100 00140 00141 return ixCrys; 00142 }
int EEDetId::ix | ( | ) | const [inline] |
get the crystal ix
Definition at line 39 of file EEDetId.h.
References DetId::id_.
Referenced by PhiSymmetryCalibration::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalDigisValidation::analyze(), JetToDigiDump::analyze(), EcalEndcapDigisValidation::analyze(), EcalEndcapSimHitsValidation::analyze(), EcalMixingModuleValidation::analyze(), PhiSymmetryCalibration::beginJob(), InvRingCalib::beginOfJob(), ZeeCalibration::beginOfJob(), EcalTrigTowerConstituentsMap::changeEEDetIdQuadrantAndZ(), EESelectiveReadoutTask::dccNum(), EcalEleCalibLooper::duringLoop(), EEDetId(), ElectronCalibrationUniv::endJob(), PhiSymmetryCalibration::endJob(), EcalEleCalibLooper::endOfLoop(), ZeeCalibration::endOfLoop(), AlCaElectronsTest::fillAroundEndcap(), InvRingCalib::fillEEMap(), EcalEleCalibLooper::fillEEMap(), HLTPi0RecHitsFilter::filter(), EcalEndcapGeometry::getClosestCell(), EcalBarrelGeometry::getClosestEndcapCells(), EcalSelectiveReadout::getCrystalInterest(), EcalElectronicsMapping::getEcalScDetId(), EcalClusterTools::getIEta(), EcalElectronicsMapping::getLMNumber(), EcalRingCalibrationTools::getRingIndex(), hashedIndex(), DetIdInfo::info(), EcalEndcapGeometry::initialize(), EcalRingCalibrationTools::initializeFromGeometry(), iPhiOuterRing(), iquadrant(), isNextToRingBoundary(), isOuterRing(), ixQuadrantOne(), JetAnalyzer::MakeCellListFromCaloTowers(), TrackDetMatchInfo::nXnEnergy(), AlCaElectronsProducer::produce(), EESelectiveReadoutTask::readOutUnitOf(), EcalSelectiveReadoutValidation::superCrystalOf(), unhashIndex(), EcalSimHitsValidProducer::update(), EcalTrigTowerConstituentsMap::wrapEEDetId(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and DumpEvent::WriteSCs().
00039 { return (id_>>7)&0x7F; }
int EEDetId::ixQuadrantOne | ( | ) | const [private] |
Definition at line 204 of file EEDetId.cc.
References iquadrant(), and ix().
Referenced by ic(), and isc().
00205 { 00206 int iQuadrant = iquadrant(); 00207 if ( iQuadrant == 1 || iQuadrant == 4) 00208 return (ix() - 50); 00209 else if ( iQuadrant == 2 || iQuadrant == 3) 00210 return (51 - ix()); 00211 //Should never be reached 00212 return -1; 00213 }
Definition at line 144 of file EEDetId.cc.
References exception, iYoffset, nCols, and QuadColLimits.
00145 { 00146 /* 00147 * iy() return individual crystal y-coordinate 00148 * 00149 * Author : B W Kennedy 00150 * Version : 1.00 00151 * Created : 21 December 2005 00152 * Last Mod : 31 January 2006 00153 * 00154 * Input : iSC, iCrys - Supercrystal and crystal ids 00155 */ 00156 00157 int nSCinQuadrant = QuadColLimits[nCols]; 00158 if (iSC > 4*nSCinQuadrant || iSC < 1) 00159 { 00160 throw new std::exception(); 00161 } 00162 00163 // Map SC number into (x>0,y>0) quadrant 00164 int iSCmap, iqy,iq; 00165 if (iSC > 3*nSCinQuadrant) 00166 { 00167 iSCmap = iSC - 3*nSCinQuadrant; 00168 iqy = -1; 00169 iq=4; 00170 } 00171 else if (iSC > 2*nSCinQuadrant) 00172 { 00173 iSCmap = iSC - 2*nSCinQuadrant; 00174 iqy = -1; 00175 iq=3; 00176 } 00177 else if (iSC > nSCinQuadrant) 00178 { 00179 iSCmap = iSC - nSCinQuadrant; 00180 iqy = 1; 00181 iq=2; 00182 } else 00183 { 00184 iSCmap = iSC; 00185 iqy = 1; 00186 iq=1; 00187 } 00188 00189 // Decide which column the SC is in 00190 int iCol = 0; 00191 while (iSCmap > QuadColLimits[iCol++]) ; 00192 iCol--; 00193 00194 int iSCy = iSCmap - QuadColLimits[iCol-1] + iYoffset[iCol]; 00195 00196 int iyCrys=-1; 00197 if (iq == 1 || iq == 3) 00198 iyCrys = iqy*(5*(iSCy-1) + (iCrys-1)%5 + 1); 00199 else if (iq == 2 || iq == 4) 00200 iyCrys = iqy*(5*(iSCy-1) + (int)(iCrys+4)/5 ); 00201 return iyCrys; 00202 }
int EEDetId::iy | ( | ) | const [inline] |
get the crystal iy
Definition at line 41 of file EEDetId.h.
References DetId::id_.
Referenced by PhiSymmetryCalibration::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalDigisValidation::analyze(), EcalEndcapDigisValidation::analyze(), JetToDigiDump::analyze(), EcalEndcapSimHitsValidation::analyze(), EcalMixingModuleValidation::analyze(), PhiSymmetryCalibration::beginJob(), InvRingCalib::beginOfJob(), ZeeCalibration::beginOfJob(), EcalTrigTowerConstituentsMap::changeEEDetIdQuadrantAndZ(), EESelectiveReadoutTask::dccNum(), EcalEleCalibLooper::duringLoop(), EEDetId(), ElectronCalibrationUniv::endJob(), PhiSymmetryCalibration::endJob(), EcalEleCalibLooper::endOfLoop(), ZeeCalibration::endOfLoop(), AlCaElectronsTest::fillAroundEndcap(), InvRingCalib::fillEEMap(), EcalEleCalibLooper::fillEEMap(), HLTPi0RecHitsFilter::filter(), EcalEndcapGeometry::getClosestCell(), EcalBarrelGeometry::getClosestEndcapCells(), EcalSelectiveReadout::getCrystalInterest(), EcalElectronicsMapping::getEcalScDetId(), EcalClusterTools::getIEta(), EcalRingCalibrationTools::getRingIndex(), hashedIndex(), DetIdInfo::info(), EcalEndcapGeometry::initialize(), EcalRingCalibrationTools::initializeFromGeometry(), iPhiOuterRing(), iquadrant(), isNextToRingBoundary(), isOuterRing(), iyQuadrantOne(), JetAnalyzer::MakeCellListFromCaloTowers(), TrackDetMatchInfo::nXnEnergy(), AlCaElectronsProducer::produce(), EESelectiveReadoutTask::readOutUnitOf(), EcalSelectiveReadoutValidation::superCrystalOf(), unhashIndex(), EcalSimHitsValidProducer::update(), EcalTrigTowerConstituentsMap::wrapEEDetId(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and DumpEvent::WriteSCs().
00041 { return id_&0x7F; }
int EEDetId::iyQuadrantOne | ( | ) | const [private] |
Definition at line 215 of file EEDetId.cc.
References iquadrant(), and iy().
Referenced by ic(), and isc().
00216 { 00217 int iQuadrant = iquadrant(); 00218 if ( iQuadrant == 1 || iQuadrant == 2) 00219 return (iy() - 50); 00220 else if ( iQuadrant == 3 || iQuadrant == 4) 00221 return 51 - iy(); 00222 //Should never be reached 00223 return -1; 00224 }
assignment operator
Definition at line 61 of file EEDetId.cc.
References DetId::det(), DetId::Ecal, EcalEndcap, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
00062 { 00063 if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalEndcap )) 00064 { 00065 throw cms::Exception("InvalidDetId"); 00066 } 00067 id_ = gen.rawId(); 00068 return *this; 00069 }
bool EEDetId::positiveZ | ( | ) | const [inline] |
Definition at line 49 of file EEDetId.h.
References DetId::id_.
Referenced by hashedIndex().
00049 { return id_&0x4000;}
static EcalSubdetector EEDetId::subdet | ( | ) | [inline, static] |
get the subdetector
Definition at line 34 of file EEDetId.h.
References EcalEndcap.
00034 { return EcalEndcap;}
get a DetId from a compact index for arrays
Definition at line 71 of file EEDetId.cc.
References EEDetId(), ICR_FEE, ix(), IX_MAX, iy(), nBegin, nIntegral, XYMODE, and zside().
Referenced by EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), CalorimetryManager::loadFromEcalEndcap(), and StoreEcalCondition::readEcalChannelStatusFromFile().
00072 { 00073 int zside = hi / ICR_FEE * 2 - 1 ; 00074 int ix = (const int*)std::upper_bound( nIntegral, nIntegral + IX_MAX, hi % ICR_FEE ) - nIntegral ; 00075 int iy = hi % ICR_FEE - nIntegral[ ix - 1 ] + nBegin[ ix - 1 ]; 00076 return EEDetId(ix, iy, zside, XYMODE); 00077 }
check if a valid index combination
Definition at line 454 of file EEDetId.cc.
References funct::abs(), IX_MAX, IY_MAX, and TrackValidation_HighPurity_cff::valid.
Referenced by EECosmicTask::analyze(), EcalGetLaserData::analyze(), EcalEndcapTopology::decrementIx(), EcalEndcapTopology::decrementIy(), EcalEleCalibLooper::EcalEleCalibLooper(), EEDetId(), EcalEleCalibLooper::EERegionDefinition(), InvRingCalib::EERingDef(), ZeeCalibration::endOfJob(), EcalSimHitsValidProducer::energyInEEMatrix(), EcalEndcapSimHitsValidation::energyInMatrixEE(), InvRingCalib::fillEEMap(), EcalEleCalibLooper::fillEEMap(), EcalEndcapSimHitsValidation::fillEEMatrix(), EcalSimHitsValidProducer::fillEEMatrix(), EcalRecHitsValidation::findEndcapMatrix(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), MiscalibReaderFromXMLEcalEndcap::getCellFromAttributes(), EcalEndcapGeometry::getCells(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalEndcapGeometry::getClosestCell(), EcalBarrelGeometry::getClosestEndcapCells(), EcalElectronicsMapping::getDCCandSC(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalEndcapSimHitsValidation::getIdsAroundMax(), popcon::EcalPedestalsHandler::getNewObjectsH2(), EcalEndcapNumberingScheme::getUnitID(), EcalEndcapGeometry::gId(), Numbers::icEE(), EcalEndcapTopology::incrementIx(), EcalEndcapTopology::incrementIy(), Numbers::indexEE(), isNextToRingBoundary(), Numbers::iTT(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), StoreEcalCondition::readEcalGainRatiosFromFile(), EcalSelectiveReadout::runSelectiveReadout0(), and Numbers::validEE().
00455 { 00456 bool valid = false; 00457 if (crystal_ix < IX_MIN || crystal_ix > IX_MAX || 00458 crystal_iy < IY_MIN || crystal_iy > IY_MAX || abs(iz) != 1 ) 00459 { 00460 return valid ; 00461 } 00462 if ( (crystal_ix >= 1 && crystal_ix <= 3 && (crystal_iy <= 40 || crystal_iy > 60) ) || 00463 (crystal_ix >= 4 && crystal_ix <= 5 && (crystal_iy <= 35 || crystal_iy > 65) ) || 00464 (crystal_ix >= 6 && crystal_ix <= 8 && (crystal_iy <= 25 || crystal_iy > 75) ) || 00465 (crystal_ix >= 9 && crystal_ix <= 13 && (crystal_iy <= 20 || crystal_iy > 80) ) || 00466 (crystal_ix >= 14 && crystal_ix <= 15 && (crystal_iy <= 15 || crystal_iy > 85) ) || 00467 (crystal_ix >= 16 && crystal_ix <= 20 && (crystal_iy <= 13 || crystal_iy > 87) ) || 00468 (crystal_ix >= 21 && crystal_ix <= 25 && (crystal_iy <= 8 || crystal_iy > 92) ) || 00469 (crystal_ix >= 26 && crystal_ix <= 35 && (crystal_iy <= 5 || crystal_iy > 95) ) || 00470 (crystal_ix >= 36 && crystal_ix <= 39 && (crystal_iy <= 3 || crystal_iy > 97) ) || 00471 (crystal_ix >= 98 && crystal_ix <= 100 && (crystal_iy <= 40 || crystal_iy > 60) ) || 00472 (crystal_ix >= 96 && crystal_ix <= 97 && (crystal_iy <= 35 || crystal_iy > 65) ) || 00473 (crystal_ix >= 93 && crystal_ix <= 95 && (crystal_iy <= 25 || crystal_iy > 75) ) || 00474 (crystal_ix >= 88 && crystal_ix <= 92 && (crystal_iy <= 20 || crystal_iy > 80) ) || 00475 (crystal_ix >= 86 && crystal_ix <= 87 && (crystal_iy <= 15 || crystal_iy > 85) ) || 00476 (crystal_ix >= 81 && crystal_ix <= 85 && (crystal_iy <= 13 || crystal_iy > 87) ) || 00477 (crystal_ix >= 76 && crystal_ix <= 80 && (crystal_iy <= 8 || crystal_iy > 92) ) || 00478 (crystal_ix >= 66 && crystal_ix <= 75 && (crystal_iy <= 5 || crystal_iy > 95) ) || 00479 (crystal_ix >= 62 && crystal_ix <= 65 && (crystal_iy <= 3 || crystal_iy > 97) ) || 00480 ( (crystal_ix == 40 || crystal_ix == 61) && ( (crystal_iy >= 46 && crystal_iy <= 55 ) || crystal_iy <= 3 || crystal_iy > 97 )) || 00481 ( (crystal_ix == 41 || crystal_ix == 60) && crystal_iy >= 44 && crystal_iy <= 57 ) || 00482 ( (crystal_ix == 42 || crystal_ix == 59) && crystal_iy >= 43 && crystal_iy <= 58 ) || 00483 ( (crystal_ix == 43 || crystal_ix == 58) && crystal_iy >= 42 && crystal_iy <= 59 ) || 00484 ( (crystal_ix == 44 || crystal_ix == 45 || crystal_ix == 57 || crystal_ix == 56) && crystal_iy >= 41 && crystal_iy <= 60 ) || 00485 ( crystal_ix >= 46 && crystal_ix <= 55 && crystal_iy >= 40 && crystal_iy <= 61 ) 00486 ) 00487 { 00488 return valid; 00489 } 00490 valid = true; 00491 return valid; 00492 }
check if a valid hash index
Definition at line 495 of file EEDetId.cc.
References MAX_HASH.
Referenced by EcalEndcapRecHitsMaker::init().
00496 { 00497 if( hi > 10557 ) 00498 { 00499 hi -= 7740; 00500 } 00501 if( hi < MIN_HASH || hi > MAX_HASH || 00502 ( hi >= 2818 && hi <= 2827 ) || ( hi >= 2913 && hi <= 2926 ) || 00503 ( hi >= 3012 && hi <= 3027 ) || ( hi >= 3111 && hi <= 3128 ) || 00504 ( hi >= 3210 && hi <= 3229 ) || ( hi >= 3310 && hi <= 3329 ) || 00505 ( hi >= 3409 && hi <= 3430 ) || ( hi >= 3509 && hi <= 3530 ) || 00506 ( hi >= 3609 && hi <= 3630 ) || ( hi >= 3709 && hi <= 3730 ) || 00507 ( hi >= 3809 && hi <= 3830 ) || ( hi >= 3909 && hi <= 3930 ) || 00508 ( hi >= 4009 && hi <= 4030 ) || ( hi >= 4109 && hi <= 4130 ) || 00509 ( hi >= 4209 && hi <= 4230 ) || ( hi >= 4309 && hi <= 4330 ) || 00510 ( hi >= 4410 && hi <= 4429 ) || ( hi >= 4510 && hi <= 4529 ) || 00511 ( hi >= 4611 && hi <= 4628 ) || ( hi >= 4712 && hi <= 4727 ) || 00512 ( hi >= 4813 && hi <= 4826 ) || ( hi >= 4912 && hi <= 4921 ) 00513 ) 00514 { 00515 return false; 00516 } 00517 return true; 00518 }
int EEDetId::zside | ( | ) | const [inline] |
get the z-side of the crystal (1/-1)
Definition at line 37 of file EEDetId.h.
References DetId::id_.
Referenced by PhiSymmetryCalibration::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalDigisValidation::analyze(), EcalEndcapDigisValidation::analyze(), EcalPreshowerRecHitsValidation::analyze(), EcalEndcapSimHitsValidation::analyze(), EcalMixingModuleValidation::analyze(), PhiSymmetryCalibration::beginJob(), InvRingCalib::beginOfJob(), ZeeCalibration::beginOfJob(), EESelectiveReadoutTask::dccNum(), InvRingCalib::EERegId(), InvRingCalib::EERegionDef(), InvRingCalib::EERingDef(), PhiSymmetryCalibration::endJob(), EcalEleCalibLooper::endOfLoop(), ZeeCalibration::endOfLoop(), InvRingCalib::fillEEMap(), EcalEleCalibLooper::fillEEMap(), EcalEndcapGeometry::getClosestCell(), EcalSelectiveReadout::getCrystalInterest(), EcalElectronicsMapping::getEcalScDetId(), EcalRingCalibrationTools::getRingIndex(), EcalRingCalibrationTools::initializeFromGeometry(), isNextToRingBoundary(), TrackDetMatchInfo::nXnEnergy(), EESelectiveReadoutTask::readOutUnitOf(), EcalSelectiveReadoutValidation::superCrystalOf(), EcalTrigTowerConstituentsMap::towerOf(), unhashIndex(), EcalSimHitsValidProducer::update(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and DumpEvent::WriteSCs().
00037 { return (id_&0x4000)?(1):(-1); }
const int EEDetId::ICR_FD = 3870 [static] |
const int EEDetId::ICR_FEE = 7740 [static] |
const int EEDetId::ICR_MAX = 25 [static] |
const int EEDetId::ICR_MIN = 1 [static] |
const int EEDetId::ISC_MAX = 316 [static] |
const int EEDetId::ISC_MIN = 1 [static] |
const int EEDetId::IX_MAX = 100 [static] |
Definition at line 80 of file EEDetId.h.
Referenced by EcalGetLaserData::analyze(), ZeeCalibration::endOfJob(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), idOuterRing(), EcalRingCalibrationTools::initializeFromGeometry(), iPhiOuterRing(), isOuterRing(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), StoreEcalCondition::readEcalGainRatiosFromFile(), unhashIndex(), and validDetId().
const int EEDetId::IX_MIN = 1 [static] |
Definition at line 78 of file EEDetId.h.
Referenced by EcalGetLaserData::analyze(), ZeeCalibration::endOfJob(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), and StoreEcalCondition::readEcalGainRatiosFromFile().
const int EEDetId::IY_MAX = 100 [static] |
Definition at line 81 of file EEDetId.h.
Referenced by EcalGetLaserData::analyze(), ZeeCalibration::endOfJob(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), idOuterRing(), EcalRingCalibrationTools::initializeFromGeometry(), iPhiOuterRing(), isOuterRing(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), StoreEcalCondition::readEcalGainRatiosFromFile(), and validDetId().
const int EEDetId::IY_MIN = 1 [static] |
Definition at line 79 of file EEDetId.h.
Referenced by EcalGetLaserData::analyze(), ZeeCalibration::endOfJob(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), and StoreEcalCondition::readEcalGainRatiosFromFile().
const int EEDetId::iYoffset = { 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0 } [static, private] |
const int EEDetId::MAX_HASH = 2*ICR_FEE-1 [static] |
const int EEDetId::MIN_HASH = 0 [static] |
const int EEDetId::nBegin = { 41, 41, 41, 36, 36, 26, 26, 26, 21, 21, 21, 21, 21, 16, 16, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 16, 16, 21, 21, 21, 21, 21, 26, 26, 26, 36, 36, 41, 41, 41 } [static, private] |
const int EEDetId::nCols = 10 [static, private] |
const int EEDetId::nCrys = 5 [static, private] |
const int EEDetId::nIntegral = { 0, 20, 40, 60, 90, 120, 170, 220, 270, 330, 390, 450, 510, 570, 640, 710, 784, 858, 932, 1006, 1080, 1164, 1248, 1332, 1416, 1500, 1590, 1680, 1770, 1860, 1950, 2040, 2130, 2220, 2310, 2400, 2494, 2588, 2682, 2776, 2870, 2970, 3070, 3170, 3270, 3370, 3470, 3570, 3670, 3770, 3870, 3970, 4070, 4170, 4270, 4370, 4470, 4570, 4670, 4770, 4870, 4964, 5058, 5152, 5246, 5340, 5430, 5520, 5610, 5700, 5790, 5880, 5970, 6060, 6150, 6240, 6324, 6408, 6492, 6576, 6660, 6734, 6808, 6882, 6956, 7030, 7100, 7170, 7230, 7290, 7350, 7410, 7470, 7520, 7570, 7620, 7650, 7680, 7700, 7720 } [static, private] |
const int EEDetId::QuadColLimits = { 0, 8,17,27,36,45,54,62,70,76,79 } [static, private] |
const int EEDetId::SCCRYSTALMODE = 1 [static] |
Definition at line 97 of file EEDetId.h.
Referenced by EEDetId(), and EcalEndcapNumberingScheme::getUnitID().
const int EEDetId::SIZE_HASH = 2*ICR_FEE [static] |
const int EEDetId::XYMODE = 0 [static] |
Definition at line 96 of file EEDetId.h.
Referenced by EECosmicTask::analyze(), EcalTrigTowerConstituentsMap::changeEEDetIdQuadrantAndZ(), EEDetId(), InvRingCalib::EERingDef(), ElectronCalibrationUniv::endJob(), InvRingCalib::fillEEMap(), EcalEleCalibLooper::fillEEMap(), EcalElectronicsMapping::getDCCandSC(), Numbers::icEE(), Numbers::iTT(), EcalElectronicsMappingBuilder::parseTextMap(), AlCaElectronsProducer::produce(), unhashIndex(), Numbers::validEE(), and EcalTrigTowerConstituentsMap::wrapEEDetId().