CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ecaldqm Namespace Reference

Namespaces

 binning
 

Classes

class  CalibrationSummaryClient
 
class  CertificationClient
 
class  ClusterTask
 
class  CrystalConsistencyReader
 
class  DBReaderWorker
 
class  DBWriterWorker
 
struct  Dependency
 
struct  DependencySet
 
class  DQWorker
 
class  DQWorkerClient
 
class  DQWorkerTask
 
class  EcalDQMonitor
 
class  EnergyTask
 
class  IntegrityClient
 
class  IntegrityTask
 
class  IntegrityWriter
 
class  LaserBlueReader
 
class  LaserClient
 
class  LaserGreenReader
 
class  LaserIRedReader
 
class  LaserRedReader
 
class  LaserTask
 
class  LaserWriter
 
class  Led1Reader
 
class  Led2Reader
 
class  LedClient
 
class  LedTask
 
class  LedWriter
 
class  MemChConsistencyReader
 
class  MemTTConsistencyReader
 
class  MESet
 
class  MESetDet0D
 
class  MESetDet1D
 
class  MESetDet2D
 
class  MESetEcal
 
class  MESetMulti
 
class  MESetNonObject
 
class  MESetProjection
 
class  MESetTrend
 
class  OccupancyClient
 
class  OccupancyReader
 
class  OccupancyTask
 
class  OccupancyWriter
 
class  PedestalClient
 
class  PedestalsOnlineReader
 
class  PedestalsReader
 
class  PedestalTask
 
class  PedestalWriter
 
class  PNBlueReader
 
class  PNDiodeTask
 
class  PNGreenReader
 
class  PNIntegrityClient
 
class  PNIRedReader
 
class  PNMGPAReader
 
class  PNPedReader
 
class  PNRedReader
 
class  PresampleClient
 
class  PresampleTask
 
class  PresampleWriter
 
class  PulseShapeReader
 
class  RawDataClient
 
class  RawDataTask
 
class  RecoSummaryTask
 
class  SelectiveReadoutClient
 
class  SelectiveReadoutTask
 
class  StatusManager
 
class  SummaryClient
 
class  SummaryWriter
 
class  TestPulseClient
 
class  TestPulseReader
 
class  TestPulseTask
 
class  TestPulseWriter
 
class  TimingClient
 
class  TimingCrystalReader
 
class  TimingLaserBlueCrystalReader
 
class  TimingLaserGreenCrystalReader
 
class  TimingLaserIRedCrystalReader
 
class  TimingLaserRedCrystalReader
 
class  TimingLed1CrystalReader
 
class  TimingLed2CrystalReader
 
class  TimingTask
 
class  TimingWriter
 
class  TowerStatusTask
 
class  TrigPrimClient
 
class  TrigPrimTask
 
class  TTConsistencyReader
 
class  WorkerFactoryStore
 

Typedefs

typedef boost::ptr_map< std::string, MESetMESetCollection
 
typedef std::map< DetId, double > ReturnType
 
typedef DQWorker *(* WorkerFactory) ()
 

Enumerations

enum  Collections {
  kSource, kEcalRawData, kEBGainErrors, kEEGainErrors,
  kEBChIdErrors, kEEChIdErrors, kEBGainSwitchErrors, kEEGainSwitchErrors,
  kTowerIdErrors, kBlockSizeErrors, kMEMTowerIdErrors, kMEMBlockSizeErrors,
  kMEMChIdErrors, kMEMGainErrors, kEBSrFlag, kEESrFlag,
  kEBDigi, kEEDigi, kPnDiodeDigi, kTrigPrimDigi,
  kTrigPrimEmulDigi, kEBUncalibRecHit, kEEUncalibRecHit, kEBLaserLedUncalibRecHit,
  kEELaserLedUncalibRecHit, kEBTestPulseUncalibRecHit, kEETestPulseUncalibRecHit, kEBRecHit,
  kEERecHit, kEBReducedRecHit, kEEReducedRecHit, kEBBasicCluster,
  kEEBasicCluster, kEBSuperCluster, kEESuperCluster, nCollections
}
 
enum  Constants {
  nDCC = 54, nEBDCC = 36, nEEDCC = 18, nDCCMEM = 44,
  nEEDCCMEM = 8, nTTOuter = 16, nTTInner = 28, nTCC = 108,
  kEEmTCCLow = 0, kEEmTCCHigh = 35, kEEpTCCLow = 72, kEEpTCCHigh = 107,
  kEBTCCLow = 36, kEBTCCHigh = 71, nChannels = EBDetId::kSizeForDenseIndexing + EEDetId::kSizeForDenseIndexing, nTowers = EcalTrigTowerDetId::kEBTotalTowers + EcalScDetId::kSizeForDenseIndexing
}
 
enum  FEFlags {
  Enabled = 0, Disabled = 1, Timeout = 2, HeaderError = 3,
  ChannelId = 4, LinkError = 5, BlockSize = 6, Suppressed = 7,
  FIFOFull = 8, L1ADesync = 9, BXDesync = 10, L1ABXDesync = 11,
  FIFOFullL1ADesync = 12, HParity = 13, VParity = 14, ForcedZS = 15,
  nFEFlags = 16
}
 
enum  Quality {
  kBad = 0, kGood = 1, kUnknown = 2, kMBad = 3,
  kMGood = 4, kMUnknown = 5
}
 
enum  SMName {
  kEEm07, kEEm08, kEEm09, kEEm01,
  kEEm02, kEEm03, kEEm04, kEEm05,
  kEEm06, kEBm01, kEBm02, kEBm03,
  kEBm04, kEBm05, kEBm06, kEBm07,
  kEBm08, kEBm09, kEBm10, kEBm11,
  kEBm12, kEBm13, kEBm14, kEBm15,
  kEBm16, kEBm17, kEBm18, kEBp01,
  kEBp02, kEBp03, kEBp04, kEBp05,
  kEBp06, kEBp07, kEBp08, kEBp09,
  kEBp10, kEBp11, kEBp12, kEBp13,
  kEBp14, kEBp15, kEBp16, kEBp17,
  kEBp18, kEEp07, kEEp08, kEEp09,
  kEEp01, kEEp02, kEEp03, kEEp04,
  kEEp05, kEEp06, kEEmLow = kEEm07, kEEmHigh = kEEm06,
  kEEpLow = kEEp07, kEEpHigh = kEEp06, kEBmLow = kEBm01, kEBmHigh = kEBm18,
  kEBpLow = kEBp01, kEBpHigh = kEBp18
}
 

Functions

bool ccuExists (unsigned, unsigned)
 
bool checkElectronicsMap (bool=true)
 
bool checkGeometry (bool=true)
 
bool checkTopology (bool=true)
 
bool checkTrigTowerMap (bool=true)
 
MESetcreateMESet (edm::ParameterSet const &)
 
EcalLogicID crystalID (DetId const &)
 
unsigned dccId (const DetId &_id)
 
unsigned dccId (const EcalElectronicsId &_id)
 
unsigned dccId (DetId const &)
 
unsigned dccId (EcalElectronicsId const &)
 
unsigned dccId (std::string const &)
 
EcalLogicID ecalID ()
 
unsigned EEPnDCC (unsigned _dee, unsigned _ab)
 
EcalElectronicsMapping const * electronicsMap (0)
 
double eta (EBDetId const &)
 
double eta (EEDetId const &)
 
double eta (const EBDetId &_ebid)
 
double eta (const EEDetId &_id)
 
const double etaBound (1.479)
 
template<typename DataType >
ReturnType fetchAndFill (std::map< std::string, double(*)(DataType const &)> const &_extractors, EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula)
 
void fillMESetDescriptions (edm::ParameterSetDescription &)
 
CaloGeometry const * geometry (0)
 
EcalElectronicsMapping const * getElectronicsMap ()
 
CaloGeometry const * getGeometry ()
 
CaloTopology const * getTopology ()
 
EcalTrigTowerConstituentsMap const * getTrigTowerMap ()
 
std::pair< unsigned, unsigned > innerTCCs (unsigned)
 
bool isCrystalId (DetId const &)
 
bool isCrystalId (const DetId &_id)
 
bool isEcalScDetId (DetId const &)
 
bool isEcalScDetId (const DetId &_id)
 
bool isEndcapTTId (DetId const &)
 
bool isEndcapTTId (const DetId &_id)
 
bool isForward (DetId const &)
 
bool isSingleChannelId (DetId const &)
 
bool isSingleChannelId (const DetId &_id)
 
EcalLogicID lmPNID (EcalPnDiodeDetId const &)
 
EcalLogicID memChannelID (EcalPnDiodeDetId const &)
 
const std::vector< unsigned > memDCC (memarr, memarr+44)
 
unsigned memDCCId (unsigned)
 
unsigned memDCCIndex (unsigned)
 
EcalLogicID memTowerID (EcalElectronicsId const &)
 
unsigned nCrystals (unsigned)
 
unsigned nSuperCrystals (unsigned)
 
std::pair< unsigned, unsigned > outerTCCs (unsigned)
 
double phi (EBDetId const &)
 
double phi (EEDetId const &)
 
double phi (EcalTrigTowerDetId const &)
 
double phi (double)
 
EcalPnDiodeDetId pnForCrystal (DetId const &, char)
 
bool qualityOK (int _quality)
 
unsigned rtHalf (DetId const &)
 
std::vector< DetIdscConstituents (EcalScDetId const &)
 
void setElectronicsMap (EcalElectronicsMapping const *)
 
void setGeometry (CaloGeometry const *)
 
void setTopology (CaloTopology const *)
 
void setTrigTowerMap (EcalTrigTowerConstituentsMap const *)
 
std::string smName (unsigned)
 
EcalLogicID subdetID (EcalSubdetector)
 
unsigned tccId (const DetId &_id)
 
unsigned tccId (const EcalElectronicsId &_id)
 
unsigned tccId (DetId const &)
 
unsigned tccId (EcalElectronicsId const &)
 
DetId toDetId (EcalLogicID const &)
 
CaloTopology const * topology (0)
 
EcalLogicID towerID (EcalElectronicsId const &)
 
unsigned towerId (const DetId &_id)
 
unsigned towerId (const EcalElectronicsId &_id)
 
unsigned towerId (DetId const &)
 
unsigned towerId (EcalElectronicsId const &)
 
EcalTrigTowerConstituentsMap const * trigtowerMap (0)
 
unsigned ttId (const DetId &_id)
 
unsigned ttId (const EcalElectronicsId &_id)
 
unsigned ttId (DetId const &)
 
unsigned ttId (EcalElectronicsId const &)
 
int zside (DetId const &)
 
int zside (const DetId &_id)
 

Variables

std::string const collectionName [nCollections]
 
WorkerFactoryStore::Registration< CalibrationSummaryClientecaldqmCalibrationSummaryClientRegistration ("CalibrationSummaryClient")
 
WorkerFactoryStore::Registration< CertificationClientecaldqmCertificationClientRegistration ("CertificationClient")
 
WorkerFactoryStore::Registration< ClusterTaskecaldqmClusterTaskRegistration ("ClusterTask")
 
WorkerFactoryStore::Registration< EnergyTaskecaldqmEnergyTaskRegistration ("EnergyTask")
 
WorkerFactoryStore::Registration< IntegrityClientecaldqmIntegrityClientRegistration ("IntegrityClient")
 
WorkerFactoryStore::Registration< IntegrityTaskecaldqmIntegrityTaskRegistration ("IntegrityTask")
 
WorkerFactoryStore::Registration< LaserClientecaldqmLaserClientRegistration ("LaserClient")
 
WorkerFactoryStore::Registration< LaserTaskecaldqmLaserTaskRegistration ("LaserTask")
 
WorkerFactoryStore::Registration< LedClientecaldqmLedClientRegistration ("LedClient")
 
WorkerFactoryStore::Registration< LedTaskecaldqmLedTaskRegistration ("LedTask")
 
WorkerFactoryStore::Registration< OccupancyClientecaldqmOccupancyClientRegistration ("OccupancyClient")
 
WorkerFactoryStore::Registration< OccupancyTaskecaldqmOccupancyTaskRegistration ("OccupancyTask")
 
WorkerFactoryStore::Registration< PedestalClientecaldqmPedestalClientRegistration ("PedestalClient")
 
WorkerFactoryStore::Registration< PedestalTaskecaldqmPedestalTaskRegistration ("PedestalTask")
 
WorkerFactoryStore::Registration< PNDiodeTaskecaldqmPNDiodeTaskRegistration ("PNDiodeTask")
 
WorkerFactoryStore::Registration< PNIntegrityClientecaldqmPNIntegrityClientRegistration ("PNIntegrityClient")
 
WorkerFactoryStore::Registration< PresampleClientecaldqmPresampleClientRegistration ("PresampleClient")
 
WorkerFactoryStore::Registration< PresampleTaskecaldqmPresampleTaskRegistration ("PresampleTask")
 
WorkerFactoryStore::Registration< RawDataClientecaldqmRawDataClientRegistration ("RawDataClient")
 
WorkerFactoryStore::Registration< RawDataTaskecaldqmRawDataTaskRegistration ("RawDataTask")
 
WorkerFactoryStore::Registration< RecoSummaryTaskecaldqmRecoSummaryTaskRegistration ("RecoSummaryTask")
 
WorkerFactoryStore::Registration< SelectiveReadoutClientecaldqmSelectiveReadoutClientRegistration ("SelectiveReadoutClient")
 
WorkerFactoryStore::Registration< SelectiveReadoutTaskecaldqmSelectiveReadoutTaskRegistration ("SelectiveReadoutTask")
 
WorkerFactoryStore::Registration< SummaryClientecaldqmSummaryClientRegistration ("SummaryClient")
 
WorkerFactoryStore::Registration< TestPulseClientecaldqmTestPulseClientRegistration ("TestPulseClient")
 
WorkerFactoryStore::Registration< TestPulseTaskecaldqmTestPulseTaskRegistration ("TestPulseTask")
 
WorkerFactoryStore::Registration< TimingClientecaldqmTimingClientRegistration ("TimingClient")
 
WorkerFactoryStore::Registration< TimingTaskecaldqmTimingTaskRegistration ("TimingTask")
 
WorkerFactoryStore::Registration< TowerStatusTaskecaldqmTowerStatusTaskRegistration ("TowerStatusTask")
 
WorkerFactoryStore::Registration< TrigPrimClientecaldqmTrigPrimClientRegistration ("TrigPrimClient")
 
WorkerFactoryStore::Registration< TrigPrimTaskecaldqmTrigPrimTaskRegistration ("TrigPrimTask")
 
double const etaBound
 
std::mutex mapMutex
 
unsigned memarr []
 
std::vector< unsigned > const memDCC
 

Typedef Documentation

typedef boost::ptr_map<std::string, MESet> ecaldqm::MESetCollection

Definition at line 350 of file MESet.h.

typedef std::map<DetId, double> ecaldqm::ReturnType

Definition at line 54 of file DBReaderWorkers.cc.

typedef DQWorker*(* ecaldqm::WorkerFactory) ()

Definition at line 86 of file DQWorker.h.

Enumeration Type Documentation

Enumerator
kSource 
kEcalRawData 
kEBGainErrors 
kEEGainErrors 
kEBChIdErrors 
kEEChIdErrors 
kEBGainSwitchErrors 
kEEGainSwitchErrors 
kTowerIdErrors 
kBlockSizeErrors 
kMEMTowerIdErrors 
kMEMBlockSizeErrors 
kMEMChIdErrors 
kMEMGainErrors 
kEBSrFlag 
kEESrFlag 
kEBDigi 
kEEDigi 
kPnDiodeDigi 
kTrigPrimDigi 
kTrigPrimEmulDigi 
kEBUncalibRecHit 
kEEUncalibRecHit 
kEBLaserLedUncalibRecHit 
kEELaserLedUncalibRecHit 
kEBTestPulseUncalibRecHit 
kEETestPulseUncalibRecHit 
kEBRecHit 
kEERecHit 
kEBReducedRecHit 
kEEReducedRecHit 
kEBBasicCluster 
kEEBasicCluster 
kEBSuperCluster 
kEESuperCluster 
nCollections 

Definition at line 8 of file Collections.h.

8  {
9  kSource,
23  kEBSrFlag,
24  kEESrFlag,
25  kEBDigi,
26  kEEDigi,
36  kEBRecHit,
37  kEERecHit,
45  };
static const char *const kSource
Enumerator
nDCC 
nEBDCC 
nEEDCC 
nDCCMEM 
nEEDCCMEM 
nTTOuter 
nTTInner 
nTCC 
kEEmTCCLow 
kEEmTCCHigh 
kEEpTCCLow 
kEEpTCCHigh 
kEBTCCLow 
kEBTCCHigh 
nChannels 
nTowers 

Definition at line 91 of file EcalDQMCommonUtils.h.

