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
 
struct  EcalDQMSetupObjects
 
struct  EcalLSCache
 
class  EnergyTask
 
class  GpuTask
 
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  MESetCollection
 
class  MESetDet0D
 
class  MESetDet1D
 
class  MESetDet2D
 
class  MESetEcal
 
class  MESetMulti
 
class  MESetNonObject
 
class  MESetProjection
 
class  MESetTrend
 
class  MLClient
 
class  OccupancyClient
 
class  OccupancyReader
 
class  OccupancyTask
 
class  OccupancyWriter
 
class  PedestalClient
 
class  PedestalsOnlineReader
 
class  PedestalsReader
 
class  PedestalTask
 
class  PedestalWriter
 
class  PiZeroTask
 
class  PNBlueReader
 
class  PNDiodeTask
 
class  PNGreenReader
 
class  PNIntegrityClient
 
class  PNIRedReader
 
class  PNMGPAReader
 
class  PNPedReader
 
class  PNRedReader
 
class  PresampleClient
 
class  PresampleTask
 
class  PresampleWriter
 
struct  PrescaleCounter
 
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 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, kEBCpuDigi,
  kEECpuDigi, kEBGpuDigi, kEEGpuDigi, kEBCpuUncalibRecHit,
  kEECpuUncalibRecHit, kEBGpuUncalibRecHit, kEEGpuUncalibRecHit, kEBCpuRecHit,
  kEECpuRecHit, kEBGpuRecHit, kEEGpuRecHit, 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  Prescalers {
  kPhysics, kCosmics, kCalibration, kLaser,
  kLed, kTestPulse, kPedestal, nPrescalers
}
 
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)
 
MESetcreateMESet (edm::ParameterSet const &)
 
EcalLogicID crystalID (DetId const &, EcalElectronicsMapping const *)
 
unsigned dccId (DetId const &, EcalElectronicsMapping const *)
 
unsigned dccId (EcalElectronicsId const &)
 
unsigned dccId (std::string const &)
 
EcalLogicID ecalID ()
 
unsigned EEPnDCC (unsigned _dee, unsigned _ab)
 
double eta (EBDetId const &, CaloGeometry const *)
 
double eta (EEDetId const &, CaloGeometry const *)
 
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 &)
 
std::pair< unsigned, unsigned > innerTCCs (unsigned)
 
bool isCrystalId (DetId const &)
 
bool isEcalScDetId (DetId const &)
 
bool isEndcapTTId (DetId const &)
 
bool isForward (DetId const &)
 
bool isSingleChannelId (DetId const &)
 
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, EcalElectronicsMapping const *)
 
bool qualityOK (int _quality)
 
unsigned rtHalf (DetId const &, EcalElectronicsMapping const *)
 
std::vector< DetIdscConstituents (EcalScDetId const &)
 
std::string smName (unsigned)
 
EcalLogicID subdetID (EcalSubdetector)
 
unsigned tccId (DetId const &, EcalElectronicsMapping const *)
 
unsigned tccId (EcalElectronicsId const &, EcalElectronicsMapping const *)
 
DetId toDetId (EcalLogicID const &)
 
EcalLogicID towerID (EcalElectronicsId const &)
 
unsigned towerId (DetId const &, EcalElectronicsMapping const *)
 
unsigned towerId (EcalElectronicsId const &)
 
unsigned ttId (DetId const &, EcalElectronicsMapping const *)
 
unsigned ttId (EcalElectronicsId const &, EcalElectronicsMapping const *)
 
int zside (DetId const &)
 

Variables

std::string const collectionName [nCollections]
 
WorkerFactoryStore::Registration< CalibrationSummaryClientecaldqmCalibrationSummaryClientRegistration ("CalibrationSummaryClient")
 
WorkerFactoryStore::Registration< CertificationClientecaldqmCertificationClientRegistration ("CertificationClient")
 
WorkerFactoryStore::Registration< ClusterTaskecaldqmClusterTaskRegistration ("ClusterTask")
 
WorkerFactoryStore::Registration< EnergyTaskecaldqmEnergyTaskRegistration ("EnergyTask")
 
WorkerFactoryStore::Registration< GpuTaskecaldqmGpuTaskRegistration ("GpuTask")
 
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< MLClientecaldqmMLClientRegistration ("MLClient")
 
WorkerFactoryStore::Registration< OccupancyClientecaldqmOccupancyClientRegistration ("OccupancyClient")
 
WorkerFactoryStore::Registration< OccupancyTaskecaldqmOccupancyTaskRegistration ("OccupancyTask")
 
WorkerFactoryStore::Registration< PedestalClientecaldqmPedestalClientRegistration ("PedestalClient")
 
WorkerFactoryStore::Registration< PedestalTaskecaldqmPedestalTaskRegistration ("PedestalTask")
 
WorkerFactoryStore::Registration< PiZeroTaskecaldqmPiZeroTaskRegistration ("PiZeroTask")
 
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
 
unsigned memarr []
 
std::vector< unsigned > const memDCC
 

Typedef Documentation

◆ ReturnType

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

Definition at line 54 of file DBReaderWorkers.cc.

◆ WorkerFactory

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

Definition at line 145 of file DQWorker.h.

Enumeration Type Documentation

◆ Collections

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 
kEBCpuDigi 
kEECpuDigi 
kEBGpuDigi 
kEEGpuDigi 
kEBCpuUncalibRecHit 
kEECpuUncalibRecHit 
kEBGpuUncalibRecHit 
kEEGpuUncalibRecHit 
kEBCpuRecHit 
kEECpuRecHit 
kEBGpuRecHit 
kEEGpuRecHit 
nCollections 

