CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions | Private Member Functions | Static Private Attributes
Numbers Class Reference

#include <Numbers.h>

Static Public Member Functions

static std::vector< DetId > * crystals (const EcalTrigTowerDetId &id)
 
static std::vector< DetId > * crystals (const EcalElectronicsId &id)
 
static std::vector< DetId > * crystals (unsigned idcc, unsigned isc)
 
static float eta (const DetId &id)
 
static const EcalScDetId getEcalScDetId (const EEDetId &id)
 
static const
EcalElectronicsMapping
getElectronicsMapping ()
 
static unsigned icEB (const unsigned ism, const unsigned ix, const unsigned iy)
 
static unsigned icEE (const unsigned ism, const unsigned ix, const unsigned iy)
 
static int iEB (const unsigned ism)
 
static int iEE (const unsigned ism)
 
static unsigned indexEB (const unsigned ism, const unsigned ie, const unsigned ip)
 
static unsigned indexEE (const unsigned ism, const unsigned ix, const unsigned iy)
 
static void initGeometry (const edm::EventSetup &setup, bool verbose=false)
 
static unsigned iSC (const EcalScDetId &id)
 
static unsigned iSC (const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
 
static unsigned iSM (const unsigned ism, const EcalSubdetector subdet)
 
static unsigned iSM (const EBDetId &id)
 
static unsigned iSM (const EEDetId &id)
 
static unsigned iSM (const EcalTrigTowerDetId &id)
 
static unsigned iSM (const EcalElectronicsId &id)
 
static unsigned iSM (const EcalPnDiodeDetId &id)
 
static unsigned iSM (const EcalScDetId &id)
 
static unsigned iSM (const EcalDCCHeaderBlock &id, const EcalSubdetector subdet)
 
static unsigned iTCC (const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
 
static unsigned iTCC (const EcalTrigTowerDetId &id)
 
static unsigned iTT (const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
 
static unsigned iTT (const EcalTrigTowerDetId &id)
 
static int ix0EE (const unsigned ism)
 
static int ix0EEm (const unsigned ism)
 
static int iy0EE (const unsigned ism)
 
static unsigned nCCUs (const unsigned ism)
 
static unsigned nTTs (const unsigned itcc)
 
static float phi (const DetId &id)
 
static unsigned RtHalf (const EBDetId &id)
 
static unsigned RtHalf (const EEDetId &id)
 
static std::string sEB (const unsigned ism)
 
static std::string sEE (const unsigned ism)
 
static EcalSubdetector subDet (const EBDetId &id)
 
static EcalSubdetector subDet (const EEDetId &id)
 
static EcalSubdetector subDet (const EcalTrigTowerDetId &id)
 
static EcalSubdetector subDet (const EcalScDetId &id)
 
static EcalSubdetector subDet (const EcalElectronicsId &id)
 
static EcalSubdetector subDet (const EcalPnDiodeDetId &id)
 
static EcalSubdetector subDet (const EcalDCCHeaderBlock &id)
 
static bool validEE (const unsigned ism, const unsigned ix, const unsigned iy)
 
static bool validEESc (const unsigned ism, const unsigned ix, const unsigned iy)
 

Private Member Functions

 Numbers ()
 
 ~Numbers ()
 

Static Private Attributes

static std::vector< DetIdcrystalsDCC_ [crystalsDCCArraySize_]
 
static const unsigned crystalsDCCArraySize_ = 100 * 54
 
static std::vector< DetIdcrystalsTCC_ [crystalsTCCArraySize_]
 
static const unsigned crystalsTCCArraySize_ = 100 * 108
 
static const CaloGeometrygeometry = 0
 
static bool init = false
 
static const
EcalElectronicsMapping
map = 0
 
static const
EcalTrigTowerConstituentsMap
mapTT = 0
 

Detailed Description

Definition at line 37 of file Numbers.h.

Constructor & Destructor Documentation

Numbers::Numbers ( )
inlineprivate

Definition at line 137 of file Numbers.h.

137 {}; // Hidden to force static use
Numbers::~Numbers ( )
inlineprivate

Definition at line 138 of file Numbers.h.

138 {}; // Hidden to force static use

Member Function Documentation

std::vector< DetId > * Numbers::crystals ( const EcalTrigTowerDetId id)
static

Definition at line 585 of file Numbers.cc.

References crystalsTCC_, crystalsTCCArraySize_, edm::hlt::Exception, getHLTprescales::index, EcalElectronicsMapping::iTT(), findQualityFiles::size, EcalElectronicsMapping::TCCid(), and EcalElectronicsMapping::ttConstituents().

Referenced by EEStatusFlagsTask::analyze(), EEIntegrityTask::analyze(), EEOccupancyTask::analyze(), EESelectiveReadoutTask::analyze(), crystals(), ecaldqm::fillME(), ecaldqm::getBinContentME(), ecaldqm::getBinEntriesME(), ecaldqm::getBinErrorME(), nTTs(), EETriggerTowerTask::processDigis(), EcalDQMStatusWriter::readEcalDQMTowerStatusFromFile(), ecaldqm::setBinContentME(), ecaldqm::setBinEntriesME(), and ecaldqm::setBinErrorME().

586 {
587 
588  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
589 
590  int itcc = Numbers::map->TCCid(id);
591  int itt = Numbers::map->iTT(id);
592 
593  unsigned index = 100*(itcc-1) + (itt-1);
594 
595  if( index >= crystalsTCCArraySize_ ) throw cms::Exception("InvalidParameter") << "TCC index " << index;
596 
597  if ( Numbers::crystalsTCC_[index].size() == 0 ) {
599  }
600 
601  return &(Numbers::crystalsTCC_[index]);
602 
603 }
static const unsigned crystalsTCCArraySize_
Definition: Numbers.h:147
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
int TCCid(const EBDetId &id) const
returns the TCCid of an EBDetId
std::vector< DetId > ttConstituents(int tccId, int tt) const
Get the constituent detids for this dccId.
static std::vector< DetId > crystalsTCC_[crystalsTCCArraySize_]
Definition: Numbers.h:150
tuple size
Write out results.
std::vector< DetId > * Numbers::crystals ( const EcalElectronicsId id)
static

Definition at line 644 of file Numbers.cc.

References crystals(), and edm::hlt::Exception.

645 {
646 
647  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
648 
649  int idcc = id.dccId();
650  int isc = id.towerId();
651 
652  return Numbers::crystals( idcc, isc );
653 
654 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
std::vector< DetId > * Numbers::crystals ( unsigned  idcc,
unsigned  isc 
)
static

Definition at line 659 of file Numbers.cc.

References crystalsDCC_, crystalsDCCArraySize_, EcalElectronicsMapping::dccTowerConstituents(), edm::hlt::Exception, getHLTprescales::index, and findQualityFiles::size.

660 {
661 
662  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
663 
664  unsigned index = 100*(idcc-1) + (isc-1);
665 
666  if( index > crystalsDCCArraySize_ ) throw cms::Exception("InvalidParameter") << "DCC index " << index;
667 
668  if ( Numbers::crystalsDCC_[index].size() == 0 ) {
670  }
671 
672  return &(Numbers::crystalsDCC_[index]);
673 
674 }
static std::vector< DetId > crystalsDCC_[crystalsDCCArraySize_]
Definition: Numbers.h:151
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
static const unsigned crystalsDCCArraySize_
Definition: Numbers.h:148
tuple size
Write out results.
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
float Numbers::eta ( const DetId id)
static

Definition at line 929 of file Numbers.cc.

References PV3DBase< T, PVType, FrameType >::eta(), geometry, CaloGeometry::getPosition(), and pos.

Referenced by EETimingClient::analyze().

930 {
931  const GlobalPoint& pos = geometry->getPosition(id);
932  return pos.eta();
933 }
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:68
T eta() const
Definition: PV3DBase.h:75
static const CaloGeometry * geometry
Definition: Numbers.h:145
const EcalScDetId Numbers::getEcalScDetId ( const EEDetId id)
static

Definition at line 679 of file Numbers.cc.

References EcalElectronicsId::dccId(), edm::hlt::Exception, EcalElectronicsMapping::getEcalScDetId(), EcalElectronicsMapping::getElectronicsId(), and EcalElectronicsId::towerId().

Referenced by ecaldqm::fillME(), EESelectiveReadoutTask::readOutUnitOf(), ecaldqm::setBinContentME(), ecaldqm::setBinEntriesME(), and ecaldqm::setBinErrorME().

680 {
681 
682  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
683 
685 
686  int idcc = eid.dccId();
687  int isc = eid.towerId();
688 
689  const std::vector<EcalScDetId> ids = Numbers::map->getEcalScDetId( idcc, isc, true );
690 
691  return ids.size() > 0 ? ids[0] : EcalScDetId();
692 
693 }
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
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
const EcalElectronicsMapping * Numbers::getElectronicsMapping ( )
static

Definition at line 919 of file Numbers.cc.

References edm::hlt::Exception, and map.

Referenced by EELedTask::analyze(), ecaldqm::fillME(), ecaldqm::setBinContentME(), ecaldqm::setBinEntriesME(), and ecaldqm::setBinErrorME().

920 {
921 
922  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
923 
924  return Numbers::map;
925 
926 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
unsigned Numbers::icEB ( const unsigned  ism,
const unsigned  ix,
const unsigned  iy 
)
static

Definition at line 729 of file Numbers.cc.

References indexEB().

Referenced by EBLaserClient::analyze(), EBTimingClient::analyze(), and EBTestPulseClient::analyze().

730 {
731 
732  return Numbers::indexEB( ism, ie, ip );
733 
734 }
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
Definition: Numbers.cc:698
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::icEE ( const unsigned  ism,
const unsigned  ix,
const unsigned  iy 
)
static

Definition at line 739 of file Numbers.cc.

References edm::hlt::Exception, EcalElectronicsMapping::getElectronicsId(), errorMatrix2Lands_multiChannel::id, EEDetId::kSizeForDenseIndexing, strip(), EcalElectronicsId::stripId(), EcalElectronicsId::towerId(), EcalElectronicsId::xtalId(), and EEDetId::XYMODE.

Referenced by EELaserTask::analyze(), EETestPulseTask::analyze(), EELedTask::analyze(), EESummaryClient::analyze(), EELedClient::analyze(), EELaserClient::analyze(), EETestPulseClient::analyze(), and EETimingClient::analyze().

740 {
741 
742  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
743 
744  int iz = 0;
745 
746  if( ism >= 1 && ism <= 9 ) iz = -1;
747  if( ism >= 10 && ism <= 18 ) iz = +1;
748 
749  EEDetId id(ix, iy, iz, EEDetId::XYMODE);
750 
752 
753  int vfe = eid.towerId();
754  int strip = eid.stripId();
755  int channel = eid.xtalId();
756 
757  // EE-05 & EE+05
758  if( ism == 8 || ism == 17 ) {
759  if( vfe > 17 ) vfe = vfe - 7;
760  }
761 
762  unsigned ic = (vfe-1)*25 + (strip-1)*5 + channel;
763 
764  if( ic == 0 || ic > static_cast<unsigned>( EEDetId::kSizeForDenseIndexing ) ) throw cms::Exception("InvalidParameter") << "ic=" << ic;
765 
766  return ic;
767 
768 }
int xtalId() const
get the channel id
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
int stripId() const
get the tower id
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static const int XYMODE
Definition: EEDetId.h:316
int towerId() const
get the tower id
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int Numbers::iEB ( const unsigned  ism)
static

Definition at line 78 of file Numbers.cc.

References edm::hlt::Exception, and ecalpyutils::ism().

Referenced by sEB().

79 {
80 
81  // EB-
82  if( ism >= 1 && ism <= 18 ) return( -ism );
83 
84  // EB+
85  if( ism >= 19 && ism <= 36 ) return( +ism - 18 );
86 
87  throw cms::Exception("InvalidParameter") << "Wrong SM id determination: iSM = " << ism;
88 
89 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int Numbers::iEE ( const unsigned  ism)
static

Definition at line 113 of file Numbers.cc.

References edm::hlt::Exception, and ecalpyutils::ism().

Referenced by sEE().

114 {
115 
116  // EE-
117  if( ism == 1 ) return( -7 );
118  if( ism == 2 ) return( -8 );
119  if( ism == 3 ) return( -9 );
120  if( ism == 4 ) return( -1 );
121  if( ism == 5 ) return( -2 );
122  if( ism == 6 ) return( -3 );
123  if( ism == 7 ) return( -4 );
124  if( ism == 8 ) return( -5 );
125  if( ism == 9 ) return( -6 );
126 
127  // EE+
128  if( ism == 10 ) return( +7 );
129  if( ism == 11 ) return( +8 );
130  if( ism == 12 ) return( +9 );
131  if( ism == 13 ) return( +1 );
132  if( ism == 14 ) return( +2 );
133  if( ism == 15 ) return( +3 );
134  if( ism == 16 ) return( +4 );
135  if( ism == 17 ) return( +5 );
136  if( ism == 18 ) return( +6 );
137 
138  throw cms::Exception("InvalidParameter") << "Wrong SM id determination: iSM = " << ism;
139 
140 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::indexEB ( const unsigned  ism,
const unsigned  ie,
const unsigned  ip 
)
static

Definition at line 698 of file Numbers.cc.

References EBDetId::kCrystalsPerSM.

Referenced by icEB().

699 {
700 
701  unsigned ic = (ip-1) + 20*(ie-1) + 1;
702 
703  if( ic == 0 || ic > static_cast<unsigned>( EBDetId::kCrystalsPerSM ) ) throw cms::Exception("InvalidParameter") << "ism=" << ism << " ie=" << ie << " ip=" << ip;
704 
705  return ic;
706 
707 }
static const int kCrystalsPerSM
Definition: EBDetId.h:130
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::indexEE ( const unsigned  ism,
const unsigned  ix,
const unsigned  iy 
)
static

Definition at line 712 of file Numbers.cc.

References edm::hlt::Exception, and EEDetId::validDetId().

Referenced by EcalDQMStatusReader::beginRun().

713 {
714 
715  int iz = 0;
716 
717  if( ism >= 1 && ism <= 9 ) iz = -1;
718  if( ism >= 10 && ism <= 18 ) iz = +1;
719 
720  if( !EEDetId::validDetId(ix, iy, iz) ) throw cms::Exception("InvalidParameter") << "ism=" << ism << " ix=" << ix << " iy=" << iy;
721 
722  return( 1000*ix + iy );
723 
724 }
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
void Numbers::initGeometry ( const edm::EventSetup setup,
bool  verbose = false 
)
static

Definition at line 50 of file Numbers.cc.

References gather_cfg::cout, edm::EventSetup::get(), patZpeak::handle, init, and edm::ESHandle< class >::product().

Referenced by EcalBarrelMonitorModule::analyze(), EcalEndcapMonitorModule::analyze(), EcalDQMStatusReader::beginRun(), EcalDQMStatusWriter::beginRun(), EBPedestalOnlineTask::beginRun(), EETestPulseTask::beginRun(), EBCosmicTask::beginRun(), EBPedestalTask::beginRun(), EEClusterTask::beginRun(), EECosmicTask::beginRun(), EBClusterTask::beginRun(), EBLaserTask::beginRun(), EELaserTask::beginRun(), EELedTask::beginRun(), EEPedestalOnlineTask::beginRun(), EBOccupancyTask::beginRun(), EEPedestalTask::beginRun(), EETrendTask::beginRun(), EBTestPulseTask::beginRun(), EBTrendTask::beginRun(), EBClusterTaskExtras::beginRun(), EEClusterTaskExtras::beginRun(), EBTimingTask::beginRun(), EBSelectiveReadoutTask::beginRun(), EERawDataTask::beginRun(), EEStatusFlagsTask::beginRun(), EBRawDataTask::beginRun(), EBStatusFlagsTask::beginRun(), EEIntegrityTask::beginRun(), EBIntegrityTask::beginRun(), EETimingTask::beginRun(), EEOccupancyTask::beginRun(), EETriggerTowerTask::beginRun(), EBTriggerTowerTask::beginRun(), EcalBarrelMonitorClient::beginRun(), EcalEndcapMonitorClient::beginRun(), and EESelectiveReadoutTask::beginRun().

51 {
52 
53  if( Numbers::init ) return;
54 
55  if ( verbose ) std::cout << "Initializing EcalElectronicsMapping ..." << std::endl;
56 
57  Numbers::init = true;
58 
60  setup.get<EcalMappingRcd>().get(handle);
61  Numbers::map = handle.product();
62 
64  setup.get<IdealGeometryRecord>().get(handleTT);
65  Numbers::mapTT = handleTT.product();
66 
67  edm::ESHandle<CaloGeometry> handleGeom;
68  setup.get<CaloGeometryRecord>().get(handleGeom);
69  Numbers::geometry = handleGeom.product();
70 
71  if ( verbose ) std::cout << "done." << std::endl;
72 
73 }
static bool init
Definition: Numbers.h:138
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
tuple handle
Definition: patZpeak.py:22
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:143
tuple cout
Definition: gather_cfg.py:121
static const CaloGeometry * geometry
Definition: Numbers.h:145
unsigned Numbers::iSC ( const EcalScDetId id)
static

Definition at line 437 of file Numbers.cc.

References EcalElectronicsMapping::getDCCandSC().

Referenced by EESelectiveReadoutTask::anaDigi(), EESelectiveReadoutTask::analyze(), EcalDQMStatusReader::beginRun(), and iTT().

438 {
439 
440  std::pair<int, int> dccsc = Numbers::map->getDCCandSC( id );
441 
442  return static_cast<unsigned>(dccsc.second);
443 
444 }
std::pair< int, int > getDCCandSC(EcalScDetId id) const
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
unsigned Numbers::iSC ( const unsigned  ism,
const EcalSubdetector  subdet,
const unsigned  i1,
const unsigned  i2 
)
static

Definition at line 449 of file Numbers.cc.

References EcalBarrel, EcalEndcap, edm::hlt::Exception, EcalElectronicsMapping::getElectronicsId(), errorMatrix2Lands_multiChannel::id, EcalElectronicsId::towerId(), and EEDetId::XYMODE.

450 {
451 
452  if( subdet == EcalBarrel ) {
453 
454  int iet = 1 + ((i1-1)/5);
455  int ipt = 1 + ((i2-1)/5);
456 
457  return( (ipt-1) + 4*(iet-1) + 1 );
458 
459  } else if( subdet == EcalEndcap ) {
460 
461  if( !Numbers::map ) throw( std::runtime_error( "ECAL Geometry not available" ) );
462 
463  // use ism only for determination of +/-
464 
465  int iz = 0;
466 
467  if( ism >= 1 && ism <= 9 ) iz = -1;
468  if( ism >= 10 && ism <= 18 ) iz = +1;
469 
470  EEDetId id(i1, i2, iz, EEDetId::XYMODE); // throws an exception if invalid
471 
473 
474  return( static_cast<unsigned>( eid.towerId() ));
475 
476  }
477 
478  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
479 
480 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static const int XYMODE
Definition: EEDetId.h:316
int towerId() const
get the tower id
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::iSM ( const unsigned  ism,
const EcalSubdetector  subdet 
)
static

Definition at line 246 of file Numbers.cc.

References EcalBarrel, EcalEndcap, edm::hlt::Exception, and ecalpyutils::ism().

Referenced by EBSelectiveReadoutTask::anaDigi(), EESelectiveReadoutTask::anaDigi(), EBCosmicTask::analyze(), EBRawDataTask::analyze(), EEStatusFlagsTask::analyze(), EETestPulseTask::analyze(), EBLaserTask::analyze(), EBOccupancyTask::analyze(), EBStatusFlagsTask::analyze(), EEClusterTask::analyze(), EEPedestalTask::analyze(), EECosmicTask::analyze(), EBPedestalOnlineTask::analyze(), EELaserTask::analyze(), EELedTask::analyze(), EBPedestalTask::analyze(), EEPedestalOnlineTask::analyze(), EERawDataTask::analyze(), EcalBarrelMonitorModule::analyze(), EcalEndcapMonitorModule::analyze(), EBIntegrityTask::analyze(), EEIntegrityTask::analyze(), EBTestPulseTask::analyze(), EBClusterTaskExtras::analyze(), EEClusterTaskExtras::analyze(), EBTimingTask::analyze(), EBSelectiveReadoutTask::analyze(), EETimingTask::analyze(), EEOccupancyTask::analyze(), EESelectiveReadoutTask::analyze(), EcalDQMStatusReader::beginRun(), Masks::maskChannel(), EBTriggerTowerTask::processDigis(), EETriggerTowerTask::processDigis(), EcalDQMStatusWriter::readEcalDQMChannelStatusFromFile(), RtHalf(), validEE(), and validEESc().

247 {
248 
249  if( subdet == EcalBarrel ) {
250 
251  if( ism >= 1 && ism <= 18 ) return( ism+18 );
252 
253  if( ism >= 19 && ism <= 36 ) return( ism-18 );
254 
255  throw cms::Exception("InvalidParameter") << "Wrong SM id: iSM = " << ism;
256 
257  } else if( subdet == EcalEndcap ) {
258 
259  if( ism >= 1 && ism <= 9 ) return( ism+9 );
260 
261  if (ism >= 10 && ism <= 18 ) return( ism-9 );
262 
263  throw cms::Exception("InvalidParameter") << "Wrong SM id: iSM = " << ism;
264 
265  }
266 
267  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
268 
269 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::iSM ( const EBDetId id)
static

Definition at line 274 of file Numbers.cc.

References EcalElectronicsId::dccId(), edm::hlt::Exception, and EcalElectronicsMapping::getElectronicsId().

275 {
276 
277  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
278 
280  int idcc = eid.dccId();
281 
282  // EB-/EB+
283  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
284 
285  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
286 
287 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
unsigned Numbers::iSM ( const EEDetId id)
static

Definition at line 293 of file Numbers.cc.

References EcalElectronicsId::dccId(), edm::hlt::Exception, and EcalElectronicsMapping::getElectronicsId().

294 {
295 
296  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
297 
299  int idcc = eid.dccId();
300 
301  // EE-
302  if( idcc >= 1 && idcc <= 9 ) return( idcc );
303 
304  // EE+
305  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
306 
307  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
308 
309 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
unsigned Numbers::iSM ( const EcalTrigTowerDetId id)
static

Definition at line 314 of file Numbers.cc.

References EcalElectronicsMapping::DCCid(), EcalBarrel, EcalEndcap, edm::hlt::Exception, and subDet().

315 {
316 
317  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
318 
319  EcalSubdetector subdet = Numbers::subDet( id );
320 
321  if( subdet == EcalBarrel ) {
322 
323  int idcc = Numbers::map->DCCid(id);
324 
325  // EB-/EB+
326  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
327 
328  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
329 
330  } else if( subdet == EcalEndcap) {
331 
332  int idcc = Numbers::map->DCCid(id);
333 
334  // EE-
335  if( idcc >= 1 && idcc <= 9 ) return( idcc );
336 
337  // EE+
338  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
339 
340  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
341 
342  }
343 
344  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
345 
346 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
EcalSubdetector
unsigned Numbers::iSM ( const EcalElectronicsId id)
static

Definition at line 351 of file Numbers.cc.

References edm::hlt::Exception.

352 {
353 
354  int idcc = id.dccId();
355 
356  // EE-
357  if( idcc >= 1 && idcc <= 9 ) return( idcc );
358 
359  // EB-/EB+
360  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
361 
362  // EE+
363  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
364 
365  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
366 
367 }
unsigned Numbers::iSM ( const EcalPnDiodeDetId id)
static

Definition at line 372 of file Numbers.cc.

References edm::hlt::Exception.

373 {
374 
375  int idcc = id.iDCCId();
376 
377  // EE-
378  if( idcc >= 1 && idcc <= 9 ) return( idcc );
379 
380  // EB-/EB+
381  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
382 
383  // EE+
384  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
385 
386  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
387 
388 }
unsigned Numbers::iSM ( const EcalScDetId id)
static

Definition at line 393 of file Numbers.cc.

References edm::hlt::Exception, and EcalElectronicsMapping::getDCCandSC().

394 {
395 
396  std::pair<int, int> dccsc = Numbers::map->getDCCandSC( id );
397 
398  int idcc = dccsc.first;
399 
400  // EE-
401  if( idcc >= 1 && idcc <= 9 ) return( idcc );
402 
403  // EB-/EB+
404  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
405 
406  // EE+
407  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
408 
409  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
410 
411 }
std::pair< int, int > getDCCandSC(EcalScDetId id) const
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
unsigned Numbers::iSM ( const EcalDCCHeaderBlock id,
const EcalSubdetector  subdet 
)
static

Definition at line 416 of file Numbers.cc.

References edm::hlt::Exception.

417 {
418 
419  int idcc = id.id();
420 
421  // EE-
422  if( idcc >= 1 && idcc <= 9 ) return( idcc );
423 
424  // EB-/EB+
425  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
426 
427  // EE+
428  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
429 
430  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
431 
432 }
unsigned Numbers::iTCC ( const unsigned  ism,
const EcalSubdetector  subdet,
const unsigned  i1,
const unsigned  i2 
)
static

Definition at line 534 of file Numbers.cc.

References EcalBarrel, EcalEndcap, EBDetId::ETAPHIMODE, edm::hlt::Exception, errorMatrix2Lands_multiChannel::id, EcalTrigTowerConstituentsMap::towerOf(), and EEDetId::XYMODE.

Referenced by EESelectiveReadoutTask::anaDigi(), EESelectiveReadoutTask::analyze(), EETriggerTowerTask::processDigis(), and EBTriggerTowerTask::processDigis().

535 {
536 
537  if( !Numbers::mapTT ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
538 
539  if( subdet == EcalBarrel ) {
540 
541  EBDetId id(i1, i2, EBDetId::ETAPHIMODE);
542 
543  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
544 
545  return( static_cast<unsigned>( Numbers::map->TCCid(towid) ) );
546 
547  } else if( subdet == EcalEndcap) {
548 
549  int iz = 0;
550 
551  if( ism >= 1 && ism <= 9 ) iz = -1;
552  if( ism >= 10 && ism <= 18 ) iz = +1;
553 
554  EEDetId id(i1, i2, iz, EEDetId::XYMODE);
555 
556  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
557 
558  return( static_cast<unsigned>( Numbers::map->TCCid(towid) ) );
559 
560  }
561 
562  throw cms::Exception("InvalidSubdetector") << "subdet = " << subdet;
563 
564 }
static const int XYMODE
Definition: EEDetId.h:316
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
static const int ETAPHIMODE
Definition: EBDetId.h:145
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:143
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::iTCC ( const EcalTrigTowerDetId id)
static

Definition at line 569 of file Numbers.cc.

References EcalBarrel, EcalEndcap, edm::hlt::Exception, and subDet().

570 {
571 
572  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
573 
574  EcalSubdetector subdet = Numbers::subDet( id );
575 
576  if( subdet == EcalBarrel || subdet == EcalEndcap ) return( static_cast<unsigned>( Numbers::map->TCCid(id) ) );
577 
578  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
579 
580 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
EcalSubdetector
unsigned Numbers::iTT ( const unsigned  ism,
const EcalSubdetector  subdet,
const unsigned  i1,
const unsigned  i2 
)
static

Definition at line 485 of file Numbers.cc.

References EcalBarrel, EcalEndcap, edm::hlt::Exception, errorMatrix2Lands_multiChannel::id, iSC(), EcalTrigTowerConstituentsMap::towerOf(), and EEDetId::XYMODE.

Referenced by EBSelectiveReadoutTask::anaDigi(), EESelectiveReadoutTask::anaDigi(), EBSelectiveReadoutTask::analyze(), EESelectiveReadoutTask::analyze(), EcalDQMStatusReader::beginRun(), iTT(), EBTriggerTowerTask::processDigis(), and EETriggerTowerTask::processDigis().

486 {
487 
488  if( subdet == EcalBarrel ) {
489 
490  return( Numbers::iSC(ism, subdet, i1, i2) );
491 
492  } else if( subdet == EcalEndcap ) {
493 
494  if( !Numbers::mapTT ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
495 
496  // use ism only for determination of +/-
497 
498  int iz = 0;
499 
500  if( ism >= 1 && ism <= 9 ) iz = -1;
501  if( ism >= 10 && ism <= 18 ) iz = +1;
502 
503  EEDetId id(i1, i2, iz, EEDetId::XYMODE); // throws an exception if invalid
504 
505  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
506 
507  return( static_cast<unsigned>( iTT(towid) ) );
508 
509  }
510 
511  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
512 
513 }
static const int XYMODE
Definition: EEDetId.h:316
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
static unsigned iSC(const EcalScDetId &id)
Definition: Numbers.cc:437
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:143
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:485
unsigned Numbers::iTT ( const EcalTrigTowerDetId id)
static

Definition at line 518 of file Numbers.cc.

References EcalBarrel, EcalEndcap, edm::hlt::Exception, iTT(), and subDet().

519 {
520 
521  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
522 
523  EcalSubdetector subdet = Numbers::subDet( id );
524 
525  if( subdet == EcalBarrel || subdet == EcalEndcap ) return( static_cast<unsigned>( Numbers::map->iTT(id) ) );
526 
527  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
528 
529 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
EcalSubdetector
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:485
int Numbers::ix0EE ( const unsigned  ism)
static

Definition at line 773 of file Numbers.cc.

Referenced by EEPedestalTask::analyze(), EESummaryClient::analyze(), EELedClient::analyze(), EELaserClient::analyze(), EETestPulseClient::analyze(), EEIntegrityClient::analyze(), EEPedestalClient::analyze(), EEPedestalOnlineClient::analyze(), EETimingClient::analyze(), ecaldqm::bookME(), ecaldqm::getBinME(), ix0EEm(), Masks::maskChannel(), EcalEndcapMonitorModule::setup(), EECosmicTask::setup(), EELedTask::setup(), EELaserTask::setup(), EEPedestalOnlineTask::setup(), EEPedestalTask::setup(), EETestPulseTask::setup(), EEStatusFlagsTask::setup(), EEIntegrityTask::setup(), EEOccupancyTask::setup(), EETimingTask::setup(), EELedClient::setup(), EELaserClient::setup(), EETestPulseClient::setup(), EEPedestalOnlineClient::setup(), EEIntegrityClient::setup(), EEPedestalClient::setup(), EETriggerTowerClient::setup(), EETimingClient::setup(), and EETriggerTowerTask::setup().

774 {
775 
776  if( ism == 1 || ism == 15 ) return( - 5 );
777  if( ism == 2 || ism == 14 ) return( + 0 );
778  if( ism == 3 || ism == 13 ) return( + 10 );
779  if( ism == 4 || ism == 12 ) return( + 40 );
780  if( ism == 5 || ism == 11 ) return( + 50 );
781  if( ism == 6 || ism == 10 ) return( + 55 );
782  if( ism == 7 || ism == 18 ) return( + 50 );
783  if( ism == 8 || ism == 17 ) return( + 25 );
784  if( ism == 9 || ism == 16 ) return( + 0 );
785 
786  return( + 0 );
787 
788 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int Numbers::ix0EEm ( const unsigned  ism)
static

Definition at line 793 of file Numbers.cc.

References ix0EE().

794 {
795 
796  switch( ism ){
797  case 1: return -105;
798  case 2: return -100;
799  case 3: return -90;
800  case 4: return -60;
801  case 5: return -50;
802  case 6: return -45;
803  case 7: return -50;
804  case 8: return -75;
805  case 9: return -100;
806  }
807 
808  return ix0EE( ism );
809 }
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int Numbers::iy0EE ( const unsigned  ism)
static

Definition at line 812 of file Numbers.cc.

Referenced by EEPedestalTask::analyze(), EESummaryClient::analyze(), EELedClient::analyze(), EELaserClient::analyze(), EETestPulseClient::analyze(), EEPedestalClient::analyze(), EEPedestalOnlineClient::analyze(), EEIntegrityClient::analyze(), EETimingClient::analyze(), ecaldqm::bookME(), ecaldqm::getBinME(), Masks::maskChannel(), EcalEndcapMonitorModule::setup(), EECosmicTask::setup(), EELaserTask::setup(), EELedTask::setup(), EEPedestalOnlineTask::setup(), EEPedestalTask::setup(), EETestPulseTask::setup(), EEStatusFlagsTask::setup(), EEIntegrityTask::setup(), EETimingTask::setup(), EEOccupancyTask::setup(), EELedClient::setup(), EELaserClient::setup(), EEIntegrityClient::setup(), EEPedestalOnlineClient::setup(), EEPedestalClient::setup(), EETestPulseClient::setup(), EETriggerTowerClient::setup(), EETimingClient::setup(), and EETriggerTowerTask::setup().

813 {
814 
815  if( ism == 1 || ism == 10 ) return( + 20 );
816  if( ism == 2 || ism == 11 ) return( + 45 );
817  if( ism == 3 || ism == 12 ) return( + 55 );
818  if( ism == 4 || ism == 13 ) return( + 55 );
819  if( ism == 5 || ism == 14 ) return( + 45 );
820  if( ism == 6 || ism == 15 ) return( + 20 );
821  if( ism == 7 || ism == 16 ) return( + 0 );
822  if( ism == 8 || ism == 17 ) return( - 5 );
823  if( ism == 9 || ism == 18 ) return( + 0 );
824 
825  return( + 0 );
826 
827 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::nCCUs ( const unsigned  ism)
static

Definition at line 875 of file Numbers.cc.

876 {
877  switch(ism){
878  case 8:
879  case 17:
880  return 41;
881  case 1:
882  case 6:
883  case 10:
884  case 15:
885  return 34;
886  case 3:
887  case 12:
888  case 4:
889  case 13:
890  case 7:
891  case 16:
892  case 9:
893  case 18:
894  return 33;
895  case 2:
896  case 11:
897  case 5:
898  case 14:
899  return 32;
900  default:
901  return 0;
902  }
903 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::nTTs ( const unsigned  itcc)
static

Definition at line 906 of file Numbers.cc.

References crystals(), EcalElectronicsMapping::iTT(), map, mapTT, EcalElectronicsMapping::tccConstituents(), and EcalTrigTowerConstituentsMap::towerOf().

907 {
908  using namespace std;
909  vector<DetId> crystals(map->tccConstituents(itcc));
910 
911  set<int> itts;
912  for(vector<DetId>::iterator cItr(crystals.begin()); cItr != crystals.end(); ++cItr)
913  itts.insert(map->iTT(mapTT->towerOf(*cItr)));
914 
915  return itts.size();
916 }
std::vector< DetId > tccConstituents(int tccId) const
Get the constituent detids for this dccId.
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
static const EcalElectronicsMapping * map
Definition: Numbers.h:142
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:143
float Numbers::phi ( const DetId id)
static

Definition at line 936 of file Numbers.cc.

References geometry, CaloGeometry::getPosition(), PV3DBase< T, PVType, FrameType >::phi(), and pos.

Referenced by EETimingClient::analyze().

937 {
938  const GlobalPoint& pos = geometry->getPosition(id);
939  return pos.phi();
940 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:68
static const CaloGeometry * geometry
Definition: Numbers.h:145
unsigned Numbers::RtHalf ( const EBDetId id)
static

Definition at line 608 of file Numbers.cc.

Referenced by EBLaserTask::analyze(), EELedTask::analyze(), and EELaserTask::analyze().

609 {
610 
611  int ic = id.ic();
612  int ie = (ic-1)/20 + 1;
613  int ip = (ic-1)%20 + 1;
614 
615  if( ie > 5 && ip < 11 ) return 1;
616 
617  return 0;
618 
619 }
unsigned Numbers::RtHalf ( const EEDetId id)
static

Definition at line 624 of file Numbers.cc.

References ecalpyutils::ism(), and iSM().

625 {
626 
627  int ix = id.ix();
628 
629  int ism = Numbers::iSM( id );
630 
631  // EE-05
632  if ( ism == 8 && ix > 50 ) return 1;
633 
634  // EE+05
635  if ( ism == 17 && ix > 50 ) return 1;
636 
637  return 0;
638 
639 }
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::string Numbers::sEB ( const unsigned  ism)
static

Definition at line 94 of file Numbers.cc.

References iEB(), and alignCSCRings::s.

Referenced by EBSummaryClient::analyze(), EBStatusFlagsClient::analyze(), EBTimingClient::analyze(), EBLaserClient::analyze(), EBPedestalClient::analyze(), EBCosmicClient::analyze(), EBPedestalOnlineClient::analyze(), EBIntegrityClient::analyze(), EBOccupancyClient::analyze(), EBTestPulseClient::analyze(), EBTriggerTowerClient::analyze(), EBDaqInfoTask::beginJob(), EBDcsInfoTask::beginJob(), EBDataCertificationTask::beginJob(), EcalDQMStatusReader::beginRun(), EcalBarrelMonitorClient::beginRun(), EBDataCertificationTask::endLuminosityBlock(), EcalBarrelMonitorClient::endRun(), EBPedestalTask::setup(), EBCosmicTask::setup(), EBPedestalOnlineTask::setup(), EBLaserTask::setup(), EBOccupancyTask::setup(), EBTestPulseTask::setup(), EcalBarrelMonitorModule::setup(), EBTimingTask::setup(), EBSelectiveReadoutTask::setup(), EBRawDataTask::setup(), EBStatusFlagsTask::setup(), EBSummaryClient::setup(), EBIntegrityTask::setup(), EBTimingClient::setup(), EBLaserClient::setup(), EBPedestalOnlineClient::setup(), EBTestPulseClient::setup(), EBIntegrityClient::setup(), EBPedestalClient::setup(), EBTriggerTowerClient::setup(), and EBTriggerTowerTask::setup().

95 {
96 
97  int ieb = Numbers::iEB( ism );
98 
99  std::ostringstream s;
100  s << "EB" << std::setw(3) << std::setfill('0')
101  << std::setiosflags( std::ios::showpos )
102  << std::setiosflags( std::ios::internal )
103  << ieb
104  << std::resetiosflags( std::ios::showpos )
105  << std::resetiosflags( std::ios::internal );
106  return( s.str() );
107 
108 }
static int iEB(const unsigned ism)
Definition: Numbers.cc:78
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::string Numbers::sEE ( const unsigned  ism)
static

Definition at line 226 of file Numbers.cc.

References iEE(), and alignCSCRings::s.

Referenced by EESummaryClient::analyze(), EELaserClient::analyze(), EELedClient::analyze(), EEStatusFlagsClient::analyze(), EECosmicClient::analyze(), EETestPulseClient::analyze(), EEOccupancyClient::analyze(), EEIntegrityClient::analyze(), EEPedestalClient::analyze(), EEPedestalOnlineClient::analyze(), EETriggerTowerClient::analyze(), EETimingClient::analyze(), EEDaqInfoTask::beginJob(), EEDataCertificationTask::beginJob(), EEDcsInfoTask::beginJob(), EcalDQMStatusReader::beginRun(), EcalEndcapMonitorClient::beginRun(), EEDataCertificationTask::endLuminosityBlock(), EcalEndcapMonitorClient::endRun(), EcalEndcapMonitorModule::setup(), EELaserTask::setup(), EEPedestalOnlineTask::setup(), EEPedestalTask::setup(), EETestPulseTask::setup(), EECosmicTask::setup(), EELedTask::setup(), EERawDataTask::setup(), EEStatusFlagsTask::setup(), EESummaryClient::setup(), EEIntegrityTask::setup(), EEOccupancyTask::setup(), EETimingTask::setup(), EELedClient::setup(), EELaserClient::setup(), EEPedestalOnlineClient::setup(), EEIntegrityClient::setup(), EETestPulseClient::setup(), EEPedestalClient::setup(), EETriggerTowerClient::setup(), EETimingClient::setup(), EESelectiveReadoutTask::setup(), and EETriggerTowerTask::setup().

227 {
228 
229  int iee = Numbers::iEE( ism );
230 
231  std::ostringstream s;
232  s << "EE" << std::setw(3) << std::setfill('0')
233  << std::setiosflags( std::ios::showpos )
234  << std::setiosflags( std::ios::internal )
235  << iee
236  << std::resetiosflags( std::ios::showpos )
237  << std::resetiosflags( std::ios::internal );
238  return( s.str() );
239 
240 }
static int iEE(const unsigned ism)
Definition: Numbers.cc:113
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
EcalSubdetector Numbers::subDet ( const EBDetId id)
static
EcalSubdetector Numbers::subDet ( const EEDetId id)
static

Definition at line 155 of file Numbers.cc.

156 {
157 
158  return( id.subdet() );
159 
160 }
EcalSubdetector Numbers::subDet ( const EcalTrigTowerDetId id)
static

Definition at line 165 of file Numbers.cc.

References subDet().

166 {
167 
168  return( id.subDet() );
169 
170 }
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
EcalSubdetector Numbers::subDet ( const EcalScDetId id)
static

Definition at line 175 of file Numbers.cc.

176 {
177 
178  return( id.subdet() );
179 
180 }
EcalSubdetector Numbers::subDet ( const EcalElectronicsId id)
static

Definition at line 185 of file Numbers.cc.

186 {
187 
188  return( id.subdet() );
189 
190 }
EcalSubdetector Numbers::subDet ( const EcalPnDiodeDetId id)
static

Definition at line 195 of file Numbers.cc.

196 {
197 
198  return( (EcalSubdetector) id.iEcalSubDetectorId() );
199 
200 }
EcalSubdetector
EcalSubdetector Numbers::subDet ( const EcalDCCHeaderBlock id)
static

Definition at line 205 of file Numbers.cc.

References EcalBarrel, EcalEndcap, and edm::hlt::Exception.

206 {
207 
208  int idcc = id.id();
209 
210  // EE-
211  if ( idcc >= 1 && idcc <= 9 ) return( EcalEndcap );
212 
213  // EB-/EB+
214  if ( idcc >= 10 && idcc <= 45 ) return( EcalBarrel);
215 
216  // EE+
217  if ( idcc >= 46 && idcc <= 54 ) return( EcalEndcap );
218 
219  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
220 
221 }
bool Numbers::validEE ( const unsigned  ism,
const unsigned  ix,
const unsigned  iy 
)
static

Definition at line 832 of file Numbers.cc.

References errorMatrix2Lands_multiChannel::id, iSM(), EEDetId::validDetId(), and EEDetId::XYMODE.

Referenced by EEPedestalTask::analyze(), EESummaryClient::analyze(), EELaserClient::analyze(), EELedClient::analyze(), EEIntegrityClient::analyze(), EEPedestalClient::analyze(), EEPedestalOnlineClient::analyze(), EETestPulseClient::analyze(), EETimingClient::analyze(), Masks::maskChannel(), EELaserClient::setup(), EELedClient::setup(), EEIntegrityClient::setup(), EEPedestalOnlineClient::setup(), EEPedestalClient::setup(), EETestPulseClient::setup(), and EETimingClient::setup().

833 {
834 
835  int iz = 0;
836 
837  if( ism >= 1 && ism <= 9 ) iz = -1;
838  if( ism >= 10 && ism <= 18 ) iz = +1;
839 
840  if( EEDetId::validDetId(ix, iy, iz) ) {
841 
842  EEDetId id(ix, iy, iz, EEDetId::XYMODE);
843 
844  if( Numbers::iSM( id ) == ism ) return true;
845 
846  }
847 
848  return false;
849 
850 }
static const int XYMODE
Definition: EEDetId.h:316
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
bool Numbers::validEESc ( const unsigned  ism,
const unsigned  ix,
const unsigned  iy 
)
static

Definition at line 855 of file Numbers.cc.

References errorMatrix2Lands_multiChannel::id, iSM(), and EcalScDetId::validDetId().

Referenced by EESummaryClient::analyze().

856 {
857 
858  int iz = 0;
859 
860  if( ism >= 1 && ism <= 9 ) iz = -1;
861  if( ism >= 10 && ism <= 18 ) iz = +1;
862 
863  if( EcalScDetId::validDetId(ix, iy, iz) ) {
864 
865  EcalScDetId id(ix, iy, iz);
866 
867  if( Numbers::iSM( id ) == ism ) return true;
868 
869  }
870 
871  return false;
872 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:63
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56

Member Data Documentation

std::vector< DetId > Numbers::crystalsDCC_
staticprivate

Definition at line 151 of file Numbers.h.

Referenced by crystals().

const unsigned Numbers::crystalsDCCArraySize_ = 100 * 54
staticprivate

Definition at line 148 of file Numbers.h.

Referenced by crystals().

std::vector< DetId > Numbers::crystalsTCC_
staticprivate

Definition at line 150 of file Numbers.h.

Referenced by crystals().

const unsigned Numbers::crystalsTCCArraySize_ = 100 * 108
staticprivate

Definition at line 147 of file Numbers.h.

Referenced by crystals().

const CaloGeometry * Numbers::geometry = 0
staticprivate

Definition at line 145 of file Numbers.h.

Referenced by eta(), Vispa.Gui.ConnectableWidget.ConnectableWidget::leaveEvent(), and phi().

bool Numbers::init = false
staticprivate

Definition at line 138 of file Numbers.h.

Referenced by initGeometry().

const EcalElectronicsMapping * Numbers::map = 0
staticprivate

Definition at line 142 of file Numbers.h.

Referenced by getElectronicsMapping(), and nTTs().

const EcalTrigTowerConstituentsMap * Numbers::mapTT = 0
staticprivate

Definition at line 143 of file Numbers.h.

Referenced by nTTs().