|
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 761 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().
767 std::pair<int, int> ind;
771 int zside =
id.zside();
772 ix = (ix - 1) * 5 + 1;
773 iy = (iy - 1) * 5 + 1;
774 ix = 5 * (ix / 5) + 1;
775 iy = 5 * (iy / 5) + 1;
792 int Dccid = elid.
dccId();
793 int DCC_Channel = elid.
towerId();
795 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 410 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().
414 int dcc =
id.dccId();
415 int tower =
id.towerId();
416 int strip =
id.stripId();
417 int channel =
id.xtalId();
421 bool EBPlus = (
id.zside() > 0);
422 bool EBMinus = !EBPlus;
424 if (
id.
zside() < 0) {
437 if (
strip % 2 == 1) {
439 iphi += (channel - 1) + 1;
441 iphi += (4 - (channel - 1)) + 1;
444 iphi += (4 - (channel - 1)) + 1;
446 iphi += (channel - 1) + 1;
450 if (
strip % 2 == 1) {
452 iphi += (4 - (channel - 1)) + 1;
454 iphi += (channel - 1) + 1;
457 iphi += (channel - 1) + 1;
459 iphi += (4 - (channel - 1)) + 1;
470 EcalElectronicsMap_by_ElectronicsId::const_iterator it = get<1>(
m_items).
find(
id);
473 edm::LogError(
"EcalElectronicsMapping") <<
"Ecal mapping was asked non DetId";
476 DetId cell = it->cell;
479 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 799 of file EcalElectronicsMapping.cc.
References cms::cuda::assert(), gather_cfg::cout, debug, EEDetId::ix(), EEDetId::iy(), and EEDetId::zside().
Referenced by EcalElectronicsMapper::fillMaps(), ecaldqm::StatusManager::readFromStream(), EcalReadoutTools::readOutUnitOf(), PFEcalEndcapRecHitCreator::readOutUnitOf(), and EcalSelectiveReadoutValidation::readOutUnitOf().
803 const bool debug =
false;
810 std::vector<EcalScDetId> scDetIds;
815 std::vector<int> nReadoutXtals;
820 std::cout << __FILE__ <<
":" << __LINE__ <<
": " << xtals.size() <<
" crystals read out by channel " << DCC_Channel
821 <<
" of DCC " <<
DCCid <<
": ";
822 for (
auto xtal : xtals) {
829 throw cms::Exception(
"InvalidDetId") <<
"EcalElectronicsMapping : can not create EcalScDetId for DCC " <<
DCCid 830 <<
" and DCC_Channel " << DCC_Channel <<
".";
832 for (
auto xtal : xtals) {
834 int ix = eedetid.
ix();
835 int iy = eedetid.
iy();
836 int iz = eedetid.
zside();
837 int ix_SC = (ix - 1) / 5 + 1;
838 int iy_SC = (iy - 1) / 5 + 1;
843 while (iSc < scDetIds.size() && scDetIds[iSc] != scdetid)
845 if (iSc == scDetIds.size()) {
846 scDetIds.emplace_back(scdetid);
847 nReadoutXtals.emplace_back(1);
849 ++nReadoutXtals[iSc];
853 if (ignoreSingleCrystal) {
859 assert(scDetIds.size() == nReadoutXtals.size());
860 for (
size_t iSc = 0; iSc < scDetIds.size(); ) {
861 if (nReadoutXtals[iSc] <= 1) {
863 std::cout <<
"EcalElectronicsMapping::getEcalScDetId: Ignore SC " << scDetIds[iSc]
864 <<
" whose only one channel is read out by " 865 "the DCC channel (DCC " 866 <<
DCCid <<
", ch " << DCC_Channel <<
").\n";
867 scDetIds.erase(scDetIds.begin() + iSc);
868 nReadoutXtals.erase(nReadoutXtals.begin() + iSc);
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 324 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().
329 int dcc =
DCCid(ebdetid);
331 bool EBMinus = !EBPlus;
344 if (
strip % 2 == 0) {
346 channel = (
iphi - 1) % 5;
348 channel = 4 - ((
iphi - 1) % 5);
351 channel = 4 - ((
iphi - 1) % 5);
353 channel = (
iphi - 1) % 5;
357 if (
strip % 2 == 0) {
359 channel = 4 - ((
iphi - 1) % 5);
361 channel = (
iphi - 1) % 5;
364 channel = (
iphi - 1) % 5;
366 channel = 4 - ((
iphi - 1) % 5);
376 EcalElectronicsMap_by_DetId::const_iterator it = get<0>(
m_items).
find(
id);
379 edm::LogError(
"EcalElectronicsMapping") <<
"Ecal mapping was asked non valid id";
385 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