Definition at line 8 of file Collections.h.

8  {
9  kSource,
23  kEBSrFlag,
24  kEESrFlag,
25  kEBDigi,
26  kEEDigi,
36  kEBRecHit,
37  kEERecHit,
44  kEBCpuDigi,
45  kEECpuDigi,
46  kEBGpuDigi,
47  kEEGpuDigi,
57  };
static const char *const kSource

◆ Constants

Enumerator
nDCC 
nEBDCC 
nEEDCC 
nDCCMEM 
nEEDCCMEM 
nTTOuter 
nTTInner 
nTCC 
kEEmTCCLow 
kEEmTCCHigh 
kEEpTCCLow 
kEEpTCCHigh 
kEBTCCLow 
kEBTCCHigh 
nChannels 
nTowers 

Definition at line 90 of file EcalDQMCommonUtils.h.

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

◆ FEFlags

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.

◆ Prescalers

◆ Quality

Enumerator
kBad 
kGood 
kUnknown 
kMBad 
kMGood 
kMUnknown 

Definition at line 55 of file DBWriterWorkers.cc.

◆ SMName

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 25 of file EcalDQMCommonUtils.h.

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

Function Documentation

◆ ccuExists()

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)

◆ createMESet()

MESet * ecaldqm::createMESet ( edm::ParameterSet const &  _MEParam)

Definition at line 18 of file MESetUtils.cc.

References CalibrationSummaryClient_cfi::btype, HLT_2023v12_cff::candidates, Exception, edm::ParameterSet::existsAs(), ecaldqm::binning::formAxis(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::binning::kChannel, CalibrationSummaryClient_cfi::kind, ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::binning::kReport, ecaldqm::binning::kTrend, ecaldqm::binning::kUser, trackerHitRTTI::multi, ecaldqm::binning::nObjType, CalibrationSummaryClient_cfi::otype, castor_dqm_sourceclient_file_cfg::path, MonitorElementData::REAL, ecaldqm::MESetTrend::setCumulative(), ecaldqm::MESetTrend::setMinutely(), ecaldqm::MESetTrend::setShiftAxis(), AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH1F, MonitorElementData::TH2F, cond::impl::to_string(), MonitorElementData::TPROFILE, MonitorElementData::TPROFILE2D, ecaldqm::binning::translateBinningType(), ecaldqm::binning::translateKind(), ecaldqm::binning::translateObjectType(), LaserClient_cfi::xaxis, TimingClient_cfi::yaxis, and LaserClient_cfi::zaxis.

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

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

◆ crystalID()

EcalLogicID ecaldqm::crystalID ( DetId const &  _id,
EcalElectronicsMapping const *  electronicsMap 
)

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, electronicsMap) - 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  }
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:49

◆ dccId() [1/3]

unsigned ecaldqm::dccId ( DetId const &  _id,
EcalElectronicsMapping const *  map 
)

Definition at line 16 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalTriggerTower, Exception, EcalPnDiodeDetId::iDCCId(), isEcalScDetId(), genParticles_cff::map, DetId::rawId(), and DetId::subdetId().

Referenced by RawTask::_process(), DCCEventBlock::addHeaderToCollection(), EcalFEDMonitorTemp< SUBDET >::analyze(), LaserSorter::analyze(), DCCEESRPBlock::checkSrpIdAndNumbSRFlags(), crystalID(), RPCReadOutMapping::dcc(), EcalElectronicsMapping::dccConstituents(), EcalElectronicsMapping::dccTowerConstituents(), 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::PresampleClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::IntegrityClient::producePlots(), EcalElectronicsMapping::pseudoStripConstituents(), ecaldqm::StatusManager::readFromStream(), rtHalf(), ecaldqm::IntegrityTask::runOnDetIdCollection(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::IntegrityTask::runOnElectronicsIdCollection(), ecaldqm::PNDiodeTask::runOnErrors(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::PNDiodeTask::runOnPnDigis(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), EcalElectronicsMapper::setActiveDCC(), ESKCHIPBlock::setDccId(), ESDCCHeaderBlock::setId(), EcalDCCHeaderBlock::setId(), EcalElectronicsMapping::stripConstituents(), EcalElectronicsMapping::tccConstituents(), and EcalElectronicsMapping::ttConstituents().

16  {
17  unsigned subdet(_id.subdetId());
18 
19  if (subdet == EcalBarrel)
20  return map->DCCid(EBDetId(_id));
21  else if (subdet == EcalTriggerTower)
22  return map->DCCid(EcalTrigTowerDetId(_id));
23  else if (subdet == EcalEndcap) {
24  if (isEcalScDetId(_id))
25  return map->getDCCandSC(EcalScDetId(_id)).first;
26  else
27  return map->getElectronicsId(EEDetId(_id)).dccId();
28  } else if (subdet == EcalLaserPnDiode)
29  return EcalPnDiodeDetId(_id).iDCCId();
30 
31  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::dccId(" << _id.rawId() << ")" << std::endl;
32 
33  return 0;
34  }
bool isEcalScDetId(DetId const &)
int iDCCId() const
get the DCCId

◆ dccId() [2/3]

unsigned ecaldqm::dccId ( EcalElectronicsId const &  _id)

Definition at line 36 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::dccId().

36 { return _id.dccId(); }

◆ dccId() [3/3]

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  }

◆ ecalID()

EcalLogicID ecaldqm::ecalID ( )

Definition at line 8 of file LogicIDTranslation.cc.

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

8 { return EcalLogicID("ECAL", 1); }

◆ EEPnDCC()

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  }

