|
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 EcalEtaPhiRegion ®ion) const |
|
void | GetListofFEDs (const EcalEtaPhiRegion ®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 31 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 799 of file EcalElectronicsMapping.cc.
References EcalElectronicsId::dccId(), EEDetId::ix(), EcalElectronicsId::towerId(), EEDetId::validDetId(), EEDetId::XYMODE, and HcalDigiParam_cfi::zside.
Referenced by EcalSelectiveReadoutValidation::dccCh(), ecaldqm::dccId(), EcalSelectiveReadoutValidation::dccId(), EcalSelectiveReadout::eeRuInterest(), EcalSelectiveReadout::printDccChMap(), and ecaldqm::towerId().
806 std::pair<int,int> ind;
810 int zside =
id.zside();
831 int Dccid = elid.
dccId();
832 int DCC_Channel = elid.
towerId();
834 ind.second = DCC_Channel;
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int towerId() const
get the tower id
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int zside(int dcctcc, int mode) const
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Get the detid given an electronicsId.
Definition at line 423 of file EcalElectronicsMapping.cc.
References MillePedeFileConverter_cfg::e, EcalBarrel, EcalEndcap, end, EBDetId::ETAPHIMODE, Exception, spr::find(), digi_MixPreMix_cfi::strip, and HcalDigiParam_cfi::zside.
Referenced by EcalElectronicsMapper::fillMaps(), DCCDataUnpacker::getChannelValue(), and EcalDetIdToBeRecoveredProducer::produce().
427 int dcc =
id.dccId();
428 int tower =
id.towerId();
429 int strip =
id.stripId();
430 int channel =
id.xtalId();
434 bool EBPlus = (
id.zside() > 0);
435 bool EBMinus = !EBPlus;
437 if (
id.
zside() < 0) {
454 if (EBMinus) iphi += (channel-1) +1;
455 if (EBPlus) iphi += (4 - (channel-1)) +1;
458 if (EBMinus) iphi += (4 - (channel-1)) +1;
459 if (EBPlus) iphi += (channel-1) +1;
463 ieta += 4 - (strip-1);
465 if (EBMinus) iphi += (4 - (channel-1)) +1;
466 if (EBPlus) iphi += (channel-1) +1;
469 if (EBMinus) iphi += (channel-1) +1;
470 if (EBPlus) iphi += (4 - (channel-1)) +1;
473 if (
id.
zside() < 0) ieta = -ieta;
480 EcalElectronicsMap_by_ElectronicsId::const_iterator it=get<1>(
m_items).
find(
id);
483 edm::LogError(
"EcalElectronicsMapping") <<
"Ecal mapping was asked non DetId";
485 DetId cell = it -> cell;
488 else throw cms::Exception(
"InvalidDetId") <<
"Wrong EcalElectronicsId in EcalElectronicsMapping::getDetId." ;
static const int DCCID_PHI0_EBP
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int zside(int dcctcc, int mode) const
static const int kTowersInPhi
EcalElectronicsMap m_items
static const int ETAPHIMODE
bool rightTower(int tower) const
EcalSubdetector subdet(int dccid, int mode) 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 840 of file EcalElectronicsMapping.cc.
References gather_cfg::cout, debug, mps_fire::i, EEDetId::ix(), EEDetId::iy(), and EEDetId::zside().
Referenced by EcalElectronicsMapper::fillMaps(), PFEcalEndcapRecHitCreator::readOutUnitOf(), and EcalSelectiveReadoutValidation::readOutUnitOf().
842 const bool debug =
false;
849 std::vector<EcalScDetId> scDetIds;
854 std::vector<int> nReadoutXtals;
859 std::cout << __FILE__ <<
":" << __LINE__ <<
": " << xtals.size()
860 <<
" crystals read out by channel " << DCC_Channel <<
" of DCC " 862 for(
size_t i = 0;
i < xtals.size(); ++
i){
869 "EcalElectronicsMapping : can not create EcalScDetId for DCC " << DCCid <<
870 " and DCC_Channel " << DCC_Channel <<
".";
872 for(
size_t iXtal = 0; iXtal < xtals.size(); ++iXtal){
873 EEDetId eedetid = xtals[iXtal];
874 int ix = eedetid.
ix();
875 int iy = eedetid.
iy();
876 int iz = eedetid.
zside();
877 int ix_SC = (ix-1)/5 + 1;
878 int iy_SC = (iy-1)/5 + 1;
883 while(iSc < scDetIds.size() && scDetIds[iSc] != scdetid) ++iSc;
884 if(iSc==scDetIds.size()){
885 scDetIds.push_back(scdetid);
886 nReadoutXtals.push_back(1);
888 ++nReadoutXtals[iSc];
892 if(ignoreSingleCrystal){
898 assert(scDetIds.size()==nReadoutXtals.size());
899 for(
size_t iSc = 0; iSc < scDetIds.size(); ){
900 if(nReadoutXtals[iSc]<=1){
901 if(debug)
std::cout <<
"EcalElectronicsMapping::getEcalScDetId: Ignore SC " 902 << scDetIds[iSc] <<
" whose only one channel is read out by " 903 "the DCC channel (DCC " << DCCid <<
", ch " << DCC_Channel<<
").\n";
904 scDetIds.erase(scDetIds.begin()+iSc);
905 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 333 of file EcalElectronicsMapping.cc.
References EcalBarrel, EcalEndcap, end, Exception, spr::find(), EBDetId::ietaAbs(), EBDetId::iphi(), digi_MixPreMix_cfi::strip, EBDetId::tower(), and HcalDigiParam_cfi::zside.
Referenced by EcalABAnalyzer::analyze(), EcalPerEvtLaserAnalyzer::analyze(), EcalTestPulseAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), EcalLaserAnalyzer::analyze(), EcalURecHitHists::analyze(), EcalTPGParamBuilder::analyze(), EcalCosmicsHists::analyze(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EcalDccWeightBuilder::dbId(), EcalSelectiveReadoutValidation::dccCh(), ecaldqm::dccId(), EcalSelectiveReadout::eeRuInterest(), EcalElectronicsMapper::fillMaps(), popcon::EcalChannelStatusHandler::laserAnalysis(), EcalDisplaysByEvent::makeHistos(), popcon::EcalChannelStatusHandler::nBadLaserModules(), popcon::EcalChannelStatusHandler::pedAnalysis(), printStatusRecords(), EcalPedOffset::readDACs(), EcalDigiDisplay::readEBDigis(), EcalPedHists::readEBdigis(), EcalDigiDisplay::readEEDigis(), EcalPedHists::readEEdigis(), PFEcalEndcapRecHitCreator::readOutUnitOf(), EcalSelectiveReadoutValidation::readOutUnitOf(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), EcalMipGraphs::selectHits(), EcalDisplaysByEvent::selectHits(), and ecaldqm::towerId().
339 int dcc =
DCCid(ebdetid);
341 bool EBMinus = !EBPlus;
345 int tower =
iTT(trigtower);
355 if (EBMinus) channel = (iphi-1) %5;
356 if (EBPlus) channel = 4 -( (iphi-1) %5 );
359 if (EBMinus) channel = 4 -( (iphi-1) %5 );
360 if (EBPlus) channel = (iphi-1) %5;
364 strip = 4 - ( (ieta-1)%5 );
366 if (EBMinus) channel = 4 -( (iphi-1) %5 );
367 if (EBPlus) channel = (iphi-1) %5;
370 if (EBMinus) channel = (iphi-1) %5;
371 if (EBPlus) channel = 4 -( (iphi-1) %5 );
382 EcalElectronicsMap_by_DetId::const_iterator it=get<0>(
m_items).
find(
id);
385 edm::LogError(
"EcalElectronicsMapping") <<
"Ecal mapping was asked non valid id";
392 " Wrong DetId in EcalElectronicsMapping::getElectronicsId.";
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int iphi() const
get the crystal iphi
int zside(int dcctcc, int mode) const
EcalElectronicsMap m_items
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
bool rightTower(int tower) const
EcalSubdetector subdet(int dccid, int mode) const
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
int ietaAbs() const
get the absolute value of the crystal ieta