91  {
92  nDCC = 54,
93  nEBDCC = 36,
94  nEEDCC = 18,
95  nDCCMEM = 44,
96  nEEDCCMEM = 8,
97 
98  nTTOuter = 16,
99  nTTInner = 28,
100  // These lines set the number of TriggerTowers in "outer" and "inner" TCCs,
101  // where "outer" := closer to the barrel. These constants are used in
102  // setting the binning. There are 16 trigger towers per TCC for "outer" TCCs,
103  // and 24 per TCC for "inner" TCCs (but the numbering is from 0 to 27, so
104  // 28 bins are required).
105 
106  nTCC = 108,
107  kEEmTCCLow = 0,
108  kEEmTCCHigh = 35,
109  kEEpTCCLow = 72,
110  kEEpTCCHigh = 107,
111  kEBTCCLow = 36,
112  kEBTCCHigh = 71,
113 
116  };
Enumerator
Enabled 
Disabled 
Timeout 
HeaderError 
ChannelId 
LinkError 
BlockSize 
Suppressed 
FIFOFull 
L1ADesync 
BXDesync 
L1ABXDesync 
FIFOFullL1ADesync 
HParity 
VParity 
ForcedZS 
nFEFlags 

Definition at line 8 of file FEFlags.h.

Enumerator
kBad 
kGood 
kUnknown 
kMBad 
kMGood 
kMUnknown 

Definition at line 55 of file DBWriterWorkers.cc.

Enumerator
kEEm07 
kEEm08 
kEEm09 
kEEm01 
kEEm02 
kEEm03 
kEEm04 
kEEm05 
kEEm06 
kEBm01 
kEBm02 
kEBm03 
kEBm04 
kEBm05 
kEBm06 
kEBm07 
kEBm08 
kEBm09 
kEBm10 
kEBm11 
kEBm12 
kEBm13 
kEBm14 
kEBm15 
kEBm16 
kEBm17 
kEBm18 
kEBp01 
kEBp02 
kEBp03 
kEBp04 
kEBp05 
kEBp06 
kEBp07 
kEBp08 
kEBp09 
kEBp10 
kEBp11 
kEBp12 
kEBp13 
kEBp14 
kEBp15 
kEBp16 
kEBp17 
kEBp18 
kEEp07 
kEEp08 
kEEp09 
kEEp01 
kEEp02 
kEEp03 
kEEp04 
kEEp05 
kEEp06 
kEEmLow 
kEEmHigh 
kEEpLow 
kEEpHigh 
kEBmLow 
kEBmHigh 
kEBpLow 
kEBpHigh 

Definition at line 26 of file EcalDQMCommonUtils.h.

26  {
27  kEEm07,
28  kEEm08,
29  kEEm09,
30  kEEm01,
31  kEEm02,
32  kEEm03,
33  kEEm04,
34  kEEm05,
35  kEEm06,
36  kEBm01,
37  kEBm02,
38  kEBm03,
39  kEBm04,
40  kEBm05,
41  kEBm06,
42  kEBm07,
43  kEBm08,
44  kEBm09,
45  kEBm10,
46  kEBm11,
47  kEBm12,
48  kEBm13,
49  kEBm14,
50  kEBm15,
51  kEBm16,
52  kEBm17,
53  kEBm18,
54  kEBp01,
55  kEBp02,
56  kEBp03,
57  kEBp04,
58  kEBp05,
59  kEBp06,
60  kEBp07,
61  kEBp08,
62  kEBp09,
63  kEBp10,
64  kEBp11,
65  kEBp12,
66  kEBp13,
67  kEBp14,
68  kEBp15,
69  kEBp16,
70  kEBp17,
71  kEBp18,
72  kEEp07,
73  kEEp08,
74  kEEp09,
75  kEEp01,
76  kEEp02,
77  kEEp03,
78  kEEp04,
79  kEEp05,
80  kEEp06,
81  kEEmLow = kEEm07,
82  kEEmHigh = kEEm06,
83  kEEpLow = kEEp07,
84  kEEpHigh = kEEp06,
85  kEBmLow = kEBm01,
86  kEBmHigh = kEBm18,
87  kEBpLow = kEBp01,
88  kEBpHigh = kEBp18
89  };

Function Documentation

bool ecaldqm::ccuExists ( unsigned  _dccId,
unsigned  _towerId 
)

Definition at line 403 of file EcalDQMCommonUtils.cc.

References kEEpLow, and nSuperCrystals().

Referenced by ecaldqm::IntegrityWriter::run(), and ecaldqm::RawDataTask::runOnRawData().

403  {
404  if (_towerId == 69 || _towerId == 70)
405  return true;
406  else if ((_dccId == 8 || _dccId == 53) && _towerId >= 18 && _towerId <= 24)
407  return false;
408  else if (_dccId <= kEEmHigh + 1 || _dccId >= kEEpLow + 1)
409  return _towerId <= nSuperCrystals(_dccId);
410  else
411  return _towerId <= 68;
412  }
unsigned nSuperCrystals(unsigned)
bool ecaldqm::checkElectronicsMap ( bool  _throw = true)

Definition at line 429 of file EcalDQMCommonUtils.cc.

References electronicsMap(), Exception, and CommonMethods::lock().

Referenced by EcalFEDMonitorTemp< SUBDET >::dqmBeginRun(), and getElectronicsMap().

429  {
430  std::lock_guard<std::mutex> lock(mapMutex);
431  if (electronicsMap)
432  return true;
433  if (_throw)
434  throw cms::Exception("InvalidCall") << "ElectronicsMapping not initialized";
435  return false;
436  }
std::mutex mapMutex
EcalElectronicsMapping const * electronicsMap(0)
bool ecaldqm::checkGeometry ( bool  _throw = true)

Definition at line 469 of file EcalDQMCommonUtils.cc.

References Exception, and CommonMethods::lock().

Referenced by getGeometry().

469  {
470  std::lock_guard<std::mutex> lock(mapMutex);
471  if (geometry)
472  return true;
473  if (_throw)
474  throw cms::Exception("InvalidCall") << "CaloGeometry not initialized";
475  return false;
476  }
std::mutex mapMutex
bool ecaldqm::checkTopology ( bool  _throw = true)

Definition at line 489 of file EcalDQMCommonUtils.cc.

References Exception, CommonMethods::lock(), and topology().

Referenced by getTopology().

489  {
490  std::lock_guard<std::mutex> lock(mapMutex);
491  if (topology)
492  return true;
493  if (_throw)
494  throw cms::Exception("InvalidCall") << "CaloTopology not initialized";
495  return false;
496  }
CaloTopology const * topology(0)
std::mutex mapMutex
bool ecaldqm::checkTrigTowerMap ( bool  _throw = true)

Definition at line 449 of file EcalDQMCommonUtils.cc.

References Exception, CommonMethods::lock(), and trigtowerMap().

Referenced by getTrigTowerMap().

449  {
450  std::lock_guard<std::mutex> lock(mapMutex);
451  if (trigtowerMap)
452  return true;
453  if (_throw)
454  throw cms::Exception("InvalidCall") << "TrigTowerConstituentsMap not initialized";
455  return false;
456  }
std::mutex mapMutex
EcalTrigTowerConstituentsMap const * trigtowerMap(0)
MESet * ecaldqm::createMESet ( edm::ParameterSet const &  _MEParam)

Definition at line 17 of file MESetUtils.cc.