◆ eta() [1/2]

double ecaldqm::eta ( EBDetId const &  _ebid,
CaloGeometry const *  geometry 
)

◆ eta() [2/2]

double ecaldqm::eta ( EEDetId const &  _id,
CaloGeometry const *  geometry 
)

Definition at line 213 of file EcalDQMCommonUtils.cc.

213 { return geometry->getPosition(_id).eta(); }

◆ etaBound()

const double ecaldqm::etaBound ( 1.  479)

◆ fetchAndFill()

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 EgammaPostProcessor_cfi::dataSet, HLT_2023v12_cff::DataType, EcalCondDBInterface::fetchDataSet(), pfMETCorrectionType0_cfi::formula, caHitNtupletGeneratorKernels::if(), 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:30

◆ fillMESetDescriptions()

void ecaldqm::fillMESetDescriptions ( edm::ParameterSetDescription _desc)

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

144  {
145  _desc.addUntracked<std::string>("path");
146  _desc.addUntracked<std::string>("kind");
147  _desc.addUntracked<std::string>("otype");
148  _desc.addUntracked<std::string>("btype");
149  _desc.addUntracked<std::string>("description");
150  _desc.addUntracked<bool>("online", false);
151  _desc.addUntracked<bool>("perLumi", false);
152  _desc.addOptionalUntracked<bool>("minutely");
153  _desc.addOptionalUntracked<bool>("cumulative");
154  _desc.addOptionalUntracked<bool>("shiftAxis");
155 
156  edm::ParameterSetDescription axisParameters;
157  binning::fillAxisDescriptions(axisParameters);
158  _desc.addOptionalUntracked("xaxis", axisParameters);
159  _desc.addOptionalUntracked("yaxis", axisParameters);
160  _desc.addOptionalUntracked("zaxis", axisParameters);
161 
162  edm::ParameterSetDescription multiParameters;
163  multiParameters.addWildcardUntracked<std::vector<std::string>>("*");
164  multiParameters.addWildcardUntracked<std::vector<int>>("*");
165  _desc.addOptionalUntracked("multi", multiParameters);
166  }
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)

◆ innerTCCs()

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

◆ isCrystalId()

bool ecaldqm::isCrystalId ( DetId const &  _id)

Definition at line 257 of file EcalDQMCommonUtils.cc.

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

Referenced by isSingleChannelId(), and pnForCrystal().

257  {
258  return (_id.det() == DetId::Ecal) &&
259  ((_id.subdetId() == EcalBarrel) || ((_id.subdetId() == EcalEndcap) && (((_id.rawId() >> 15) & 0x1) == 0)));
260  }

◆ isEcalScDetId()

bool ecaldqm::isEcalScDetId ( DetId const &  _id)

◆ isEndcapTTId()

bool ecaldqm::isEndcapTTId ( DetId const &  _id)

◆ isForward()

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::Particle::isOnLayer(), ecaldqm::LedClient::producePlots(), ecaldqm::PresampleClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::TimingClient::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(DetId const &)

◆ isSingleChannelId()

bool ecaldqm::isSingleChannelId ( DetId const &  _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  }
bool isCrystalId(DetId const &)

◆ lmPNID()

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:49

◆ memChannelID()

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:49

◆ memDCC()

const std::vector<unsigned> ecaldqm::memDCC ( memarr  ,
memarr 44 
)

◆ memDCCId()

unsigned ecaldqm::memDCCId ( unsigned  _index)

Definition at line 38 of file EcalDQMCommonUtils.cc.

References memDCC.

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

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

◆ memDCCIndex()

unsigned ecaldqm::memDCCIndex ( unsigned  _dccid)

Definition at line 46 of file EcalDQMCommonUtils.cc.

References spr::find(), and memDCC.

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

46  {
47  std::vector<unsigned>::const_iterator itr(std::find(memDCC.begin(), memDCC.end(), _dccid - 1));
48  if (itr == memDCC.end())
49  return -1;
50 
51  return (itr - memDCC.begin());
52  }
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:19

◆ memTowerID()

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:49

◆ nCrystals()

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, kEEp03, kEEp04, kEEp05, kEEp06, kEEp07, kEEp08, and kEEp09.

Referenced by EcalFEDMonitorTemp< SUBDET >::analyze(), ecaldqm::TowerStatusTask::endLuminosityBlock(), EcalLaserCondTools::from_hdf_to_db(), 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  }

◆ nSuperCrystals()

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, kEEp03, 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  }

◆ outerTCCs()

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

◆ phi() [1/4]

double ecaldqm::phi ( EBDetId const &  _ebid)

◆ phi() [2/4]

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  }

◆ phi() [3/4]

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  }

◆ phi() [4/4]

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  }

◆ pnForCrystal()

EcalPnDiodeDetId ecaldqm::pnForCrystal ( DetId const &  _id,
char  _ab,
EcalElectronicsMapping const *  electronicsMap 
)

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(), DetId::subdetId(), and EcalScDetId::zside().

