#include <EEDetId.h>
Public Types | |
enum | { Subdet =EcalEndcap } |
enum | { kEEhalf = 7324, kSizeForDenseIndexing = 2*kEEhalf } |
Public Types inherited from DetId | |
enum | Detector { Tracker =1, Muon =2, Ecal =3, Hcal =4, Calo =5, Forward =6, VeryForward =7 } |
Public Member Functions | |
uint32_t | denseIndex () const |
EEDetId () | |
EEDetId (uint32_t rawid) | |
EEDetId (int crystal_ix, int crystal_iy, int iz) | |
EEDetId (int i, int j, int iz, int mode) | |
EEDetId (const DetId &id) | |
int | hashedIndex () const |
int | ic () const |
int | iPhiOuterRing () const |
int | iquadrant () const |
int | isc () const |
int | ix () const |
int | iy () const |
EEDetId | offsetBy (int nrStepsX, int nrStepsY) const |
EEDetId & | operator= (const DetId &id) |
bool | positiveZ () const |
EcalScDetId | sc () const |
EEDetId | switchZSide () const |
int | zside () const |
Public Member Functions inherited from DetId | |
Detector | det () const |
get the detector field from this detid More... | |
DetId () | |
Create an empty or null id (also for persistence) More... | |
DetId (uint32_t id) | |
Create an id from a raw number. More... | |
DetId (Detector det, int subdet) | |
Create an id, filling the detector and subdetector fields as specified. More... | |
bool | null () const |
is this a null id ? More... | |
operator uint32_t () const | |
bool | operator!= (DetId id) const |
inequality More... | |
uint32_t | operator() () const |
bool | operator< (DetId id) const |
comparison More... | |
bool | operator== (DetId id) const |
equality More... | |
uint32_t | rawId () const |
get the raw id More... | |
int | subdetId () const |
get the contents of the subdetector field (not cast into any detector's numbering enum) More... | |
Static Public Member Functions | |
static EEDetId | detIdFromDenseIndex (uint32_t din) |
static int | distanceX (const EEDetId &a, const EEDetId &b) |
static int | distanceY (const EEDetId &a, const EEDetId &b) |
static bool | fastValidDetId (int crystal_ix, int crystal_iy) |
static EEDetId | idOuterRing (int iPhi, int zEnd) |
static int | isc (int iscCol, int iscRow) |
static bool | isNextToBoundary (EEDetId id) |
static bool | isNextToDBoundary (EEDetId id) |
static bool | isNextToRingBoundary (EEDetId id) |
static DetId | offsetBy (const DetId startId, int nrStepsX, int nrStepsY) |
static bool | slowValidDetId (int crystal_ix, int crystal_iy) |
static EcalSubdetector | subdet () |
static DetId | switchZSide (const DetId startId) |
static EEDetId | unhashIndex (int hi) |
static bool | validDenseIndex (uint32_t din) |
static bool | validDetId (int crystal_ix, int crystal_iy, int iz) |
static bool | validHashIndex (int i) |
Static Public Attributes | |
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 | XYMODE = 0 |
static const int | SCCRYSTALMODE = 1 |
Static Public Attributes inherited from DetId | |
static const int | kDetOffset = 28 |
static const int | kSubdetOffset = 25 |
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 unsigned short | kdi [2 *IY_MAX] |
static const unsigned short | kxf [2 *IY_MAX] |
static const int | nCols = 10 |
static const int | nCrys = 5 |
static const int | QuadColLimits [nCols+1] = { 0, 8,17,27,36,45,54,62,70,76,79 } |
Additional Inherited Members | |
Protected Attributes inherited from DetId | |
uint32_t | id_ |
anonymous enum |
anonymous enum |
|
inline |
|
inline |
Constructor from crystal ix,iy,iz (iz=+1/-1) (mode = XYMODE) or from sc,cr,iz (mode = SCCRYSTALMODE).
ix runs from 1 to 100 along x-axis of standard CMS coordinates
iy runs from 1 to 100 along y-axis of standard CMS coordinates
iz is -1 for EE- and +1 for EE+
For isc see isc(), for ic see ic()
i | ix or isc index |
j | iy or isc index |
iz | iz/zside index: -1 for EE-, +1 for EE+ |
mode | pass XYMODE if i j refer to ix, iy, SCCRYSTALMODE if thery refer to isc, ic |
EEDetId::EEDetId | ( | int | i, |
int | j, | ||
int | iz, | ||
int | mode | ||
) |
Definition at line 56 of file EEDetId.cc.
|
inline |
|
inline |
Same as hashedIndex()
|
inlinestatic |
Converts a hashed/dense index as defined in hashedIndex() and denseIndex() methods to a det id.
din | hashed/dense index |
Definition at line 220 of file EEDetId.h.
Referenced by CaloGenericDetId::CaloGenericDetId(), EEHitResponse::EEHitResponse(), and EcalTPSkimmer::produce().
Returns the distance along x-axis in crystal units between two EEDetId
a | det id of first crystal |
b | det id of second crystal |
Definition at line 577 of file EEDetId.cc.
Returns the distance along y-axis in crystal units between two EEDetId
a | det id of first crystal |
b | det id of second crystal |
Definition at line 582 of file EEDetId.cc.
|
inlinestatic |
|
inline |
Gets a compact index for arrays
Definition at line 182 of file EEDetId.h.
Referenced by ecalpyutils::hashedIndexEE(), EcalUncalibRecHitWorkerWeights::run(), and EcalGeomPhiSymHelper::setup().
int EEDetId::ic | ( | ) | const |
Gets crystal number inside SuperCrystal. Crystal numbering withing a supercrystal in each quadrant:
* A y * (Q2) | (Q1) * 25 20 15 10 5 | 5 10 15 20 25 * 24 19 14 9 4 | 4 9 14 19 24 * 23 18 13 8 3 | 3 8 13 18 23 * 22 17 12 7 2 | 2 7 12 17 22 * 21 16 11 6 1 | 1 6 11 16 21 * | * ----------------------o---------------------------> x * | * 21 16 11 6 1 | 1 6 11 16 21 * 22 17 12 7 2 | 2 7 12 17 22 * 23 18 13 8 3 | 3 8 13 18 23 * 24 19 14 9 4 | 4 9 14 19 24 * 25 20 15 10 5 | 5 10 15 20 25 * (Q3) (Q4) *
Definition at line 324 of file EEDetId.cc.
|
static |
Definition at line 435 of file EEDetId.cc.
int EEDetId::iPhiOuterRing | ( | ) | const |
Definition at line 388 of file EEDetId.cc.
int EEDetId::iquadrant | ( | ) | const |
Gets the quadrant of the DetId. Quadrant number definition, x and y in std CMS coordinates, for EE+:
* A y * | * Q2 | Q1 * | * ----------o---------> x * | * Q3 | Q4 * | *
Definition at line 264 of file EEDetId.cc.
int EEDetId::isc | ( | ) | const |
Gets the SuperCrystal number within the endcap. This number runs from 1 to 316, numbers 70 149 228 307 are not used.
BEWARE: This number is not consistent with indices used in constructor: see details below.
Numbering in quadrant 1 of EE+ is the following
* 08 17 27 * 07 16 26 36 45 54 * 06 15 25 35 44 53 62 * 05 14 24 34 43 52 61 69 * 04 13 23 33 42 51 60 68 76 * 03 12 22 32 41 50 59 67 75 * 02 11 21 31 40 49 58 66 74 * 01 10 20 30 39 48 57 65 73 79 * 09 19 29 38 47 56 64 72 78 * 18 28 37 46 55 63 71 77 * * == THERE IS NO INDEX 70! == *
Quadrant 2 indices are deduced by a symetry about y-axis and by adding an offset of 79.
Quadrant 3 and 4 indices are deduced from quadrant 1 and 2 by a symetry about x-axis and adding an offset. Quadrant N starts with index 1 + (N-1)*79.
EE- indices are deduced from EE+ by a symetry about (x,y)-plane (mirrored view). It is inconsistent with indices used in constructor EEDetId(int, int,int) in SCCRYSTALMODE. Indices of constructor uses a symetry along y-axis: in principal it considers the isc as a local index. The discrepancy is most probably due to a bug in the implementation of this isc() method.
Definition at line 285 of file EEDetId.cc.
|
static |
Gives supercrystal index from endcap supercrystal x and y indexes.
iscCol | supercrystal column number: supecrystal x-index for EE+ |
iscRow,: | supecrystal y-index |
Definition at line 292 of file EEDetId.cc.
|
static |
Definition at line 361 of file EEDetId.cc.
Referenced by isNextToBoundary().
|
static |
Definition at line 367 of file EEDetId.cc.
|
static |
Definition at line 375 of file EEDetId.cc.
Referenced by InterestingDetIdFromSuperClusterProducer::produce().
|
private |
Definition at line 520 of file EEDetId.cc.
|
staticprivate |
Definition at line 531 of file EEDetId.cc.
|
inline |
Gets the crystal x-index.
Definition at line 76 of file EEDetId.h.
Referenced by ecaldqm::crystalID(), MatrixFillMap::fillEEMap(), ecalpyutils::hashedIndexToXY(), EcalGeomPhiSymHelper::setup(), CaloGenericDetId::validDetId(), Pi0CalibXMLwriter::writeLine(), and calibXMLwriter::writeLine().
|
private |
Definition at line 117 of file EEDetId.cc.
|
private |
Definition at line 241 of file EEDetId.cc.
|
inline |
Get the crystal y-index
Definition at line 82 of file EEDetId.h.
Referenced by ecaldqm::crystalID(), MatrixFillMap::fillEEMap(), ecalpyutils::hashedIndexToXY(), EcalGeomPhiSymHelper::setup(), CaloGenericDetId::validDetId(), Pi0CalibXMLwriter::writeLine(), and calibXMLwriter::writeLine().
|
private |
Definition at line 181 of file EEDetId.cc.
|
private |
Definition at line 252 of file EEDetId.cc.
EEDetId EEDetId::offsetBy | ( | int | nrStepsX, |
int | nrStepsY | ||
) | const |
returns a new EEDetId offset by nrStepsX and nrStepsY (can be negative), returns EEDetId(0) if invalid
Definition at line 474 of file EEDetId.cc.
Referenced by EcalTools::deadNeighbour(), and EcalTools::recHitE().
following are static member functions of the above two functions which take and return a DetId, returns DetId(0) if invalid
Definition at line 498 of file EEDetId.cc.
|
inline |
Checks if crystal is in EE+
Definition at line 173 of file EEDetId.h.
Referenced by ecaldqm::crystalID().
|
inline |
Gets the DetId of the supercrystal the crystal belong to.
cms::Exception | if the crystal det id is invalid |
|
static |
Definition at line 546 of file EEDetId.cc.
|
inlinestatic |
EEDetId EEDetId::switchZSide | ( | ) | const |
returns a new EEDetId swapped (same iX, iY) to the other endcap, returns EEDetId(0) if invalid (shouldnt happen)
Definition at line 487 of file EEDetId.cc.
Definition at line 509 of file EEDetId.cc.
|
static |
Gets a DetId from a compact index for arrays. Converse of hashedIndex() method.
hi | dense/hashed index |
Definition at line 99 of file EEDetId.cc.
Referenced by EcalChannelStatusXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalTPGLinearizationConstXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), EcalElectronicsMappingBuilder::FillFromDatabase(), popcon::EcalLaser_weekly_Handler::getNewObjects(), ecalpyutils::hashedIndexToXY(), and main().
|
inlinestatic |
Checks validity of a dense/hashed index
din | dense/hashed index as returned by hashedIndex() or denseIndex() method |
Definition at line 213 of file EEDetId.h.
Referenced by EcalTPSkimmer::produce().
|
inlinestatic |
Checks validity of a crystal (x,y.z) index triplet.
crystal_ix | crystal x-index |
crystal_iy | crystal y-index |
iz | crystal z-index |
Definition at line 248 of file EEDetId.h.
Referenced by EcalEndcapHardcodedTopology::decrementIx(), EcalEndcapTopology::decrementIx(), EcalEndcapHardcodedTopology::decrementIy(), EcalEndcapTopology::decrementIy(), EcalTPGCrystalStatusXMLTranslator::dumpXML(), MatrixFillMap::fillEEMap(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), MiscalibReaderFromXMLEcalEndcap::getCellFromAttributes(), popcon::EcalPulseShapesHandler::getNewObjects(), popcon::EcalPulseSymmCovariancesHandler::getNewObjects(), EcalEndcapNumberingScheme::getUnitID(), ecalpyutils::hashedIndexEE(), EcalEndcapHardcodedTopology::incrementIx(), EcalEndcapTopology::incrementIx(), EcalEndcapHardcodedTopology::incrementIy(), EcalEndcapTopology::incrementIy(), PhotonFixCMS::initialise(), CaloMiscalibMapEcal::print(), and CaloGenericDetId::validDetId().
|
inlinestatic |
Checks if a hashed/dense index is valid
i | hashed/dense index |
Definition at line 239 of file EEDetId.h.
Referenced by EcalChannelStatusXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalTPGLinearizationConstXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), and main().
|
inline |
Gets the z-side of the crystal (1/-1)
Definition at line 70 of file EEDetId.h.
Referenced by ecaldqm::crystalID(), MatrixFillMap::fillEEMap(), ecalpyutils::hashedIndexToXY(), EcalGeomPhiSymHelper::setup(), CaloGenericDetId::validDetId(), Pi0CalibXMLwriter::writeLine(), and calibXMLwriter::writeLine().
|
static |
|
static |
|
static |
|
static |
|
static |
Upper bound of EE crystal y-index
Definition at line 302 of file EEDetId.h.
Referenced by EcalTPGCrystalStatusXMLTranslator::dumpXML(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), popcon::EcalPulseSymmCovariancesHandler::getNewObjects(), popcon::EcalPulseShapesHandler::getNewObjects(), CaloMiscalibMapEcal::prefillMap(), and CaloMiscalibMapEcal::print().
|
static |
Lower bound of EE crystal x-index
Definition at line 294 of file EEDetId.h.
Referenced by EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), popcon::EcalPulseSymmCovariancesHandler::getNewObjects(), popcon::EcalPulseShapesHandler::getNewObjects(), CaloMiscalibMapEcal::prefillMap(), and CaloMiscalibMapEcal::print().
|
static |
Upper bound of EE crystal y-index
Definition at line 306 of file EEDetId.h.
Referenced by EcalTPGCrystalStatusXMLTranslator::dumpXML(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), popcon::EcalPulseSymmCovariancesHandler::getNewObjects(), popcon::EcalPulseShapesHandler::getNewObjects(), CaloMiscalibMapEcal::prefillMap(), and CaloMiscalibMapEcal::print().
|
static |
Lower bound of EE crystal y-index
Definition at line 298 of file EEDetId.h.
Referenced by EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), popcon::EcalPulseSymmCovariancesHandler::getNewObjects(), popcon::EcalPulseShapesHandler::getNewObjects(), CaloMiscalibMapEcal::prefillMap(), and CaloMiscalibMapEcal::print().
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
Definition at line 340 of file EEDetId.h.
Referenced by EcalEndcapNumberingScheme::getUnitID().
|
static |
function modes for EEDetId(int, int, int, int) constructor
Definition at line 339 of file EEDetId.h.
Referenced by MatrixFillMap::fillEEMap(), and EcalMappingElectronicsHandler::getNewObjects().