References objects.IsoTrackAnalyzer::candidates, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, Exception, edm::ParameterSet::existsAs(), ecaldqm::binning::formAxis(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::binning::kChannel, callgraph::kind, ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::binning::kReport, ecaldqm::binning::kTrend, ecaldqm::binning::kUser, trackerHitRTTI::multi, ecaldqm::binning::nObjType, callgraph::path, ecaldqm::MESetTrend::setCumulative(), ecaldqm::MESetTrend::setMinutely(), ecaldqm::MESetTrend::setShiftAxis(), AlCaHLTBitMon_QueryRunRegistry::string, ecaldqm::binning::translateBinningType(), ecaldqm::binning::translateKind(), ecaldqm::binning::translateObjectType(), and trackingPlots::zaxis.

Referenced by ecaldqm::DBWriterWorker::DBWriterWorker(), ecaldqm::DQWorker::setME(), and ecaldqm::DQWorkerClient::setSource().

17  {
18  std::string path(_MEParam.getUntrackedParameter<std::string>("path"));
19  binning::ObjectType otype(binning::translateObjectType(_MEParam.getUntrackedParameter<std::string>("otype")));
20  binning::BinningType btype(binning::translateBinningType(_MEParam.getUntrackedParameter<std::string>("btype")));
21  MonitorElement::Kind kind(binning::translateKind(_MEParam.getUntrackedParameter<std::string>("kind")));
22 
23  binning::AxisSpecs xaxis, yaxis, zaxis;
24  bool hasXaxis(_MEParam.existsAs<edm::ParameterSet>("xaxis", false));
25  if (hasXaxis)
26  xaxis = binning::formAxis(_MEParam.getUntrackedParameterSet("xaxis"));
27  bool hasYaxis(_MEParam.existsAs<edm::ParameterSet>("yaxis", false));
28  if (hasYaxis)
29  yaxis = binning::formAxis(_MEParam.getUntrackedParameterSet("yaxis"));
30  bool hasZaxis(_MEParam.existsAs<edm::ParameterSet>("zaxis", false));
31  if (hasZaxis)
32  zaxis = binning::formAxis(_MEParam.getUntrackedParameterSet("zaxis"));
33 
34  MESet *set(nullptr);
35 
36  if (btype == binning::kTrend) {
37  MESetTrend *setTrend(new MESetTrend(path, otype, btype, kind, hasYaxis ? &yaxis : nullptr));
38  if (_MEParam.existsAs<bool>("minutely", false) && _MEParam.getUntrackedParameter<bool>("minutely"))
39  setTrend->setMinutely();
40  if (_MEParam.existsAs<bool>("cumulative", false) && _MEParam.getUntrackedParameter<bool>("cumulative"))
41  setTrend->setCumulative();
42  if (_MEParam.existsAs<bool>("shiftAxis", false) && _MEParam.getUntrackedParameter<bool>("shiftAxis"))
43  setTrend->setShiftAxis();
44  set = setTrend;
45  } else if (otype == binning::nObjType)
46  set = new MESetNonObject(path,
47  otype,
48  btype,
49  kind,
50  hasXaxis ? &xaxis : nullptr,
51  hasYaxis ? &yaxis : nullptr,
52  hasZaxis ? &zaxis : nullptr);
53  else if (otype == binning::kChannel)
54 // Class removed until concurrency issue is finalized
55 #if 0
56  set = new MESetChannel(path, otype, btype, kind);
57 #else
58  set = nullptr;
59 #endif
60  else if (btype == binning::kProjEta || btype == binning::kProjPhi) set =
61  new MESetProjection(path, otype, btype, kind, hasYaxis ? &yaxis : nullptr);
62  else {
63  unsigned logicalDimensions(-1);
64  switch (kind) {
66  logicalDimensions = 0;
67  break;
70  logicalDimensions = 1;
71  break;
74  logicalDimensions = 2;
75  break;
76  default:
77  break;
78  }
79 
80  // example case: Ecal/TriggerPrimitives/EmulMatching/TrigPrimTask matching
81  // index
82  if (logicalDimensions == 2 && hasYaxis && btype != binning::kUser)
83  logicalDimensions = 1;
84 
85  if (logicalDimensions > 2 || (btype == binning::kReport && logicalDimensions != 0))
86  throw cms::Exception("InvalidConfiguration") << "Cannot create MESet at " << path;
87 
88  if (btype == binning::kUser)
89  set = new MESetEcal(path,
90  otype,
91  btype,
92  kind,
93  logicalDimensions,
94  hasXaxis ? &xaxis : nullptr,
95  hasYaxis ? &yaxis : nullptr,
96  hasZaxis ? &zaxis : nullptr);
97  else if (logicalDimensions == 0)
98  set = new MESetDet0D(path, otype, btype, kind);
99  else if (logicalDimensions == 1)
100  set = new MESetDet1D(path, otype, btype, kind, hasYaxis ? &yaxis : nullptr);
101  else if (logicalDimensions == 2)
102  set = new MESetDet2D(path, otype, btype, kind, hasZaxis ? &zaxis : nullptr);
103  }
104 
105  if (_MEParam.existsAs<edm::ParameterSet>("multi", false)) {
106  typedef std::vector<std::string> VString;
107 
108  edm::ParameterSet const &multiParams(_MEParam.getUntrackedParameterSet("multi"));
109  VString replacementNames(multiParams.getParameterNames());
110  if (replacementNames.empty())
111  throw cms::Exception("InvalidConfiguration") << "0 multiplicity for MESet at " << path;
112 
113  MESetMulti::ReplCandidates candidates;
114  for (unsigned iD(0); iD != replacementNames.size(); ++iD) {
115  VString reps;
116  if (multiParams.existsAs<VString>(replacementNames[iD], false))
117  reps = multiParams.getUntrackedParameter<VString>(replacementNames[iD]);
118  else if (multiParams.existsAs<std::vector<int>>(replacementNames[iD], false)) {
119  std::vector<int> repInts(multiParams.getUntrackedParameter<std::vector<int>>(replacementNames[iD]));
120  for (unsigned iR(0); iR != repInts.size(); ++iR)
121  reps.push_back(std::to_string(repInts[iR]));
122  }
123 
124  if (reps.empty())
125  throw cms::Exception("InvalidConfiguration") << "0 multiplicity for MESet at " << path;
126 
127  candidates[replacementNames[iD]] = reps;
128  }
129  MESetMulti *multi(new MESetMulti(*set, candidates));
130  delete set;
131  set = multi;
132  }
133 
134  if (!set)
135  throw cms::Exception("InvalidConfiguration") << "MESet " << path << " could not be initialized";
136 
137  if (_MEParam.getUntrackedParameter<bool>("perLumi"))
138  set->setLumiFlag();
139 
140  return set;
141  }
ObjectType translateObjectType(std::string const &)
MonitorElement::Kind translateKind(std::string const &)
BinningType translateBinningType(std::string const &)
AxisSpecs formAxis(edm::ParameterSet const &)
EcalLogicID ecaldqm::crystalID ( DetId const &  _id)

Definition at line 21 of file LogicIDTranslation.cc.

References dccId(), EBDetId::ic(), ecalpyutils::ism(), EEDetId::ix(), EEDetId::iy(), kEBmHigh, kEBmLow, kEBpLow, kEEpLow, EEDetId::positiveZ(), and EEDetId::zside().

Referenced by ecaldqm::IntegrityWriter::run(), ecaldqm::LaserWriter::run(), ecaldqm::PedestalWriter::run(), ecaldqm::PresampleWriter::run(), ecaldqm::TestPulseWriter::run(), ecaldqm::TimingWriter::run(), ecaldqm::LedWriter::run(), and ecaldqm::OccupancyWriter::run().

21  {
22  unsigned iDCC(dccId(_id) - 1);
23  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
24  EEDetId eeid(_id);
25  return EcalLogicID("EE_crystal_number",
26  2010000000UL + 1000000 * (eeid.positiveZ() ? 2 : 0) + 1000 * eeid.ix() + eeid.iy(),
27  eeid.zside(),
28  eeid.ix(),
29  eeid.iy());
30  } else {
31  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
32  EBDetId ebid(_id);
33  return EcalLogicID("EB_crystal_number", 1011000000UL + 10000 * ism + ebid.ic(), ism, ebid.ic());
34  }
35  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned dccId(DetId const &)
unsigned ecaldqm::dccId ( const DetId _id)

Definition at line 16 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::dccId(), EcalElectronicsMapping::DCCid(), EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalTriggerTower, Exception, EcalElectronicsMapping::getDCCandSC(), EcalElectronicsMapping::getElectronicsId(), getElectronicsMap(), EcalPnDiodeDetId::iDCCId(), isEcalScDetId(), genParticles_cff::map, DetId::rawId(), and DetId::subdetId().

16  {
18 
19  unsigned subdet(_id.subdetId());
20 
21  if (subdet == EcalBarrel)
22  return map->DCCid(EBDetId(_id));
23  else if (subdet == EcalTriggerTower)
24  return map->DCCid(EcalTrigTowerDetId(_id));
25  else if (subdet == EcalEndcap) {
26  if (isEcalScDetId(_id))
27  return map->getDCCandSC(EcalScDetId(_id)).first;
28  else
29  return map->getElectronicsId(EEDetId(_id)).dccId();
30  } else if (subdet == EcalLaserPnDiode)
31  return EcalPnDiodeDetId(_id).iDCCId();
32 
33  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::dccId(" << _id.rawId() << ")" << std::endl;
34 
35  return 0;
36  }
EcalElectronicsMapping const * getElectronicsMap()
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
int iDCCId() const
get the DCCId
bool isEcalScDetId(const DetId &_id)
unsigned ecaldqm::dccId ( const EcalElectronicsId _id)

Definition at line 38 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::dccId().

38 { return _id.dccId(); }
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
unsigned ecaldqm::dccId ( DetId const &  )

Referenced by RawTask::_process(), DCCEventBlock::addHeaderToCollection(), EcalFEDMonitorTemp< SUBDET >::analyze(), LaserSorter::analyze(), DCCEESRPBlock::checkSrpIdAndNumbSRFlags(), crystalID(), EcalDCCHeaderBlock::EcalDCCHeaderBlock(), ecaldqm::TowerStatusTask::endLuminosityBlock(), ESDCCHeaderBlock::ESDCCHeaderBlock(), ecaldqm::binning::findBin1D(), ecaldqm::binning::findBinCrystal_(), ecaldqm::binning::findBinSuperCrystal_(), ecaldqm::binning::findPlotIndex(), ecaldqm::binning::isValidIdBin(), pnForCrystal(), LinkBoardElectronicIndex::print(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::PresampleClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::IntegrityClient::producePlots(), EcalElectronicsMapping::pseudoStripConstituents(), ecaldqm::StatusManager::readFromStream(), rtHalf(), ecaldqm::IntegrityTask::runOnDetIdCollection(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::IntegrityTask::runOnElectronicsIdCollection(), ecaldqm::PNDiodeTask::runOnErrors(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::PNDiodeTask::runOnPnDigis(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), EcalElectronicsMapper::setActiveDCC(), ESKCHIPBlock::setDccId(), ESDCCHeaderBlock::setId(), EcalDCCHeaderBlock::setId(), EcalElectronicsMapping::tccConstituents(), EcalElectronicsMapping::ttConstituents(), and RPCReadOutMapping::~RPCReadOutMapping().

unsigned ecaldqm::dccId ( EcalElectronicsId const &  )
unsigned ecaldqm::dccId ( std::string const &  _smName)

Definition at line 274 of file EcalDQMCommonUtils.cc.

References kEBmLow, kEBpLow, kEEmLow, and kEEpLow.

274  {
275  unsigned smNumber(std::atoi(_smName.substr(3).c_str()));
276 
277  if (_smName.find("EE-") == 0)
278  return kEEmLow + 1 + ((smNumber + 2) % 9);
279  else if (_smName.find("EB-") == 0)
280  return kEBmLow + 1 + smNumber;
281  else if (_smName.find("EB+") == 0)
282  return kEBpLow + 1 + smNumber;
283  else if (_smName.find("EE+") == 0)
284  return kEEpLow + 1 + ((smNumber + 2) % 9);
285  else
286  return 0;
287  }
EcalLogicID ecaldqm::ecalID ( )

Definition at line 8 of file LogicIDTranslation.cc.

Referenced by ecaldqm::SummaryWriter::run().

8 { return EcalLogicID("ECAL", 1); }
unsigned ecaldqm::EEPnDCC ( unsigned  _dee,
unsigned  _ab 
)

Definition at line 307 of file EcalDQMCommonUtils.cc.

307  {
308  switch (_dee) {
309  case 1: // EE+F -> FEDs 649-653/0
310  if (_ab == 0)
311  return 50;
312  else
313  return 51;
314  case 2: // EE+N -> FEDs 646-648, 653/1, 654
315  if (_ab == 0)
316  return 47;
317  else
318  return 46;
319  case 3: // EE-N -> FEDs 601-603, 608/1, 609
320  if (_ab == 0)
321  return 1;
322  else
323  return 2;
324  case 4: // EE-F -> FEDs 604-608/0
325  if (_ab == 0)
326  return 5;
327  else
328  return 6;
329  default:
330  return 0;
331  }
332  }
EcalElectronicsMapping const* ecaldqm::electronicsMap ( )
double ecaldqm::eta ( EBDetId const &  )
double ecaldqm::eta ( EEDetId const &  )
double ecaldqm::eta ( const EBDetId _ebid)

Definition at line 209 of file EcalDQMCommonUtils.cc.

References EBDetId::approxEta(), EBDetId::crystalUnitToEta, and EBDetId::zside().

209  {
210  return _ebid.approxEta() + (_ebid.zside() < 0 ? 0.5 : -0.5) * EBDetId::crystalUnitToEta;
211  }
float approxEta() const
Definition: EBDetId.h:102
static const float crystalUnitToEta
Definition: EBDetId.h:153
int zside() const
get the z-side of the crystal (1/-1)
Definition: EBDetId.h:45
double ecaldqm::eta ( const EEDetId _id)

Definition at line 213 of file EcalDQMCommonUtils.cc.

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

213 { return getGeometry()->getPosition(_id).eta(); }
CaloGeometry const * getGeometry()
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:74
T eta() const
Definition: PV3DBase.h:76
const double ecaldqm::etaBound ( 1.  479)
template<typename DataType >
ReturnType ecaldqm::fetchAndFill ( std::map< std::string, double(*)(DataType const &)> const &  _extractors,
EcalCondDBInterface _db,
MonRunIOV _iov,
std::string const &  _formula 
)

Definition at line 57 of file DBReaderWorkers.cc.

References RecoTauCombinatoricProducer_cfi::DataType, EcalCondDBInterface::fetchDataSet(), EcalElecEmulTccOnlyExample_cfg::formula, mps_fire::result, and toDetId().

Referenced by ecaldqm::CrystalConsistencyReader::run(), ecaldqm::TTConsistencyReader::run(), ecaldqm::MemChConsistencyReader::run(), ecaldqm::MemTTConsistencyReader::run(), ecaldqm::LaserBlueReader::run(), ecaldqm::PNBlueReader::run(), ecaldqm::LaserGreenReader::run(), ecaldqm::PNGreenReader::run(), ecaldqm::LaserIRedReader::run(), ecaldqm::PNIRedReader::run(), ecaldqm::LaserRedReader::run(), ecaldqm::PNRedReader::run(), ecaldqm::PedestalsReader::run(), ecaldqm::PNPedReader::run(), ecaldqm::PedestalsOnlineReader::run(), ecaldqm::TestPulseReader::run(), ecaldqm::PulseShapeReader::run(), ecaldqm::PNMGPAReader::run(), ecaldqm::Led1Reader::run(), ecaldqm::Led2Reader::run(), and ecaldqm::OccupancyReader::run().

60  {
61  typedef std::map<EcalLogicID, DataType> DataSet;
62  typedef double (*DataExtractor)(DataType const &);
63  typedef std::map<std::string, DataExtractor> ExtractorList;
64 
65  ExtractorList varMap;
66 
67  for (typename ExtractorList::const_iterator eItr(_extractors.begin()); eItr != _extractors.end(); ++eItr)
68  if (_formula.find(eItr->first) != std::string::npos)
69  varMap[eItr->first] = eItr->second;
70 
71  if (varMap.size() > 4)
72  throw cms::Exception("EcalDQM") << _formula << " has too many variables";
73 
74  TString formula(_formula);
75 
76  unsigned iV(0);
77  char varChars[4][2] = {"x", "y", "z", "t"};
78  for (typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
79  formula.ReplaceAll(vItr->first, varChars[iV++]);
80 
81  TFormula tformula("formula", formula);
82  if (tformula.Compile() != 0)
83  throw cms::Exception("EcalDQM") << _formula << " could not be compiled";
84 
85  DataSet dataSet;
86  _db->fetchDataSet(&dataSet, &_iov);
87 
89 
90  for (typename DataSet::const_iterator dItr(dataSet.begin()); dItr != dataSet.end(); ++dItr) {
91  double vars[4];
92  iV = 0;
93  for (typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
94  vars[iV++] = vItr->second(dItr->second);
95 
96  result[toDetId(dItr->first)] = tformula.EvalPar(vars);
97  }
98 
99  return result;
100  }
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
std::map< DetId, double > ReturnType
DetId toDetId(EcalLogicID const &)
vars
Definition: DeepTauId.cc:77
void ecaldqm::fillMESetDescriptions ( edm::ParameterSetDescription _desc)

Definition at line 143 of file MESetUtils.cc.

References edm::ParameterSetDescription::addOptionalUntracked(), edm::ParameterSetDescription::addUntracked(), edm::ParameterSetDescription::addWildcardUntracked(), ecaldqm::binning::fillAxisDescriptions(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ecaldqm::DQWorkerClient::fillDescriptions(), and ecaldqm::DQWorker::fillDescriptions().

143  {
144  _desc.addUntracked<std::string>("path");
145  _desc.addUntracked<std::string>("kind");
146  _desc.addUntracked<std::string>("otype");
147  _desc.addUntracked<std::string>("btype");
148  _desc.addUntracked<std::string>("description");
149  _desc.addUntracked<bool>("online", false);
150  _desc.addUntracked<bool>("perLumi", false);
151  _desc.addOptionalUntracked<bool>("minutely");
152  _desc.addOptionalUntracked<bool>("cumulative");
153  _desc.addOptionalUntracked<bool>("shiftAxis");
154 
155  edm::ParameterSetDescription axisParameters;
156  binning::fillAxisDescriptions(axisParameters);
157  _desc.addOptionalUntracked("xaxis", axisParameters);
158  _desc.addOptionalUntracked("yaxis", axisParameters);
159  _desc.addOptionalUntracked("zaxis", axisParameters);
160 
161  edm::ParameterSetDescription multiParameters;
162  multiParameters.addWildcardUntracked<std::vector<std::string>>("*");
163  multiParameters.addWildcardUntracked<std::vector<int>>("*");
164  _desc.addOptionalUntracked("multi", multiParameters);
165  }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterWildcardBase * addWildcardUntracked(U const &pattern)
void fillAxisDescriptions(edm::ParameterSetDescription &)
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
CaloGeometry const* ecaldqm::geometry ( )

Referenced by getGeometry().

EcalElectronicsMapping const * ecaldqm::getElectronicsMap ( )
CaloGeometry const * ecaldqm::getGeometry ( )
CaloTopology const * ecaldqm::getTopology ( )

Definition at line 498 of file EcalDQMCommonUtils.cc.

References checkTopology(), and topology().

Referenced by ecaldqm::ClusterTask::runOnSuperClusters().

498  {
499  if (!topology)
500  checkTopology();
501  return topology;
502  }
CaloTopology const * topology(0)
bool checkTopology(bool=true)
EcalTrigTowerConstituentsMap const * ecaldqm::getTrigTowerMap ( )
std::pair< unsigned, unsigned > ecaldqm::innerTCCs ( unsigned  _dccId)

Definition at line 133 of file EcalDQMCommonUtils.cc.

References kEBpHigh, kEEmHigh, kEEmLow, and kEEpLow.

Referenced by ecaldqm::MESetDet1D::book().

133  {
134  int iDCC(_dccId - 1);
135  std::pair<unsigned, unsigned> res;
136  if (iDCC <= kEEmHigh) {
137  res.first = (iDCC - kEEmLow) * 2;
138  if (res.first == 0)
139  res.first = 18;
140  res.second = (iDCC - kEEmLow) * 2 + 1;
141  } else if (iDCC < -kEBpHigh)
142  res.first = res.second = _dccId + 27;
143  else {
144  res.first = (iDCC - kEEpLow) * 2 + 90;
145  if (res.first == 90)
146  res.first = 108;
147  res.second = (iDCC - kEEpLow) * 2 + 91;
148  }
149 
150  return res;
151  }
Definition: Electron.h:6
bool ecaldqm::isCrystalId ( DetId const &  )

Referenced by isSingleChannelId(), and pnForCrystal().

bool ecaldqm::isCrystalId ( const DetId _id)

Definition at line 257 of file EcalDQMCommonUtils.cc.

References DetId::det(), DetId::Ecal, EcalBarrel, EcalEndcap, DetId::rawId(), DetId::subdetId(), and globals_cff::x1.

257  {
258  return (_id.det() == DetId::Ecal) &&
259  ((_id.subdetId() == EcalBarrel) || ((_id.subdetId() == EcalEndcap) && (((_id.rawId() >> 15) & 0x1) == 0)));
260  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
bool ecaldqm::isEcalScDetId ( DetId const &  )
bool ecaldqm::isEcalScDetId ( const DetId _id)

Definition at line 266 of file EcalDQMCommonUtils.cc.

References DetId::det(), DetId::Ecal, EcalEndcap, DetId::rawId(), DetId::subdetId(), and globals_cff::x1.

266  {
267  return (_id.det() == DetId::Ecal) && ((_id.subdetId() == EcalEndcap) && ((_id.rawId() >> 15) & 0x1));
268  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
bool ecaldqm::isEndcapTTId ( DetId const &  )
bool ecaldqm::isEndcapTTId ( const DetId _id)

Definition at line 270 of file EcalDQMCommonUtils.cc.

References DetId::det(), DetId::Ecal, EcalTriggerTower, DetId::rawId(), and DetId::subdetId().

270  {
271  return (_id.det() == DetId::Ecal) && ((_id.subdetId() == EcalTriggerTower) && (((_id.rawId() >> 7) & 0x7f) > 17));
272  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
bool ecaldqm::isForward ( DetId const &  _id)

Definition at line 243 of file EcalDQMCommonUtils.cc.

References EcalEndcap, isEcalScDetId(), EcalScDetId::ix(), EEDetId::ix(), EcalScDetId::iy(), EEDetId::iy(), and DetId::subdetId().

Referenced by JetAnalyzer_HeavyIons::analyze(), L1GctHardwareJetFinder::convertClustersToOutputJets(), L1GctHardwareJetFinder::convertClustersToProtoJets(), fastsim::SimplifiedGeometryFactory::createSimplifiedGeometry(), fastsim::SimplifiedGeometry::getDetLayer(), ecaldqm::PresampleClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::LedClient::producePlots(), ecaldqm::TimingTask::runOnRecHits(), ecaldqm::TimingTask::runOnUncalibRecHits(), and fastsim::Particle::setOnLayer().

243  {
244  // the numbers here roughly corresponds to a cut at |eta| > 2.2
245  // cf hepwww.rl.ac.uk/CMSecal/Dee-layout.html
246  if (_id.subdetId() != EcalEndcap)
247  return false;
248  if (isEcalScDetId(_id)) {
249  EcalScDetId scid(_id);
250  return (scid.ix() - 10) * (scid.ix() - 10) + (scid.iy() - 10) * (scid.iy() - 10) < 25.;
251  } else {
252  EEDetId eeid(_id);
253  return (eeid.ix() - 50) * (eeid.ix() - 50) + (eeid.iy() - 50) * (eeid.iy() - 50) < 625.;
254  }
255  }
bool isEcalScDetId(const DetId &_id)
bool ecaldqm::isSingleChannelId ( DetId const &  )
bool ecaldqm::isSingleChannelId ( const DetId _id)

Definition at line 262 of file EcalDQMCommonUtils.cc.

References DetId::det(), DetId::Ecal, EcalLaserPnDiode, isCrystalId(), and DetId::subdetId().

262  {
263  return (_id.det() == DetId::Ecal) && (isCrystalId(_id) || (_id.subdetId() == EcalLaserPnDiode));
264  }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
bool isCrystalId(const DetId &_id)
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
EcalLogicID ecaldqm::lmPNID ( EcalPnDiodeDetId const &  _id)

Definition at line 71 of file LogicIDTranslation.cc.

References EcalPnDiodeDetId::iDCCId(), EcalPnDiodeDetId::iPnId(), ecalpyutils::ism(), kEBmHigh, kEBmLow, kEBpLow, and kEEpLow.

Referenced by ecaldqm::LaserWriter::run(), ecaldqm::PedestalWriter::run(), and ecaldqm::TestPulseWriter::run().

71  {
72  unsigned iDCC(_id.iDCCId() - 1);
73  int pnid(_id.iPnId());
74  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
75  return EcalLogicID("EE_LM_PN", 100 * (601 + iDCC) + pnid, 601 + iDCC, pnid);
76  } else {
77  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
78  return EcalLogicID("EB_LM_PN", 1131000000UL + 10000 * ism + pnid, ism, pnid);
79  }
80  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
EcalLogicID ecaldqm::memChannelID ( EcalPnDiodeDetId const &  _id)

Definition at line 48 of file LogicIDTranslation.cc.

References EcalPnDiodeDetId::iDCCId(), EcalPnDiodeDetId::iPnId(), ecalpyutils::ism(), kEBmHigh, kEBmLow, kEBpLow, and kEEpLow.

Referenced by ecaldqm::IntegrityWriter::run().

48  {
49  // using the PN ID degenerates the logic ID - 50 time samples are actually
50  // split into 5 channels each
51  unsigned iDCC(_id.iDCCId() - 1);
52  int memId((_id.iPnId() - 1) % 5 + ((_id.iPnId() - 1) / 5) * 25 + 1);
53  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
54  return EcalLogicID("EE_mem_channel", 100 * (601 + iDCC) + memId, 601 + iDCC, memId);
55  } else {
56  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
57  return EcalLogicID("EB_mem_channel", 1191000000UL + 10000 * ism + memId, ism, memId);
58  }
59  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
const std::vector<unsigned> ecaldqm::memDCC ( memarr  ,
memarr 44 
)
unsigned ecaldqm::memDCCId ( unsigned  _index)

Definition at line 40 of file EcalDQMCommonUtils.cc.

Referenced by ecaldqm::MESetDet2D::book(), ecaldqm::MESetEcal::generatePaths(), and ecaldqm::binning::getBinningSMMEM_().

40  {
41  // for DCCs with no MEM - map the index in an array of DCCs with no MEM to the
42  // DCC ID
43  if (_index >= memDCC.size())
44  return 0;
45  return memDCC.at(_index) + 1;
46  }
const std::vector< unsigned > memDCC(memarr, memarr+44)
unsigned ecaldqm::memDCCIndex ( unsigned  _dccid)

Definition at line 48 of file EcalDQMCommonUtils.cc.

References spr::find().

Referenced by ecaldqm::binning::findBinCrystal_(), ecaldqm::binning::findPlotIndex(), ecaldqm::PNIntegrityClient::producePlots(), ecaldqm::PedestalClient::producePlots(), ecaldqm::LedClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::CalibrationSummaryClient::producePlots(), and ecaldqm::TestPulseClient::producePlots().

48  {
49  std::vector<unsigned>::const_iterator itr(std::find(memDCC.begin(), memDCC.end(), _dccid - 1));
50  if (itr == memDCC.end())
51  return -1;
52 
53  return (itr - memDCC.begin());
54  }
const std::vector< unsigned > memDCC(memarr, memarr+44)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
EcalLogicID ecaldqm::memTowerID ( EcalElectronicsId const &  _id)

Definition at line 61 of file LogicIDTranslation.cc.

References EcalElectronicsId::dccId(), ecalpyutils::ism(), kEBmHigh, kEBmLow, kEBpLow, kEEpLow, and EcalElectronicsId::towerId().

Referenced by ecaldqm::IntegrityWriter::run().

61  {
62  unsigned iDCC(_id.dccId() - 1);
63  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
64  return EcalLogicID("EE_mem_TT", 100 * (601 + iDCC) + _id.towerId(), 601 + iDCC, _id.towerId());
65  } else {
66  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
67  return EcalLogicID("EB_mem_TT", 1181000000UL + 10000 * ism + _id.towerId(), ism, _id.towerId());
68  }
69  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned ecaldqm::nCrystals ( unsigned  _dccId)

Definition at line 334 of file EcalDQMCommonUtils.cc.

References kEBmLow, kEBpHigh, kEEm01, kEEm02, kEEm03, kEEm04, kEEm05, kEEm06, kEEm07, kEEm08, kEEm09, kEEp01, kEEp02, kEEp04, kEEp05, kEEp06, kEEp07, kEEp08, and kEEp09.

Referenced by EcalFEDMonitorTemp< SUBDET >::analyze(), ecaldqm::TowerStatusTask::endLuminosityBlock(), ecaldqm::CertificationClient::producePlots(), ecaldqm::TowerStatusTask::producePlotsTask_(), and ecaldqm::IntegrityTask::runOnElectronicsIdCollection().

334  {
335  unsigned iSM(_dccId - 1);
336 
337  if (iSM >= kEBmLow && iSM <= kEBpHigh)
338  return 1700;
339 
340  switch (iSM) {
341  case kEEm05:
342  case kEEp05:
343  return 810;
344  case kEEm07:
345  case kEEm03:
346  case kEEp07:
347  case kEEp03:
348  return 830;
349  case kEEm09:
350  case kEEm01:
351  case kEEp09:
352  case kEEp01:
353  return 815;
354  case kEEm08:
355  case kEEm02:
356  case kEEp08:
357  case kEEp02:
358  return 791;
359  case kEEm04:
360  case kEEm06:
361  case kEEp04:
362  case kEEp06:
363  return 821;
364  default:
365  return 0;
366  }
367  }
unsigned ecaldqm::nSuperCrystals ( unsigned  _dccId)

Definition at line 369 of file EcalDQMCommonUtils.cc.

References kEBmLow, kEBpHigh, kEEm01, kEEm02, kEEm03, kEEm04, kEEm05, kEEm06, kEEm07, kEEm08, kEEm09, kEEp01, kEEp02, kEEp04, kEEp05, kEEp06, kEEp07, kEEp08, and kEEp09.

Referenced by ccuExists(), and ecaldqm::binning::getBinningSM_().

369  {
370  unsigned iSM(_dccId - 1);
371 
372  if (iSM >= kEBmLow && iSM <= kEBpHigh)
373  return 68;
374 
375  switch (iSM) {
376  case kEEm05:
377  case kEEp05:
378  return 41;
379  case kEEm07:
380  case kEEm03:
381  case kEEp07:
382  case kEEp03:
383  return 34;
384  case kEEm09:
385  case kEEm01:
386  case kEEm04:
387  case kEEm06:
388  case kEEp09:
389  case kEEp01:
390  case kEEp04:
391  case kEEp06:
392  return 33;
393  case kEEm08:
394  case kEEm02:
395  case kEEp08:
396  case kEEp02:
397  return 32;
398  default:
399  return 0;
400  }
401  }
std::pair< unsigned, unsigned > ecaldqm::outerTCCs ( unsigned  _dccId)

Definition at line 153 of file EcalDQMCommonUtils.cc.

References kEBpHigh, kEEmHigh, kEEmLow, and kEEpLow.

Referenced by ecaldqm::MESetDet1D::book().

153  {
154  int iDCC(_dccId - 1);
155  std::pair<unsigned, unsigned> res;
156  if (iDCC <= kEEmHigh) {
157  res.first = (iDCC - kEEmLow) * 2 + 18;
158  if (res.first == 18)
159  res.first = 36;
160  res.second = (iDCC - kEEmLow) * 2 + 19;
161  } else if (iDCC <= kEBpHigh)
162  res.first = res.second = _dccId + 27;
163  else {
164  res.first = (iDCC - kEEpLow) * 2 + 72;
165  if (res.first == 72)
166  res.first = 90;
167  res.second = (iDCC - kEEpLow) * 2 + 73;
168  }
169 
170  return res;
171  }
Definition: Electron.h:6
double ecaldqm::phi ( EBDetId const &  _ebid)
double ecaldqm::phi ( EEDetId const &  _eeid)

Definition at line 220 of file EcalDQMCommonUtils.cc.

References EEDetId::ix(), EEDetId::iy(), and AlCaHLTBitMon_ParallelJobs::p.

220  {
221  const double degToRad(0.0174533);
222  double p(std::atan2(_eeid.ix() - 50.5, _eeid.iy() - 50.5));
223  if (p < -10. * degToRad)
224  p += 360. * degToRad;
225  return p;
226  }
double ecaldqm::phi ( EcalTrigTowerDetId const &  _ttid)

Definition at line 228 of file EcalDQMCommonUtils.cc.

References EcalTrigTowerDetId::iphi(), and AlCaHLTBitMon_ParallelJobs::p.

228  {
229  const double degToRad(0.0174533);
230  double p((_ttid.iphi() - 0.5) * 5. * degToRad);
231  if (p > 350. * degToRad)
232  p -= 360. * degToRad;
233  return p;
234  }
double ecaldqm::phi ( double  _phi)

Definition at line 236 of file EcalDQMCommonUtils.cc.

236  {
237  const double degToRad(0.0174533);
238  if (_phi < -10. * degToRad)
239  _phi += 360. * degToRad;
240  return _phi;
241  }
EcalPnDiodeDetId ecaldqm::pnForCrystal ( DetId const &  _id,
char  _ab 
)

Definition at line 10 of file EcalDQMCommonUtils2.cc.

References dccId(), MEEEGeom::dee(), EcalBarrel, EcalEndcap, EBDetId::ieta(), EBDetId::iphi(), isCrystalId(), EcalScDetId::ix(), EcalScDetId::iy(), MEEEGeom::lmmod(), MEEBGeom::lmmod(), SimDataFormats::CaloAnalysis::sc, DetId::subdetId(), and EcalScDetId::zside().

Referenced by ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::LedTask::runOnUncalibRecHits(), and ecaldqm::LaserTask::runOnUncalibRecHits().

10  {
11  bool pnA(_ab == 'a' || _ab == 'A');
12 
13  if (!isCrystalId(_id))
14  return EcalPnDiodeDetId(0);
15 
16  if (_id.subdetId() == EcalBarrel) {
17  EBDetId ebid(_id);
18  int lmmod(MEEBGeom::lmmod(ebid.ieta(), ebid.iphi()));
19 
20  switch (dccId(_id)) {
21  case 10:
22  switch (lmmod) {
23  case 1:
24  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 1) : EcalPnDiodeDetId(EcalBarrel, 10, 6);
25  case 2:
26  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 2) : EcalPnDiodeDetId(EcalBarrel, 10, 7);
27  case 3:
28  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 2) : EcalPnDiodeDetId(EcalBarrel, 10, 7);
29  case 4:
30  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 3) : EcalPnDiodeDetId(EcalBarrel, 10, 8);
31  case 5:
32  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 3) : EcalPnDiodeDetId(EcalBarrel, 10, 8);
33  case 6:
34  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 4) : EcalPnDiodeDetId(EcalBarrel, 10, 9);
35  case 7:
36  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 4) : EcalPnDiodeDetId(EcalBarrel, 10, 9);
37  case 8:
38  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 5) : EcalPnDiodeDetId(EcalBarrel, 10, 10);
39  case 9:
40  return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 5) : EcalPnDiodeDetId(EcalBarrel, 10, 10);
41  default:
42  return EcalPnDiodeDetId(0);
43  }
44  break;
45  case 11:
46  switch (lmmod) {
47  case 1:
48  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 1) : EcalPnDiodeDetId(EcalBarrel, 11, 6);
49  case 2:
50  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 2) : EcalPnDiodeDetId(EcalBarrel, 11, 7);
51  case 3:
52  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 2) : EcalPnDiodeDetId(EcalBarrel, 11, 7);
53  case 4:
54  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 3) : EcalPnDiodeDetId(EcalBarrel, 11, 8);
55  case 5:
56  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 3) : EcalPnDiodeDetId(EcalBarrel, 11, 8);
57  case 6:
58  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 4) : EcalPnDiodeDetId(EcalBarrel, 11, 9);
59  case 7:
60  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 4) : EcalPnDiodeDetId(EcalBarrel, 11, 9);
61  case 8:
62  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 5) : EcalPnDiodeDetId(EcalBarrel, 11, 10);
63  case 9:
64  return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 5) : EcalPnDiodeDetId(EcalBarrel, 11, 10);
65  default:
66  return EcalPnDiodeDetId(0);
67  }
68  break;
69  case 12:
70  switch (lmmod) {
71  case 1:
72  return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 1) :*/ EcalPnDiodeDetId(EcalBarrel, 12, 6);
73  case 2:
74  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 2) : EcalPnDiodeDetId(EcalBarrel, 12, 7);
75  case 3:
76  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 2) : EcalPnDiodeDetId(EcalBarrel, 12, 7);
77  case 4:
78  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 3) : EcalPnDiodeDetId(EcalBarrel, 12, 8);
79  case 5:
80  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 3) : EcalPnDiodeDetId(EcalBarrel, 12, 8);
81  case 6:
82  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 4) : EcalPnDiodeDetId(EcalBarrel, 12, 9);
83  case 7:
84  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 4) : EcalPnDiodeDetId(EcalBarrel, 12, 9);
85  case 8:
86  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 5) : EcalPnDiodeDetId(EcalBarrel, 12, 10);
87  case 9:
88  return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 5) : EcalPnDiodeDetId(EcalBarrel, 12, 10);
89  default:
90  return EcalPnDiodeDetId(0);
91  }
92  break;
93  case 13:
94  switch (lmmod) {
95  case 1:
96  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 1) : EcalPnDiodeDetId(EcalBarrel, 13, 6);
97  case 2:
98  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 2) : EcalPnDiodeDetId(EcalBarrel, 13, 7);
99  case 3:
100  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 2) : EcalPnDiodeDetId(EcalBarrel, 13, 7);
101  case 4:
102  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 3) : EcalPnDiodeDetId(EcalBarrel, 13, 8);
103  case 5:
104  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 3) : EcalPnDiodeDetId(EcalBarrel, 13, 8);
105  case 6:
106  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 4) : EcalPnDiodeDetId(EcalBarrel, 13, 9);
107  case 7:
108  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 4) : EcalPnDiodeDetId(EcalBarrel, 13, 9);
109  case 8:
110  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 5) : EcalPnDiodeDetId(EcalBarrel, 13, 10);
111  case 9:
112  return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 5) : EcalPnDiodeDetId(EcalBarrel, 13, 10);
113  default:
114  return EcalPnDiodeDetId(0);
115  }
116  break;
117  case 14:
118  switch (lmmod) {
119  case 1:
120  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 1) : EcalPnDiodeDetId(EcalBarrel, 14, 6);
121  case 2:
122  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 2) : EcalPnDiodeDetId(EcalBarrel, 14, 7);
123  case 3:
124  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 2) : EcalPnDiodeDetId(EcalBarrel, 14, 7);
125  case 4:
126  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 3) : EcalPnDiodeDetId(EcalBarrel, 14, 8);
127  case 5:
128  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 3) : EcalPnDiodeDetId(EcalBarrel, 14, 8);
129  case 6:
130  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 4) : EcalPnDiodeDetId(EcalBarrel, 14, 9);
131  case 7:
132  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 4) : EcalPnDiodeDetId(EcalBarrel, 14, 9);
133  case 8:
134  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 5) : EcalPnDiodeDetId(EcalBarrel, 14, 10);
135  case 9:
136  return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 5) : EcalPnDiodeDetId(EcalBarrel, 14, 10);
137  default:
138  return EcalPnDiodeDetId(0);
139  }
140  break;
141  case 15:
142  switch (lmmod) {
143  case 1:
144  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 1) : EcalPnDiodeDetId(EcalBarrel, 15, 6);
145  case 2:
146  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 2) : EcalPnDiodeDetId(EcalBarrel, 15, 7);
147  case 3:
148  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 2) : EcalPnDiodeDetId(EcalBarrel, 15, 7);
149  case 4:
150  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 3) : EcalPnDiodeDetId(EcalBarrel, 15, 8);
151  case 5:
152  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 3) : EcalPnDiodeDetId(EcalBarrel, 15, 8);
153  case 6:
154  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 4) : EcalPnDiodeDetId(EcalBarrel, 15, 9);
155  case 7:
156  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 4) : EcalPnDiodeDetId(EcalBarrel, 15, 9);
157  case 8:
158  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 5) : EcalPnDiodeDetId(EcalBarrel, 15, 10);
159  case 9:
160  return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 5) : EcalPnDiodeDetId(EcalBarrel, 15, 10);
161  default:
162  return EcalPnDiodeDetId(0);
163  }
164  break;
165  case 16:
166  switch (lmmod) {
167  case 1:
168  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 1) : EcalPnDiodeDetId(EcalBarrel, 16, 6);
169  case 2:
170  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 2) : EcalPnDiodeDetId(EcalBarrel, 16, 7);
171  case 3:
172  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 2) : EcalPnDiodeDetId(EcalBarrel, 16, 7);
173  case 4:
174  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 3) : EcalPnDiodeDetId(EcalBarrel, 16, 8);
175  case 5:
176  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 3) : EcalPnDiodeDetId(EcalBarrel, 16, 8);
177  case 6:
178  return pnA ? /*EcalPnDiodeDetId(EcalBarrel, 16, 4)*/ EcalPnDiodeDetId(EcalBarrel, 16, 1)
179  : EcalPnDiodeDetId(EcalBarrel, 16, 9);
180  case 7:
181  return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 4) :*/ EcalPnDiodeDetId(EcalBarrel, 16, 9);
182  case 8:
183  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 5) : EcalPnDiodeDetId(EcalBarrel, 16, 10);
184  case 9:
185  return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 5) : EcalPnDiodeDetId(EcalBarrel, 16, 10);
186  default:
187  return EcalPnDiodeDetId(0);
188  }
189  break;
190  case 17:
191  switch (lmmod) {
192  case 1:
193  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 1) : EcalPnDiodeDetId(EcalBarrel, 17, 6);
194  case 2:
195  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 2) : EcalPnDiodeDetId(EcalBarrel, 17, 7);
196  case 3:
197  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 2) : EcalPnDiodeDetId(EcalBarrel, 17, 7);
198  case 4:
199  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 3) : EcalPnDiodeDetId(EcalBarrel, 17, 8);
200  case 5:
201  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 3) : EcalPnDiodeDetId(EcalBarrel, 17, 8);
202  case 6:
203  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 4) : EcalPnDiodeDetId(EcalBarrel, 17, 9);
204  case 7:
205  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 4) : EcalPnDiodeDetId(EcalBarrel, 17, 9);
206  case 8:
207  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 5) : EcalPnDiodeDetId(EcalBarrel, 17, 10);
208  case 9:
209  return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 5) : EcalPnDiodeDetId(EcalBarrel, 17, 10);
210  default:
211  return EcalPnDiodeDetId(0);
212  }
213  break;
214  case 18:
215  switch (lmmod) {
216  case 1:
217  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 1) : EcalPnDiodeDetId(EcalBarrel, 18, 6);
218  case 2:
219  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 2) : EcalPnDiodeDetId(EcalBarrel, 18, 7);
220  case 3:
221  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 2) : EcalPnDiodeDetId(EcalBarrel, 18, 7);
222  case 4:
223  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 3) : EcalPnDiodeDetId(EcalBarrel, 18, 8);
224  case 5:
225  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 3) : EcalPnDiodeDetId(EcalBarrel, 18, 8);
226  case 6:
227  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 4) : EcalPnDiodeDetId(EcalBarrel, 18, 9);
228  case 7:
229  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 4) : EcalPnDiodeDetId(EcalBarrel, 18, 9);
230  case 8:
231  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 5) : EcalPnDiodeDetId(EcalBarrel, 18, 10);
232  case 9:
233  return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 5) : EcalPnDiodeDetId(EcalBarrel, 18, 10);
234  default:
235  return EcalPnDiodeDetId(0);
236  }
237  break;
238  case 19:
239  switch (lmmod) {
240  case 1:
241  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 1) : EcalPnDiodeDetId(EcalBarrel, 19, 6);
242  case 2:
243  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 2) : EcalPnDiodeDetId(EcalBarrel, 19, 8);
244  case 3:
245  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 2) : EcalPnDiodeDetId(EcalBarrel, 19, 8);
246  case 4:
247  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 3) : EcalPnDiodeDetId(EcalBarrel, 19, 7);
248  case 5:
249  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 3) : EcalPnDiodeDetId(EcalBarrel, 19, 7);
250  case 6:
251  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 4) : EcalPnDiodeDetId(EcalBarrel, 19, 9);
252  case 7:
253  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 4) : EcalPnDiodeDetId(EcalBarrel, 19, 9);
254  case 8:
255  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 5) : EcalPnDiodeDetId(EcalBarrel, 19, 10);
256  case 9:
257  return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 5) : EcalPnDiodeDetId(EcalBarrel, 19, 10);
258  default:
259  return EcalPnDiodeDetId(0);
260  }
261  break;
262  case 20:
263  switch (lmmod) {
264  case 1:
265  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 1) : EcalPnDiodeDetId(EcalBarrel, 20, 6);
266  case 2:
267  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 2) : EcalPnDiodeDetId(EcalBarrel, 20, 7);
268  case 3:
269  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 2) : EcalPnDiodeDetId(EcalBarrel, 20, 7);
270  case 4:
271  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 3) : EcalPnDiodeDetId(EcalBarrel, 20, 8);
272  case 5:
273  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 3) : EcalPnDiodeDetId(EcalBarrel, 20, 8);
274  case 6:
275  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 4) : EcalPnDiodeDetId(EcalBarrel, 20, 9);
276  case 7:
277  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 4) : EcalPnDiodeDetId(EcalBarrel, 20, 9);
278  case 8:
279  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 5) : EcalPnDiodeDetId(EcalBarrel, 20, 10);
280  case 9:
281  return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 5) : EcalPnDiodeDetId(EcalBarrel, 20, 10);
282  default:
283  return EcalPnDiodeDetId(0);
284  }
285  break;
286  case 21:
287  switch (lmmod) {
288  case 1:
289  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 1) : EcalPnDiodeDetId(EcalBarrel, 21, 6);
290  case 2:
291  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 2) : EcalPnDiodeDetId(EcalBarrel, 21, 7);
292  case 3:
293  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 2) : EcalPnDiodeDetId(EcalBarrel, 21, 7);
294  case 4:
295  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 3) : EcalPnDiodeDetId(EcalBarrel, 21, 8);
296  case 5:
297  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 3) : EcalPnDiodeDetId(EcalBarrel, 21, 8);
298  case 6:
299  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 4) : EcalPnDiodeDetId(EcalBarrel, 21, 9);
300  case 7:
301  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 4) : EcalPnDiodeDetId(EcalBarrel, 21, 9);
302  case 8:
303  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 5) : EcalPnDiodeDetId(EcalBarrel, 21, 10);
304  case 9:
305  return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 5) : EcalPnDiodeDetId(EcalBarrel, 21, 10);
306  default:
307  return EcalPnDiodeDetId(0);
308  }
309  break;
310  case 22:
311  switch (lmmod) {
312  case 1:
313  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 1) : EcalPnDiodeDetId(EcalBarrel, 22, 6);
314  case 2:
315  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 2) : EcalPnDiodeDetId(EcalBarrel, 22, 7);
316  case 3:
317  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 2) : EcalPnDiodeDetId(EcalBarrel, 22, 7);
318  case 4:
319  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 3) : EcalPnDiodeDetId(EcalBarrel, 22, 8);
320  case 5:
321  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 3) : EcalPnDiodeDetId(EcalBarrel, 22, 8);
322  case 6:
323  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 4) : EcalPnDiodeDetId(EcalBarrel, 22, 9);
324  case 7:
325  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 4) : EcalPnDiodeDetId(EcalBarrel, 22, 9);
326  case 8:
327  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 5) : EcalPnDiodeDetId(EcalBarrel, 22, 10);
328  case 9:
329  return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 5) : EcalPnDiodeDetId(EcalBarrel, 22, 10);
330  default:
331  return EcalPnDiodeDetId(0);
332  }
333  break;
334  case 23:
335  switch (lmmod) {
336  case 1:
337  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 1) : EcalPnDiodeDetId(EcalBarrel, 23, 6);
338  case 2:
339  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 2) : EcalPnDiodeDetId(EcalBarrel, 23, 7);
340  case 3:
341  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 2) : EcalPnDiodeDetId(EcalBarrel, 23, 7);
342  case 4:
343  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 3) : EcalPnDiodeDetId(EcalBarrel, 23, 8);
344  case 5:
345  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 3) : EcalPnDiodeDetId(EcalBarrel, 23, 8);
346  case 6:
347  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 4) : EcalPnDiodeDetId(EcalBarrel, 23, 9);
348  case 7:
349  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 4) : EcalPnDiodeDetId(EcalBarrel, 23, 9);
350  case 8:
351  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 5) : EcalPnDiodeDetId(EcalBarrel, 23, 10);
352  case 9:
353  return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 5) : EcalPnDiodeDetId(EcalBarrel, 23, 10);
354  default:
355  return EcalPnDiodeDetId(0);
356  }
357  break;
358  case 24:
359  switch (lmmod) {
360  case 1:
361  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 1) : EcalPnDiodeDetId(EcalBarrel, 24, 6);
362  case 2:
363  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 2) : EcalPnDiodeDetId(EcalBarrel, 24, 7);
364  case 3:
365  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 2) : EcalPnDiodeDetId(EcalBarrel, 24, 7);
366  case 4:
367  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 3) : EcalPnDiodeDetId(EcalBarrel, 24, 8);
368  case 5:
369  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 3) : EcalPnDiodeDetId(EcalBarrel, 24, 8);
370  case 6:
371  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 4) : EcalPnDiodeDetId(EcalBarrel, 24, 9);
372  case 7:
373  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 4) : EcalPnDiodeDetId(EcalBarrel, 24, 9);
374  case 8:
375  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 5) : EcalPnDiodeDetId(EcalBarrel, 24, 10);
376  case 9:
377  return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 5) : EcalPnDiodeDetId(EcalBarrel, 24, 10);
378  default:
379  return EcalPnDiodeDetId(0);
380  }
381  break;
382  case 25:
383  switch (lmmod) {
384  case 1:
385  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 2) : EcalPnDiodeDetId(EcalBarrel, 25, 6);
386  case 2:
387  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 1) : EcalPnDiodeDetId(EcalBarrel, 25, 7);
388  case 3:
389  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 1) : EcalPnDiodeDetId(EcalBarrel, 25, 7);
390  case 4:
391  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 3) : EcalPnDiodeDetId(EcalBarrel, 25, 8);
392  case 5:
393  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 3) : EcalPnDiodeDetId(EcalBarrel, 25, 8);
394  case 6:
395  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 4) : EcalPnDiodeDetId(EcalBarrel, 25, 9);
396  case 7:
397  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 4) : EcalPnDiodeDetId(EcalBarrel, 25, 9);
398  case 8:
399  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 5) : EcalPnDiodeDetId(EcalBarrel, 25, 10);
400  case 9:
401  return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 5) : EcalPnDiodeDetId(EcalBarrel, 25, 10);
402  default:
403  return EcalPnDiodeDetId(0);
404  }
405  break;
406  case 26:
407  switch (lmmod) {
408  case 1:
409  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 1) : EcalPnDiodeDetId(EcalBarrel, 26, 6);
410  case 2:
411  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 2) : EcalPnDiodeDetId(EcalBarrel, 26, 7);
412  case 3:
413  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 2) : EcalPnDiodeDetId(EcalBarrel, 26, 7);
414  case 4:
415  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 3) : EcalPnDiodeDetId(EcalBarrel, 26, 8);
416  case 5:
417  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 3) : EcalPnDiodeDetId(EcalBarrel, 26, 8);
418  case 6:
419  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 4) : EcalPnDiodeDetId(EcalBarrel, 26, 9);
420  case 7:
421  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 4) : EcalPnDiodeDetId(EcalBarrel, 26, 9);
422  case 8:
423  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 5) : EcalPnDiodeDetId(EcalBarrel, 26, 10);
424  case 9:
425  return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 5) : EcalPnDiodeDetId(EcalBarrel, 26, 10);
426  default:
427  return EcalPnDiodeDetId(0);
428  }
429  break;
430  case 27:
431  switch (lmmod) {
432  case 1:
433  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 1) : EcalPnDiodeDetId(EcalBarrel, 27, 6);
434  case 2:
435  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 2) : EcalPnDiodeDetId(EcalBarrel, 27, 7);
436  case 3:
437  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 2) : EcalPnDiodeDetId(EcalBarrel, 27, 7);
438  case 4:
439  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 3) : EcalPnDiodeDetId(EcalBarrel, 27, 8);
440  case 5:
441  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 3) : EcalPnDiodeDetId(EcalBarrel, 27, 8);
442  case 6:
443  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 4) : EcalPnDiodeDetId(EcalBarrel, 27, 9);
444  case 7:
445  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 4) : EcalPnDiodeDetId(EcalBarrel, 27, 9);
446  case 8:
447  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 5) : EcalPnDiodeDetId(EcalBarrel, 27, 10);
448  case 9:
449  return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 5) : EcalPnDiodeDetId(EcalBarrel, 27, 10);
450  default:
451  return EcalPnDiodeDetId(0);
452  }
453  break;
454  case 28:
455  switch (lmmod) {
456  case 1:
457  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 1) : EcalPnDiodeDetId(EcalBarrel, 28, 6);
458  case 2:
459  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 2) : EcalPnDiodeDetId(EcalBarrel, 28, 7);
460  case 3:
461  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 2) : EcalPnDiodeDetId(EcalBarrel, 28, 7);
462  case 4:
463  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 3) : EcalPnDiodeDetId(EcalBarrel, 28, 8);
464  case 5:
465  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 3) : EcalPnDiodeDetId(EcalBarrel, 28, 8);
466  case 6:
467  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 4) : EcalPnDiodeDetId(EcalBarrel, 28, 9);
468  case 7:
469  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 4) : EcalPnDiodeDetId(EcalBarrel, 28, 9);
470  case 8:
471  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 5) : EcalPnDiodeDetId(EcalBarrel, 28, 10);
472  case 9:
473  return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 5) : EcalPnDiodeDetId(EcalBarrel, 28, 10);
474  default:
475  return EcalPnDiodeDetId(0);
476  }
477  break;
478  case 29:
479  switch (lmmod) {
480  case 1:
481  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 1) : EcalPnDiodeDetId(EcalBarrel, 29, 6);
482  case 2:
483  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 2) : EcalPnDiodeDetId(EcalBarrel, 29, 7);
484  case 3:
485  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 2) : EcalPnDiodeDetId(EcalBarrel, 29, 7);
486  case 4:
487  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 3) : EcalPnDiodeDetId(EcalBarrel, 29, 8);
488  case 5:
489  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 3) : EcalPnDiodeDetId(EcalBarrel, 29, 8);
490  case 6:
491  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 4) : EcalPnDiodeDetId(EcalBarrel, 29, 9);
492  case 7:
493  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 4) : EcalPnDiodeDetId(EcalBarrel, 29, 9);
494  case 8:
495  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 5) : EcalPnDiodeDetId(EcalBarrel, 29, 10);
496  case 9:
497  return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 5) : EcalPnDiodeDetId(EcalBarrel, 29, 10);
498  default:
499  return EcalPnDiodeDetId(0);
500  }
501  break;
502  case 30:
503  switch (lmmod) {
504  case 1:
505  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 1) : EcalPnDiodeDetId(EcalBarrel, 30, 6);
506  case 2:
507  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 2) : EcalPnDiodeDetId(EcalBarrel, 30, 7);
508  case 3:
509  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 2) : EcalPnDiodeDetId(EcalBarrel, 30, 7);
510  case 4:
511  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 3) : EcalPnDiodeDetId(EcalBarrel, 30, 8);
512  case 5:
513  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 3) : EcalPnDiodeDetId(EcalBarrel, 30, 8);
514  case 6:
515  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 4) : EcalPnDiodeDetId(EcalBarrel, 30, 9);
516  case 7:
517  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 4) : EcalPnDiodeDetId(EcalBarrel, 30, 9);
518  case 8:
519  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 5) : EcalPnDiodeDetId(EcalBarrel, 30, 10);
520  case 9:
521  return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 5) : EcalPnDiodeDetId(EcalBarrel, 30, 10);
522  default:
523  return EcalPnDiodeDetId(0);
524  }
525  break;
526  case 31:
527  switch (lmmod) {
528  case 1:
529  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 1) : EcalPnDiodeDetId(EcalBarrel, 31, 6);
530  case 2:
531  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 2) : EcalPnDiodeDetId(EcalBarrel, 31, 7);
532  case 3:
533  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 2) : EcalPnDiodeDetId(EcalBarrel, 31, 7);
534  case 4:
535  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 3) : EcalPnDiodeDetId(EcalBarrel, 31, 8);
536  case 5:
537  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 3) : EcalPnDiodeDetId(EcalBarrel, 31, 8);
538  case 6:
539  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 4) : EcalPnDiodeDetId(EcalBarrel, 31, 9);
540  case 7:
541  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 4) : EcalPnDiodeDetId(EcalBarrel, 31, 9);
542  case 8:
543  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 5) : EcalPnDiodeDetId(EcalBarrel, 31, 10);
544  case 9:
545  return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 5) : EcalPnDiodeDetId(EcalBarrel, 31, 10);
546  default:
547  return EcalPnDiodeDetId(0);
548  }
549  break;
550  case 32:
551  switch (lmmod) {
552  case 1:
553  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 1) : EcalPnDiodeDetId(EcalBarrel, 32, 6);
554  case 2:
555  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 2) : EcalPnDiodeDetId(EcalBarrel, 32, 7);
556  case 3:
557  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 2) : EcalPnDiodeDetId(EcalBarrel, 32, 7);
558  case 4:
559  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 3) : EcalPnDiodeDetId(EcalBarrel, 32, 8);
560  case 5:
561  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 3) : EcalPnDiodeDetId(EcalBarrel, 32, 8);
562  case 6:
563  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 5) : EcalPnDiodeDetId(EcalBarrel, 32, 10);
564  case 7:
565  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 5) : EcalPnDiodeDetId(EcalBarrel, 32, 10);
566  case 8:
567  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 4) : EcalPnDiodeDetId(EcalBarrel, 32, 9);
568  case 9:
569  return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 4) : EcalPnDiodeDetId(EcalBarrel, 32, 9);
570  default:
571  return EcalPnDiodeDetId(0);
572  }
573  break;
574  case 33:
575  switch (lmmod) {
576  case 1:
577  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 1) : EcalPnDiodeDetId(EcalBarrel, 33, 6);
578  case 2:
579  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 2) : EcalPnDiodeDetId(EcalBarrel, 33, 7);
580  case 3:
581  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 2) : EcalPnDiodeDetId(EcalBarrel, 33, 7);
582  case 4:
583  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 3) : EcalPnDiodeDetId(EcalBarrel, 33, 8);
584  case 5:
585  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 3) : EcalPnDiodeDetId(EcalBarrel, 33, 8);
586  case 6:
587  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 4) : EcalPnDiodeDetId(EcalBarrel, 33, 9);
588  case 7:
589  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 4) : EcalPnDiodeDetId(EcalBarrel, 33, 9);
590  case 8:
591  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 5) : EcalPnDiodeDetId(EcalBarrel, 33, 10);
592  case 9:
593  return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 5) : EcalPnDiodeDetId(EcalBarrel, 33, 10);
594  default:
595  return EcalPnDiodeDetId(0);
596  }
597  break;
598  case 34:
599  switch (lmmod) {
600  case 1:
601  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 1) : EcalPnDiodeDetId(EcalBarrel, 34, 6);
602  case 2:
603  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 2) : EcalPnDiodeDetId(EcalBarrel, 34, 7);
604  case 3:
605  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 2) : EcalPnDiodeDetId(EcalBarrel, 34, 7);
606  case 4:
607  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 3) : EcalPnDiodeDetId(EcalBarrel, 34, 8);
608  case 5:
609  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 3) : EcalPnDiodeDetId(EcalBarrel, 34, 8);
610  case 6:
611  return pnA ? /*EcalPnDiodeDetId(EcalBarrel, 34, 4)*/ EcalPnDiodeDetId(EcalBarrel, 34, 1)
612  : EcalPnDiodeDetId(EcalBarrel, 34, 9);
613  case 7:
614  return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 4) :*/ EcalPnDiodeDetId(EcalBarrel, 34, 9);
615  case 8:
616  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 5) : EcalPnDiodeDetId(EcalBarrel, 34, 10);
617  case 9:
618  return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 5) : EcalPnDiodeDetId(EcalBarrel, 34, 10);
619  default:
620  return EcalPnDiodeDetId(0);
621  }
622  break;
623  case 35:
624  switch (lmmod) {
625  case 1:
626  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 1) : EcalPnDiodeDetId(EcalBarrel, 35, 6);
627  case 2:
628  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 2) : EcalPnDiodeDetId(EcalBarrel, 35, 7);
629  case 3:
630  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 2) : EcalPnDiodeDetId(EcalBarrel, 35, 7);
631  case 4:
632  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 3) : EcalPnDiodeDetId(EcalBarrel, 35, 8);
633  case 5:
634  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 3) : EcalPnDiodeDetId(EcalBarrel, 35, 8);
635  case 6:
636  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 4) : EcalPnDiodeDetId(EcalBarrel, 35, 9);
637  case 7:
638  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 4) : EcalPnDiodeDetId(EcalBarrel, 35, 9);
639  case 8:
640  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 5) : EcalPnDiodeDetId(EcalBarrel, 35, 10);
641  case 9:
642  return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 5) : EcalPnDiodeDetId(EcalBarrel, 35, 10);
643  default:
644  return EcalPnDiodeDetId(0);
645  }
646  break;
647  case 36:
648  switch (lmmod) {
649  case 1:
650  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 1) : EcalPnDiodeDetId(EcalBarrel, 36, 6);
651  case 2:
652  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 2) : EcalPnDiodeDetId(EcalBarrel, 36, 7);
653  case 3:
654  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 2) : EcalPnDiodeDetId(EcalBarrel, 36, 7);
655  case 4:
656  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 3) : EcalPnDiodeDetId(EcalBarrel, 36, 8);
657  case 5:
658  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 3) : EcalPnDiodeDetId(EcalBarrel, 36, 8);
659  case 6:
660  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 4) : EcalPnDiodeDetId(EcalBarrel, 36, 9);
661  case 7:
662  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 4) : EcalPnDiodeDetId(EcalBarrel, 36, 9);
663  case 8:
664  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 5) : EcalPnDiodeDetId(EcalBarrel, 36, 10);
665  case 9:
666  return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 5) : EcalPnDiodeDetId(EcalBarrel, 36, 10);
667  default:
668  return EcalPnDiodeDetId(0);
669  }
670  break;
671  case 37:
672  switch (lmmod) {
673  case 1:
674  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 1) : EcalPnDiodeDetId(EcalBarrel, 37, 6);
675  case 2:
676  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 2) : EcalPnDiodeDetId(EcalBarrel, 37, 7);
677  case 3:
678  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 2) : EcalPnDiodeDetId(EcalBarrel, 37, 7);
679  case 4:
680  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 3) : EcalPnDiodeDetId(EcalBarrel, 37, 8);
681  case 5:
682  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 3) : EcalPnDiodeDetId(EcalBarrel, 37, 8);
683  case 6:
684  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 4) : EcalPnDiodeDetId(EcalBarrel, 37, 9);
685  case 7:
686  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 4) : EcalPnDiodeDetId(EcalBarrel, 37, 9);
687  case 8:
688  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 5) : EcalPnDiodeDetId(EcalBarrel, 37, 10);
689  case 9:
690  return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 5) : EcalPnDiodeDetId(EcalBarrel, 37, 10);
691  default:
692  return EcalPnDiodeDetId(0);
693  }
694  break;
695  case 38:
696  switch (lmmod) {
697  case 1:
698  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 1) : EcalPnDiodeDetId(EcalBarrel, 38, 6);
699  case 2:
700  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 2) : EcalPnDiodeDetId(EcalBarrel, 38, 7);
701  case 3:
702  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 2) : EcalPnDiodeDetId(EcalBarrel, 38, 7);
703  case 4:
704  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 3) : EcalPnDiodeDetId(EcalBarrel, 38, 8);
705  case 5:
706  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 3) : EcalPnDiodeDetId(EcalBarrel, 38, 8);
707  case 6:
708  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 4) : EcalPnDiodeDetId(EcalBarrel, 38, 9);
709  case 7:
710  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 4) : EcalPnDiodeDetId(EcalBarrel, 38, 9);
711  case 8:
712  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 5) : EcalPnDiodeDetId(EcalBarrel, 38, 10);
713  case 9:
714  return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 5) : EcalPnDiodeDetId(EcalBarrel, 38, 10);
715  default:
716  return EcalPnDiodeDetId(0);
717  }
718  break;
719  case 39:
720  switch (lmmod) {
721  case 1:
722  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 1) : EcalPnDiodeDetId(EcalBarrel, 39, 6);
723  case 2:
724  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 2) : EcalPnDiodeDetId(EcalBarrel, 39, 7);
725  case 3:
726  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 2) : EcalPnDiodeDetId(EcalBarrel, 39, 7);
727  case 4:
728  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 3) : EcalPnDiodeDetId(EcalBarrel, 39, 8);
729  case 5:
730  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 3) : EcalPnDiodeDetId(EcalBarrel, 39, 8);
731  case 6:
732  return pnA ? /*EcalPnDiodeDetId(EcalBarrel, 39, 4)*/ EcalPnDiodeDetId(EcalBarrel, 39, 1)
733  : EcalPnDiodeDetId(EcalBarrel, 39, 9);
734  case 7:
735  return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 4) :*/ EcalPnDiodeDetId(EcalBarrel, 39, 9);
736  case 8:
737  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 5) : EcalPnDiodeDetId(EcalBarrel, 39, 10);
738  case 9:
739  return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 5) : EcalPnDiodeDetId(EcalBarrel, 39, 10);
740  default:
741  return EcalPnDiodeDetId(0);
742  }
743  break;
744  case 40:
745  switch (lmmod) {
746  case 1:
747  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 1) : EcalPnDiodeDetId(EcalBarrel, 40, 6);
748  case 2:
749  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 2) : EcalPnDiodeDetId(EcalBarrel, 40, 7);
750  case 3:
751  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 2) : EcalPnDiodeDetId(EcalBarrel, 40, 7);
752  case 4:
753  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 3) : EcalPnDiodeDetId(EcalBarrel, 40, 8);
754  case 5:
755  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 3) : EcalPnDiodeDetId(EcalBarrel, 40, 8);
756  case 6:
757  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 4) : EcalPnDiodeDetId(EcalBarrel, 40, 9);
758  case 7:
759  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 4) : EcalPnDiodeDetId(EcalBarrel, 40, 9);
760  case 8:
761  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 5) : EcalPnDiodeDetId(EcalBarrel, 40, 10);
762  case 9:
763  return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 5) : EcalPnDiodeDetId(EcalBarrel, 40, 10);
764  default:
765  return EcalPnDiodeDetId(0);
766  }
767  break;
768  case 41:
769  switch (lmmod) {
770  case 1:
771  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 1) : EcalPnDiodeDetId(EcalBarrel, 41, 6);
772  case 2:
773  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 2) : EcalPnDiodeDetId(EcalBarrel, 41, 7);
774  case 3:
775  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 2) : EcalPnDiodeDetId(EcalBarrel, 41, 7);
776  case 4:
777  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 3) : EcalPnDiodeDetId(EcalBarrel, 41, 8);
778  case 5:
779  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 3) : EcalPnDiodeDetId(EcalBarrel, 41, 8);
780  case 6:
781  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 4) : EcalPnDiodeDetId(EcalBarrel, 41, 9);
782  case 7:
783  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 4) : EcalPnDiodeDetId(EcalBarrel, 41, 9);
784  case 8:
785  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 5) : EcalPnDiodeDetId(EcalBarrel, 41, 10);
786  case 9:
787  return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 5) : EcalPnDiodeDetId(EcalBarrel, 41, 10);
788  default:
789  return EcalPnDiodeDetId(0);
790  }
791  break;
792  case 42:
793  switch (lmmod) {
794  case 1:
795  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 1) : EcalPnDiodeDetId(EcalBarrel, 42, 6);
796  case 2:
797  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 2) : EcalPnDiodeDetId(EcalBarrel, 42, 7);
798  case 3:
799  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 2) : EcalPnDiodeDetId(EcalBarrel, 42, 7);
800  case 4:
801  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 3) : EcalPnDiodeDetId(EcalBarrel, 42, 8);
802  case 5:
803  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 3) : EcalPnDiodeDetId(EcalBarrel, 42, 8);
804  case 6:
805  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 4) : EcalPnDiodeDetId(EcalBarrel, 42, 9);
806  case 7:
807  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 4) : EcalPnDiodeDetId(EcalBarrel, 42, 9);
808  case 8:
809  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 5) : EcalPnDiodeDetId(EcalBarrel, 42, 10);
810  case 9:
811  return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 5) : EcalPnDiodeDetId(EcalBarrel, 42, 10);
812  default:
813  return EcalPnDiodeDetId(0);
814  }
815  break;
816  case 43:
817  switch (lmmod) {
818  case 1:
819  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 1) : EcalPnDiodeDetId(EcalBarrel, 43, 6);
820  case 2:
821  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 2) : EcalPnDiodeDetId(EcalBarrel, 43, 7);
822  case 3:
823  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 2) : EcalPnDiodeDetId(EcalBarrel, 43, 7);
824  case 4:
825  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 3) : EcalPnDiodeDetId(EcalBarrel, 43, 8);
826  case 5:
827  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 3) : EcalPnDiodeDetId(EcalBarrel, 43, 8);
828  case 6:
829  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 4) : EcalPnDiodeDetId(EcalBarrel, 43, 9);
830  case 7:
831  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 4) : EcalPnDiodeDetId(EcalBarrel, 43, 9);
832  case 8:
833  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 5) : EcalPnDiodeDetId(EcalBarrel, 43, 10);
834  case 9:
835  return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 5) : EcalPnDiodeDetId(EcalBarrel, 43, 10);
836  default:
837  return EcalPnDiodeDetId(0);
838  }
839  break;
840  case 44:
841  switch (lmmod) {
842  case 1:
843  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 1) : EcalPnDiodeDetId(EcalBarrel, 44, 6);
844  case 2:
845  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 2) : EcalPnDiodeDetId(EcalBarrel, 44, 7);
846  case 3:
847  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 2) : EcalPnDiodeDetId(EcalBarrel, 44, 7);
848  case 4:
849  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 3) : EcalPnDiodeDetId(EcalBarrel, 44, 8);
850  case 5:
851  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 3) : EcalPnDiodeDetId(EcalBarrel, 44, 8);
852  case 6:
853  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 4) : EcalPnDiodeDetId(EcalBarrel, 44, 9);
854  case 7:
855  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 4) : EcalPnDiodeDetId(EcalBarrel, 44, 9);
856  case 8:
857  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 5) : EcalPnDiodeDetId(EcalBarrel, 44, 10);
858  case 9:
859  return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 5) : EcalPnDiodeDetId(EcalBarrel, 44, 10);
860  default:
861  return EcalPnDiodeDetId(0);
862  }
863  break;
864  case 45:
865  switch (lmmod) {
866  case 1:
867  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 1) : EcalPnDiodeDetId(EcalBarrel, 45, 6);
868  case 2:
869  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 2) : EcalPnDiodeDetId(EcalBarrel, 45, 7);
870  case 3:
871  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 2) : EcalPnDiodeDetId(EcalBarrel, 45, 7);
872  case 4:
873  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 3) : EcalPnDiodeDetId(EcalBarrel, 45, 8);
874  case 5:
875  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 3) : EcalPnDiodeDetId(EcalBarrel, 45, 8);
876  case 6:
877  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 4) : EcalPnDiodeDetId(EcalBarrel, 45, 9);
878  case 7:
879  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 4) : EcalPnDiodeDetId(EcalBarrel, 45, 9);
880  case 8:
881  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 5) : EcalPnDiodeDetId(EcalBarrel, 45, 10);
882  case 9:
883  return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 5) : EcalPnDiodeDetId(EcalBarrel, 45, 10);
884  default:
885  return EcalPnDiodeDetId(0);
886  }
887  break;
888  default:
889  return EcalPnDiodeDetId(0);
890  }
891 
892  } else {
893  EcalScDetId scid(EEDetId(_id).sc());
894  int ix(scid.ix());
895  int iy(scid.iy());
896  int dee(MEEEGeom::dee(ix, iy, scid.zside()));
897  int lmmod(MEEEGeom::lmmod(ix, iy));
898 
899  switch (dee) {
900  case 1:
901  switch (lmmod) {
902  case 1:
903  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 1) : EcalPnDiodeDetId(EcalEndcap, 50, 6);
904  case 2:
905  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 2) : EcalPnDiodeDetId(EcalEndcap, 50, 7);
906  case 3:
907  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 3) : EcalPnDiodeDetId(EcalEndcap, 50, 8);
908  case 4:
909  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 4) : EcalPnDiodeDetId(EcalEndcap, 50, 9);
910  case 5:
911  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 3) : EcalPnDiodeDetId(EcalEndcap, 50, 8);
912  case 6:
913  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 1) : EcalPnDiodeDetId(EcalEndcap, 50, 6);
914  case 7:
915  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 2) : EcalPnDiodeDetId(EcalEndcap, 50, 7);
916  case 8:
917  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 4) : EcalPnDiodeDetId(EcalEndcap, 50, 9);
918  case 9:
919  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 6) : EcalPnDiodeDetId(EcalEndcap, 50, 1);
920  case 10:
921  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 7) : EcalPnDiodeDetId(EcalEndcap, 50, 2);
922  case 11:
923  return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 8) :*/ EcalPnDiodeDetId(EcalEndcap, 50, 3);
924  case 12:
925  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 9) : EcalPnDiodeDetId(EcalEndcap, 50, 4);
926  case 13:
927  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 10) : EcalPnDiodeDetId(EcalEndcap, 50, 5);
928  case 14:
929  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 8) : EcalPnDiodeDetId(EcalEndcap, 50, 3);
930  case 15:
931  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 6) : EcalPnDiodeDetId(EcalEndcap, 50, 1);
932  case 16:
933  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 7) : EcalPnDiodeDetId(EcalEndcap, 50, 2);
934  case 17:
935  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 10) : EcalPnDiodeDetId(EcalEndcap, 50, 5);
936  case 18:
937  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 5) : EcalPnDiodeDetId(EcalEndcap, 50, 10);
938  case 19:
939  return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 9) : EcalPnDiodeDetId(EcalEndcap, 50, 4);
940  default:
941  return EcalPnDiodeDetId(0);
942  }
943  case 2:
944  switch (lmmod) {
945  case 1:
946  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 1) : EcalPnDiodeDetId(EcalEndcap, 46, 6);
947  case 2:
948  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 2) : EcalPnDiodeDetId(EcalEndcap, 46, 7);
949  case 3:
950  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 3) : EcalPnDiodeDetId(EcalEndcap, 46, 8);
951  case 4:
952  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 4) : EcalPnDiodeDetId(EcalEndcap, 46, 9);
953  case 5:
954  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 3) : EcalPnDiodeDetId(EcalEndcap, 46, 8);
955  case 6:
956  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 1) : EcalPnDiodeDetId(EcalEndcap, 46, 6);
957  case 7:
958  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 2) : EcalPnDiodeDetId(EcalEndcap, 46, 7);
959  case 8:
960  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 4) : EcalPnDiodeDetId(EcalEndcap, 46, 9);
961  case 9:
962  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 6) : EcalPnDiodeDetId(EcalEndcap, 46, 1);
963  case 10:
964  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 7) : EcalPnDiodeDetId(EcalEndcap, 46, 2);
965  case 11:
966  return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 8) :*/ EcalPnDiodeDetId(EcalEndcap, 46, 3);
967  case 12:
968  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 9) : EcalPnDiodeDetId(EcalEndcap, 46, 4);
969  case 13:
970  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 10) : EcalPnDiodeDetId(EcalEndcap, 46, 5);
971  case 14:
972  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 8) : EcalPnDiodeDetId(EcalEndcap, 46, 3);
973  case 15:
974  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 6) : EcalPnDiodeDetId(EcalEndcap, 46, 1);
975  case 16:
976  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 7) : EcalPnDiodeDetId(EcalEndcap, 46, 2);
977  case 17:
978  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 10) : EcalPnDiodeDetId(EcalEndcap, 46, 5);
979  case 18:
980  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 5) : EcalPnDiodeDetId(EcalEndcap, 46, 10);
981  case 19:
982  return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 9) : EcalPnDiodeDetId(EcalEndcap, 46, 4);
983  default:
984  return EcalPnDiodeDetId(0);
985  }
986  case 3:
987  switch (lmmod) {
988  case 1:
989  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 1) : EcalPnDiodeDetId(EcalEndcap, 1, 6);
990  case 2:
991  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 2) : EcalPnDiodeDetId(EcalEndcap, 1, 7);
992  case 3:
993  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 3) : EcalPnDiodeDetId(EcalEndcap, 1, 8);
994  case 4:
995  return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 4) :*/ EcalPnDiodeDetId(EcalEndcap, 1, 9);
996  case 5:
997  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 3) : EcalPnDiodeDetId(EcalEndcap, 1, 8);
998  case 6:
999  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 1) : EcalPnDiodeDetId(EcalEndcap, 1, 6);
1000  case 7:
1001  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 2) : EcalPnDiodeDetId(EcalEndcap, 1, 7);
1002  case 8:
1003  return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 4) :*/ EcalPnDiodeDetId(EcalEndcap, 1, 9);
1004  case 9:
1005  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 6) : EcalPnDiodeDetId(EcalEndcap, 1, 1);
1006  case 10:
1007  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 7) : EcalPnDiodeDetId(EcalEndcap, 1, 2);
1008  case 11:
1009  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 8) : EcalPnDiodeDetId(EcalEndcap, 1, 3);
1010  case 12:
1011  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 9) : EcalPnDiodeDetId(EcalEndcap, 1, 4);
1012  case 13:
1013  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 10) : EcalPnDiodeDetId(EcalEndcap, 1, 5);
1014  case 14:
1015  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 8) : EcalPnDiodeDetId(EcalEndcap, 1, 3);
1016  case 15:
1017  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 6) : EcalPnDiodeDetId(EcalEndcap, 1, 1);
1018  case 16:
1019  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 7) : EcalPnDiodeDetId(EcalEndcap, 1, 2);
1020  case 17:
1021  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 10) : EcalPnDiodeDetId(EcalEndcap, 1, 5);
1022  case 18:
1023  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 5) : EcalPnDiodeDetId(EcalEndcap, 1, 10);
1024  case 19:
1025  return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 9) : EcalPnDiodeDetId(EcalEndcap, 1, 4);
1026  default:
1027  return EcalPnDiodeDetId(0);
1028  }
1029  case 4:
1030  switch (lmmod) {
1031  case 1:
1032  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 1) : EcalPnDiodeDetId(EcalEndcap, 5, 6);
1033  case 2:
1034  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 2) : EcalPnDiodeDetId(EcalEndcap, 5, 7);
1035  case 3:
1036  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 3) : EcalPnDiodeDetId(EcalEndcap, 5, 8);
1037  case 4:
1038  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 4) : EcalPnDiodeDetId(EcalEndcap, 5, 9);
1039  case 5:
1040  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 3) : EcalPnDiodeDetId(EcalEndcap, 5, 8);
1041  case 6:
1042  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 1) : EcalPnDiodeDetId(EcalEndcap, 5, 6);
1043  case 7:
1044  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 2) : EcalPnDiodeDetId(EcalEndcap, 5, 7);
1045  case 8:
1046  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 4) : EcalPnDiodeDetId(EcalEndcap, 5, 9);
1047  case 9:
1048  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 6) : EcalPnDiodeDetId(EcalEndcap, 5, 1);
1049  case 10:
1050  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 7) : EcalPnDiodeDetId(EcalEndcap, 5, 2);
1051  case 11:
1052  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 8) : EcalPnDiodeDetId(EcalEndcap, 5, 3);
1053  case 12:
1054  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 9) : EcalPnDiodeDetId(EcalEndcap, 5, 4);
1055  case 13:
1056  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 10) : EcalPnDiodeDetId(EcalEndcap, 5, 5);
1057  case 14:
1058  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 8) : EcalPnDiodeDetId(EcalEndcap, 5, 3);
1059  case 15:
1060  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 6) : EcalPnDiodeDetId(EcalEndcap, 5, 1);
1061  case 16:
1062  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 7) : EcalPnDiodeDetId(EcalEndcap, 5, 2);
1063  case 17:
1064  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 10) : EcalPnDiodeDetId(EcalEndcap, 5, 5);
1065  case 18:
1066  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 5) : EcalPnDiodeDetId(EcalEndcap, 5, 10);
1067  case 19:
1068  return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 9) : EcalPnDiodeDetId(EcalEndcap, 5, 4);
1069  default:
1070  return EcalPnDiodeDetId(0);
1071  }
1072  default:
1073  return EcalPnDiodeDetId(0);
1074  }
1075  }
1076  }
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:94
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:93
bool isCrystalId(DetId const &)
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:284
unsigned dccId(DetId const &)
bool ecaldqm::qualityOK ( int  _quality)
unsigned ecaldqm::rtHalf ( DetId const &  _id)