Referenced by ecaldqm::LedTask::runOnDigis(), ecaldqm::LaserTask::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, electronicsMap)) {
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:112
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:90
bool isCrystalId(DetId const &)
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:292

◆ qualityOK()

bool ecaldqm::qualityOK ( int  _quality)

◆ rtHalf()

unsigned ecaldqm::rtHalf ( DetId const &  _id,
EcalElectronicsMapping const *  electronicsMap 
)

Definition at line 119 of file EcalDQMCommonUtils.cc.

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

Referenced by ecaldqm::LedTask::runOnDigis(), ecaldqm::LaserTask::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, electronicsMap) - 1);
126  if ((iDCC == kEEm05 || iDCC == kEEp05) && EEDetId(_id).ix() > 50)
127  return 1;
128  }
129 
130  return 0;
131  }
unsigned dccId(DetId const &, EcalElectronicsMapping const *)

◆ scConstituents()

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

◆ smName()

std::string ecaldqm::smName ( unsigned  _dccId)

Definition at line 289 of file EcalDQMCommonUtils.cc.

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

Referenced by ecaldqm::binning::channelName(), ecaldqm::StatusManager::readFromStream(), 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  }

◆ subdetID()

EcalLogicID ecaldqm::subdetID ( EcalSubdetector  _subdet)

Definition at line 10 of file LogicIDTranslation.cc.

References EcalBarrel, EcalEndcap, and Exception.

Referenced by SiPixelDigitizerAlgorithm::fillSimHitMaps().

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  }

◆ tccId() [1/2]

unsigned ecaldqm::tccId ( DetId const &  _id,
EcalElectronicsMapping const *  map 
)

Definition at line 54 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalTriggerTower, Exception, isEcalScDetId(), genParticles_cff::map, and DetId::subdetId().

Referenced by DCCTBEventBlock::DCCTBEventBlock(), EcalElectronicsMapper::fillMaps(), ecaldqm::binning::findBin1D(), ecaldqm::binning::findBinPseudoStrip_(), ecaldqm::binning::findBinTriggerTower_(), EcalTPGParamBuilder::getEtaSlice(), EcalElectronicsMapper::getPSInputDigiPointer(), EcalElectronicsMapper::getTPPointer(), EcalElectronicsMapper::getTTDetIdPointer(), EcalElectronicsMapper::getTTEleIdPointer(), EcalElectronicsMapping::pseudoStripConstituents(), EcalElectronicsMapper::resetPointers(), EcalElectronicsMapping::tccConstituents(), and EcalElectronicsMapping::ttConstituents().

54  {
55  unsigned subdet(_id.subdetId());
56 
57  if (subdet == EcalBarrel)
58  return map->TCCid(EBDetId(_id));
59  else if (subdet == EcalTriggerTower)
60  return map->TCCid(EcalTrigTowerDetId(_id));
61  else if (subdet == EcalEndcap) {
62  if (isEcalScDetId(_id))
63  return 0; // incompatible
64  else
65  return map->getTriggerElectronicsId(EEDetId(_id)).tccId();
66  }
67 
68  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::tccId(" << uint32_t(_id) << ")" << std::endl;
69 
70  return 0;
71  }
bool isEcalScDetId(DetId const &)

◆ tccId() [2/2]

unsigned ecaldqm::tccId ( EcalElectronicsId const &  _id,
EcalElectronicsMapping const *  map 
)

Definition at line 73 of file EcalDQMCommonUtils.cc.

References genParticles_cff::map.

73  {
74  return map->getTriggerElectronicsId(_id).tccId();
75  }

◆ toDetId()

DetId ecaldqm::toDetId ( EcalLogicID const &  _id)

Definition at line 82 of file LogicIDTranslation.cc.

Referenced by fetchAndFill().

82 { return DetId(); }
Definition: DetId.h:17

◆ towerID()

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:49

◆ towerId() [1/2]

unsigned ecaldqm::towerId ( DetId const &  _id,
EcalElectronicsMapping const *  map 
)

Definition at line 77 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalTriggerTower, Exception, isEcalScDetId(), EcalTrigTowerDetId::iTT(), genParticles_cff::map, DetId::subdetId(), and EBDetId::tower().

Referenced by EGHcalRecHitSelector::addDetIds(), EcalSelectiveReadoutValidation::analyzeTP(), EcalElectronicsMapper::fillMaps(), ecaldqm::binning::findBin1D(), EcalTPGScale::getLinearizedTPG(), EcalFEtoDigi::getLUT(), popcon::EcalTPGFineGrainTowerfromFile::getNewObjects(), popcon::EcalTPGSpikeThresholdfromFile::getNewObjects(), EcalElectronicsMapper::getPSInputDigiPointer(), EcalTPGScale::getTPGInADC(), EcalTPGScale::getTPGInGeV(), CaloTowersCreationAlgo::hadShwrPos(), HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::IntegrityTask::runOnElectronicsIdCollection(), ecaldqm::PNDiodeTask::runOnErrors(), ecaldqm::DQWorkerClient::towerAverage_(), and DCCTBEventBlock::towerBlocksById().

77  {
78  unsigned subdet(_id.subdetId());
79 
80  if (subdet == EcalBarrel)
81  return EBDetId(_id).tower().iTT();
82  else if (subdet == EcalTriggerTower)
83  return EcalTrigTowerDetId(_id).iTT();
84  else if (subdet == EcalEndcap) {
85  if (isEcalScDetId(_id))
86  return map->getDCCandSC(EcalScDetId(_id)).second;
87  else
88  return map->getElectronicsId(EEDetId(_id)).towerId();
89  }
90 
91  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::towerId(" << std::hex << uint32_t(_id) << ")"
92  << std::endl;
93 
94  return 0;
95  }
int iTT() const
sequential index within one DCC
bool isEcalScDetId(DetId const &)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:57

◆ towerId() [2/2]

