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 35 of file Numbers.h.

Constructor & Destructor Documentation

Numbers::Numbers ( )
inlineprivate

Definition at line 135 of file Numbers.h.

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

Definition at line 136 of file Numbers.h.

136 {}; // Hidden to force static use

Member Function Documentation

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

Definition at line 582 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().

583 {
584 
585  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
586 
587  int itcc = Numbers::map->TCCid(id);
588  int itt = Numbers::map->iTT(id);
589 
590  unsigned index = 100*(itcc-1) + (itt-1);
591 
592  if( index >= crystalsTCCArraySize_ ) throw cms::Exception("InvalidParameter") << "TCC index " << index;
593 
594  if ( Numbers::crystalsTCC_[index].size() == 0 ) {
596  }
597 
598  return &(Numbers::crystalsTCC_[index]);
599 
600 }
static const unsigned crystalsTCCArraySize_
Definition: Numbers.h:145
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
static const EcalElectronicsMapping * map
Definition: Numbers.h:140
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:148
tuple size
Write out results.
std::vector< DetId > * Numbers::crystals ( const EcalElectronicsId id)
static

Definition at line 641 of file Numbers.cc.

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

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

Definition at line 656 of file Numbers.cc.

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

657 {
658 
659  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
660 
661  unsigned index = 100*(idcc-1) + (isc-1);
662 
663  if( index > crystalsDCCArraySize_ ) throw cms::Exception("InvalidParameter") << "DCC index " << index;
664 
665  if ( Numbers::crystalsDCC_[index].size() == 0 ) {
667  }
668 
669  return &(Numbers::crystalsDCC_[index]);
670 
671 }
static std::vector< DetId > crystalsDCC_[crystalsDCCArraySize_]
Definition: Numbers.h:149
static const EcalElectronicsMapping * map
Definition: Numbers.h:140
static const unsigned crystalsDCCArraySize_
Definition: Numbers.h:146
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 926 of file Numbers.cc.

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

Referenced by EETimingClient::analyze().

927 {
928  const GlobalPoint& pos = geometry->getPosition(id);
929  return pos.eta();
930 }
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:76
static const CaloGeometry * geometry
Definition: Numbers.h:143
const EcalScDetId Numbers::getEcalScDetId ( const EEDetId id)
static

Definition at line 676 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().

677 {
678 
679  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
680 
682 
683  int idcc = eid.dccId();
684  int isc = eid.towerId();
685 
686  const std::vector<EcalScDetId> ids = Numbers::map->getEcalScDetId( idcc, isc, true );
687 
688  return ids.size() > 0 ? ids[0] : EcalScDetId();
689 
690 }
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:140
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 916 of file Numbers.cc.

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

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

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

Definition at line 726 of file Numbers.cc.

References indexEB().

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

727 {
728 
729  return Numbers::indexEB( ism, ie, ip );
730 
731 }
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
Definition: Numbers.cc:695
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 736 of file Numbers.cc.

References edm::hlt::Exception, EcalElectronicsMapping::getElectronicsId(), EEDetId::kSizeForDenseIndexing, 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().

737 {
738 
739  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
740 
741  int iz = 0;
742 
743  if( ism >= 1 && ism <= 9 ) iz = -1;
744  if( ism >= 10 && ism <= 18 ) iz = +1;
745 
746  EEDetId id(ix, iy, iz, EEDetId::XYMODE);
747 
749 
750  int vfe = eid.towerId();
751  int strip = eid.stripId();
752  int channel = eid.xtalId();
753 
754  // EE-05 & EE+05
755  if( ism == 8 || ism == 17 ) {
756  if( vfe > 17 ) vfe = vfe - 7;
757  }
758 
759  unsigned ic = (vfe-1)*25 + (strip-1)*5 + channel;
760 
761  if( ic == 0 || ic > static_cast<unsigned>( EEDetId::kSizeForDenseIndexing ) ) throw cms::Exception("InvalidParameter") << "ic=" << ic;
762 
763  return ic;
764 
765 }
int xtalId() const
get the channel id
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:339
int towerId() const
get the tower id
static const EcalElectronicsMapping * map
Definition: Numbers.h:140
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 75 of file Numbers.cc.

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

