#include <EcalScDetId.h>
Public Types | |
enum | { kSizeForDenseIndexing = SC_PER_EE_CNT * 2 } |
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 |
EcalScDetId () | |
EcalScDetId (uint32_t rawid) | |
EcalScDetId (int ix, int iy, int iz) | |
EcalScDetId (const DetId &id) | |
int | hashedIndex () const |
int | iquadrant () const |
int | ix () const |
int | iy () const |
EcalScDetId & | operator= (const DetId &id) |
EcalSubdetector | subdet () 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 EcalScDetId | unhashIndex (int hi) |
static bool | validDenseIndex (uint32_t din) |
static bool | validDetId (int ix, int iy, int iz) |
static bool | validHashIndex (int hi) |
Static Public Attributes | |
static const int | IHASHED_MAX = SC_PER_EE_CNT*2 - 1 |
static const int | IHASHED_MIN = 0 |
static const int | IX_MAX =20 |
static const int | IX_MIN =1 |
static const int | IY_MAX =20 |
static const int | IY_MIN =1 |
static const int | SC_PER_EE_CNT = 312 |
Static Public Attributes inherited from DetId | |
static const int | kDetOffset = 28 |
static const int | kSubdetOffset = 25 |
Static Private Member Functions | |
static void | checkHashedIndexMap () |
Static Private Attributes | |
static EcalScDetId | hashedIndex2DetId [kSizeForDenseIndexing] |
static const int | nEndcaps = 2 |
static short | xyz2HashedIndex [IX_MAX][IY_MAX][nEndcaps] |
Additional Inherited Members | |
Protected Attributes inherited from DetId | |
uint32_t | id_ |
Supercrystal identifier class for the ECAL endcap.
Note: internal representation of ScDetId:
* 31 . 15 . 0 * |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| * | det |sudet| 0 |1|z| ix | iy | * +-------+-----+-----------------+-+-+-------------+-------------+ *
Definition at line 24 of file EcalScDetId.h.
anonymous enum |
Enumerator | |
---|---|
kSizeForDenseIndexing |
Number of dense supercrystal indices. |
Definition at line 187 of file EcalScDetId.h.
EcalScDetId::EcalScDetId | ( | ) |
Constructor of a null id
Definition at line 13 of file EcalScDetId.cc.
Referenced by checkHashedIndexMap(), and unhashIndex().
EcalScDetId::EcalScDetId | ( | uint32_t | rawid | ) |
Constructor from a raw value
rawid | det ID number of the supecrystal, as defined in this class description. |
Definition at line 16 of file EcalScDetId.cc.
EcalScDetId::EcalScDetId | ( | int | ix, |
int | iy, | ||
int | iz | ||
) |
Constructor from supercrystal ix,iy,iz (iz=+1/-1) ix x-index runs from 1 to 20 along x-axis of standard CMS coordinates iy y-index runs from 1 to 20 along y-axis of standard CMS coordinates iz z-index (also called "z-side") is -1 for EE- and +1 for EE+
ix | x-index |
iy | y-index |
iz | z-side /z-index: -1 for EE-, +1 for EE+ |
Definition at line 19 of file EcalScDetId.cc.
References Exception, DetId::id_, and validDetId().
EcalScDetId::EcalScDetId | ( | const DetId & | id | ) |
Constructor from a raw value
id | det ID number |
Definition at line 31 of file EcalScDetId.cc.
References DetId::det(), DetId::Ecal, EcalEndcap, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
|
staticprivate |
Initializes x,y,z <-> hashed index map if not yet done.
Definition at line 96 of file EcalScDetId.cc.
References EcalScDetId(), hashedIndex(), hashedIndex2DetId, initializedFlag, IX_MAX, IX_MIN, IY_MAX, IY_MIN, validDetId(), and xyz2HashedIndex.
Referenced by hashedIndex(), and unhashIndex().
|
inline |
Same as hashed index.
Definition at line 127 of file EcalScDetId.h.
References hashedIndex().
|
inline |
Gets a compact index for arrays. Index runs from 0 to 623. They are ordered by increasing z (EE- then EE+), then for same z by increasing y. then for same z and y by increasing x
Definition at line 108 of file EcalScDetId.h.
References checkHashedIndexMap(), ix(), IX_MIN, iy(), IY_MIN, validDetId(), xyz2HashedIndex, and zside().
Referenced by checkHashedIndexMap(), denseIndex(), ecaldqm::SelectiveReadoutTask::runOnDigis(), and ecaldqm::SelectiveReadoutTask::runOnSrFlags().
int EcalScDetId::iquadrant | ( | ) | const |
Gets the quadrant of the DetId.
Quadrant number definition for EE+, x and y in std CMS coordinates:
* A y * | * Q2 | Q1 * | * ----------o---------> x * | * Q3 | Q4 * | *
This method will return the same quadrant number independently of z: that is two supercrystals which are face to face will be considered will have the same quadrant number. It is not clear it is the correct or usual definition.
Definition at line 46 of file EcalScDetId.cc.
References ix(), IX_MAX, iy(), and IY_MAX.
Referenced by iy().
|
inline |
Gets the crystal x-index.
Definition at line 71 of file EcalScDetId.h.
References DetId::id_.
Referenced by EcalSelectiveReadoutValidation::analyzeEE(), ecaldqm::binning::channelName(), ecaldqm::binning::findBinSuperCrystal_(), EcalSimRawData::getSrfs(), hashedIndex(), iquadrant(), ecaldqm::isForward(), ecaldqm::MESet::maskMatches(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::pnForCrystal(), EcalSelectiveReadoutProducer::printSrFlags(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitWorkerRecover::run(), ecaldqm::scConstituents(), and xuti::writeCell().
|
inline |
Get the crystal y-index
Definition at line 77 of file EcalScDetId.h.
References DetId::id_, and iquadrant().
Referenced by EcalSelectiveReadoutValidation::analyzeEE(), ecaldqm::binning::channelName(), ecaldqm::binning::findBinSuperCrystal_(), EcalSimRawData::getSrfs(), hashedIndex(), iquadrant(), ecaldqm::isForward(), ecaldqm::MESet::maskMatches(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::pnForCrystal(), EcalSelectiveReadoutProducer::printSrFlags(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitWorkerRecover::run(), ecaldqm::scConstituents(), and xuti::writeCell().
EcalScDetId & EcalScDetId::operator= | ( | const DetId & | id | ) |
Assignment operator
id | source det id |
Definition at line 38 of file EcalScDetId.cc.
References DetId::det(), DetId::Ecal, EcalEndcap, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
|
inline |
Gets the subdetector
Definition at line 60 of file EcalScDetId.h.
References DetId::subdetId().
|
inlinestatic |
Gets EcalScDetId from hasedIndex as defined by hashedIndex method
hi | hashed index |
Definition at line 118 of file EcalScDetId.h.
References checkHashedIndexMap(), EcalScDetId(), hashedIndex2DetId, and kSizeForDenseIndexing.
Referenced by EcalDAQTowerStatusXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::dumpXML(), ecaldqm::TowerStatusTask::endLuminosityBlock(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::StatusManager::readFromObj(), ecaldqm::SelectiveReadoutTask::runOnDigis(), and ecaldqm::StatusManager::writeToObj().
|
inlinestatic |
Validates a hashed index.
din | hashed index to validate |
Definition at line 133 of file EcalScDetId.h.
References kSizeForDenseIndexing.
Referenced by validHashIndex().
|
static |
Checks validity of a crystal (x,y.z) index triplet.
ix | supercrystal x-index |
iy | supercrystal y-index |
iz | supercrystal z-index (aka z-side) |
Definition at line 64 of file EcalScDetId.cc.
References funct::abs().
Referenced by checkHashedIndexMap(), EcalScDetId(), popcon::EcalDAQHandler::getNewObjects(), popcon::EcalDCSHandler::getNewObjects(), hashedIndex(), popcon::EcalDCSHandler::insertHVDataSetToOffline(), popcon::EcalDCSHandler::insertLVDataSetToOffline(), ecaldqm::binning::isValidIdBin(), EcalSelectiveReadout::printDccChMap(), EcalSelectiveReadout::printEndcap(), EcalTrivialConditionRetriever::produceEcalDAQTowerStatus(), EcalTrivialConditionRetriever::produceEcalDCSTowerStatus(), EcalTrivialConditionRetriever::produceEcalDQMTowerStatus(), and EcalSelectiveReadoutSuppressor::run().
|
inlinestatic |
Validates a hashed index.
hi | hashed index to validate |
Definition at line 140 of file EcalScDetId.h.
References validDenseIndex().
Referenced by EcalDAQTowerStatusXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::plot(), and EcalDAQTowerStatusXMLTranslator::plot().
|
inline |
Gets the z-side of the crystal (1/-1)
Definition at line 65 of file EcalScDetId.h.
References DetId::id_.
Referenced by EcalSelectiveReadoutValidation::analyzeEE(), EcalSelectiveReadout::eeRuInterest(), ecaldqm::binning::findBinSuperCrystal_(), EcalSimRawData::getSrfs(), hashedIndex(), ecaldqm::MESet::maskMatches(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::pnForCrystal(), EcalSelectiveReadoutProducer::printSrFlags(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitWorkerRecover::run(), ecaldqm::scConstituents(), and xuti::writeCell().
|
staticprivate |
Map of hased index to x,y,z. See hashedIndex/
Definition at line 202 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and unhashIndex().
|
static |
Upper bound for hashed/dense index
Definition at line 168 of file EcalScDetId.h.
|
static |
Lower bound for hashed/dense index
Definition at line 164 of file EcalScDetId.h.
|
static |
Upper bound of EE crystal y-index
Definition at line 156 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and iquadrant().
|
static |
Lower bound of EE supercrystal x-index
Definition at line 148 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and hashedIndex().
|
static |
Upper bound of EE crystal y-index
Definition at line 160 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and iquadrant().
|
static |
Lower bound of EE supercrystal y-index
Definition at line 152 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and hashedIndex().
|
staticprivate |
Definition at line 194 of file EcalScDetId.h.
|
static |
Number of supercrystals per endcap
Definition at line 144 of file EcalScDetId.h.
|
staticprivate |
Map of z,x,y index to hashed index. See hashedIndex/
Definition at line 198 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and hashedIndex().