unsigned ecaldqm::towerId ( EcalElectronicsId const &  _id)

Definition at line 97 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::towerId().

97 { return _id.towerId(); }

◆ ttId() [1/2]

unsigned ecaldqm::ttId ( DetId const &  _id,
EcalElectronicsMapping const *  map 
)

Definition at line 99 of file EcalDQMCommonUtils.cc.

References EcalBarrel, EcalEndcap, EcalTriggerTower, Exception, isEcalScDetId(), EcalTrigTowerDetId::iTT(), genParticles_cff::map, DetId::subdetId(), and EBDetId::tower().

Referenced by EcalTPSkimmer::alreadyInserted(), EcalTrigPrimCompactColl::compressedEt(), EcalTPGTowerStatusXMLTranslator::dumpXML(), EcalElectronicsMapper::fillMaps(), ecaldqm::binning::findBin1D(), EcalTrigPrimCompactColl::fineGrain(), EcalTPSkimmer::insertTP(), EcalTrigPrimCompactColl::l1aSpike(), ecaldqm::MESet::maskMatches(), EcalTPGTowerStatusXMLTranslator::plot(), EcalRecHitProducer::produce(), EcalDetIdToBeRecoveredProducer::produce(), HLTRechitsToDigis::produce(), EcalTrigPrimCompactColl::raw(), EcalSelectiveReadoutValidation::setTtEtSums(), EcalSelectiveReadoutSuppressor::setTtFlags(), EcalTrigPrimCompactColl::sFGVB(), EcalTrigPrimCompactColl::toEcalTrigPrimDigiCollection(), EcalDumpRaw::tpgTag(), EcalTrigPrimCompactColl::ttFlag(), and EcalDumpRaw::ttfTag().

99  {
100  unsigned subdet(_id.subdetId());
101 
102  if (subdet == EcalBarrel)
103  return EBDetId(_id).tower().iTT();
104  else if (subdet == EcalTriggerTower)
105  return map->iTT(EcalTrigTowerDetId(_id));
106  else if (subdet == EcalEndcap && !isEcalScDetId(_id))
107  return map->getTriggerElectronicsId(_id).ttId();
108 
109  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::ttId(" << std::hex << uint32_t(_id) << ")"
110  << std::endl;
111 
112  return 0;
113  }
int iTT() const
sequential index within one DCC
bool isEcalScDetId(DetId const &)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:57

◆ ttId() [2/2]

unsigned ecaldqm::ttId ( EcalElectronicsId const &  _id,
EcalElectronicsMapping const *  map 
)

Definition at line 115 of file EcalDQMCommonUtils.cc.

References genParticles_cff::map.

115  {
116  return map->getTriggerElectronicsId(_id).ttId();
117  }

◆ zside()

int ecaldqm::zside ( DetId const &  _id)

Definition at line 189 of file EcalDQMCommonUtils.cc.

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