Referenced by sEB().

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

Definition at line 110 of file Numbers.cc.

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

Referenced by sEE().

111 {
112 
113  // EE-
114  if( ism == 1 ) return( -7 );
115  if( ism == 2 ) return( -8 );
116  if( ism == 3 ) return( -9 );
117  if( ism == 4 ) return( -1 );
118  if( ism == 5 ) return( -2 );
119  if( ism == 6 ) return( -3 );
120  if( ism == 7 ) return( -4 );
121  if( ism == 8 ) return( -5 );
122  if( ism == 9 ) return( -6 );
123 
124  // EE+
125  if( ism == 10 ) return( +7 );
126  if( ism == 11 ) return( +8 );
127  if( ism == 12 ) return( +9 );
128  if( ism == 13 ) return( +1 );
129  if( ism == 14 ) return( +2 );
130  if( ism == 15 ) return( +3 );
131  if( ism == 16 ) return( +4 );
132  if( ism == 17 ) return( +5 );
133  if( ism == 18 ) return( +6 );
134 
135  throw cms::Exception("InvalidParameter") << "Wrong SM id determination: iSM = " << ism;
136 
137 }
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 695 of file Numbers.cc.

References EBDetId::kCrystalsPerSM.

Referenced by icEB().

696 {
697 
698  unsigned ic = (ip-1) + 20*(ie-1) + 1;
699 
700  if( ic == 0 || ic > static_cast<unsigned>( EBDetId::kCrystalsPerSM ) ) throw cms::Exception("InvalidParameter") << "ism=" << ism << " ie=" << ie << " ip=" << ip;
701 
702  return ic;
703 
704 }
static const int kCrystalsPerSM
Definition: EBDetId.h:151
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 709 of file Numbers.cc.

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

Referenced by EcalDQMStatusReader::beginRun().

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

Definition at line 47 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(), EEPedestalOnlineTask::beginRun(), EBPedestalTask::beginRun(), EECosmicTask::beginRun(), EEPedestalTask::beginRun(), EETestPulseTask::beginRun(), EBCosmicTask::beginRun(), EBOccupancyTask::beginRun(), EELedTask::beginRun(), EELaserTask::beginRun(), EBTestPulseTask::beginRun(), EBLaserTask::beginRun(), EBTimingTask::beginRun(), EBClusterTaskExtras::beginRun(), EBSelectiveReadoutTask::beginRun(), EEClusterTask::beginRun(), EEClusterTaskExtras::beginRun(), EBClusterTask::beginRun(), EBStatusFlagsTask::beginRun(), EEStatusFlagsTask::beginRun(), EBTrendTask::beginRun(), EETrendTask::beginRun(), EERawDataTask::beginRun(), EBRawDataTask::beginRun(), EBIntegrityTask::beginRun(), EEIntegrityTask::beginRun(), EETimingTask::beginRun(), EEOccupancyTask::beginRun(), EBTriggerTowerTask::beginRun(), EETriggerTowerTask::beginRun(), EcalBarrelMonitorClient::beginRun(), EcalEndcapMonitorClient::beginRun(), and EESelectiveReadoutTask::beginRun().

48 {
49 
50  if( Numbers::init ) return;
51 
52  if ( verbose ) std::cout << "Initializing EcalElectronicsMapping ..." << std::endl;
53 
54  Numbers::init = true;
55 
57  setup.get<EcalMappingRcd>().get(handle);
58  Numbers::map = handle.product();
59 
61  setup.get<IdealGeometryRecord>().get(handleTT);
62  Numbers::mapTT = handleTT.product();
63 
64  edm::ESHandle<CaloGeometry> handleGeom;
65  setup.get<CaloGeometryRecord>().get(handleGeom);
66  Numbers::geometry = handleGeom.product();
67 
68  if ( verbose ) std::cout << "done." << std::endl;
69 
70 }
static bool init
Definition: Numbers.h:136
static const EcalElectronicsMapping * map
Definition: Numbers.h:140
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:141
tuple cout
Definition: gather_cfg.py:121
static const CaloGeometry * geometry
Definition: Numbers.h:143
unsigned Numbers::iSC ( const EcalScDetId id)
static

Definition at line 434 of file Numbers.cc.

References EcalElectronicsMapping::getDCCandSC().

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

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

Definition at line 446 of file Numbers.cc.

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

447 {
448 
449  if( subdet == EcalBarrel ) {
450 
451  int iet = 1 + ((i1-1)/5);
452  int ipt = 1 + ((i2-1)/5);
453 
454  return( (ipt-1) + 4*(iet-1) + 1 );
455 
456  } else if( subdet == EcalEndcap ) {
457 
458  if( !Numbers::map ) throw( std::runtime_error( "ECAL Geometry not available" ) );
459 
460  // use ism only for determination of +/-
461 
462  int iz = 0;
463 
464  if( ism >= 1 && ism <= 9 ) iz = -1;
465  if( ism >= 10 && ism <= 18 ) iz = +1;
466 
467  EEDetId id(i1, i2, iz, EEDetId::XYMODE); // throws an exception if invalid
468 
470 
471  return( static_cast<unsigned>( eid.towerId() ));
472 
473  }
474 
475  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
476 
477 }
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:339
int towerId() const
get the tower id
static const EcalElectronicsMapping * map
Definition: Numbers.h:140
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 243 of file Numbers.cc.

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

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

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

Definition at line 271 of file Numbers.cc.

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

272 {
273 
274  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
275 
277  int idcc = eid.dccId();
278 
279  // EB-/EB+
280  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
281 
282  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
283 
284 }
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:140
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 290 of file Numbers.cc.

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

291 {
292 
293  if( !Numbers::map ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
294 
296  int idcc = eid.dccId();
297 
298  // EE-
299  if( idcc >= 1 && idcc <= 9 ) return( idcc );
300 
301  // EE+
302  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
303 
304  throw cms::Exception("InvalidParameter") << "Wrong DCC id: dcc = " << idcc;
305 
306 }
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:140
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 311 of file Numbers.cc.

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

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

Definition at line 348 of file Numbers.cc.

References edm::hlt::Exception.

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

Definition at line 369 of file Numbers.cc.

References edm::hlt::Exception.

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

Definition at line 390 of file Numbers.cc.

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

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

Definition at line 413 of file Numbers.cc.

References edm::hlt::Exception.

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

Definition at line 531 of file Numbers.cc.

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

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

532 {
533 
534  if( !Numbers::mapTT ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
535 
536  if( subdet == EcalBarrel ) {
537 
538  EBDetId id(i1, i2, EBDetId::ETAPHIMODE);
539 
540  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
541 
542  return( static_cast<unsigned>( Numbers::map->TCCid(towid) ) );
543 
544  } else if( subdet == EcalEndcap) {
545 
546  int iz = 0;
547 
548  if( ism >= 1 && ism <= 9 ) iz = -1;
549  if( ism >= 10 && ism <= 18 ) iz = +1;
550 
551  EEDetId id(i1, i2, iz, EEDetId::XYMODE);
552 
553  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
554 
555  return( static_cast<unsigned>( Numbers::map->TCCid(towid) ) );
556 
557  }
558 
559  throw cms::Exception("InvalidSubdetector") << "subdet = " << subdet;
560 
561 }
static const int XYMODE
Definition: EEDetId.h:339
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:140
static const int ETAPHIMODE
Definition: EBDetId.h:166
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:141
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned Numbers::iTCC ( const EcalTrigTowerDetId id)
static

Definition at line 566 of file Numbers.cc.

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

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

Definition at line 482 of file Numbers.cc.

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

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

483 {
484 
485  if( subdet == EcalBarrel ) {
486 
487  return( Numbers::iSC(ism, subdet, i1, i2) );
488 
489  } else if( subdet == EcalEndcap ) {
490 
491  if( !Numbers::mapTT ) throw cms::Exception("ObjectUnavailable") << "ECAL Geometry not available";
492 
493  // use ism only for determination of +/-
494 
495  int iz = 0;
496 
497  if( ism >= 1 && ism <= 9 ) iz = -1;
498  if( ism >= 10 && ism <= 18 ) iz = +1;
499 
500  EEDetId id(i1, i2, iz, EEDetId::XYMODE); // throws an exception if invalid
501 
502  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
503 
504  return( static_cast<unsigned>( iTT(towid) ) );
505 
506  }
507 
508  throw cms::Exception("InvalidParameter") << "Invalid subdetector: subdet = " << subdet;
509 
510 }
static const int XYMODE
Definition: EEDetId.h:339
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:434
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:141
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:482
unsigned Numbers::iTT ( const EcalTrigTowerDetId id)
static

Definition at line 515 of file Numbers.cc.

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

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

Definition at line 770 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(), EEPedestalOnlineTask::setup(), EECosmicTask::setup(), EEPedestalTask::setup(), EELaserTask::setup(), EELedTask::setup(), EETestPulseTask::setup(), EEStatusFlagsTask::setup(), EELedClient::setup(), EEIntegrityTask::setup(), EELaserClient::setup(), EETestPulseClient::setup(), EEPedestalOnlineClient::setup(), EEIntegrityClient::setup(), EEPedestalClient::setup(), EETimingTask::setup(), EEOccupancyTask::setup(), EETriggerTowerClient::setup(), EETimingClient::setup(), and EETriggerTowerTask::setup().

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

Definition at line 790 of file Numbers.cc.

References ix0EE().

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

Definition at line 809 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(), EEPedestalOnlineTask::setup(), EECosmicTask::setup(), EEPedestalTask::setup(), EELaserTask::setup(), EELedTask::setup(), EETestPulseTask::setup(), EEStatusFlagsTask::setup(), EELedClient::setup(), EEIntegrityTask::setup(), EELaserClient::setup(), EETestPulseClient::setup(), EEIntegrityClient::setup(), EEPedestalOnlineClient::setup(), EEPedestalClient::setup(), EETimingTask::setup(), EEOccupancyTask::setup(), EETriggerTowerClient::setup(), EETimingClient::setup(), and EETriggerTowerTask::setup().

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

Definition at line 872 of file Numbers.cc.

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

Definition at line 903 of file Numbers.cc.

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

904 {
905  using namespace std;
906  vector<DetId> crystals(map->tccConstituents(itcc));
907 
908  set<int> itts;
909  for(vector<DetId>::iterator cItr(crystals.begin()); cItr != crystals.end(); ++cItr)
910  itts.insert(map->iTT(mapTT->towerOf(*cItr)));
911 
912  return itts.size();
913 }
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:140
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:141
float Numbers::phi ( const DetId id)
static

Definition at line 933 of file Numbers.cc.

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

Referenced by EETimingClient::analyze().

934 {
935  const GlobalPoint& pos = geometry->getPosition(id);
936  return pos.phi();
937 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
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:143
unsigned Numbers::RtHalf ( const EBDetId id)
static

Definition at line 605 of file Numbers.cc.

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

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

Definition at line 621 of file Numbers.cc.

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

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

Definition at line 91 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(), EBPedestalOnlineTask::setup(), EBPedestalTask::setup(), EBCosmicTask::setup(), EBOccupancyTask::setup(), EBTestPulseTask::setup(), EcalBarrelMonitorModule::setup(), EBLaserTask::setup(), EBSummaryClient::setup(), EBTimingTask::setup(), EBSelectiveReadoutTask::setup(), EBStatusFlagsTask::setup(), EBLaserClient::setup(), EBRawDataTask::setup(), EBTimingClient::setup(), EBIntegrityTask::setup(), EBPedestalOnlineClient::setup(), EBIntegrityClient::setup(), EBPedestalClient::setup(), EBTestPulseClient::setup(), EBTriggerTowerClient::setup(), and EBTriggerTowerTask::setup().

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

Definition at line 223 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(), EEPedestalOnlineTask::setup(), EEPedestalTask::setup(), EECosmicTask::setup(), EELaserTask::setup(), EETestPulseTask::setup(), EELedTask::setup(), EESummaryClient::setup(), EEStatusFlagsTask::setup(), EELedClient::setup(), EERawDataTask::setup(), EELaserClient::setup(), EEIntegrityTask::setup(), EETestPulseClient::setup(), EEPedestalOnlineClient::setup(), EEIntegrityClient::setup(), EEPedestalClient::setup(), EEOccupancyTask::setup(), EETriggerTowerClient::setup(), EETimingTask::setup(), EETimingClient::setup(), EESelectiveReadoutTask::setup(), and EETriggerTowerTask::setup().

224 {
225 
226  int iee = Numbers::iEE( ism );
227 
228  std::ostringstream s;
229  s << "EE" << std::setw(3) << std::setfill('0')
230  << std::setiosflags( std::ios::showpos )
231  << std::setiosflags( std::ios::internal )
232  << iee
233  << std::resetiosflags( std::ios::showpos )
234  << std::resetiosflags( std::ios::internal );
235  return( s.str() );
236 
237 }
static int iEE(const unsigned ism)
Definition: Numbers.cc:110
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 152 of file Numbers.cc.

153 {
154 
155  return( id.subdet() );
156 
157 }
EcalSubdetector Numbers::subDet ( const EcalTrigTowerDetId id)
static

Definition at line 162 of file Numbers.cc.

References subDet().

163 {
164 
165  return( id.subDet() );
166 
167 }
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:142
EcalSubdetector Numbers::subDet ( const EcalScDetId id)
static

Definition at line 172 of file Numbers.cc.

173 {
174 
175  return( id.subdet() );
176 
177 }
EcalSubdetector Numbers::subDet ( const EcalElectronicsId id)
static

Definition at line 182 of file Numbers.cc.

183 {
184 
185  return( id.subdet() );
186 
187 }
EcalSubdetector Numbers::subDet ( const EcalPnDiodeDetId id)
static

Definition at line 192 of file Numbers.cc.

193 {
194 
195  return( (EcalSubdetector) id.iEcalSubDetectorId() );
196 
197 }
EcalSubdetector
EcalSubdetector Numbers::subDet ( const EcalDCCHeaderBlock id)
static

Definition at line 202 of file Numbers.cc.

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

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

Definition at line 829 of file Numbers.cc.

References 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().

830 {
831 
832  int iz = 0;
833 
834  if( ism >= 1 && ism <= 9 ) iz = -1;
835  if( ism >= 10 && ism <= 18 ) iz = +1;
836 
837  if( EEDetId::validDetId(ix, iy, iz) ) {
838 
839  EEDetId id(ix, iy, iz, EEDetId::XYMODE);
840 
841  if( Numbers::iSM( id ) == ism ) return true;
842 
843  }
844 
845  return false;
846 
847 }
static const int XYMODE
Definition: EEDetId.h:339
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
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 852 of file Numbers.cc.

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

Referenced by EESummaryClient::analyze().

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

Member Data Documentation

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

Definition at line 149 of file Numbers.h.

Referenced by crystals().

const unsigned Numbers::crystalsDCCArraySize_ = 100 * 54
staticprivate

Definition at line 146 of file Numbers.h.

Referenced by crystals().

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

Definition at line 148 of file Numbers.h.

Referenced by crystals().

const unsigned Numbers::crystalsTCCArraySize_ = 100 * 108
staticprivate

Definition at line 145 of file Numbers.h.

Referenced by crystals().

const CaloGeometry * Numbers::geometry = 0
staticprivate

Definition at line 143 of file Numbers.h.

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

bool Numbers::init = false
staticprivate

Definition at line 136 of file Numbers.h.

Referenced by initGeometry().

const EcalElectronicsMapping * Numbers::map = 0
staticprivate

Definition at line 140 of file Numbers.h.

Referenced by getElectronicsMapping(), and nTTs().

const EcalTrigTowerConstituentsMap * Numbers::mapTT = 0
staticprivate

Definition at line 141 of file Numbers.h.

Referenced by nTTs().