Definition at line 119 of file EcalDQMCommonUtils.cc.

References dccId(), EcalBarrel, kEEm05, kEEp05, and DetId::subdetId().

Referenced by ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), and EcalDCCHeaderBlock::setRtHalf().

119  {
120  if (_id.subdetId() == EcalBarrel) {
121  int ic(EBDetId(_id).ic());
122  if ((ic - 1) / 20 > 4 && (ic - 1) % 20 < 10)
123  return 1;
124  } else {
125  unsigned iDCC(dccId(_id) - 1);
126  if ((iDCC == kEEm05 || iDCC == kEEp05) && EEDetId(_id).ix() > 50)
127  return 1;
128  }
129 
130  return 0;
131  }
unsigned dccId(const EcalElectronicsId &_id)
std::vector< DetId > ecaldqm::scConstituents ( EcalScDetId const &  _scid)

Definition at line 173 of file EcalDQMCommonUtils.cc.

References EcalScDetId::ix(), EcalScDetId::iy(), EEDetId::validDetId(), and EcalScDetId::zside().

Referenced by ecaldqm::TowerStatusTask::endLuminosityBlock(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::TimingClient::producePlots(), and ecaldqm::DQWorkerClient::towerAverage_().

173  {
174  std::vector<DetId> res;
175 
176  int ixbase((_scid.ix() - 1) * 5);
177  int iybase((_scid.iy() - 1) * 5);
178 
179  for (int ix(1); ix <= 5; ++ix) {
180  for (int iy(1); iy <= 5; ++iy) {
181  if (EEDetId::validDetId(ixbase + ix, iybase + iy, _scid.zside()))
182  res.push_back(EEDetId(ixbase + ix, iybase + iy, _scid.zside()));
183  }
184  }
185 
186  return res;
187  }
Definition: Electron.h:6
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
void ecaldqm::setElectronicsMap ( EcalElectronicsMapping const *  _map)

Definition at line 444 of file EcalDQMCommonUtils.cc.

References electronicsMap(), and CommonMethods::lock().

Referenced by EcalFEDMonitorTemp< SUBDET >::dqmBeginRun(), and ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects().

444  {
445  std::lock_guard<std::mutex> lock(mapMutex);
446  electronicsMap = _map;
447  }
std::mutex mapMutex
EcalElectronicsMapping const * electronicsMap(0)
void ecaldqm::setGeometry ( CaloGeometry const *  _geom)

Definition at line 484 of file EcalDQMCommonUtils.cc.

References CommonMethods::lock().

Referenced by ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects(), and EcalSelectiveReadout::setElecMap().

484  {
485  std::lock_guard<std::mutex> lock(mapMutex);
486  geometry = _geom;
487  }
std::mutex mapMutex
void ecaldqm::setTopology ( CaloTopology const *  _geom)

Definition at line 504 of file EcalDQMCommonUtils.cc.

References CommonMethods::lock(), and topology().

Referenced by ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects().

504  {
505  std::lock_guard<std::mutex> lock(mapMutex);
506  topology = _geom;
507  }
CaloTopology const * topology(0)
std::mutex mapMutex
void ecaldqm::setTrigTowerMap ( EcalTrigTowerConstituentsMap const *  _map)

Definition at line 464 of file EcalDQMCommonUtils.cc.

References CommonMethods::lock(), and trigtowerMap().

Referenced by ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects().

464  {
465  std::lock_guard<std::mutex> lock(mapMutex);
466  trigtowerMap = _map;
467  }
std::mutex mapMutex
EcalTrigTowerConstituentsMap const * trigtowerMap(0)
std::string ecaldqm::smName ( unsigned  _dccId)

Definition at line 289 of file EcalDQMCommonUtils.cc.

References kEBmHigh, kEBmLow, kEBpHigh, kEBpLow, kEEmHigh, kEEmLow, kEEpHigh, and kEEpLow.

Referenced by ecaldqm::binning::channelName(), ME::smName(), and ME::smNameFromDcc().

289  {
290  std::stringstream ss;
291 
292  unsigned iSM(_dccId - 1);
293 
294  if (iSM <= kEEmHigh)
295  ss << "EE-" << std::setw(2) << std::setfill('0') << (((iSM - kEEmLow + 6) % 9) + 1);
296  else if (iSM <= kEBmHigh)
297  ss << "EB-" << std::setw(2) << std::setfill('0') << (iSM - kEBmLow + 1);
298  else if (iSM <= kEBpHigh)
299  ss << "EB+" << std::setw(2) << std::setfill('0') << (iSM - kEBpLow + 1);
300  else if (iSM <= kEEpHigh)
301  ss << "EE+" << std::setw(2) << std::setfill('0') << (((iSM - kEEpLow + 6) % 9) + 1);
302 
303  return ss.str();
304  }
EcalLogicID ecaldqm::subdetID ( EcalSubdetector  _subdet)

Definition at line 10 of file LogicIDTranslation.cc.

References EcalBarrel, EcalEndcap, and Exception.

10  {
11  switch (_subdet) {
12  case EcalBarrel:
13  return EcalLogicID("EB", 1000000000UL);
14  case EcalEndcap:
15  return EcalLogicID("EE", 2000000000UL);
16  default:
17  throw cms::Exception("UndefinedLogicID");
18  }
19  }
unsigned ecaldqm::tccId ( const DetId _id)

Definition at line 56 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalTriggerTower, Exception, getElectronicsMap(), EcalElectronicsMapping::getTriggerElectronicsId(), isEcalScDetId(), genParticles_cff::map, DetId::subdetId(), EcalTriggerElectronicsId::tccId(), and EcalElectronicsMapping::TCCid().

56  {
58 
59  unsigned subdet(_id.subdetId());
60 
61  if (subdet == EcalBarrel)
62  return map->TCCid(EBDetId(_id));
63  else if (subdet == EcalTriggerTower)
64  return map->TCCid(EcalTrigTowerDetId(_id));
65  else if (subdet == EcalEndcap) {
66  if (isEcalScDetId(_id))
67  return 0; // incompatible
68  else
69  return map->getTriggerElectronicsId(EEDetId(_id)).tccId();
70  }
71 
72  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::tccId(" << uint32_t(_id) << ")" << std::endl;
73 
74  return 0;
75  }
EcalElectronicsMapping const * getElectronicsMap()
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
bool isEcalScDetId(const DetId &_id)
unsigned ecaldqm::tccId ( const EcalElectronicsId _id)

Definition at line 77 of file EcalDQMCommonUtils.cc.

References getElectronicsMap(), EcalElectronicsMapping::getTriggerElectronicsId(), and EcalTriggerElectronicsId::tccId().

int tccId() const
get the DCC (Ecal Local DCC value not global one) id
EcalElectronicsMapping const * getElectronicsMap()
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
unsigned ecaldqm::tccId ( DetId const &  )
unsigned ecaldqm::tccId ( EcalElectronicsId const &  )
DetId ecaldqm::toDetId ( EcalLogicID const &  _id)

Definition at line 82 of file LogicIDTranslation.cc.

Referenced by fetchAndFill().

82 { return DetId(); }
Definition: DetId.h:18
CaloTopology const* ecaldqm::topology ( )

Referenced by BtlDigiHitsValidation::analyze(), BtlRecHitsValidation::analyze(), edmtest::HcalDumpConditions::analyze(), ContainmentCorrectionAnalyzer::analyze(), BtlSimHitsValidation::analyze(), HcalLutAnalyzer::analyze(), ElectronCalibrationUniv::analyze(), MCMisalignmentScaler::analyze(), HcalRecHitRecalib::beginRun(), GEMCheckGeometry::bookHistograms(), cms::DTGeometryBuilder::buildLayer(), DTGeometryBuilderFromDDD::buildLayer(), DTGeometryBuilderFromCondDB::buildLayer(), GsfElectronAlgo::calculateShowerShape(), CaloRectangleRange< T >::CaloRectangleRange(), checkTopology(), ClusterShapeAlgo::ClusterShapeAlgo(), StripCPE::Param::coveredStrips(), ClusterShapeAlgo::Create_Map(), CaloTopology::down(), Pi0FixedMassWindowCalibration::duringLoop(), CaloTopology::east(), Chi2Strip1DEstimator::estimate(), EcalRegressionData::fill(), GlobalTrajectoryBuilderBase::fixTEC(), CaloTopology::getAllNeighbours(), SiPixelQuality::getBadRocPositions(), CaloTopology::getNeighbours(), getTopology(), CaloTopology::getWindow(), SiTrivialInduceChargeOnStrips::induceOriginal(), SiTrivialInduceChargeOnStrips::induceVector(), SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db(), FWGeometry::loadMap(), fireworks::localSiStrip(), RPixClusterToHit::make_hit(), reco::makeSpecific(), L1MuDTMuonSorter::neighbour(), L1MuBMMuonSorter::neighbour(), CaloTopology::north(), ZdcGeometry::numberOfParametersPerShape(), CastorGeometry::numberOfParametersPerShape(), CaloRectangle::operator()(), InterestingEcalDetIdProducer::produce(), EcalDigiSelector::produce(), EgammaHLTHybridClusterProducer::produce(), HybridClusterProducer::produce(), PhotonProducer::produce(), HiEgammaSCCorrectionMaker::produce(), HLTRechitInRegionsProducer< T1 >::produce(), GEDPhotonProducer::produce(), InterestingDetIdCollectionProducer::produce(), InterestingDetIdFromSuperClusterProducer::produce(), InterestingTrackEcalDetIdProducer::produce(), HighPtTrackEcalDetIdProducer::produce(), CaloGeometryDBEP< T, U >::produceAligned(), HcalHardcodeGeometryEP::produceIdeal(), HcalDDDGeometryEP::produceIdeal(), L1MuBMMuonSorter::runCOL(), L1MuDTMuonSorter::runCOL(), SingleEleCalibSelector::select(), CaloNavigator< T, TOPO >::setTopology(), setTopology(), RPCSimSimple::simulate(), RPCSimTriv::simulate(), RPCSimParam::simulate(), RPCSimAverage::simulate(), RPCSimAverageNoiseEffCls::simulate(), RPCSimAverageNoise::simulate(), RPCSimAverageNoiseEff::simulate(), RPCSimModelTiming::simulate(), RPCSimAsymmetricCls::simulate(), ME0SimpleModel::simulateClustering(), GEMTrivialModel::simulateSignal(), CaloTopology::south(), CaloTopology::up(), MeasurementTrackerEventProducer::updatePixels(), CaloTopology::west(), reco::writeSpecific(), and HiEgammaSCEnergyCorrectionAlgo::~HiEgammaSCEnergyCorrectionAlgo().

EcalLogicID ecaldqm::towerID ( EcalElectronicsId const &  _id)

Definition at line 37 of file LogicIDTranslation.cc.

References EcalElectronicsId::dccId(), ecalpyutils::ism(), kEBmHigh, kEBmLow, kEBpLow, kEEpLow, and EcalElectronicsId::towerId().

Referenced by EcalABAnalyzer::analyze(), EcalPerEvtLaserAnalyzer::analyze(), TShapeAnalysis::computeShape(), EcalPerEvtLaserAnalyzer::endJob(), and ecaldqm::IntegrityWriter::run().

37  {
38  unsigned iDCC(_id.dccId() - 1);
39  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
40  return EcalLogicID(
41  "EE_readout_tower", 2110000000UL + 100 * (601 + iDCC) + _id.towerId(), 601 + iDCC, _id.towerId());
42  } else {
43  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
44  return EcalLogicID("EB_trigger_tower", 1021000000UL + 10000 * ism + _id.towerId(), ism, _id.towerId());
45  }
46  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned ecaldqm::towerId ( const DetId _id)

Definition at line 79 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalTriggerTower, Exception, EcalElectronicsMapping::getDCCandSC(), EcalElectronicsMapping::getElectronicsId(), getElectronicsMap(), isEcalScDetId(), EcalTrigTowerDetId::iTT(), DetId::subdetId(), EBDetId::tower(), and EcalElectronicsId::towerId().

79  {
80  unsigned subdet(_id.subdetId());
81 
82  if (subdet == EcalBarrel)
83  return EBDetId(_id).tower().iTT();
84  else if (subdet == EcalTriggerTower)
85  return EcalTrigTowerDetId(_id).iTT();
86  else if (subdet == EcalEndcap) {
87  if (isEcalScDetId(_id))
88  return getElectronicsMap()->getDCCandSC(EcalScDetId(_id)).second;
89  else
91  }
92 
93  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::towerId(" << std::hex << uint32_t(_id) << ")"
94  << std::endl;
95 
96  return 0;
97  }
EcalElectronicsMapping const * getElectronicsMap()
int towerId() const
get the tower id
std::pair< int, int > getDCCandSC(EcalScDetId id) const
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:57
bool isEcalScDetId(const DetId &_id)
int iTT() const
sequential index within one DCC
unsigned ecaldqm::towerId ( const EcalElectronicsId _id)

Definition at line 99 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::towerId().

99 { return _id.towerId(); }
int towerId() const
get the tower id
unsigned ecaldqm::towerId ( DetId const &  )
unsigned ecaldqm::towerId ( EcalElectronicsId const &  )
EcalTrigTowerConstituentsMap const* ecaldqm::trigtowerMap ( )
unsigned ecaldqm::ttId ( const DetId _id)

Definition at line 101 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalTriggerTower, Exception, getElectronicsMap(), EcalElectronicsMapping::getTriggerElectronicsId(), isEcalScDetId(), EcalTrigTowerDetId::iTT(), EcalElectronicsMapping::iTT(), DetId::subdetId(), EBDetId::tower(), and EcalTriggerElectronicsId::ttId().

101  {
102  unsigned subdet(_id.subdetId());
103 
104  if (subdet == EcalBarrel)
105  return EBDetId(_id).tower().iTT();
106  else if (subdet == EcalTriggerTower)
107  return getElectronicsMap()->iTT(EcalTrigTowerDetId(_id));
108  else if (subdet == EcalEndcap && !isEcalScDetId(_id))
110 
111  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::ttId(" << std::hex << uint32_t(_id) << ")"
112  << std::endl;
113 
114  return 0;
115  }
EcalElectronicsMapping const * getElectronicsMap()
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
int ttId() const
get the tower id
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:57
bool isEcalScDetId(const DetId &_id)
int iTT() const
sequential index within one DCC
unsigned ecaldqm::ttId ( const EcalElectronicsId _id)

Definition at line 117 of file EcalDQMCommonUtils.cc.

References getElectronicsMap(), EcalElectronicsMapping::getTriggerElectronicsId(), and EcalTriggerElectronicsId::ttId().

117 { return getElectronicsMap()->getTriggerElectronicsId(_id).ttId(); }
EcalElectronicsMapping const * getElectronicsMap()
int ttId() const
get the tower id
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
unsigned ecaldqm::ttId ( DetId const &  )
unsigned ecaldqm::ttId ( EcalElectronicsId const &  )
int ecaldqm::zside ( DetId const &  )

Referenced by HcalHBHEMuonAnalyzer::activeLength(), EcalEndcapGeometry::alignmentTransformIndexLocal(), EcalSelectiveReadoutValidation::anaDigi(), ESOccupancyTask::analyze(), ESPedestalTask::analyze(), ESTimingTask::analyze(), ESTrendTask::analyze(), DQMSourceEleCalib::analyze(), EcalPreshowerRecHitsValidation::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), HGCGeometryValidation::analyze(), EcalTPGParamBuilder::analyze(), HcalRaddamMuon::analyze(), EcalSelectiveReadoutValidation::analyzeEE(), HGCalHitValidation::analyzeHGCalSimHit(), HGCalSimHitValidation::analyzeHits(), HGCalTimingAnalyzer::analyzeSimHits(), HGCalTBAnalyzer::analyzeSimHits(), ftl_digitizer::FTLDigitizer< SensorPhysics, ElectronicsSim >::beginRun(), FastTimeGeometryLoader::build(), HGCalGeometryLoader::build(), FastTimeGeometryLoader::buildGeom(), HGCalTriggerGeometryImp1::buildMaps(), CaloTowerConstituentsMap::constituentsOf(), EcalTrigTowerConstituentsMap::constituentsOf(), EcalFEtoDigi::create_TTDetId(), EcalElectronicsMapping::DCCid(), EcalElectronicsMapping::dccTowerConstituents(), HcalTopology::decAIEta(), HcalTopology::decIEta(), ChargeDividerFP420::DeconvolutionShape(), HcalTopology::decrementDepth(), EcalEndcapHardcodedTopology::decrementIx(), EcalEndcapTopology::decrementIx(), EcalPreshowerTopology::decrementIx(), EcalEndcapHardcodedTopology::decrementIy(), EcalEndcapTopology::decrementIy(), EcalPreshowerTopology::decrementIy(), EcalPreshowerTopology::decrementIz(), HcalHBHEMuonAnalyzer::depth16HE(), HcalTopology::detId2denseIdCALIB(), HcalTopology::detId2denseIdHT(), HcalTrigTowerGeometry::detIds(), HcalTopology::doublePhiBins(), HcalHitRelabeller::energyWt(), SimG4HcalValidation::fetchHits(), HGCalTriggerNtupleHGCTriggerCells::fill(), HcalTestAnalysis::fill(), SimG4HcalValidation::fill(), AdHocNTupler::fill(), HGVHistoProducerAlgo::fill_generic_cluster_histos(), HcalTestHistoClass::fillHits(), HGCalTriggerGeometryV9Imp1::fillInvalidTriggerCells(), CastorShowerLibraryMaker::FillShowerEvent(), EcalLaserCorrFilter::filter(), ecaldqm::binning::findBinSuperCrystal_(), PhysicsTowerOrganizer::findNeighbors(), ecaldqm::binning::findPlotIndex(), PhysicsTowerOrganizer::findTower(), BSCTrigger::getBSCNum(), CastorTestAnalysis::getCastorBranchData(), HGCalTriggerGeometryV9Imp2::getCellsFromTriggerCell(), EcalEndcapGeometry::getClosestBarrelCells(), HcalGeometry::getClosestCell(), FastTimeGeometry::getClosestCell(), HcalDDDRecConstants::getConstHBHE(), EcalElectronicsMapping::getDCCandSC(), HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getDepthEta29M(), EcalElectronicsMapping::getDetId(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), EcalElectronicsMapping::getElectronicsId(), HcalDDDRecConstants::getEtaBins(), ESElectronicsMapper::getFED(), HcalDDDRecConstants::getHCID(), EcalEBTrigPrimTestAlgo::getIndex(), EcalTrigPrimFunctionalAlgo::getIndex(), ESElectronicsMapper::getKCHIP(), HcalDDDRecConstants::getLayerBack(), HcalDDDRecConstants::getLayerFront(), HGCalTriggerGeometryV9Imp2::getModuleFromTriggerCell(), HCALConfigDB::getOnlineLUT(), HCALConfigDB::getOnlineLUTFromXML(), HcalDDDRecConstants::getPhiZOne(), HcalDDDRecConstants::getRZ(), HcalLayerDepthMap::getSubdet(), EgammaHLTHcalIsolation::getSum(), HcalDDDRecConstants::getThickActive(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), HGCalTriggerGeometryV9Imp1::getTriggerCellFromCell(), EcalElectronicsMapping::getTriggerElectronicsId(), HGCalTriggerTowerGeometryHelper::getTriggerTowerFromTriggerCell(), EcalElectronicsMapping::getTrigTowerDetId(), ETLNumberingScheme::getUnitID(), BTLNumberingScheme::getUnitID(), ESTBNumberingScheme::getUnitID(), BHMNumberingScheme::getUnitID(), HcalTestNumberingScheme::getUnitID(), EcalEndcapNumberingScheme::getUnitID(), EcalPreshowerNumberingScheme::getUnitID(), HcalNumberingScheme::getUnitID(), BscNumberingScheme::getUnitID(), ZdcNumberingScheme::getUnitID(), FP420NumberingScheme::getUnitID(), HcalTBNumberingScheme::getUnitID(), CastorNumberingScheme::getUnitID(), CastorCondObjectContainer< Item >::hashed_id(), ecalpyutils::hashedIndexToXY(), HcalDDDSimConstants::HcalCellTypes(), HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(), HcalTopology::incAIEta(), HcalTopology::incIEta(), HcalTopology::incrementDepth(), EcalEndcapHardcodedTopology::incrementIx(), EcalEndcapTopology::incrementIx(), EcalPreshowerTopology::incrementIx(), EcalEndcapHardcodedTopology::incrementIy(), EcalEndcapTopology::incrementIy(), EcalPreshowerTopology::incrementIy(), EcalPreshowerTopology::incrementIz(), indexByEta(), HcalCondObjectContainerBase::indexFor(), HcalHPDRBXMap::indexHPD(), HcalDDDSimConstants::initialize(), HcalDDDRecConstants::initialize(), PhysicsTowerOrganizer::insert_(), HGCalTopology::isHFNose(), HGCalTriggerTools::isScintillator(), EcalElectronicsMapping::iTT(), HGCalGeomParameters::loadGeometryHexagon8(), CastorHardcodeGeometryLoader::makeCell(), ZdcHardcodeGeometryLoader::makeCell(), HSCPValidator::makeSimDigiPlotsECAL(), HcalDDDRecConstants::mergedDepthList29(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), ChargeDividerFP420::PeakShape(), HcalDDDSimConstants::printTiles(), cms::DigitizerFP420::produce(), L1RCTTPGProvider::produce(), cms::ClusterizerFP420::produce(), CastorCellProducer::produce(), EcalSimpleProducer::produce(), EcalElectronicsMapping::pseudoStripConstituents(), HcalTestAnalysis::qieAnalysis(), xuti::readCellId(), StoreESCondition::readESPedestalsFromFile(), ecaldqm::StatusManager::readFromStream(), HCalSD::readWeightFromFile(), FP420NumberingScheme::realzside(), EcalRecHitWorkerRecover::run(), FP420ClusterMain::run(), ecaldqm::ClusterTask::runOnBasicClusters(), ecaldqm::OccupancyTask::runOnRecHits(), EcalElectronicsMapping::stripConstituents(), EcalElectronicsMapping::tccConstituents(), EcalElectronicsMapping::TCCid(), EcalTrigPrimCompactColl::toEcalTrigPrimDigiCollection(), TrackProducerFP420::trackFinderSophisticated(), EcalElectronicsMapping::ttConstituents(), HcalNumberingFromPS::unitID(), HcalNumberingFromDDD::unitID(), BscNumberingScheme::unpackBscIndex(), DoCastorAnalysis::update(), FP420Test::update(), BscTest::update(), CastorTopology::validRaw(), ZdcTopology::validRaw(), HcalTopology::validRaw(), ESUnpacker::word2digi(), ESElectronicsMapper::~ESElectronicsMapper(), and hgcal::RecHitTools::~RecHitTools().