Referenced by HcalHBHEMuonAnalyzer::activeLength(), HcalHBHEMuonHighEtaAnalyzer::activeLength(), AlCaHcalHBHEMuonProducer::activeLength(), HGCalTopology::addHGCSCintillatorId(), HGCalTopology::addHGCSiliconId(), EcalEndcapGeometry::alignmentTransformIndexLocal(), EcalSelectiveReadoutValidation::anaDigi(), ESOccupancyTask::analyze(), ESPedestalTask::analyze(), ESTrendTask::analyze(), ESTimingTask::analyze(), HGCGeometryValidation::analyze(), DQMSourceEleCalib::analyze(), EcalPreshowerRecHitsValidation::analyze(), HcalSimHitAnalysis::analyze(), EtlSimHitsValidation::analyze(), HcalTestNumberingTester::analyze(), EtlLocalRecoValidation::analyze(), HcalRaddamMuon::analyze(), EcalTPGParamBuilder::analyze(), EcalSelectiveReadoutValidation::analyzeEE(), HcalHitValidation::analyzeHits(), HOSimHitStudy::analyzeHits(), EcalSimHitStudy::analyzeHits(), CaloSimHitStudy::analyzeHits(), HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), HGCalTimingAnalyzer::analyzeSimHits(), HGCalTBAnalyzer::analyzeSimHits(), HGCalDDDConstants::assignCellHex(), HGCalDDDConstants::assignCellTrap(), HGCalHistoSeedingImpl::HistogramT< T >::at(), HGCalGeometryLoader::build(), HGCalTBGeometryLoader::build(), FWTracksterHitsProxyBuilder::build(), FWTracksterLayersProxyBuilder::build(), HcalDDDSimConstants::cell(), HGCalDDDConstants::cellInLayer(), HFNoseNumberingScheme::checkPosition(), HGCalNumberingScheme::checkPosition(), CaloTowerConstituentsMap::constituentsOf(), EcalTrigTowerConstituentsMap::constituentsOf(), EcalFEtoDigi::create_TTDetId(), EcalElectronicsMapping::DCCid(), EcalElectronicsMapping::dccTowerConstituents(), HcalTopology::decAIEta(), HcalTopology::decIEta(), HcalTopology::decrementDepth(), EcalEndcapHardcodedTopology::decrementIx(), EcalEndcapTopology::decrementIx(), EcalPreshowerTopology::decrementIx(), EcalEndcapHardcodedTopology::decrementIy(), EcalEndcapTopology::decrementIy(), EcalPreshowerTopology::decrementIy(), EcalPreshowerTopology::decrementIz(), HcalHBHEMuonAnalyzer::depth16HE(), HcalHBHEMuonHighEtaAnalyzer::depth16HE(), AlCaHcalHBHEMuonProducer::depth16HE(), HcalTopology::depthBinInformation(), HcalTopology::detId2denseIdCALIB(), HcalTopology::detId2denseIdHT(), HcalTrigTowerGeometry::detIds(), HcalHitRelabeller::energyWt(), HGCMouseBite::exclude(), CastorTopology::exclude(), ZdcTopology::exclude(), SimG4HcalValidation::fetchHits(), HcalTestAnalysis::fill(), SimG4HcalValidation::fill(), HGVHistoProducerAlgo::fill_generic_cluster_histos(), HcalTestHistoClass::fillHits(), CastorShowerLibraryMaker::FillShowerEvent(), EcalLaserCorrFilter::filter(), ecaldqm::binning::findBinSuperCrystal_(), HcalDDDSimConstants::findDepth(), HcalDDDRecConstants::findDepth(), PhysicsTowerOrganizer::findNeighbors(), ecaldqm::binning::findPlotIndex(), PhysicsTowerOrganizer::findTower(), BSCTrigger::getBSCNum(), CastorTestAnalysis::getCastorBranchData(), FWL1THGCalProxyTemplate< l1t::HGCalMulticluster >::getCellsFromTriggerCell(), HGCalTriggerGeometryV9Imp2::getCellsFromTriggerCell(), HGCalTriggerGeometryV9Imp3::getCellsFromTriggerCell(), EcalEndcapGeometry::getClosestBarrelCells(), HcalGeometry::getClosestCell(), HGCalGeometry::getClosestCell(), HGCalGeometry::getClosestCellHex(), EcalElectronicsMapping::getDCCandSC(), HcalLayerDepthMap::getDepth(), HcalDDDRecConstants::getDepth(), HcalLayerDepthMap::getDepth16(), HcalDDDSimConstants::getDepthEta16(), HcalDDDRecConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getDepthEta29(), HcalDDDRecConstants::getDepthEta29(), HcalDDDSimConstants::getDepthEta29M(), HcalLayerDepthMap::getDepthMax(), HcalLayerDepthMap::getDepthMin(), EcalElectronicsMapping::getDetId(), HFNoseDetIdToModule::getDetIds(), HGCSiliconDetIdToModule::getDetIds(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), HGCSiliconDetIdToModule::getDetTriggerIds(), EcalElectronicsMapping::getElectronicsId(), HcalDDDSimConstants::getEta(), HcalDDDRecConstants::getEtaBins(), HcalDDDSimConstants::getEtaDepth(), ESElectronicsMapper::getFED(), HcalDDDRecConstants::getHCID(), EcalEBTrigPrimTestAlgo::getIndex(), EcalTrigPrimFunctionalAlgo::getIndex(), ESElectronicsMapper::getKCHIP(), HcalLayerDepthMap::getLayer0Wt(), HcalDDDSimConstants::getLayer0Wt(), HcalDDDRecConstants::getLayer0Wt(), HcalLayerDepthMap::getLayerBack(), HcalDDDSimConstants::getLayerBack(), HcalDDDRecConstants::getLayerBack(), HcalLayerDepthMap::getLayerDepth(), HcalLayerDepthMap::getLayerFront(), HcalDDDSimConstants::getLayerFront(), HcalDDDRecConstants::getLayerFront(), HGCalTriggerGeometryV9Imp3::getLpgbtsFromModule(), HGCalTriggerGeometryV9Imp3::getLpgbtsFromStage1Fpga(), HcalDDDSimConstants::getMaxDepth(), HcalDDDRecConstants::getMaxDepth(), HcalLayerDepthMap::getMaxDepthLastHE(), HcalDDDSimConstants::getMinDepth(), HcalDDDRecConstants::getMinDepth(), HGCalTriggerGeometryV9Imp2::getModuleFromTriggerCell(), HGCalTriggerGeometryV9Imp3::getModuleFromTriggerCell(), HGCalTriggerGeometryV9Imp3::getModulesFromLpgbt(), HcalDDDRecConstants::getOneEtaBin(), HcalDDDRecConstants::getPhiZOne(), HGCalWaferMask::getRotation(), HcalDDDRecConstants::getRZ(), HGCalCassette::getShift(), HGCalTriggerGeometryV9Imp3::getStage1FpgaFromLpgbt(), HGCalTriggerGeometryV9Imp3::getStage1FpgaFromModule(), HGCalTriggerGeometryV9Imp3::getStage1FpgaFromStage1Link(), HGCalTriggerGeometryV9Imp3::getStage1LinksFromStage1Fpga(), HGCalTriggerGeometryV9Imp3::getStage1LinksFromStage2Fpga(), HGCalTriggerGeometryV9Imp3::getStage2FpgaFromStage1Link(), HcalDDDRecConstants::getThickActive(), HFNoseDetIdToModule::getTriggerDetIds(), EcalElectronicsMapping::getTriggerElectronicsId(), HGCalTriggerTowerGeometryHelper::getTriggerTowerFromEtaPhi(), EcalElectronicsMapping::getTrigTowerDetId(), ESTBNumberingScheme::getUnitID(), ETLNumberingScheme::getUnitID(), BHMNumberingScheme::getUnitID(), EcalEndcapNumberingScheme::getUnitID(), EcalPreshowerNumberingScheme::getUnitID(), HcalTestNumberingScheme::getUnitID(), BTLNumberingScheme::getUnitID(), HcalNumberingScheme::getUnitID(), BscNumberingScheme::getUnitID(), FP420NumberingScheme::getUnitID(), ZdcNumberingScheme::getUnitID(), HFNoseNumberingScheme::getUnitID(), HGCNumberingScheme::getUnitID(), HcalTBNumberingScheme::getUnitID(), HGCalNumberingScheme::getUnitID(), CastorNumberingScheme::getUnitID(), CastorCondObjectContainer< CastorQIECoder >::hashed_id(), ecalpyutils::hashedIndexToXY(), HcalDDDSimConstants::HcalCellTypes(), HGCalNumberingScheme::HGCalNumberingScheme(), HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(), HcalTopology::incAIEta(), HcalTopology::incIEta(), HcalTopology::incrementDepth(), EcalEndcapHardcodedTopology::incrementIx(), EcalEndcapTopology::incrementIx(), EcalPreshowerTopology::incrementIx(), EcalEndcapHardcodedTopology::incrementIy(), EcalPreshowerTopology::incrementIy(), EcalEndcapTopology::incrementIy(), EcalPreshowerTopology::incrementIz(), HGCalHistoSeedingImpl::HistogramT< T >::index(), indexByEta(), HcalCondObjectContainerBase::indexFor(), HcalHPDRBXMap::indexHPD(), HcalDDDSimConstants::initialize(), HcalDDDRecConstants::initialize(), PhysicsTowerOrganizer::insert_(), HcalLayerDepthMap::isValid(), HGCalDDDConstants::isValidTrap(), EcalElectronicsMapping::iTT(), HcalDDDSimConstants::layerGroup(), HGCalGeomParameters::loadGeometryHexagon8(), HGCalGeomParameters::loadGeometryHexagonModule(), HGCalDDDConstants::localToGlobal8(), HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellTrap(), CastorHardcodeGeometryLoader::makeCell(), ZdcHardcodeGeometryLoader::makeCell(), HcalDDDRecConstants::mergedDepthList29(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), BscNumberingScheme::packBscIndex(), FP420NumberingScheme::packFP420Index(), BHMNumberingScheme::packIndex(), FP420NumberingScheme::packMYIndex(), HcalDDDSimConstants::printTileHB(), HcalDDDSimConstants::printTileHE(), HcalDDDSimConstants::printTiles(), L1RCTTPGProvider::produce(), CastorCellProducer::produce(), EcalSimpleProducer::produce(), EcalElectronicsMapping::pseudoStripConstituents(), HcalTestAnalysis::qieAnalysis(), xuti::readCellId(), StoreESCondition::readESPedestalsFromFile(), ecaldqm::StatusManager::readFromStream(), HCalSD::readWeightFromFile(), FP420NumberingScheme::realzside(), EcalRecHitWorkerRecover::run(), ecaldqm::ClusterTask::runOnBasicClusters(), ecaldqm::OccupancyTask::runOnRecHits(), TotemT2ScintSD::setDetUnitId(), EcalElectronicsMapping::stripConstituents(), EcalElectronicsMapping::tccConstituents(), EcalElectronicsMapping::TCCid(), HGCalTileIndex::tileExist(), HGCalDDDConstants::tileExist(), EcalTrigPrimCompactColl::toEcalTrigPrimDigiCollection(), EcalElectronicsMapping::ttConstituents(), HcalNumberingFromPS::unitID(), HcalNumberingFromDDD::unitID(), BscNumberingScheme::unpackBscIndex(), FP420NumberingScheme::unpackCopyIndex(), FP420NumberingScheme::unpackFP420Index(), BHMNumberingScheme::unpackIndex(), FP420NumberingScheme::unpackLayerIndex(), FP420NumberingScheme::unpackMYIndex(), FP420NumberingScheme::unpackOrientation(), DoCastorAnalysis::update(), FP420Test::update(), BscTest::update(), CastorTopology::validRaw(), ZdcTopology::validRaw(), HcalTopology::validRaw(), HGCalDDDConstants::waferFromPosition(), HGCalWaferMask::waferXY(), and ESUnpacker::word2digi().

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  }

Variable Documentation

◆ collectionName

std::string const ecaldqm::collectionName[nCollections]

◆ ecaldqmCalibrationSummaryClientRegistration

WorkerFactoryStore::Registration< CalibrationSummaryClient > ecaldqm::ecaldqmCalibrationSummaryClientRegistration("CalibrationSummaryClient")

◆ ecaldqmCertificationClientRegistration

WorkerFactoryStore::Registration< CertificationClient > ecaldqm::ecaldqmCertificationClientRegistration("CertificationClient")

◆ ecaldqmClusterTaskRegistration

WorkerFactoryStore::Registration< ClusterTask > ecaldqm::ecaldqmClusterTaskRegistration("ClusterTask")

◆ ecaldqmEnergyTaskRegistration

WorkerFactoryStore::Registration< EnergyTask > ecaldqm::ecaldqmEnergyTaskRegistration("EnergyTask")

◆ ecaldqmGpuTaskRegistration

WorkerFactoryStore::Registration< GpuTask > ecaldqm::ecaldqmGpuTaskRegistration("GpuTask")

◆ ecaldqmIntegrityClientRegistration

WorkerFactoryStore::Registration< IntegrityClient > ecaldqm::ecaldqmIntegrityClientRegistration("IntegrityClient")

◆ ecaldqmIntegrityTaskRegistration

WorkerFactoryStore::Registration< IntegrityTask > ecaldqm::ecaldqmIntegrityTaskRegistration("IntegrityTask")

◆ ecaldqmLaserClientRegistration

WorkerFactoryStore::Registration< LaserClient > ecaldqm::ecaldqmLaserClientRegistration("LaserClient")

◆ ecaldqmLaserTaskRegistration

WorkerFactoryStore::Registration< LaserTask > ecaldqm::ecaldqmLaserTaskRegistration("LaserTask")

◆ ecaldqmLedClientRegistration

WorkerFactoryStore::Registration< LedClient > ecaldqm::ecaldqmLedClientRegistration("LedClient")

◆ ecaldqmLedTaskRegistration

WorkerFactoryStore::Registration< LedTask > ecaldqm::ecaldqmLedTaskRegistration("LedTask")

◆ ecaldqmMLClientRegistration

WorkerFactoryStore::Registration< MLClient > ecaldqm::ecaldqmMLClientRegistration("MLClient")

◆ ecaldqmOccupancyClientRegistration

WorkerFactoryStore::Registration< OccupancyClient > ecaldqm::ecaldqmOccupancyClientRegistration("OccupancyClient")

◆ ecaldqmOccupancyTaskRegistration

WorkerFactoryStore::Registration< OccupancyTask > ecaldqm::ecaldqmOccupancyTaskRegistration("OccupancyTask")

◆ ecaldqmPedestalClientRegistration

WorkerFactoryStore::Registration< PedestalClient > ecaldqm::ecaldqmPedestalClientRegistration("PedestalClient")

◆ ecaldqmPedestalTaskRegistration

WorkerFactoryStore::Registration< PedestalTask > ecaldqm::ecaldqmPedestalTaskRegistration("PedestalTask")

◆ ecaldqmPiZeroTaskRegistration

WorkerFactoryStore::Registration< PiZeroTask > ecaldqm::ecaldqmPiZeroTaskRegistration("PiZeroTask")

◆ ecaldqmPNDiodeTaskRegistration

WorkerFactoryStore::Registration< PNDiodeTask > ecaldqm::ecaldqmPNDiodeTaskRegistration("PNDiodeTask")

◆ ecaldqmPNIntegrityClientRegistration

WorkerFactoryStore::Registration< PNIntegrityClient > ecaldqm::ecaldqmPNIntegrityClientRegistration("PNIntegrityClient")

◆ ecaldqmPresampleClientRegistration

WorkerFactoryStore::Registration< PresampleClient > ecaldqm::ecaldqmPresampleClientRegistration("PresampleClient")

◆ ecaldqmPresampleTaskRegistration

WorkerFactoryStore::Registration< PresampleTask > ecaldqm::ecaldqmPresampleTaskRegistration("PresampleTask")

◆ ecaldqmRawDataClientRegistration

WorkerFactoryStore::Registration< RawDataClient > ecaldqm::ecaldqmRawDataClientRegistration("RawDataClient")

◆ ecaldqmRawDataTaskRegistration

WorkerFactoryStore::Registration< RawDataTask > ecaldqm::ecaldqmRawDataTaskRegistration("RawDataTask")

◆ ecaldqmRecoSummaryTaskRegistration

WorkerFactoryStore::Registration< RecoSummaryTask > ecaldqm::ecaldqmRecoSummaryTaskRegistration("RecoSummaryTask")

◆ ecaldqmSelectiveReadoutClientRegistration

WorkerFactoryStore::Registration< SelectiveReadoutClient > ecaldqm::ecaldqmSelectiveReadoutClientRegistration("SelectiveReadoutClient")

◆ ecaldqmSelectiveReadoutTaskRegistration

WorkerFactoryStore::Registration< SelectiveReadoutTask > ecaldqm::ecaldqmSelectiveReadoutTaskRegistration("SelectiveReadoutTask")

◆ ecaldqmSummaryClientRegistration

WorkerFactoryStore::Registration< SummaryClient > ecaldqm::ecaldqmSummaryClientRegistration("SummaryClient")

◆ ecaldqmTestPulseClientRegistration

WorkerFactoryStore::Registration< TestPulseClient > ecaldqm::ecaldqmTestPulseClientRegistration("TestPulseClient")

◆ ecaldqmTestPulseTaskRegistration

WorkerFactoryStore::Registration< TestPulseTask > ecaldqm::ecaldqmTestPulseTaskRegistration("TestPulseTask")

◆ ecaldqmTimingClientRegistration

WorkerFactoryStore::Registration< TimingClient > ecaldqm::ecaldqmTimingClientRegistration("TimingClient")

◆ ecaldqmTimingTaskRegistration

WorkerFactoryStore::Registration< TimingTask > ecaldqm::ecaldqmTimingTaskRegistration("TimingTask")

◆ ecaldqmTowerStatusTaskRegistration

WorkerFactoryStore::Registration< TowerStatusTask > ecaldqm::ecaldqmTowerStatusTaskRegistration("TowerStatusTask")

◆ ecaldqmTrigPrimClientRegistration

WorkerFactoryStore::Registration< TrigPrimClient > ecaldqm::ecaldqmTrigPrimClientRegistration("TrigPrimClient")

◆ ecaldqmTrigPrimTaskRegistration

WorkerFactoryStore::Registration< TrigPrimTask > ecaldqm::ecaldqmTrigPrimTaskRegistration("TrigPrimTask")

◆ etaBound

double const ecaldqm::etaBound

◆ memarr

unsigned ecaldqm::memarr[]
Initial value:

Definition at line 8 of file EcalDQMCommonUtils.cc.

◆ memDCC

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