#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, HGCalEE = 8, HGCalHSi = 9, HGCalHSc = 10, HGCalTrigger = 11 } |
Public Member Functions | |
uint32_t | denseIndex () const |
EcalScDetId () | |
EcalScDetId (const DetId &id) | |
EcalScDetId (int ix, int iy, int iz) | |
EcalScDetId (uint32_t rawid) | |
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 | |
constexpr Detector | det () const |
get the detector field from this detid More... | |
constexpr | DetId () |
Create an empty or null id (also for persistence) More... | |
constexpr | DetId (Detector det, int subdet) |
Create an id, filling the detector and subdetector fields as specified. More... | |
constexpr | DetId (uint32_t id) |
Create an id from a raw number. More... | |
constexpr bool | null () const |
is this a null id ? More... | |
constexpr | operator uint32_t () const |
constexpr bool | operator!= (DetId id) const |
inequality More... | |
constexpr uint32_t | operator() () const |
constexpr bool | operator< (DetId id) const |
comparison More... | |
constexpr bool | operator== (DetId id) const |
equality More... | |
constexpr uint32_t | rawId () const |
get the raw id More... | |
constexpr 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 | kDetMask = 0xF |
static const int | kDetOffset = 28 |
static const int | kSubdetMask = 0x7 |
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 185 of file EcalScDetId.h.
EcalScDetId::EcalScDetId | ( | ) |
Constructor of a null id
Definition at line 12 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 14 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 16 of file EcalScDetId.cc.
References Exception, DetId::id_, ix(), iy(), and validDetId().
EcalScDetId::EcalScDetId | ( | const DetId & | id | ) |
Constructor from a raw value
id | det ID number |
Definition at line 26 of file EcalScDetId.cc.
References DetId::Ecal, EcalEndcap, Exception, and DetId::id_.
|
staticprivate |
Initializes x,y,z <-> hashed index map if not yet done.
Definition at line 91 of file EcalScDetId.cc.
References cms::cuda::assert(), 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 106 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 41 of file EcalScDetId.cc.
|
inline |
Gets the crystal x-index.
Definition at line 70 of file EcalScDetId.h.
References DetId::id_.
Referenced by EcalSelectiveReadoutValidation::analyzeEE(), ecaldqm::binning::channelName(), EcalScDetId(), ecaldqm::binning::findBinSuperCrystal_(), hashedIndex(), iquadrant(), ecaldqm::isForward(), ecaldqm::MESet::maskMatches(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::pnForCrystal(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitWorkerRecover::run(), ecaldqm::scConstituents(), and xuti::writeCell().
|
inline |
Get the crystal y-index
Definition at line 76 of file EcalScDetId.h.
References DetId::id_.
Referenced by EcalSelectiveReadoutValidation::analyzeEE(), ecaldqm::binning::channelName(), EcalScDetId(), ecaldqm::binning::findBinSuperCrystal_(), hashedIndex(), iquadrant(), ecaldqm::isForward(), ecaldqm::MESet::maskMatches(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::pnForCrystal(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitWorkerRecover::run(), ecaldqm::scConstituents(), and xuti::writeCell().
EcalScDetId & EcalScDetId::operator= | ( | const DetId & | id | ) |
Assignment operator
id | source det id |
Definition at line 33 of file EcalScDetId.cc.
References DetId::Ecal, EcalEndcap, Exception, and DetId::id_.
|
inline |
Gets the subdetector
Definition at line 59 of file EcalScDetId.h.
References DetId::subdetId().
|
inlinestatic |
Gets EcalScDetId from hasedIndex as defined by hashedIndex method
hi | hashed index |
Definition at line 117 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 cropTnPTrees::din, and 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 59 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::printEndcap(), EcalTrivialConditionRetriever::produceEcalDAQTowerStatus(), EcalTrivialConditionRetriever::produceEcalDCSTowerStatus(), EcalTrivialConditionRetriever::produceEcalDQMTowerStatus(), and EcalSelectiveReadoutSuppressor::run().
|
inlinestatic |
Validates a hashed index.
hi | hashed index to validate |
Definition at line 139 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 64 of file EcalScDetId.h.
References DetId::id_.
Referenced by EcalSelectiveReadoutValidation::analyzeEE(), EcalSelectiveReadout::eeRuInterest(), ecaldqm::binning::findBinSuperCrystal_(), hashedIndex(), ecaldqm::MESet::maskMatches(), EcalDAQTowerStatusXMLTranslator::plot(), EcalDCSTowerStatusXMLTranslator::plot(), ecaldqm::pnForCrystal(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitWorkerRecover::run(), ecaldqm::scConstituents(), and xuti::writeCell().
|
staticprivate |
Map of hased index to x,y,z. See hashedIndex/
Definition at line 200 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and unhashIndex().
|
static |
Upper bound for hashed/dense index
Definition at line 167 of file EcalScDetId.h.
|
static |
Lower bound for hashed/dense index
Definition at line 163 of file EcalScDetId.h.
|
static |
Upper bound of EE crystal y-index
Definition at line 155 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and iquadrant().
|
static |
Lower bound of EE supercrystal x-index
Definition at line 147 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and hashedIndex().
|
static |
Upper bound of EE crystal y-index
Definition at line 159 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and iquadrant().
|
static |
Lower bound of EE supercrystal y-index
Definition at line 151 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and hashedIndex().
|
staticprivate |
Definition at line 192 of file EcalScDetId.h.
|
static |
Number of supercrystals per endcap
Definition at line 143 of file EcalScDetId.h.
|
staticprivate |
Map of z,x,y index to hashed index. See hashedIndex/
Definition at line 196 of file EcalScDetId.h.
Referenced by checkHashedIndexMap(), and hashedIndex().