int ecaldqm::zside ( const DetId _id)

Definition at line 189 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalTriggerTower, Exception, kEBpLow, DetId::subdetId(), and globals_cff::x1.

189  {
190  uint32_t rawId(_id);
191 
192  switch (_id.subdetId()) {
193  case EcalBarrel:
194  return (((rawId >> 16) & 0x1) == 1 ? 1 : -1);
195  case EcalEndcap:
196  return (((rawId >> 14) & 0x1) == 1 ? 1 : -1);
197  case EcalTriggerTower:
198  return (((rawId >> 15) & 0x1) == 1 ? 1 : -1);
199  case EcalLaserPnDiode:
200  return (((rawId >> 4) & 0x7f) > kEBpLow ? 1 : -1);
201  default:
202  throw cms::Exception("InvalidDetId")
203  << "EcalDQMCommonUtils::zside(" << std::hex << uint32_t(_id) << ")" << std::endl;
204  }
205 
206  return 0;
207  }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41

Variable Documentation

std::string const ecaldqm::collectionName[nCollections]
WorkerFactoryStore::Registration< CalibrationSummaryClient > ecaldqm::ecaldqmCalibrationSummaryClientRegistration("CalibrationSummaryClient")
WorkerFactoryStore::Registration< CertificationClient > ecaldqm::ecaldqmCertificationClientRegistration("CertificationClient")
WorkerFactoryStore::Registration< ClusterTask > ecaldqm::ecaldqmClusterTaskRegistration("ClusterTask")
WorkerFactoryStore::Registration< EnergyTask > ecaldqm::ecaldqmEnergyTaskRegistration("EnergyTask")
WorkerFactoryStore::Registration< IntegrityClient > ecaldqm::ecaldqmIntegrityClientRegistration("IntegrityClient")
WorkerFactoryStore::Registration< IntegrityTask > ecaldqm::ecaldqmIntegrityTaskRegistration("IntegrityTask")
WorkerFactoryStore::Registration< LaserClient > ecaldqm::ecaldqmLaserClientRegistration("LaserClient")
WorkerFactoryStore::Registration< LaserTask > ecaldqm::ecaldqmLaserTaskRegistration("LaserTask")
WorkerFactoryStore::Registration< LedClient > ecaldqm::ecaldqmLedClientRegistration("LedClient")
WorkerFactoryStore::Registration< LedTask > ecaldqm::ecaldqmLedTaskRegistration("LedTask")
WorkerFactoryStore::Registration< OccupancyClient > ecaldqm::ecaldqmOccupancyClientRegistration("OccupancyClient")
WorkerFactoryStore::Registration< OccupancyTask > ecaldqm::ecaldqmOccupancyTaskRegistration("OccupancyTask")
WorkerFactoryStore::Registration< PedestalClient > ecaldqm::ecaldqmPedestalClientRegistration("PedestalClient")
WorkerFactoryStore::Registration< PedestalTask > ecaldqm::ecaldqmPedestalTaskRegistration("PedestalTask")
WorkerFactoryStore::Registration< PNDiodeTask > ecaldqm::ecaldqmPNDiodeTaskRegistration("PNDiodeTask")
WorkerFactoryStore::Registration< PNIntegrityClient > ecaldqm::ecaldqmPNIntegrityClientRegistration("PNIntegrityClient")
WorkerFactoryStore::Registration< PresampleClient > ecaldqm::ecaldqmPresampleClientRegistration("PresampleClient")
WorkerFactoryStore::Registration< PresampleTask > ecaldqm::ecaldqmPresampleTaskRegistration("PresampleTask")
WorkerFactoryStore::Registration< RawDataClient > ecaldqm::ecaldqmRawDataClientRegistration("RawDataClient")
WorkerFactoryStore::Registration< RawDataTask > ecaldqm::ecaldqmRawDataTaskRegistration("RawDataTask")
WorkerFactoryStore::Registration< RecoSummaryTask > ecaldqm::ecaldqmRecoSummaryTaskRegistration("RecoSummaryTask")
WorkerFactoryStore::Registration< SelectiveReadoutClient > ecaldqm::ecaldqmSelectiveReadoutClientRegistration("SelectiveReadoutClient")
WorkerFactoryStore::Registration< SelectiveReadoutTask > ecaldqm::ecaldqmSelectiveReadoutTaskRegistration("SelectiveReadoutTask")
WorkerFactoryStore::Registration< SummaryClient > ecaldqm::ecaldqmSummaryClientRegistration("SummaryClient")
WorkerFactoryStore::Registration< TestPulseClient > ecaldqm::ecaldqmTestPulseClientRegistration("TestPulseClient")
WorkerFactoryStore::Registration< TestPulseTask > ecaldqm::ecaldqmTestPulseTaskRegistration("TestPulseTask")
WorkerFactoryStore::Registration< TimingClient > ecaldqm::ecaldqmTimingClientRegistration("TimingClient")
WorkerFactoryStore::Registration< TimingTask > ecaldqm::ecaldqmTimingTaskRegistration("TimingTask")
WorkerFactoryStore::Registration< TowerStatusTask > ecaldqm::ecaldqmTowerStatusTaskRegistration("TowerStatusTask")
WorkerFactoryStore::Registration< TrigPrimClient > ecaldqm::ecaldqmTrigPrimClientRegistration("TrigPrimClient")
WorkerFactoryStore::Registration< TrigPrimTask > ecaldqm::ecaldqmTrigPrimTaskRegistration("TrigPrimTask")
double const ecaldqm::etaBound
std::mutex ecaldqm::mapMutex

Definition at line 423 of file EcalDQMCommonUtils.cc.

unsigned ecaldqm::memarr[]
Initial value:

Definition at line 8 of file EcalDQMCommonUtils.cc.

std::vector<unsigned> const ecaldqm::memDCC