|
void | assign (const DetId &cell, const EcalElectronicsId &, const EcalTriggerElectronicsId &tower) |
| set the association between a DetId and a tower More...
|
|
int | DCCBoundary (int FED) const |
|
std::vector< DetId > | dccConstituents (int dccId) const |
| Get the constituent detids for this dccId. More...
|
|
int | DCCid (const EBDetId &id) const |
| returns the DCC of an EBDetId More...
|
|
int | DCCid (const EcalTrigTowerDetId &id) const |
| returns the DCCid (i.e. the FED) of a Trigger Tower More...
|
|
std::vector< DetId > | dccTowerConstituents (int dccId, int tower) const |
| Get the constituent detids for this dccId. More...
|
|
| EcalElectronicsMapping () |
|
std::pair< int, int > | getDCCandSC (EcalScDetId id) const |
|
DetId | getDetId (const EcalElectronicsId &id) const |
| Get the detid given an electronicsId. More...
|
|
DetId | getDetId (const EcalTriggerElectronicsId &id) const |
| Get the detid given a trigger electronicsId. More...
|
|
std::vector< EcalScDetId > | getEcalScDetId (int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const |
|
EcalElectronicsId | getElectronicsId (const DetId &id) const |
| Get the electronics id for this det id. More...
|
|
EcalElectronicsId | getElectronicsId (const EcalTriggerElectronicsId &id) const |
| Get the electronics id given a trigger electronicsId. More...
|
|
int | GetFED (double eta, double phi) const |
|
std::vector< int > | GetListofFEDs (const RectangularEtaPhiRegion ®ion) const |
|
void | GetListofFEDs (const RectangularEtaPhiRegion ®ion, std::vector< int > &FEDs) const |
|
int | getLMNumber (const DetId &id) const |
|
EcalTriggerElectronicsId | getTriggerElectronicsId (const DetId &id) const |
| Get the trigger electronics id for this det id. More...
|
|
EcalTriggerElectronicsId | getTriggerElectronicsId (const EcalElectronicsId &id) const |
| Get the trigger electronics id given an electronicsId. More...
|
|
EcalTrigTowerDetId | getTrigTowerDetId (int TCCid, int iTT) const |
| Builds a EcalTrigTowerDetID from the TCCid & TriggerTower index in TCC. More...
|
|
int | iTT (const EcalTrigTowerDetId &id) const |
| returns the index of a Trigger Tower within its TCC. More...
|
|
std::vector< DetId > | pseudoStripConstituents (int tccId, int tt, int pseudostrip) const |
| Get the constituent detids for this dccId. More...
|
|
bool | rightTower (int tower) const |
|
std::vector< DetId > | stripConstituents (int dccId, int tower, int strip) const |
| Get the constituent detids for this dccId. More...
|
|
EcalSubdetector | subdet (int dccid, int mode) const |
|
std::vector< DetId > | tccConstituents (int tccId) const |
| Get the constituent detids for this dccId. More...
|
|
int | TCCid (const EBDetId &id) const |
| returns the TCCid of an EBDetId More...
|
|
int | TCCid (const EcalTrigTowerDetId &id) const |
| returns the TCCid of a Trigger Tower More...
|
|
std::vector< DetId > | ttConstituents (int tccId, int tt) const |
| Get the constituent detids for this dccId. More...
|
|
int | zside (int dcctcc, int mode) const |
|
|
typedef boost::multi_index::multi_index_container< MapItem, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< MapItem, DetId, &MapItem::cell > >, boost::multi_index::ordered_unique< boost::multi_index::member< MapItem, EcalElectronicsId, &MapItem::elid > >, boost::multi_index::ordered_unique< boost::multi_index::member< MapItem, EcalTriggerElectronicsId, &MapItem::trelid > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< MapItem, int, &MapItem::dccId > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::dccId >, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::towerId > > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::dccId >, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::towerId >, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::stripId > > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< MapItem, int, &MapItem::tccId > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::tccId >, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::ttId > > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::tccId >, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::ttId >, boost::multi_index::const_mem_fun< MapItem, int, &MapItem::pseudoStripId > > > > > | EcalElectronicsMap |
|
typedef EcalElectronicsMap::nth_index< 3 >::type | EcalElectronicsMap_by_DccId |
|
typedef EcalElectronicsMap::nth_index< 4 >::type | EcalElectronicsMap_by_DccId_and_TowerId |
|
typedef EcalElectronicsMap::nth_index< 5 >::type | EcalElectronicsMap_by_DccId_TowerId_and_StripId |
|
typedef EcalElectronicsMap::nth_index< 0 >::type | EcalElectronicsMap_by_DetId |
|
typedef EcalElectronicsMap::nth_index< 1 >::type | EcalElectronicsMap_by_ElectronicsId |
|
typedef EcalElectronicsMap::nth_index< 6 >::type | EcalElectronicsMap_by_TccId |
|
typedef EcalElectronicsMap::nth_index< 7 >::type | EcalElectronicsMap_by_TccId_and_TtId |
|
typedef EcalElectronicsMap::nth_index< 8 >::type | EcalElectronicsMap_by_TccId_TtId_and_PseudostripId |
|
typedef EcalElectronicsMap::nth_index< 2 >::type | EcalElectronicsMap_by_TriggerElectronicsId |
|
- Author
- P.Meridiani (INFN Roma1), E. Perez (CERN)
Definition at line 28 of file EcalElectronicsMapping.h.
std::pair< int, int > EcalElectronicsMapping::getDCCandSC |
( |
EcalScDetId |
id | ) |
const |
Retrieves the DCC channel that reads the crystals constituting an ECAL supercystal (SC). For standard 5x5 complete SCs, there is a one-to-one matching between DCC channel and SC. For partial SCs, the relation from SC to DCC channel is N-to-N. The 3-2-1 partial SC type has 1 crystal read by a DCC channel and the others read by another DCC channel. If the former crystal is ignored for the DCC channel matching, then the SC-to-DCC channel association is simplified to 1-to-N relation. This method uses this prescription and therefore returns a single DCC channel.
- Parameters
-
- Returns
- DCC channel. .first: DCC ID (from 1 to 54); .second: channel within the DCC (from 1 to 68). See http://hepwww.rl.ac.uk/CMSecal/Dee-layout.html, https://twiki.cern.ch/twiki/bin/view/CMS/EcalIndices, and references thereby.
Definition at line 762 of file EcalElectronicsMapping.cc.
References EcalElectronicsId::dccId(), EEDetId::ix(), EcalElectronicsId::towerId(), EEDetId::validDetId(), EEDetId::XYMODE, and ecaldqm::zside().
Referenced by EcalSelectiveReadoutValidation::dccCh(), EcalSelectiveReadoutValidation::dccId(), EcalSelectiveReadout::eeRuInterest(), EcalSelectiveReadout::printDccChMap(), and EcalDigiToRaw::produce().
768 std::pair<int, int> ind;
772 int zside =
id.zside();
773 ix = (ix - 1) * 5 + 1;
774 iy = (iy - 1) * 5 + 1;
775 ix = 5 * (ix / 5) + 1;
776 iy = 5 * (iy / 5) + 1;
793 int Dccid = elid.
dccId();
794 int DCC_Channel = elid.
towerId();
796 ind.second = DCC_Channel;
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
int zside(int dcctcc, int mode) const
int towerId() const
get the tower id
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Get the detid given an electronicsId.
Definition at line 411 of file EcalElectronicsMapping.cc.
References MillePedeFileConverter_cfg::e, EcalBarrel, EcalEndcap, EBDetId::ETAPHIMODE, Exception, spr::find(), LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, digitizers_cfi::strip, l1tHGCalTowerProducer_cfi::tower, and ecaldqm::zside().
Referenced by ecaldqm::binning::channelName(), EcalElectronicsMapper::fillMaps(), ecaldqm::binning::findBinCrystal_(), ecaldqm::binning::findBinSuperCrystal_(), DCCDataUnpacker::getChannelValue(), and EcalDetIdToBeRecoveredProducer::produce().
415 int dcc =
id.dccId();
416 int tower =
id.towerId();
417 int strip =
id.stripId();
418 int channel =
id.xtalId();
422 bool EBPlus = (
id.zside() > 0);
423 bool EBMinus = !EBPlus;
425 if (
id.
zside() < 0) {
438 if (
strip % 2 == 1) {
440 iphi += (channel - 1) + 1;
442 iphi += (4 - (channel - 1)) + 1;
445 iphi += (4 - (channel - 1)) + 1;
447 iphi += (channel - 1) + 1;
451 if (
strip % 2 == 1) {
453 iphi += (4 - (channel - 1)) + 1;
455 iphi += (channel - 1) + 1;
458 iphi += (channel - 1) + 1;
460 iphi += (4 - (channel - 1)) + 1;
471 EcalElectronicsMap_by_ElectronicsId::const_iterator it = get<1>(
m_items).
find(
id);
474 edm::LogError(
"EcalElectronicsMapping") <<
"Ecal mapping was asked non DetId";
477 DetId cell = it->cell;
480 throw cms::Exception(
"InvalidDetId") <<
"Wrong EcalElectronicsId in EcalElectronicsMapping::getDetId.";
static const int DCCID_PHI0_EBP
Log< level::Error, false > LogError
int zside(int dcctcc, int mode) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EcalSubdetector subdet(int dccid, int mode) const
static const int kTowersInPhi
EcalElectronicsMap m_items
static const int ETAPHIMODE
bool rightTower(int tower) const
static const int kCrystalsInPhi
static const int DCCID_PHI0_EBM
std::vector< EcalScDetId > EcalElectronicsMapping::getEcalScDetId |
( |
int |
DCCid, |
|
|
int |
DCC_Channel, |
|
|
bool |
ignoreSingleCrystal = true |
|
) |
| const |
builds EcalScDetId's from (DCC, DCC_channel) Most of the time there is only one SC read-out by the DCC channel, but few DCC channels read VPTs coming from two different partial SCs. There are also 4 SCs per endcap whose one crystal is read out by a different DCC channel than the others. In such case, the SC will be assiociated to the DCC channel reading most of the crystals, the DCC channel reading only one crystal being ignored.
- Parameters
-
ignoreSingleCrystal. | There are four partial SCs per endcap whose one crystal is read out by a different DCC channel than for the other crystals. If this parameter is true these single crystals will be ignored: if a SC has only one crystal read out by the DCC channel, then the SC will not be included in the returned list. a differentsimplification, SC read out by two different DCC channels |
- Returns
- vector of SCs associated to the DCC channel.
Definition at line 800 of file EcalElectronicsMapping.cc.
References cms::cuda::assert(), debug, EEDetId::ix(), EEDetId::iy(), and EEDetId::zside().
Referenced by EcalElectronicsMapper::fillMaps(), ecaldqm::StatusManager::readFromStream(), EcalReadoutTools::readOutUnitOf(), PFEcalEndcapRecHitCreator::readOutUnitOf(), and EcalSelectiveReadoutValidation::readOutUnitOf().
804 const bool debug =
false;
811 std::vector<EcalScDetId> scDetIds;
816 std::vector<int> nReadoutXtals;
821 std::ostringstream st1;
822 st1 << __FILE__ <<
":" << __LINE__ <<
": " << xtals.size() <<
" crystals read out by channel " << DCC_Channel
823 <<
" of DCC " <<
DCCid <<
": ";
824 for (
auto xtal : xtals) {
831 throw cms::Exception(
"InvalidDetId") <<
"EcalElectronicsMapping : can not create EcalScDetId for DCC " <<
DCCid 832 <<
" and DCC_Channel " << DCC_Channel <<
".";
834 for (
auto xtal : xtals) {
836 int ix = eedetid.
ix();
837 int iy = eedetid.
iy();
838 int iz = eedetid.
zside();
839 int ix_SC = (ix - 1) / 5 + 1;
840 int iy_SC = (iy - 1) / 5 + 1;
845 while (iSc < scDetIds.size() && scDetIds[iSc] != scdetid)
847 if (iSc == scDetIds.size()) {
848 scDetIds.emplace_back(scdetid);
849 nReadoutXtals.emplace_back(1);
851 ++nReadoutXtals[iSc];
855 if (ignoreSingleCrystal) {
861 assert(scDetIds.size() == nReadoutXtals.size());
862 for (
size_t iSc = 0; iSc < scDetIds.size(); ) {
863 if (nReadoutXtals[iSc] <= 1) {
865 edm::LogVerbatim(
"EcalMapping") <<
"EcalElectronicsMapping::getEcalScDetId: Ignore SC " << scDetIds[iSc]
866 <<
" whose only one channel is read out by " 867 "the DCC channel (DCC " 868 <<
DCCid <<
", ch " << DCC_Channel <<
").\n";
869 scDetIds.erase(scDetIds.begin() + iSc);
870 nReadoutXtals.erase(nReadoutXtals.begin() + iSc);
Log< level::Info, true > LogVerbatim
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
Get the electronics id for this det id.
Definition at line 325 of file EcalElectronicsMapping.cc.
References EcalBarrel, EcalEndcap, Exception, spr::find(), LEDCalibrationChannels::ieta, EBDetId::ietaAbs(), EBDetId::iphi(), LEDCalibrationChannels::iphi, digitizers_cfi::strip, l1tHGCalTowerProducer_cfi::tower, EBDetId::tower(), and ecaldqm::zside().
Referenced by EcalURecHitHists::analyze(), EcalTPGParamBuilder::analyze(), EcalCosmicsHists::analyze(), ecaldqm::binning::channelName(), EcalDccWeightBuilder::dbId(), EcalSelectiveReadoutValidation::dccCh(), TowerBlockFormatter::DigiToRaw(), EcalSelectiveReadout::eeRuInterest(), EcalElectronicsMapper::fillMaps(), EcalDisplaysByEvent::makeHistos(), EcalDigiToRaw::produce(), EcalPedOffset::readDACs(), EcalDigiDisplay::readEBDigis(), EcalPedHists::readEBdigis(), EcalDigiDisplay::readEEDigis(), EcalPedHists::readEEdigis(), EcalReadoutTools::readOutUnitOf(), PFEcalEndcapRecHitCreator::readOutUnitOf(), EcalSelectiveReadoutValidation::readOutUnitOf(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), EcalMipGraphs::selectHits(), and EcalDisplaysByEvent::selectHits().
330 int dcc =
DCCid(ebdetid);
332 bool EBMinus = !EBPlus;
345 if (
strip % 2 == 0) {
347 channel = (
iphi - 1) % 5;
349 channel = 4 - ((
iphi - 1) % 5);
352 channel = 4 - ((
iphi - 1) % 5);
354 channel = (
iphi - 1) % 5;
358 if (
strip % 2 == 0) {
360 channel = 4 - ((
iphi - 1) % 5);
362 channel = (
iphi - 1) % 5;
365 channel = (
iphi - 1) % 5;
367 channel = 4 - ((
iphi - 1) % 5);
377 EcalElectronicsMap_by_DetId::const_iterator it = get<0>(
m_items).
find(
id);
380 edm::LogError(
"EcalElectronicsMapping") <<
"Ecal mapping was asked non valid id";
386 throw cms::Exception(
"InvalidDetId") <<
" Wrong DetId in EcalElectronicsMapping::getElectronicsId.";
int ietaAbs() const
get the absolute value of the crystal ieta
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int iphi() const
get the crystal iphi
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
Log< level::Error, false > LogError
int zside(int dcctcc, int mode) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EcalSubdetector subdet(int dccid, int mode) const
EcalElectronicsMap m_items
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
bool rightTower(int tower) const
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal