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) throw ( std::runtime_error )
 
static std::vector< DetId > * crystals (const EcalElectronicsId &id) throw ( std::runtime_error )
 
static std::vector< DetId > * crystals (int idcc, int isc) throw ( std::runtime_error )
 
static const EcalScDetId getEcalScDetId (const EEDetId &id) throw ( std::runtime_error )
 
static int icEB (const int ism, const int ix, const int iy)
 
static int icEE (const int ism, const int ix, const int iy) throw ( std::runtime_error )
 
static int iEB (const int ism) throw ( std::runtime_error )
 
static int iEE (const int ism) throw ( std::runtime_error )
 
static int indexEB (const int ism, const int ie, const int ip)
 
static int indexEE (const int ism, const int ix, const int iy)
 
static void initGeometry (const edm::EventSetup &setup, bool verbose=false)
 
static int iSC (const EcalScDetId &id) throw ( std::runtime_error )
 
static int iSC (const int ism, const EcalSubdetector subdet, const int i1, const int i2) throw ( std::runtime_error )
 
static int iSM (const int ism, const EcalSubdetector subdet) throw ( std::runtime_error )
 
static int iSM (const EBDetId &id) throw ( std::runtime_error )
 
static int iSM (const EEDetId &id) throw ( std::runtime_error )
 
static int iSM (const EcalTrigTowerDetId &id) throw ( std::runtime_error )
 
static int iSM (const EcalElectronicsId &id) throw ( std::runtime_error )
 
static int iSM (const EcalPnDiodeDetId &id) throw ( std::runtime_error )
 
static int iSM (const EcalScDetId &id) throw ( std::runtime_error )
 
static int iSM (const EcalDCCHeaderBlock &id, const EcalSubdetector subdet) throw ( std::runtime_error )
 
static int iTCC (const int ism, const EcalSubdetector subdet, const int i1, const int i2) throw ( std::runtime_error )
 
static int iTCC (const EcalTrigTowerDetId &id) throw ( std::runtime_error )
 
static int iTT (const int ism, const EcalSubdetector subdet, const int i1, const int i2) throw ( std::runtime_error )
 
static int iTT (const EcalTrigTowerDetId &id) throw ( std::runtime_error )
 
static int ix0EE (const int ism)
 
static int iy0EE (const int ism)
 
static int RtHalf (const EBDetId &id)
 
static int RtHalf (const EEDetId &id)
 
static std::string sEB (const int ism)
 
static std::string sEE (const int 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) throw ( std::runtime_error )
 
static bool validEE (const int ism, const int ix, const int iy)
 

Private Member Functions

 Numbers ()
 
 ~Numbers ()
 

Static Private Attributes

static std::vector< DetIdcrystalsDCC_ [100 *54]
 
static std::vector< DetIdcrystalsTCC_ [100 *108]
 
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 119 of file Numbers.h.

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

Definition at line 120 of file Numbers.h.

120 {}; // Hidden to force static use

Member Function Documentation

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

Definition at line 734 of file Numbers.cc.

References crystalsTCC_, getHLTprescales::index, EcalElectronicsMapping::iTT(), asciidump::s, findQualityFiles::size, EcalElectronicsMapping::TCCid(), and EcalElectronicsMapping::ttConstituents().

Referenced by EEStatusFlagsTask::analyze(), EEIntegrityTask::analyze(), EEOccupancyTask::analyze(), EESelectiveReadoutTask::analyze(), crystals(), EETriggerTowerTask::processDigis(), and EcalDQMStatusWriter::readEcalDQMTowerStatusFromFile().

734  {
735 
736  if( Numbers::map ) {
737 
738  int itcc = Numbers::map->TCCid(id);
739  int itt = Numbers::map->iTT(id);
740 
741  int index = 100*(itcc-1) + (itt-1);
742 
743  if ( Numbers::crystalsTCC_[index].size() == 0 ) {
745  }
746 
747  return &(Numbers::crystalsTCC_[index]);
748 
749  } else {
750 
751  std::ostringstream s;
752  s << "ECAL Geometry not available";
753  throw( std::runtime_error( s.str() ) );
754 
755  }
756 
757 }
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
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.
string s
Definition: asciidump.py:422
static std::vector< DetId > crystalsTCC_[100 *108]
Definition: Numbers.h:127
tuple size
Write out results.
std::vector< DetId > * Numbers::crystals ( const EcalElectronicsId id)
throw (std::runtime_error
)
static

Definition at line 793 of file Numbers.cc.

References crystals(), and asciidump::s.

793  {
794 
795  if( Numbers::map ) {
796 
797  int idcc = id.dccId();
798  int isc = id.towerId();
799 
800  return Numbers::crystals( idcc, isc );
801 
802  } else {
803 
804  std::ostringstream s;
805  s << "ECAL Geometry not available";
806  throw( std::runtime_error( s.str() ) );
807 
808  }
809 
810 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:734
string s
Definition: asciidump.py:422
std::vector< DetId > * Numbers::crystals ( int  idcc,
int  isc 
)
throw (std::runtime_error
)
static

Definition at line 814 of file Numbers.cc.

References crystalsDCC_, EcalElectronicsMapping::dccTowerConstituents(), getHLTprescales::index, asciidump::s, and findQualityFiles::size.

814  {
815 
816  if( Numbers::map ) {
817 
818  int index = 100*(idcc-1) + (isc-1);
819 
820  if ( Numbers::crystalsDCC_[index].size() == 0 ) {
822  }
823 
824  return &(Numbers::crystalsDCC_[index]);
825 
826  } else {
827 
828  std::ostringstream s;
829  s << "ECAL Geometry not available";
830  throw( std::runtime_error( s.str() ) );
831 
832  }
833 
834 }
static std::vector< DetId > crystalsDCC_[100 *54]
Definition: Numbers.h:128
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
string s
Definition: asciidump.py:422
tuple size
Write out results.
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
const EcalScDetId Numbers::getEcalScDetId ( const EEDetId id)
throw (std::runtime_error
)
static

Definition at line 838 of file Numbers.cc.

References EcalElectronicsId::dccId(), EcalElectronicsMapping::getEcalScDetId(), EcalElectronicsMapping::getElectronicsId(), asciidump::s, and EcalElectronicsId::towerId().

Referenced by EESelectiveReadoutTask::readOutUnitOf().

838  {
839 
840  if( Numbers::map ) {
841 
843 
844  int idcc = eid.dccId();
845  int isc = eid.towerId();
846 
847  const std::vector<EcalScDetId> ids = Numbers::map->getEcalScDetId( idcc, isc, true );
848 
849  return ids.size() > 0 ? ids[0] : EcalScDetId();
850 
851  } else {
852 
853  std::ostringstream s;
854  s << "ECAL Geometry not available";
855  throw( std::runtime_error( s.str() ) );
856 
857  }
858 
859 }
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:124
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
string s
Definition: asciidump.py:422
int Numbers::icEB ( const int  ism,
const int  ix,
const int  iy 
)
static

Definition at line 892 of file Numbers.cc.

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

892  {
893 
894  return( (ip-1) + 20*(ie-1) + 1 );
895 
896 }
int Numbers::icEE ( const int  ism,
const int  ix,
const int  iy 
)
throw (std::runtime_error
)
static

Definition at line 900 of file Numbers.cc.

References EcalElectronicsMapping::getElectronicsId(), ExpressReco_HICollisions_FallBack::id, ecalpyutils::ism(), iSM(), asciidump::s, strip(), EcalElectronicsId::stripId(), EcalElectronicsId::towerId(), EEDetId::validDetId(), EcalElectronicsId::xtalId(), and EEDetId::XYMODE.

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

900  {
901 
902  int iz = 0;
903 
904  if( ism >= 1 && ism <= 9 ) iz = -1;
905  if( ism >= 10 && ism <= 18 ) iz = +1;
906 
907  if( EEDetId::validDetId(ix, iy, iz) ) {
908 
909  EEDetId id(ix, iy, iz, EEDetId::XYMODE);
910 
911  if( Numbers::iSM( id ) != ism ) return( -1 );
912 
913  if( Numbers::map ) {
914 
916 
917  int vfe = eid.towerId();
918  int strip = eid.stripId();
919  int channel = eid.xtalId();
920 
921  // EE-05 & EE+05
922  if( ism == 8 || ism == 17 ) {
923  if( vfe > 17 ) vfe = vfe - 7;
924  }
925 
926  return ( (vfe-1)*25 + (strip-1)*5 + channel );
927 
928  } else {
929 
930  std::ostringstream s;
931  s << "ECAL Geometry not available";
932  throw( std::runtime_error( s.str() ) );
933 
934  }
935 
936  } else {
937 
938  return( -1 );
939 
940  }
941 
942 }
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 bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iEB ( const int  ism)
throw (std::runtime_error
)
static

Definition at line 65 of file Numbers.cc.

References ecalpyutils::ism(), and asciidump::s.

Referenced by sEB().

65  {
66 
67  // EB-
68  if( ism >= 1 && ism <= 18 ) return( -ism );
69 
70  // EB+
71  if( ism >= 19 && ism <= 36 ) return( +ism - 18 );
72 
73  std::ostringstream s;
74  s << "Wrong SM id determination: iSM = " << ism;
75  throw( std::runtime_error( s.str() ) );
76 
77 }
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iEE ( const int  ism)
throw (std::runtime_error
)
static

Definition at line 98 of file Numbers.cc.

References ecalpyutils::ism(), and asciidump::s.

Referenced by sEE().

98  {
99 
100  // EE-
101  if( ism == 1 ) return( -7 );
102  if( ism == 2 ) return( -8 );
103  if( ism == 3 ) return( -9 );
104  if( ism == 4 ) return( -1 );
105  if( ism == 5 ) return( -2 );
106  if( ism == 6 ) return( -3 );
107  if( ism == 7 ) return( -4 );
108  if( ism == 8 ) return( -5 );
109  if( ism == 9 ) return( -6 );
110 
111  // EE+
112  if( ism == 10 ) return( +7 );
113  if( ism == 11 ) return( +8 );
114  if( ism == 12 ) return( +9 );
115  if( ism == 13 ) return( +1 );
116  if( ism == 14 ) return( +2 );
117  if( ism == 15 ) return( +3 );
118  if( ism == 16 ) return( +4 );
119  if( ism == 17 ) return( +5 );
120  if( ism == 18 ) return( +6 );
121 
122  std::ostringstream s;
123  s << "Wrong SM id determination: iSM = " << ism;
124  throw( std::runtime_error( s.str() ) );
125 
126 }
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::indexEB ( const int  ism,
const int  ie,
const int  ip 
)
static

Definition at line 863 of file Numbers.cc.

863  {
864 
865  return( (ip-1) + 20*(ie-1) + 1 );
866 
867 }
int Numbers::indexEE ( const int  ism,
const int  ix,
const int  iy 
)
static

Definition at line 871 of file Numbers.cc.

References EEDetId::validDetId().

Referenced by EcalDQMStatusReader::beginRun().

871  {
872 
873  int iz = 0;
874 
875  if( ism >= 1 && ism <= 9 ) iz = -1;
876  if( ism >= 10 && ism <= 18 ) iz = +1;
877 
878  if( EEDetId::validDetId(ix, iy, iz) ) {
879 
880  return( 1000*ix + iy );
881 
882  } else {
883 
884  return( -1 );
885 
886  }
887 
888 }
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
void Numbers::initGeometry ( const edm::EventSetup setup,
bool  verbose = false 
)
static

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

43  {
44 
45  if( Numbers::init ) return;
46 
47  if ( verbose ) std::cout << "Initializing EcalElectronicsMapping ..." << std::endl;
48 
49  Numbers::init = true;
50 
52  setup.get<EcalMappingRcd>().get(handle);
53  Numbers::map = handle.product();
54 
56  setup.get<IdealGeometryRecord>().get(handleTT);
57  Numbers::mapTT = handleTT.product();
58 
59  if ( verbose ) std::cout << "done." << std::endl;
60 
61 }
static bool init
Definition: Numbers.h:120
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
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:125
tuple cout
Definition: gather_cfg.py:41
int Numbers::iSC ( const EcalScDetId id)
throw (std::runtime_error
)
static

Definition at line 456 of file Numbers.cc.

References EcalElectronicsMapping::getDCCandSC().

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

456  {
457 
458  std::pair<int, int> dccsc = Numbers::map->getDCCandSC( id );
459 
460  return dccsc.second;
461 
462 }
std::pair< int, int > getDCCandSC(EcalScDetId id) const
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
int Numbers::iSC ( const int  ism,
const EcalSubdetector  subdet,
const int  i1,
const int  i2 
)
throw (std::runtime_error
)
static

Definition at line 466 of file Numbers.cc.

References EcalBarrel, EcalEndcap, EcalElectronicsMapping::getElectronicsId(), ExpressReco_HICollisions_FallBack::id, ecalpyutils::ism(), iSM(), asciidump::s, EcalElectronicsId::towerId(), EEDetId::validDetId(), and EEDetId::XYMODE.

466  {
467 
468  if( subdet == EcalBarrel ) {
469 
470  int iet = 1 + ((i1-1)/5);
471  int ipt = 1 + ((i2-1)/5);
472 
473  return( (ipt-1) + 4*(iet-1) + 1 );
474 
475  } else if( subdet == EcalEndcap ) {
476 
477  int iz = 0;
478 
479  if( ism >= 1 && ism <= 9 ) iz = -1;
480  if( ism >= 10 && ism <= 18 ) iz = +1;
481 
482  if( EEDetId::validDetId(i1, i2, iz) ) {
483 
484  EEDetId id(i1, i2, iz, EEDetId::XYMODE);
485 
486  if( Numbers::iSM( id ) != ism ) return( -1 );
487 
488  if( Numbers::map ) {
489 
491 
492  return( eid.towerId() );
493 
494  } else {
495 
496  std::ostringstream s;
497  s << "ECAL Geometry not available";
498  throw( std::runtime_error( s.str() ) );
499 
500  }
501 
502  } else {
503 
504  return( -1 );
505 
506  }
507 
508  } else {
509 
510  std::ostringstream s;
511  s << "Invalid subdetector: subdet = " << subdet;
512  throw( std::runtime_error( s.str() ) );
513 
514  }
515 
516 }
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 bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iSM ( const int  ism,
const EcalSubdetector  subdet 
)
throw (std::runtime_error
)
static

Definition at line 216 of file Numbers.cc.

References EcalBarrel, EcalEndcap, ecalpyutils::ism(), and asciidump::s.

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

216  {
217 
218  if( subdet == EcalBarrel ) {
219 
220  // EB-
221  if( ism >= 1 && ism <= 18 ) return( ism+18 );
222 
223  // EB+
224  if( ism >= 19 && ism <= 36 ) return( ism-18 );
225 
226  std::ostringstream s;
227  s << "Wrong SM id: iSM = " << ism;
228  throw( std::runtime_error( s.str() ) );
229 
230  } else if( subdet == EcalEndcap ) {
231 
232  // EE-
233  if( ism >= 1 && ism <= 9 ) return( ism+9 );
234 
235  // EE+
236  if (ism >= 10 && ism <= 18 ) return( ism-9 );
237 
238  std::ostringstream s;
239  s << "Wrong SM id: iSM = " << ism;
240  throw( std::runtime_error( s.str() ) );
241 
242  } else {
243 
244  std::ostringstream s;
245  s << "Invalid subdetector: subdet = " << subdet;
246  throw( std::runtime_error( s.str() ) );
247 
248  }
249 
250 }
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iSM ( const EBDetId id)
throw (std::runtime_error
)
static

Definition at line 254 of file Numbers.cc.

References EcalElectronicsId::dccId(), EcalElectronicsMapping::getElectronicsId(), and asciidump::s.

254  {
255 
256  if( Numbers::map ) {
257 
259  int idcc = eid.dccId();
260 
261  // EB-/EB+
262  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
263 
264  std::ostringstream s;
265  s << "Wrong DCC id: dcc = " << idcc;
266  throw( std::runtime_error( s.str() ) );
267 
268  } else {
269 
270  std::ostringstream s;
271  s << "ECAL Geometry not available";
272  throw( std::runtime_error( s.str() ) );
273 
274  }
275 
276 }
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:124
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
string s
Definition: asciidump.py:422
int Numbers::iSM ( const EEDetId id)
throw (std::runtime_error
)
static

Definition at line 280 of file Numbers.cc.

References EcalElectronicsId::dccId(), EcalElectronicsMapping::getElectronicsId(), and asciidump::s.

280  {
281 
282  if( Numbers::map ) {
283 
285  int idcc = eid.dccId();
286 
287  // EE-
288  if( idcc >= 1 && idcc <= 9 ) return( idcc );
289 
290  // EE+
291  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
292 
293  std::ostringstream s;
294  s << "Wrong DCC id: dcc = " << idcc;
295  throw( std::runtime_error( s.str() ) );
296 
297  } else {
298 
299  std::ostringstream s;
300  s << "ECAL Geometry not available";
301  throw( std::runtime_error( s.str() ) );
302 
303  }
304 
305 }
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:124
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
string s
Definition: asciidump.py:422
int Numbers::iSM ( const EcalTrigTowerDetId id)
throw (std::runtime_error
)
static

Definition at line 309 of file Numbers.cc.

References EcalElectronicsMapping::DCCid(), EcalBarrel, EcalEndcap, asciidump::s, and subDet().

309  {
310 
311  EcalSubdetector subdet = Numbers::subDet( id );
312 
313  if( subdet == EcalBarrel ) {
314 
315  if( Numbers::map ) {
316 
317  int idcc = Numbers::map->DCCid(id);
318 
319  // EB-/EB+
320  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
321 
322  std::ostringstream s;
323  s << "Wrong DCC id: dcc = " << idcc;
324  throw( std::runtime_error( s.str() ) );
325 
326  } else {
327 
328  std::ostringstream s;
329  s << "ECAL Geometry not available";
330  throw( std::runtime_error( s.str() ) );
331 
332  }
333 
334  } else if( subdet == EcalEndcap) {
335 
336  if( Numbers::map ) {
337 
338  int idcc = Numbers::map->DCCid(id);
339 
340  // EE-
341  if( idcc >= 1 && idcc <= 9 ) return( idcc );
342 
343  // EE+
344  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
345 
346  std::ostringstream s;
347  s << "Wrong DCC id: dcc = " << idcc;
348  throw( std::runtime_error( s.str() ) );
349 
350  } else {
351 
352  std::ostringstream s;
353  s << "ECAL Geometry not available";
354  throw( std::runtime_error( s.str() ) );
355 
356  }
357 
358  } else {
359 
360  std::ostringstream s;
361  s << "Invalid subdetector: subdet = " << subdet;
362  throw( std::runtime_error( s.str() ) );
363 
364  }
365 
366 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
string s
Definition: asciidump.py:422
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:130
EcalSubdetector
int Numbers::iSM ( const EcalElectronicsId id)
throw (std::runtime_error
)
static

Definition at line 370 of file Numbers.cc.

References asciidump::s.

370  {
371 
372  int idcc = id.dccId();
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  std::ostringstream s;
384  s << "Wrong DCC id: dcc = " << idcc;
385  throw( std::runtime_error( s.str() ) );
386 
387 }
string s
Definition: asciidump.py:422
int Numbers::iSM ( const EcalPnDiodeDetId id)
throw (std::runtime_error
)
static

Definition at line 391 of file Numbers.cc.

References asciidump::s.

391  {
392 
393  int idcc = id.iDCCId();
394 
395  // EE-
396  if( idcc >= 1 && idcc <= 9 ) return( idcc );
397 
398  // EB-/EB+
399  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
400 
401  // EE+
402  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
403 
404  std::ostringstream s;
405  s << "Wrong DCC id: dcc = " << idcc;
406  throw( std::runtime_error( s.str() ) );
407 
408 }
string s
Definition: asciidump.py:422
int Numbers::iSM ( const EcalScDetId id)
throw (std::runtime_error
)
static

Definition at line 412 of file Numbers.cc.

References EcalElectronicsMapping::getDCCandSC(), and asciidump::s.

412  {
413 
414  std::pair<int, int> dccsc = Numbers::map->getDCCandSC( id );
415 
416  int idcc = dccsc.first;
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  std::ostringstream s;
428  s << "Wrong DCC id: dcc = " << idcc;
429  throw( std::runtime_error( s.str() ) );
430 
431 }
std::pair< int, int > getDCCandSC(EcalScDetId id) const
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
string s
Definition: asciidump.py:422
int Numbers::iSM ( const EcalDCCHeaderBlock id,
const EcalSubdetector  subdet 
)
throw (std::runtime_error
)
static

Definition at line 435 of file Numbers.cc.

References asciidump::s.

435  {
436 
437  int idcc = id.id();
438 
439  // EE-
440  if( idcc >= 1 && idcc <= 9 ) return( idcc );
441 
442  // EB-/EB+
443  if( idcc >= 10 && idcc <= 45 ) return( idcc - 9 );
444 
445  // EE+
446  if( idcc >= 46 && idcc <= 54 ) return( idcc - 45 + 9 );
447 
448  std::ostringstream s;
449  s << "Wrong DCC id: dcc = " << idcc;
450  throw( std::runtime_error( s.str() ) );
451 
452 }
string s
Definition: asciidump.py:422
int Numbers::iTCC ( const int  ism,
const EcalSubdetector  subdet,
const int  i1,
const int  i2 
)
throw (std::runtime_error
)
static

Definition at line 615 of file Numbers.cc.

References EcalBarrel, EcalEndcap, EBDetId::ETAPHIMODE, ExpressReco_HICollisions_FallBack::id, ecalpyutils::ism(), iSM(), asciidump::s, EcalTrigTowerConstituentsMap::towerOf(), EBDetId::validDetId(), EEDetId::validDetId(), and EEDetId::XYMODE.

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

615  {
616 
617  if( subdet == EcalBarrel ) {
618 
619  if( EBDetId::validDetId(i1, i2) ) {
620 
621  EBDetId id = EBDetId(i1, i2, EBDetId::ETAPHIMODE);
622 
623  if( Numbers::iSM( id ) != ism ) return( -1 );
624 
625  if( Numbers::mapTT ) {
626 
627  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
628 
629  return( Numbers::map->TCCid(towid) );
630 
631  } else {
632 
633  std::ostringstream s;
634  s << "ECAL Geometry not available";
635  throw( std::runtime_error( s.str() ) );
636 
637  }
638 
639  } else {
640 
641  return( -1 );
642 
643  }
644 
645  } else if( subdet == EcalEndcap) {
646 
647  int iz = 0;
648 
649  if( ism >= 1 && ism <= 9 ) iz = -1;
650  if( ism >= 10 && ism <= 18 ) iz = +1;
651 
652  if( EEDetId::validDetId(i1, i2, iz) ) {
653 
654  EEDetId id(i1, i2, iz, EEDetId::XYMODE);
655 
656  if( Numbers::iSM( id ) != ism ) return( -1 );
657 
658  if( Numbers::mapTT ) {
659 
660  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
661 
662  return( Numbers::map->TCCid(towid) );
663 
664  } else {
665 
666  std::ostringstream s;
667  s << "ECAL Geometry not available";
668  throw( std::runtime_error( s.str() ) );
669 
670  }
671 
672  } else {
673 
674  return( -1 );
675 
676  }
677 
678  } else {
679 
680  std::ostringstream s;
681  s << "Invalid subdetector: subdet = " << subdet;
682  throw( std::runtime_error( s.str() ) );
683 
684  }
685 
686 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int XYMODE
Definition: EEDetId.h:316
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
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:124
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
static const int ETAPHIMODE
Definition: EBDetId.h:145
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:125
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iTCC ( const EcalTrigTowerDetId id)
throw (std::runtime_error
)
static

Definition at line 690 of file Numbers.cc.

References EcalBarrel, EcalEndcap, asciidump::s, and subDet().

690  {
691 
692  EcalSubdetector subdet = Numbers::subDet( id );
693 
694  if( subdet == EcalBarrel ) {
695 
696  if( Numbers::map ) {
697 
698  return( Numbers::map->TCCid(id) );
699 
700  } else {
701 
702  std::ostringstream s;
703  s << "ECAL Geometry not available";
704  throw( std::runtime_error( s.str() ) );
705 
706  }
707 
708  } else if( subdet == EcalEndcap) {
709 
710  if( Numbers::map ) {
711 
712  return( Numbers::map->TCCid(id) );
713 
714  } else {
715 
716  std::ostringstream s;
717  s << "ECAL Geometry not available";
718  throw( std::runtime_error( s.str() ) );
719 
720  }
721 
722  } else {
723 
724  std::ostringstream s;
725  s << "Invalid subdetector: subdet = " << subdet;
726  throw( std::runtime_error( s.str() ) );
727 
728  }
729 
730 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
string s
Definition: asciidump.py:422
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:130
EcalSubdetector
int Numbers::iTT ( const int  ism,
const EcalSubdetector  subdet,
const int  i1,
const int  i2 
)
throw (std::runtime_error
)
static

Definition at line 520 of file Numbers.cc.

References EcalBarrel, EcalEndcap, ExpressReco_HICollisions_FallBack::id, iSC(), ecalpyutils::ism(), iSM(), asciidump::s, EcalTrigTowerConstituentsMap::towerOf(), EEDetId::validDetId(), and EEDetId::XYMODE.

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

520  {
521 
522  if( subdet == EcalBarrel ) {
523 
524  return( Numbers::iSC(ism, subdet, i1, i2) );
525 
526  } else if( subdet == EcalEndcap ) {
527 
528  int iz = 0;
529 
530  if( ism >= 1 && ism <= 9 ) iz = -1;
531  if( ism >= 10 && ism <= 18 ) iz = +1;
532 
533  if( EEDetId::validDetId(i1, i2, iz) ) {
534 
535  EEDetId id(i1, i2, iz, EEDetId::XYMODE);
536 
537  if( Numbers::iSM( id ) != ism ) return( -1 );
538 
539  if( Numbers::mapTT ) {
540 
541  const EcalTrigTowerDetId towid = Numbers::mapTT->towerOf(id);
542 
543  return( iTT(towid) );
544 
545  } else {
546 
547  std::ostringstream s;
548  s << "ECAL Geometry not available";
549  throw( std::runtime_error( s.str() ) );
550 
551  }
552 
553  } else {
554 
555  return( -1 );
556 
557  }
558 
559  } else {
560 
561  std::ostringstream s;
562  s << "Invalid subdetector: subdet = " << subdet;
563  throw( std::runtime_error( s.str() ) );
564 
565  }
566 
567 }
static int iSC(const EcalScDetId &id)
Definition: Numbers.cc:456
static const int XYMODE
Definition: EEDetId.h:316
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
static int iTT(const int ism, const EcalSubdetector subdet, const int i1, const int i2)
Definition: Numbers.cc:520
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
static const EcalTrigTowerConstituentsMap * mapTT
Definition: Numbers.h:125
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iTT ( const EcalTrigTowerDetId id)
throw (std::runtime_error
)
static

Definition at line 571 of file Numbers.cc.

References EcalBarrel, EcalEndcap, asciidump::s, and subDet().

571  {
572 
573  EcalSubdetector subdet = Numbers::subDet( id );
574 
575  if( subdet == EcalBarrel ) {
576 
577  if( Numbers::map ) {
578 
579  return( Numbers::map->iTT(id) );
580 
581  } else {
582 
583  std::ostringstream s;
584  s << "ECAL Geometry not available";
585  throw( std::runtime_error( s.str() ) );
586 
587  }
588 
589  } else if( subdet == EcalEndcap) {
590 
591  if( Numbers::map ) {
592 
593  return( Numbers::map->iTT(id) );
594 
595  } else {
596 
597  std::ostringstream s;
598  s << "ECAL Geometry not available";
599  throw( std::runtime_error( s.str() ) );
600 
601  }
602 
603  } else {
604 
605  std::ostringstream s;
606  s << "Invalid subdetector: subdet = " << subdet;
607  throw( std::runtime_error( s.str() ) );
608 
609  }
610 
611 }
static const EcalElectronicsMapping * map
Definition: Numbers.h:124
static int iTT(const int ism, const EcalSubdetector subdet, const int i1, const int i2)
Definition: Numbers.cc:520
string s
Definition: asciidump.py:422
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:130
EcalSubdetector
int Numbers::ix0EE ( const int  ism)
static

Definition at line 946 of file Numbers.cc.

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

946  {
947 
948  if( ism == 1 || ism == 15 ) return( - 5 );
949  if( ism == 2 || ism == 14 ) return( + 0 );
950  if( ism == 3 || ism == 13 ) return( + 10 );
951  if( ism == 4 || ism == 12 ) return( + 40 );
952  if( ism == 5 || ism == 11 ) return( + 50 );
953  if( ism == 6 || ism == 10 ) return( + 55 );
954  if( ism == 7 || ism == 18 ) return( + 50 );
955  if( ism == 8 || ism == 17 ) return( + 25 );
956  if( ism == 9 || ism == 16 ) return( + 0 );
957 
958  return( + 0 );
959 
960 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::iy0EE ( const int  ism)
static

Definition at line 964 of file Numbers.cc.

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

964  {
965 
966  if( ism == 1 || ism == 10 ) return( + 20 );
967  if( ism == 2 || ism == 11 ) return( + 45 );
968  if( ism == 3 || ism == 12 ) return( + 55 );
969  if( ism == 4 || ism == 13 ) return( + 55 );
970  if( ism == 5 || ism == 14 ) return( + 45 );
971  if( ism == 6 || ism == 15 ) return( + 20 );
972  if( ism == 7 || ism == 16 ) return( + 0 );
973  if( ism == 8 || ism == 17 ) return( - 5 );
974  if( ism == 9 || ism == 18 ) return( + 0 );
975 
976  return( + 0 );
977 
978 }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int Numbers::RtHalf ( const EBDetId id)
static

Definition at line 761 of file Numbers.cc.

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

761  {
762 
763  int ic = id.ic();
764  int ie = (ic-1)/20 + 1;
765  int ip = (ic-1)%20 + 1;
766 
767  if( ie > 5 && ip < 11 ) return 1;
768 
769  return 0;
770 
771 }
int Numbers::RtHalf ( const EEDetId id)
static

Definition at line 775 of file Numbers.cc.

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

775  {
776 
777  int ix = id.ix();
778 
779  int ism = Numbers::iSM( id );
780 
781  // EE-05
782  if ( ism == 8 && ix > 50 ) return 1;
783 
784  // EE+05
785  if ( ism == 17 && ix > 50 ) return 1;
786 
787  return 0;
788 
789 }
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
std::string Numbers::sEB ( const int  ism)
static

Definition at line 81 of file Numbers.cc.

References iEB(), and asciidump::s.

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

81  {
82 
83  int ieb = Numbers::iEB( ism );
84 
85  std::ostringstream s;
86  s << "EB" << std::setw(3) << std::setfill('0')
87  << std::setiosflags( std::ios::showpos )
88  << std::setiosflags( std::ios::internal )
89  << ieb
90  << std::resetiosflags( std::ios::showpos )
91  << std::resetiosflags( std::ios::internal );
92  return( s.str() );
93 
94 }
static int iEB(const int ism)
Definition: Numbers.cc:65
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
std::string Numbers::sEE ( const int  ism)
static

Definition at line 199 of file Numbers.cc.

References iEE(), and asciidump::s.

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

199  {
200 
201  int iee = Numbers::iEE( ism );
202 
203  std::ostringstream s;
204  s << "EE" << std::setw(3) << std::setfill('0')
205  << std::setiosflags( std::ios::showpos )
206  << std::setiosflags( std::ios::internal )
207  << iee
208  << std::resetiosflags( std::ios::showpos )
209  << std::resetiosflags( std::ios::internal );
210  return( s.str() );
211 
212 }
static int iEE(const int ism)
Definition: Numbers.cc:98
string s
Definition: asciidump.py:422
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
EcalSubdetector Numbers::subDet ( const EBDetId id)
static
EcalSubdetector Numbers::subDet ( const EEDetId id)
static

Definition at line 138 of file Numbers.cc.

138  {
139 
140  return( id.subdet() );
141 
142 }
EcalSubdetector Numbers::subDet ( const EcalTrigTowerDetId id)
static

Definition at line 146 of file Numbers.cc.

References subDet().

146  {
147 
148  return( id.subDet() );
149 
150 }
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:130
EcalSubdetector Numbers::subDet ( const EcalScDetId id)
static

Definition at line 154 of file Numbers.cc.

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

Definition at line 162 of file Numbers.cc.

162  {
163 
164  return( id.subdet() );
165 
166 }
EcalSubdetector Numbers::subDet ( const EcalPnDiodeDetId id)
static

Definition at line 170 of file Numbers.cc.

170  {
171 
172  return( (EcalSubdetector) id.iEcalSubDetectorId() );
173 
174 }
EcalSubdetector
EcalSubdetector Numbers::subDet ( const EcalDCCHeaderBlock id)
throw (std::runtime_error
)
static

Definition at line 178 of file Numbers.cc.

References EcalBarrel, EcalEndcap, and asciidump::s.

178  {
179 
180  int idcc = id.id();
181 
182  // EE-
183  if ( idcc >= 1 && idcc <= 9 ) return( EcalEndcap );
184 
185  // EB-/EB+
186  if ( idcc >= 10 && idcc <= 45 ) return( EcalBarrel);
187 
188  // EE+
189  if ( idcc >= 46 && idcc <= 54 ) return( EcalEndcap );
190 
191  std::ostringstream s;
192  s << "Wrong DCC id: dcc = " << idcc;
193  throw( std::runtime_error( s.str() ) );
194 
195 }
string s
Definition: asciidump.py:422
bool Numbers::validEE ( const int  ism,
const int  ix,
const int  iy 
)
static

Definition at line 982 of file Numbers.cc.

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

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

982  {
983 
984  int iz = 0;
985 
986  if( ism >= 1 && ism <= 9 ) iz = -1;
987  if( ism >= 10 && ism <= 18 ) iz = +1;
988 
989  if( EEDetId::validDetId(ix, iy, iz) ) {
990 
991  EEDetId id(ix, iy, iz, EEDetId::XYMODE);
992 
993  if( Numbers::iSM( id ) == ism ) return true;
994 
995  }
996 
997  return false;
998 
999 }
static const int XYMODE
Definition: EEDetId.h:316
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47

Member Data Documentation

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

Definition at line 128 of file Numbers.h.

Referenced by crystals().

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

Definition at line 127 of file Numbers.h.

Referenced by crystals().

bool Numbers::init = false
staticprivate

Definition at line 120 of file Numbers.h.

Referenced by initGeometry().

const EcalElectronicsMapping * Numbers::map = 0
staticprivate

Definition at line 124 of file Numbers.h.

const EcalTrigTowerConstituentsMap * Numbers::mapTT = 0
staticprivate

Definition at line 125 of file Numbers.h.