CMS 3D CMS Logo

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

Namespaces

 binning
 

Classes

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

Typedefs

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

Enumerations

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

Functions

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

Variables

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

Typedef Documentation

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

Definition at line 326 of file MESet.h.

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

Definition at line 55 of file DBReaderWorkers.cc.

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

Definition at line 87 of file DQWorker.h.

Enumeration Type Documentation

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

Definition at line 6 of file Collections.h.

6  {
7  kSource,
21  kEBSrFlag,
22  kEESrFlag,
23  kEBDigi,
24  kEEDigi,
34  kEBRecHit,
35  kEERecHit,
43  };
static const char *const kSource
Enumerator
nDCC 
nEBDCC 
nEEDCC 
nDCCMEM 
nEEDCCMEM 
nTTOuter 
nTTInner 
nTCC 
kEEmTCCLow 
kEEmTCCHigh 
kEEpTCCLow 
kEEpTCCHigh 
kEBTCCLow 
kEBTCCHigh 
nChannels 
nTowers 

Definition at line 39 of file EcalDQMCommonUtils.h.

39  {
40  nDCC = 54,
41  nEBDCC = 36,
42  nEEDCC = 18,
43  nDCCMEM = 44,
44  nEEDCCMEM = 8,
45 
46  nTTOuter = 16,
47  nTTInner = 28,
48  // These lines set the number of TriggerTowers in "outer" and "inner" TCCs,
49  // where "outer" := closer to the barrel. These constants are used in
50  // setting the binning. There are 16 trigger towers per TCC for "outer" TCCs,
51  // and 24 per TCC for "inner" TCCs (but the numbering is from 0 to 27, so
52  // 28 bins are required).
53 
54  nTCC = 108,
55  kEEmTCCLow = 0, kEEmTCCHigh = 35,
56  kEEpTCCLow = 72, kEEpTCCHigh = 107,
57  kEBTCCLow = 36, kEBTCCHigh = 71,
58 
61  };
Enumerator
Enabled 
Disabled 
Timeout 
HeaderError 
ChannelId 
LinkError 
BlockSize 
Suppressed 
FIFOFull 
L1ADesync 
BXDesync 
L1ABXDesync 
FIFOFullL1ADesync 
HParity 
VParity 
ForcedZS 
nFEFlags 

Definition at line 7 of file FEFlags.h.

Enumerator
kBad 
kGood 
kUnknown 
kMBad 
kMGood 
kMUnknown 

Definition at line 55 of file DBWriterWorkers.cc.

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

Definition at line 26 of file EcalDQMCommonUtils.h.

26  {
36  kEBpLow = kEBp01, kEBpHigh = kEBp18
37  };

Function Documentation

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

Definition at line 445 of file EcalDQMCommonUtils.cc.

References kEEpLow, and nSuperCrystals().

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

446  {
447  if(_towerId == 69 || _towerId == 70) return true;
448  else if((_dccId == 8 || _dccId == 53) && _towerId >= 18 && _towerId <= 24) return false;
449  else if(_dccId <= kEEmHigh + 1 || _dccId >= kEEpLow + 1) return _towerId <= nSuperCrystals(_dccId);
450  else return _towerId <= 68;
451  }
unsigned nSuperCrystals(unsigned)
bool ecaldqm::checkElectronicsMap ( bool  _throw = true)

Definition at line 470 of file EcalDQMCommonUtils.cc.

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

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

471  {
472  std::lock_guard<std::mutex> lock(mapMutex);
473  if(electronicsMap) return true;
474  if(_throw) throw cms::Exception("InvalidCall") << "ElectronicsMapping not initialized";
475  return false;
476  }
std::mutex mapMutex
EcalElectronicsMapping const * electronicsMap(0)
bool ecaldqm::checkGeometry ( bool  _throw = true)

Definition at line 518 of file EcalDQMCommonUtils.cc.

References Exception, and CommonMethods::lock().

Referenced by ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects(), and getGeometry().

519  {
520  std::lock_guard<std::mutex> lock(mapMutex);
521  if(geometry) return true;
522  if(_throw) throw cms::Exception("InvalidCall") << "CaloGeometry not initialized";
523  return false;
524  }
std::mutex mapMutex
bool ecaldqm::checkTopology ( bool  _throw = true)

Definition at line 542 of file EcalDQMCommonUtils.cc.

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

Referenced by ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects(), and getTopology().

543  {
544  std::lock_guard<std::mutex> lock(mapMutex);
545  if(topology) return true;
546  if(_throw) throw cms::Exception("InvalidCall") << "CaloTopology not initialized";
547  return false;
548  }
CaloTopology const * topology(0)
std::mutex mapMutex
bool ecaldqm::checkTrigTowerMap ( bool  _throw = true)

Definition at line 494 of file EcalDQMCommonUtils.cc.

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

Referenced by ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects(), and getTrigTowerMap().

495  {
496  std::lock_guard<std::mutex> lock(mapMutex);
497  if(trigtowerMap) return true;
498  if(_throw) throw cms::Exception("InvalidCall") << "TrigTowerConstituentsMap not initialized";
499  return false;
500  }
std::mutex mapMutex
EcalTrigTowerConstituentsMap const * trigtowerMap(0)
MESet * ecaldqm::createMESet ( edm::ParameterSet const &  _MEParam)

Definition at line 19 of file MESetUtils.cc.

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

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

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

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

30  {
31  unsigned iDCC(dccId(_id) - 1);
32  if(iDCC <= kEEmHigh || iDCC >= kEEpLow){
33  EEDetId eeid(_id);
34  return EcalLogicID("EE_crystal_number",
35  2010000000UL + 1000000 * (eeid.positiveZ() ? 2 : 0) + 1000 * eeid.ix() + eeid.iy(),
36  eeid.zside(), eeid.ix(), eeid.iy());
37  }
38  else{
39  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
40  EBDetId ebid(_id);
41  return EcalLogicID("EB_crystal_number",
42  1011000000UL + 10000 * ism + ebid.ic(),
43  ism, ebid.ic());
44  }
45  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned dccId(DetId const &)
unsigned ecaldqm::dccId ( const DetId _id)

Definition at line 20 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 40 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::dccId().

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

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

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

Definition at line 316 of file EcalDQMCommonUtils.cc.

References kEBmLow, kEBpLow, kEEmLow, kEEpLow, and AlCaHLTBitMon_QueryRunRegistry::string.

317  {
318  unsigned smNumber(std::atoi(_smName.substr(3).c_str()));
319 
320  if(_smName.find("EE-") == 0)
321  return kEEmLow + 1 + ((smNumber + 2) % 9);
322  else if(_smName.find("EB-") == 0)
323  return kEBmLow + 1 + smNumber;
324  else if(_smName.find("EB+") == 0)
325  return kEBpLow + 1 + smNumber;
326  else if(_smName.find("EE+") == 0)
327  return kEEpLow + 1 + ((smNumber + 2) % 9);
328  else
329  return 0;
330  }
EcalLogicID ecaldqm::ecalID ( )

Definition at line 10 of file LogicIDTranslation.cc.

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

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

Definition at line 353 of file EcalDQMCommonUtils.cc.

354  {
355  switch(_dee){
356  case 1: // EE+F -> FEDs 649-653/0
357  if(_ab == 0) return 50;
358  else return 51;
359  case 2: // EE+N -> FEDs 646-648, 653/1, 654
360  if(_ab == 0) return 47;
361  else return 46;
362  case 3: // EE-N -> FEDs 601-603, 608/1, 609
363  if(_ab == 0) return 1;
364  else return 2;
365  case 4: // EE-F -> FEDs 604-608/0
366  if(_ab == 0) return 5;
367  else return 6;
368  default:
369  return 0;
370  }
371  }
EcalElectronicsMapping const* ecaldqm::electronicsMap ( )
double ecaldqm::eta ( EBDetId const &  )
double ecaldqm::eta ( EEDetId const &  )
double ecaldqm::eta ( const EBDetId _ebid)

Definition at line 231 of file EcalDQMCommonUtils.cc.

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

232  {
233  return _ebid.approxEta() + (_ebid.zside() < 0 ? 0.5 : -0.5) * EBDetId::crystalUnitToEta;
234  }
float approxEta() const
Definition: EBDetId.h:106
static const float crystalUnitToEta
Definition: EBDetId.h:160
int zside() const
get the z-side of the crystal (1/-1)
Definition: EBDetId.h:47
double ecaldqm::eta ( const EEDetId _id)

Definition at line 237 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 59 of file DBReaderWorkers.cc.

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

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

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

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

130  {
131  _desc.addUntracked<std::string>("path");
132  _desc.addUntracked<std::string>("kind");
133  _desc.addUntracked<std::string>("otype");
134  _desc.addUntracked<std::string>("btype");
135  _desc.addUntracked<std::string>("description");
136  _desc.addUntracked<bool>("online", false);
137  _desc.addUntracked<bool>("perLumi", false);
138  _desc.addOptionalUntracked<bool>("minutely");
139  _desc.addOptionalUntracked<bool>("cumulative");
140  _desc.addOptionalUntracked<bool>("shiftAxis");
141 
142  edm::ParameterSetDescription axisParameters;
143  binning::fillAxisDescriptions(axisParameters);
144  _desc.addOptionalUntracked("xaxis", axisParameters);
145  _desc.addOptionalUntracked("yaxis", axisParameters);
146  _desc.addOptionalUntracked("zaxis", axisParameters);
147 
148  edm::ParameterSetDescription multiParameters;
149  multiParameters.addWildcardUntracked<std::vector<std::string> >("*");
150  multiParameters.addWildcardUntracked<std::vector<int> >("*");
151  _desc.addOptionalUntracked("multi", multiParameters);
152  }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterWildcardBase * addWildcardUntracked(U const &pattern)
void fillAxisDescriptions(edm::ParameterSetDescription &)
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
CaloGeometry const* ecaldqm::geometry ( )

Referenced by getGeometry().

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

Definition at line 551 of file EcalDQMCommonUtils.cc.

References checkTopology(), and topology().

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

552  {
553  if(!topology) checkTopology();
554  return topology;
555  }
CaloTopology const * topology(0)
bool checkTopology(bool=true)
EcalTrigTowerConstituentsMap const * ecaldqm::getTrigTowerMap ( )
std::pair< unsigned, unsigned > ecaldqm::innerTCCs ( unsigned  _dccId)

Definition at line 150 of file EcalDQMCommonUtils.cc.

References kEBpHigh, kEEmHigh, kEEmLow, and kEEpLow.

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

151  {
152  int iDCC(_dccId - 1);
153  std::pair<unsigned, unsigned> res;
154  if(iDCC <= kEEmHigh){
155  res.first = (iDCC - kEEmLow) * 2;
156  if(res.first == 0) res.first = 18;
157  res.second = (iDCC - kEEmLow) * 2 + 1;
158  }
159  else if(iDCC <- kEBpHigh)
160  res.first = res.second = _dccId + 27;
161  else{
162  res.first = (iDCC - kEEpLow) * 2 + 90;
163  if(res.first == 90) res.first = 108;
164  res.second = (iDCC - kEEpLow) * 2 + 91;
165  }
166 
167  return res;
168  }
Definition: Electron.h:4
bool ecaldqm::isCrystalId ( DetId const &  )

Referenced by isSingleChannelId(), and pnForCrystal().

bool ecaldqm::isCrystalId ( const DetId _id)

Definition at line 292 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 304 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 310 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 276 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(), ecaldqm::LedClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::PresampleClient::producePlots(), and ecaldqm::LaserClient::producePlots().

277  {
278  // the numbers here roughly corresponds to a cut at |eta| > 2.2
279  // cf hepwww.rl.ac.uk/CMSecal/Dee-layout.html
280  if(_id.subdetId() != EcalEndcap) return false;
281  if(isEcalScDetId(_id)){
282  EcalScDetId scid(_id);
283  return (scid.ix() - 10) * (scid.ix() - 10) + (scid.iy() - 10) * (scid.iy() - 10) < 25.;
284  }
285  else{
286  EEDetId eeid(_id);
287  return (eeid.ix() - 50) * (eeid.ix() - 50) + (eeid.iy() - 50) * (eeid.iy() - 50) < 625.;
288  }
289  }
bool isEcalScDetId(const DetId &_id)
bool ecaldqm::isSingleChannelId ( DetId const &  )
bool ecaldqm::isSingleChannelId ( const DetId _id)

Definition at line 298 of file EcalDQMCommonUtils.cc.

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

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

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

102  {
103  unsigned iDCC(_id.iDCCId() - 1);
104  int pnid(_id.iPnId());
105  if(iDCC <= kEEmHigh || iDCC >= kEEpLow){
106  return EcalLogicID("EE_LM_PN",
107  100 * (601 + iDCC) + pnid,
108  601 + iDCC, pnid);
109  }
110  else{
111  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
112  return EcalLogicID("EB_LM_PN",
113  1131000000UL + 10000 * ism + pnid,
114  ism, pnid);
115  }
116  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
EcalLogicID ecaldqm::memChannelID ( EcalPnDiodeDetId const &  _id)

Definition at line 65 of file LogicIDTranslation.cc.

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

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

66  {
67  // using the PN ID degenerates the logic ID - 50 time samples are actually split into 5 channels each
68  unsigned iDCC(_id.iDCCId() - 1);
69  int memId((_id.iPnId() - 1) % 5 + ((_id.iPnId() - 1) / 5) * 25 + 1);
70  if(iDCC <= kEEmHigh || iDCC >= kEEpLow){
71  return EcalLogicID("EE_mem_channel",
72  100 * (601 + iDCC) + memId,
73  601 + iDCC, memId);
74  }
75  else{
76  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
77  return EcalLogicID("EB_mem_channel",
78  1191000000UL + 10000 * ism + memId,
79  ism, memId);
80  }
81  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
const std::vector<unsigned> ecaldqm::memDCC ( memarr  ,
memarr 44 
)
unsigned ecaldqm::memDCCId ( unsigned  _index)

Definition at line 46 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 54 of file EcalDQMCommonUtils.cc.

References spr::find().

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

55  {
56  std::vector<unsigned>::const_iterator itr(std::find(memDCC.begin(), memDCC.end(), _dccid - 1));
57  if(itr == memDCC.end()) return -1;
58 
59  return (itr - memDCC.begin());
60  }
const std::vector< unsigned > memDCC(memarr, memarr+44)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
EcalLogicID ecaldqm::memTowerID ( EcalElectronicsId const &  _id)

Definition at line 84 of file LogicIDTranslation.cc.

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

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

85  {
86  unsigned iDCC(_id.dccId() - 1);
87  if(iDCC <= kEEmHigh || iDCC >= kEEpLow){
88  return EcalLogicID("EE_mem_TT",
89  100 * (601 + iDCC) + _id.towerId(),
90  601 + iDCC, _id.towerId());
91  }
92  else{
93  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
94  return EcalLogicID("EB_mem_TT",
95  1181000000UL + 10000 * ism + _id.towerId(),
96  ism, _id.towerId());
97  }
98  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned ecaldqm::nCrystals ( unsigned  _dccId)

Definition at line 374 of file EcalDQMCommonUtils.cc.

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

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

375  {
376  unsigned iSM(_dccId - 1);
377 
378  if(iSM >= kEBmLow && iSM <= kEBpHigh) return 1700;
379 
380  switch(iSM){
381  case kEEm05:
382  case kEEp05:
383  return 810;
384  case kEEm07:
385  case kEEm03:
386  case kEEp07:
387  case kEEp03:
388  return 830;
389  case kEEm09:
390  case kEEm01:
391  case kEEp09:
392  case kEEp01:
393  return 815;
394  case kEEm08:
395  case kEEm02:
396  case kEEp08:
397  case kEEp02:
398  return 791;
399  case kEEm04:
400  case kEEm06:
401  case kEEp04:
402  case kEEp06:
403  return 821;
404  default:
405  return 0;
406  }
407  }
unsigned ecaldqm::nSuperCrystals ( unsigned  _dccId)

Definition at line 410 of file EcalDQMCommonUtils.cc.

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

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

411  {
412  unsigned iSM(_dccId - 1);
413 
414  if(iSM >= kEBmLow && iSM <= kEBpHigh) return 68;
415 
416  switch(iSM){
417  case kEEm05:
418  case kEEp05:
419  return 41;
420  case kEEm07:
421  case kEEm03:
422  case kEEp07:
423  case kEEp03:
424  return 34;
425  case kEEm09:
426  case kEEm01:
427  case kEEm04:
428  case kEEm06:
429  case kEEp09:
430  case kEEp01:
431  case kEEp04:
432  case kEEp06:
433  return 33;
434  case kEEm08:
435  case kEEm02:
436  case kEEp08:
437  case kEEp02:
438  return 32;
439  default:
440  return 0;
441  }
442  }
std::pair< unsigned, unsigned > ecaldqm::outerTCCs ( unsigned  _dccId)

Definition at line 171 of file EcalDQMCommonUtils.cc.

References kEBpHigh, kEEmHigh, kEEmLow, and kEEpLow.

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

172  {
173  int iDCC(_dccId - 1);
174  std::pair<unsigned, unsigned> res;
175  if(iDCC <= kEEmHigh){
176  res.first = (iDCC - kEEmLow) * 2 + 18;
177  if(res.first == 18) res.first = 36;
178  res.second = (iDCC - kEEmLow) * 2 + 19;
179  }
180  else if(iDCC <= kEBpHigh)
181  res.first = res.second = _dccId + 27;
182  else{
183  res.first = (iDCC - kEEpLow) * 2 + 72;
184  if(res.first == 72) res.first = 90;
185  res.second = (iDCC - kEEpLow) * 2 + 73;
186  }
187 
188  return res;
189  }
Definition: Electron.h:4
double ecaldqm::phi ( EBDetId const &  _ebid)
double ecaldqm::phi ( EEDetId const &  _eeid)

Definition at line 250 of file EcalDQMCommonUtils.cc.

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

251  {
252  const double degToRad(0.0174533);
253  double p(std::atan2(_eeid.ix() - 50.5, _eeid.iy() - 50.5));
254  if(p < -10. * degToRad) p += 360. * degToRad;
255  return p;
256  }
double ecaldqm::phi ( EcalTrigTowerDetId const &  _ttid)

Definition at line 259 of file EcalDQMCommonUtils.cc.

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

260  {
261  const double degToRad(0.0174533);
262  double p((_ttid.iphi() - 0.5) * 5. * degToRad);
263  if(p > 350. * degToRad) p -= 360. * degToRad;
264  return p;
265  }
double ecaldqm::phi ( double  _phi)

Definition at line 268 of file EcalDQMCommonUtils.cc.

269  {
270  const double degToRad(0.0174533);
271  if(_phi < -10. * degToRad) _phi += 360. * degToRad;
272  return _phi;
273  }
EcalPnDiodeDetId ecaldqm::pnForCrystal ( DetId const &  _id,
char  _ab 
)

Definition at line 12 of file EcalDQMCommonUtils2.cc.

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

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

13  {
14  bool pnA(_ab == 'a' || _ab == 'A');
15 
16  if(!isCrystalId(_id)) return EcalPnDiodeDetId(0);
17 
18  if(_id.subdetId() == EcalBarrel){
19  EBDetId ebid(_id);
20  int lmmod(MEEBGeom::lmmod(ebid.ieta(), ebid.iphi()));
21 
22  switch(dccId(_id)){
23  case 10:
24  switch(lmmod){
25  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 1) : EcalPnDiodeDetId(EcalBarrel, 10, 6);
26  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 2) : EcalPnDiodeDetId(EcalBarrel, 10, 7);
27  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 2) : EcalPnDiodeDetId(EcalBarrel, 10, 7);
28  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 3) : EcalPnDiodeDetId(EcalBarrel, 10, 8);
29  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 3) : EcalPnDiodeDetId(EcalBarrel, 10, 8);
30  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 4) : EcalPnDiodeDetId(EcalBarrel, 10, 9);
31  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 4) : EcalPnDiodeDetId(EcalBarrel, 10, 9);
32  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 5) : EcalPnDiodeDetId(EcalBarrel, 10, 10);
33  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 10, 5) : EcalPnDiodeDetId(EcalBarrel, 10, 10);
34  default: return EcalPnDiodeDetId(0);
35  }
36  break;
37  case 11:
38  switch(lmmod){
39  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 1) : EcalPnDiodeDetId(EcalBarrel, 11, 6);
40  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 2) : EcalPnDiodeDetId(EcalBarrel, 11, 7);
41  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 2) : EcalPnDiodeDetId(EcalBarrel, 11, 7);
42  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 3) : EcalPnDiodeDetId(EcalBarrel, 11, 8);
43  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 3) : EcalPnDiodeDetId(EcalBarrel, 11, 8);
44  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 4) : EcalPnDiodeDetId(EcalBarrel, 11, 9);
45  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 4) : EcalPnDiodeDetId(EcalBarrel, 11, 9);
46  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 5) : EcalPnDiodeDetId(EcalBarrel, 11, 10);
47  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 11, 5) : EcalPnDiodeDetId(EcalBarrel, 11, 10);
48  default: return EcalPnDiodeDetId(0);
49  }
50  break;
51  case 12:
52  switch(lmmod){
53  case 1: return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 1) :*/ EcalPnDiodeDetId(EcalBarrel, 12, 6);
54  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 2) : EcalPnDiodeDetId(EcalBarrel, 12, 7);
55  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 2) : EcalPnDiodeDetId(EcalBarrel, 12, 7);
56  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 3) : EcalPnDiodeDetId(EcalBarrel, 12, 8);
57  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 3) : EcalPnDiodeDetId(EcalBarrel, 12, 8);
58  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 4) : EcalPnDiodeDetId(EcalBarrel, 12, 9);
59  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 4) : EcalPnDiodeDetId(EcalBarrel, 12, 9);
60  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 5) : EcalPnDiodeDetId(EcalBarrel, 12, 10);
61  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 12, 5) : EcalPnDiodeDetId(EcalBarrel, 12, 10);
62  default: return EcalPnDiodeDetId(0);
63  }
64  break;
65  case 13:
66  switch(lmmod){
67  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 1) : EcalPnDiodeDetId(EcalBarrel, 13, 6);
68  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 2) : EcalPnDiodeDetId(EcalBarrel, 13, 7);
69  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 2) : EcalPnDiodeDetId(EcalBarrel, 13, 7);
70  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 3) : EcalPnDiodeDetId(EcalBarrel, 13, 8);
71  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 3) : EcalPnDiodeDetId(EcalBarrel, 13, 8);
72  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 4) : EcalPnDiodeDetId(EcalBarrel, 13, 9);
73  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 4) : EcalPnDiodeDetId(EcalBarrel, 13, 9);
74  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 5) : EcalPnDiodeDetId(EcalBarrel, 13, 10);
75  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 13, 5) : EcalPnDiodeDetId(EcalBarrel, 13, 10);
76  default: return EcalPnDiodeDetId(0);
77  }
78  break;
79  case 14:
80  switch(lmmod){
81  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 1) : EcalPnDiodeDetId(EcalBarrel, 14, 6);
82  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 2) : EcalPnDiodeDetId(EcalBarrel, 14, 7);
83  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 2) : EcalPnDiodeDetId(EcalBarrel, 14, 7);
84  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 3) : EcalPnDiodeDetId(EcalBarrel, 14, 8);
85  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 3) : EcalPnDiodeDetId(EcalBarrel, 14, 8);
86  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 4) : EcalPnDiodeDetId(EcalBarrel, 14, 9);
87  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 4) : EcalPnDiodeDetId(EcalBarrel, 14, 9);
88  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 5) : EcalPnDiodeDetId(EcalBarrel, 14, 10);
89  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 14, 5) : EcalPnDiodeDetId(EcalBarrel, 14, 10);
90  default: return EcalPnDiodeDetId(0);
91  }
92  break;
93  case 15:
94  switch(lmmod){
95  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 1) : EcalPnDiodeDetId(EcalBarrel, 15, 6);
96  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 2) : EcalPnDiodeDetId(EcalBarrel, 15, 7);
97  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 2) : EcalPnDiodeDetId(EcalBarrel, 15, 7);
98  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 3) : EcalPnDiodeDetId(EcalBarrel, 15, 8);
99  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 3) : EcalPnDiodeDetId(EcalBarrel, 15, 8);
100  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 4) : EcalPnDiodeDetId(EcalBarrel, 15, 9);
101  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 4) : EcalPnDiodeDetId(EcalBarrel, 15, 9);
102  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 5) : EcalPnDiodeDetId(EcalBarrel, 15, 10);
103  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 15, 5) : EcalPnDiodeDetId(EcalBarrel, 15, 10);
104  default: return EcalPnDiodeDetId(0);
105  }
106  break;
107  case 16:
108  switch(lmmod){
109  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 1) : EcalPnDiodeDetId(EcalBarrel, 16, 6);
110  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 2) : EcalPnDiodeDetId(EcalBarrel, 16, 7);
111  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 2) : EcalPnDiodeDetId(EcalBarrel, 16, 7);
112  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 3) : EcalPnDiodeDetId(EcalBarrel, 16, 8);
113  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 3) : EcalPnDiodeDetId(EcalBarrel, 16, 8);
114  case 6: return pnA ? /*EcalPnDiodeDetId(EcalBarrel, 16, 4)*/ EcalPnDiodeDetId(EcalBarrel, 16, 1) : EcalPnDiodeDetId(EcalBarrel, 16, 9);
115  case 7: return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 4) :*/ EcalPnDiodeDetId(EcalBarrel, 16, 9);
116  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 5) : EcalPnDiodeDetId(EcalBarrel, 16, 10);
117  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 16, 5) : EcalPnDiodeDetId(EcalBarrel, 16, 10);
118  default: return EcalPnDiodeDetId(0);
119  }
120  break;
121  case 17:
122  switch(lmmod){
123  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 1) : EcalPnDiodeDetId(EcalBarrel, 17, 6);
124  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 2) : EcalPnDiodeDetId(EcalBarrel, 17, 7);
125  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 2) : EcalPnDiodeDetId(EcalBarrel, 17, 7);
126  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 3) : EcalPnDiodeDetId(EcalBarrel, 17, 8);
127  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 3) : EcalPnDiodeDetId(EcalBarrel, 17, 8);
128  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 4) : EcalPnDiodeDetId(EcalBarrel, 17, 9);
129  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 4) : EcalPnDiodeDetId(EcalBarrel, 17, 9);
130  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 5) : EcalPnDiodeDetId(EcalBarrel, 17, 10);
131  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 17, 5) : EcalPnDiodeDetId(EcalBarrel, 17, 10);
132  default: return EcalPnDiodeDetId(0);
133  }
134  break;
135  case 18:
136  switch(lmmod){
137  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 1) : EcalPnDiodeDetId(EcalBarrel, 18, 6);
138  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 2) : EcalPnDiodeDetId(EcalBarrel, 18, 7);
139  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 2) : EcalPnDiodeDetId(EcalBarrel, 18, 7);
140  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 3) : EcalPnDiodeDetId(EcalBarrel, 18, 8);
141  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 3) : EcalPnDiodeDetId(EcalBarrel, 18, 8);
142  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 4) : EcalPnDiodeDetId(EcalBarrel, 18, 9);
143  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 4) : EcalPnDiodeDetId(EcalBarrel, 18, 9);
144  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 5) : EcalPnDiodeDetId(EcalBarrel, 18, 10);
145  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 18, 5) : EcalPnDiodeDetId(EcalBarrel, 18, 10);
146  default: return EcalPnDiodeDetId(0);
147  }
148  break;
149  case 19:
150  switch(lmmod){
151  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 1) : EcalPnDiodeDetId(EcalBarrel, 19, 6);
152  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 2) : EcalPnDiodeDetId(EcalBarrel, 19, 8);
153  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 2) : EcalPnDiodeDetId(EcalBarrel, 19, 8);
154  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 3) : EcalPnDiodeDetId(EcalBarrel, 19, 7);
155  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 3) : EcalPnDiodeDetId(EcalBarrel, 19, 7);
156  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 4) : EcalPnDiodeDetId(EcalBarrel, 19, 9);
157  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 4) : EcalPnDiodeDetId(EcalBarrel, 19, 9);
158  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 5) : EcalPnDiodeDetId(EcalBarrel, 19, 10);
159  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 19, 5) : EcalPnDiodeDetId(EcalBarrel, 19, 10);
160  default: return EcalPnDiodeDetId(0);
161  }
162  break;
163  case 20:
164  switch(lmmod){
165  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 1) : EcalPnDiodeDetId(EcalBarrel, 20, 6);
166  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 2) : EcalPnDiodeDetId(EcalBarrel, 20, 7);
167  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 2) : EcalPnDiodeDetId(EcalBarrel, 20, 7);
168  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 3) : EcalPnDiodeDetId(EcalBarrel, 20, 8);
169  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 3) : EcalPnDiodeDetId(EcalBarrel, 20, 8);
170  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 4) : EcalPnDiodeDetId(EcalBarrel, 20, 9);
171  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 4) : EcalPnDiodeDetId(EcalBarrel, 20, 9);
172  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 5) : EcalPnDiodeDetId(EcalBarrel, 20, 10);
173  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 20, 5) : EcalPnDiodeDetId(EcalBarrel, 20, 10);
174  default: return EcalPnDiodeDetId(0);
175  }
176  break;
177  case 21:
178  switch(lmmod){
179  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 1) : EcalPnDiodeDetId(EcalBarrel, 21, 6);
180  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 2) : EcalPnDiodeDetId(EcalBarrel, 21, 7);
181  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 2) : EcalPnDiodeDetId(EcalBarrel, 21, 7);
182  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 3) : EcalPnDiodeDetId(EcalBarrel, 21, 8);
183  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 3) : EcalPnDiodeDetId(EcalBarrel, 21, 8);
184  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 4) : EcalPnDiodeDetId(EcalBarrel, 21, 9);
185  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 4) : EcalPnDiodeDetId(EcalBarrel, 21, 9);
186  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 5) : EcalPnDiodeDetId(EcalBarrel, 21, 10);
187  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 21, 5) : EcalPnDiodeDetId(EcalBarrel, 21, 10);
188  default: return EcalPnDiodeDetId(0);
189  }
190  break;
191  case 22:
192  switch(lmmod){
193  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 1) : EcalPnDiodeDetId(EcalBarrel, 22, 6);
194  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 2) : EcalPnDiodeDetId(EcalBarrel, 22, 7);
195  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 2) : EcalPnDiodeDetId(EcalBarrel, 22, 7);
196  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 3) : EcalPnDiodeDetId(EcalBarrel, 22, 8);
197  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 3) : EcalPnDiodeDetId(EcalBarrel, 22, 8);
198  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 4) : EcalPnDiodeDetId(EcalBarrel, 22, 9);
199  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 4) : EcalPnDiodeDetId(EcalBarrel, 22, 9);
200  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 5) : EcalPnDiodeDetId(EcalBarrel, 22, 10);
201  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 22, 5) : EcalPnDiodeDetId(EcalBarrel, 22, 10);
202  default: return EcalPnDiodeDetId(0);
203  }
204  break;
205  case 23:
206  switch(lmmod){
207  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 1) : EcalPnDiodeDetId(EcalBarrel, 23, 6);
208  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 2) : EcalPnDiodeDetId(EcalBarrel, 23, 7);
209  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 2) : EcalPnDiodeDetId(EcalBarrel, 23, 7);
210  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 3) : EcalPnDiodeDetId(EcalBarrel, 23, 8);
211  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 3) : EcalPnDiodeDetId(EcalBarrel, 23, 8);
212  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 4) : EcalPnDiodeDetId(EcalBarrel, 23, 9);
213  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 4) : EcalPnDiodeDetId(EcalBarrel, 23, 9);
214  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 5) : EcalPnDiodeDetId(EcalBarrel, 23, 10);
215  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 23, 5) : EcalPnDiodeDetId(EcalBarrel, 23, 10);
216  default: return EcalPnDiodeDetId(0);
217  }
218  break;
219  case 24:
220  switch(lmmod){
221  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 1) : EcalPnDiodeDetId(EcalBarrel, 24, 6);
222  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 2) : EcalPnDiodeDetId(EcalBarrel, 24, 7);
223  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 2) : EcalPnDiodeDetId(EcalBarrel, 24, 7);
224  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 3) : EcalPnDiodeDetId(EcalBarrel, 24, 8);
225  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 3) : EcalPnDiodeDetId(EcalBarrel, 24, 8);
226  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 4) : EcalPnDiodeDetId(EcalBarrel, 24, 9);
227  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 4) : EcalPnDiodeDetId(EcalBarrel, 24, 9);
228  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 5) : EcalPnDiodeDetId(EcalBarrel, 24, 10);
229  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 24, 5) : EcalPnDiodeDetId(EcalBarrel, 24, 10);
230  default: return EcalPnDiodeDetId(0);
231  }
232  break;
233  case 25:
234  switch(lmmod){
235  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 2) : EcalPnDiodeDetId(EcalBarrel, 25, 6);
236  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 1) : EcalPnDiodeDetId(EcalBarrel, 25, 7);
237  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 1) : EcalPnDiodeDetId(EcalBarrel, 25, 7);
238  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 3) : EcalPnDiodeDetId(EcalBarrel, 25, 8);
239  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 3) : EcalPnDiodeDetId(EcalBarrel, 25, 8);
240  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 4) : EcalPnDiodeDetId(EcalBarrel, 25, 9);
241  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 4) : EcalPnDiodeDetId(EcalBarrel, 25, 9);
242  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 5) : EcalPnDiodeDetId(EcalBarrel, 25, 10);
243  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 25, 5) : EcalPnDiodeDetId(EcalBarrel, 25, 10);
244  default: return EcalPnDiodeDetId(0);
245  }
246  break;
247  case 26:
248  switch(lmmod){
249  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 1) : EcalPnDiodeDetId(EcalBarrel, 26, 6);
250  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 2) : EcalPnDiodeDetId(EcalBarrel, 26, 7);
251  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 2) : EcalPnDiodeDetId(EcalBarrel, 26, 7);
252  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 3) : EcalPnDiodeDetId(EcalBarrel, 26, 8);
253  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 3) : EcalPnDiodeDetId(EcalBarrel, 26, 8);
254  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 4) : EcalPnDiodeDetId(EcalBarrel, 26, 9);
255  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 4) : EcalPnDiodeDetId(EcalBarrel, 26, 9);
256  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 5) : EcalPnDiodeDetId(EcalBarrel, 26, 10);
257  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 26, 5) : EcalPnDiodeDetId(EcalBarrel, 26, 10);
258  default: return EcalPnDiodeDetId(0);
259  }
260  break;
261  case 27:
262  switch(lmmod){
263  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 1) : EcalPnDiodeDetId(EcalBarrel, 27, 6);
264  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 2) : EcalPnDiodeDetId(EcalBarrel, 27, 7);
265  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 2) : EcalPnDiodeDetId(EcalBarrel, 27, 7);
266  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 3) : EcalPnDiodeDetId(EcalBarrel, 27, 8);
267  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 3) : EcalPnDiodeDetId(EcalBarrel, 27, 8);
268  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 4) : EcalPnDiodeDetId(EcalBarrel, 27, 9);
269  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 4) : EcalPnDiodeDetId(EcalBarrel, 27, 9);
270  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 5) : EcalPnDiodeDetId(EcalBarrel, 27, 10);
271  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 27, 5) : EcalPnDiodeDetId(EcalBarrel, 27, 10);
272  default: return EcalPnDiodeDetId(0);
273  }
274  break;
275  case 28:
276  switch(lmmod){
277  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 1) : EcalPnDiodeDetId(EcalBarrel, 28, 6);
278  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 2) : EcalPnDiodeDetId(EcalBarrel, 28, 7);
279  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 2) : EcalPnDiodeDetId(EcalBarrel, 28, 7);
280  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 3) : EcalPnDiodeDetId(EcalBarrel, 28, 8);
281  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 3) : EcalPnDiodeDetId(EcalBarrel, 28, 8);
282  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 4) : EcalPnDiodeDetId(EcalBarrel, 28, 9);
283  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 4) : EcalPnDiodeDetId(EcalBarrel, 28, 9);
284  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 5) : EcalPnDiodeDetId(EcalBarrel, 28, 10);
285  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 28, 5) : EcalPnDiodeDetId(EcalBarrel, 28, 10);
286  default: return EcalPnDiodeDetId(0);
287  }
288  break;
289  case 29:
290  switch(lmmod){
291  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 1) : EcalPnDiodeDetId(EcalBarrel, 29, 6);
292  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 2) : EcalPnDiodeDetId(EcalBarrel, 29, 7);
293  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 2) : EcalPnDiodeDetId(EcalBarrel, 29, 7);
294  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 3) : EcalPnDiodeDetId(EcalBarrel, 29, 8);
295  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 3) : EcalPnDiodeDetId(EcalBarrel, 29, 8);
296  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 4) : EcalPnDiodeDetId(EcalBarrel, 29, 9);
297  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 4) : EcalPnDiodeDetId(EcalBarrel, 29, 9);
298  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 5) : EcalPnDiodeDetId(EcalBarrel, 29, 10);
299  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 29, 5) : EcalPnDiodeDetId(EcalBarrel, 29, 10);
300  default: return EcalPnDiodeDetId(0);
301  }
302  break;
303  case 30:
304  switch(lmmod){
305  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 1) : EcalPnDiodeDetId(EcalBarrel, 30, 6);
306  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 2) : EcalPnDiodeDetId(EcalBarrel, 30, 7);
307  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 2) : EcalPnDiodeDetId(EcalBarrel, 30, 7);
308  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 3) : EcalPnDiodeDetId(EcalBarrel, 30, 8);
309  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 3) : EcalPnDiodeDetId(EcalBarrel, 30, 8);
310  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 4) : EcalPnDiodeDetId(EcalBarrel, 30, 9);
311  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 4) : EcalPnDiodeDetId(EcalBarrel, 30, 9);
312  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 5) : EcalPnDiodeDetId(EcalBarrel, 30, 10);
313  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 30, 5) : EcalPnDiodeDetId(EcalBarrel, 30, 10);
314  default: return EcalPnDiodeDetId(0);
315  }
316  break;
317  case 31:
318  switch(lmmod){
319  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 1) : EcalPnDiodeDetId(EcalBarrel, 31, 6);
320  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 2) : EcalPnDiodeDetId(EcalBarrel, 31, 7);
321  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 2) : EcalPnDiodeDetId(EcalBarrel, 31, 7);
322  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 3) : EcalPnDiodeDetId(EcalBarrel, 31, 8);
323  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 3) : EcalPnDiodeDetId(EcalBarrel, 31, 8);
324  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 4) : EcalPnDiodeDetId(EcalBarrel, 31, 9);
325  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 4) : EcalPnDiodeDetId(EcalBarrel, 31, 9);
326  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 5) : EcalPnDiodeDetId(EcalBarrel, 31, 10);
327  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 31, 5) : EcalPnDiodeDetId(EcalBarrel, 31, 10);
328  default: return EcalPnDiodeDetId(0);
329  }
330  break;
331  case 32:
332  switch(lmmod){
333  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 1) : EcalPnDiodeDetId(EcalBarrel, 32, 6);
334  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 2) : EcalPnDiodeDetId(EcalBarrel, 32, 7);
335  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 2) : EcalPnDiodeDetId(EcalBarrel, 32, 7);
336  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 3) : EcalPnDiodeDetId(EcalBarrel, 32, 8);
337  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 3) : EcalPnDiodeDetId(EcalBarrel, 32, 8);
338  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 5) : EcalPnDiodeDetId(EcalBarrel, 32, 10);
339  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 5) : EcalPnDiodeDetId(EcalBarrel, 32, 10);
340  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 4) : EcalPnDiodeDetId(EcalBarrel, 32, 9);
341  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 32, 4) : EcalPnDiodeDetId(EcalBarrel, 32, 9);
342  default: return EcalPnDiodeDetId(0);
343  }
344  break;
345  case 33:
346  switch(lmmod){
347  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 1) : EcalPnDiodeDetId(EcalBarrel, 33, 6);
348  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 2) : EcalPnDiodeDetId(EcalBarrel, 33, 7);
349  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 2) : EcalPnDiodeDetId(EcalBarrel, 33, 7);
350  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 3) : EcalPnDiodeDetId(EcalBarrel, 33, 8);
351  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 3) : EcalPnDiodeDetId(EcalBarrel, 33, 8);
352  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 4) : EcalPnDiodeDetId(EcalBarrel, 33, 9);
353  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 4) : EcalPnDiodeDetId(EcalBarrel, 33, 9);
354  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 5) : EcalPnDiodeDetId(EcalBarrel, 33, 10);
355  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 33, 5) : EcalPnDiodeDetId(EcalBarrel, 33, 10);
356  default: return EcalPnDiodeDetId(0);
357  }
358  break;
359  case 34:
360  switch(lmmod){
361  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 1) : EcalPnDiodeDetId(EcalBarrel, 34, 6);
362  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 2) : EcalPnDiodeDetId(EcalBarrel, 34, 7);
363  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 2) : EcalPnDiodeDetId(EcalBarrel, 34, 7);
364  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 3) : EcalPnDiodeDetId(EcalBarrel, 34, 8);
365  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 3) : EcalPnDiodeDetId(EcalBarrel, 34, 8);
366  case 6: return pnA ? /*EcalPnDiodeDetId(EcalBarrel, 34, 4)*/ EcalPnDiodeDetId(EcalBarrel, 34, 1) : EcalPnDiodeDetId(EcalBarrel, 34, 9);
367  case 7: return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 4) :*/ EcalPnDiodeDetId(EcalBarrel, 34, 9);
368  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 5) : EcalPnDiodeDetId(EcalBarrel, 34, 10);
369  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 34, 5) : EcalPnDiodeDetId(EcalBarrel, 34, 10);
370  default: return EcalPnDiodeDetId(0);
371  }
372  break;
373  case 35:
374  switch(lmmod){
375  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 1) : EcalPnDiodeDetId(EcalBarrel, 35, 6);
376  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 2) : EcalPnDiodeDetId(EcalBarrel, 35, 7);
377  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 2) : EcalPnDiodeDetId(EcalBarrel, 35, 7);
378  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 3) : EcalPnDiodeDetId(EcalBarrel, 35, 8);
379  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 3) : EcalPnDiodeDetId(EcalBarrel, 35, 8);
380  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 4) : EcalPnDiodeDetId(EcalBarrel, 35, 9);
381  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 4) : EcalPnDiodeDetId(EcalBarrel, 35, 9);
382  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 5) : EcalPnDiodeDetId(EcalBarrel, 35, 10);
383  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 35, 5) : EcalPnDiodeDetId(EcalBarrel, 35, 10);
384  default: return EcalPnDiodeDetId(0);
385  }
386  break;
387  case 36:
388  switch(lmmod){
389  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 1) : EcalPnDiodeDetId(EcalBarrel, 36, 6);
390  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 2) : EcalPnDiodeDetId(EcalBarrel, 36, 7);
391  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 2) : EcalPnDiodeDetId(EcalBarrel, 36, 7);
392  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 3) : EcalPnDiodeDetId(EcalBarrel, 36, 8);
393  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 3) : EcalPnDiodeDetId(EcalBarrel, 36, 8);
394  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 4) : EcalPnDiodeDetId(EcalBarrel, 36, 9);
395  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 4) : EcalPnDiodeDetId(EcalBarrel, 36, 9);
396  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 5) : EcalPnDiodeDetId(EcalBarrel, 36, 10);
397  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 36, 5) : EcalPnDiodeDetId(EcalBarrel, 36, 10);
398  default: return EcalPnDiodeDetId(0);
399  }
400  break;
401  case 37:
402  switch(lmmod){
403  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 1) : EcalPnDiodeDetId(EcalBarrel, 37, 6);
404  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 2) : EcalPnDiodeDetId(EcalBarrel, 37, 7);
405  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 2) : EcalPnDiodeDetId(EcalBarrel, 37, 7);
406  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 3) : EcalPnDiodeDetId(EcalBarrel, 37, 8);
407  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 3) : EcalPnDiodeDetId(EcalBarrel, 37, 8);
408  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 4) : EcalPnDiodeDetId(EcalBarrel, 37, 9);
409  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 4) : EcalPnDiodeDetId(EcalBarrel, 37, 9);
410  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 5) : EcalPnDiodeDetId(EcalBarrel, 37, 10);
411  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 37, 5) : EcalPnDiodeDetId(EcalBarrel, 37, 10);
412  default: return EcalPnDiodeDetId(0);
413  }
414  break;
415  case 38:
416  switch(lmmod){
417  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 1) : EcalPnDiodeDetId(EcalBarrel, 38, 6);
418  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 2) : EcalPnDiodeDetId(EcalBarrel, 38, 7);
419  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 2) : EcalPnDiodeDetId(EcalBarrel, 38, 7);
420  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 3) : EcalPnDiodeDetId(EcalBarrel, 38, 8);
421  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 3) : EcalPnDiodeDetId(EcalBarrel, 38, 8);
422  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 4) : EcalPnDiodeDetId(EcalBarrel, 38, 9);
423  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 4) : EcalPnDiodeDetId(EcalBarrel, 38, 9);
424  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 5) : EcalPnDiodeDetId(EcalBarrel, 38, 10);
425  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 38, 5) : EcalPnDiodeDetId(EcalBarrel, 38, 10);
426  default: return EcalPnDiodeDetId(0);
427  }
428  break;
429  case 39:
430  switch(lmmod){
431  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 1) : EcalPnDiodeDetId(EcalBarrel, 39, 6);
432  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 2) : EcalPnDiodeDetId(EcalBarrel, 39, 7);
433  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 2) : EcalPnDiodeDetId(EcalBarrel, 39, 7);
434  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 3) : EcalPnDiodeDetId(EcalBarrel, 39, 8);
435  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 3) : EcalPnDiodeDetId(EcalBarrel, 39, 8);
436  case 6: return pnA ? /*EcalPnDiodeDetId(EcalBarrel, 39, 4)*/ EcalPnDiodeDetId(EcalBarrel, 39, 1) : EcalPnDiodeDetId(EcalBarrel, 39, 9);
437  case 7: return /*pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 4) :*/ EcalPnDiodeDetId(EcalBarrel, 39, 9);
438  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 5) : EcalPnDiodeDetId(EcalBarrel, 39, 10);
439  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 39, 5) : EcalPnDiodeDetId(EcalBarrel, 39, 10);
440  default: return EcalPnDiodeDetId(0);
441  }
442  break;
443  case 40:
444  switch(lmmod){
445  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 1) : EcalPnDiodeDetId(EcalBarrel, 40, 6);
446  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 2) : EcalPnDiodeDetId(EcalBarrel, 40, 7);
447  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 2) : EcalPnDiodeDetId(EcalBarrel, 40, 7);
448  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 3) : EcalPnDiodeDetId(EcalBarrel, 40, 8);
449  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 3) : EcalPnDiodeDetId(EcalBarrel, 40, 8);
450  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 4) : EcalPnDiodeDetId(EcalBarrel, 40, 9);
451  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 4) : EcalPnDiodeDetId(EcalBarrel, 40, 9);
452  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 5) : EcalPnDiodeDetId(EcalBarrel, 40, 10);
453  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 40, 5) : EcalPnDiodeDetId(EcalBarrel, 40, 10);
454  default: return EcalPnDiodeDetId(0);
455  }
456  break;
457  case 41:
458  switch(lmmod){
459  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 1) : EcalPnDiodeDetId(EcalBarrel, 41, 6);
460  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 2) : EcalPnDiodeDetId(EcalBarrel, 41, 7);
461  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 2) : EcalPnDiodeDetId(EcalBarrel, 41, 7);
462  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 3) : EcalPnDiodeDetId(EcalBarrel, 41, 8);
463  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 3) : EcalPnDiodeDetId(EcalBarrel, 41, 8);
464  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 4) : EcalPnDiodeDetId(EcalBarrel, 41, 9);
465  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 4) : EcalPnDiodeDetId(EcalBarrel, 41, 9);
466  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 5) : EcalPnDiodeDetId(EcalBarrel, 41, 10);
467  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 41, 5) : EcalPnDiodeDetId(EcalBarrel, 41, 10);
468  default: return EcalPnDiodeDetId(0);
469  }
470  break;
471  case 42:
472  switch(lmmod){
473  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 1) : EcalPnDiodeDetId(EcalBarrel, 42, 6);
474  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 2) : EcalPnDiodeDetId(EcalBarrel, 42, 7);
475  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 2) : EcalPnDiodeDetId(EcalBarrel, 42, 7);
476  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 3) : EcalPnDiodeDetId(EcalBarrel, 42, 8);
477  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 3) : EcalPnDiodeDetId(EcalBarrel, 42, 8);
478  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 4) : EcalPnDiodeDetId(EcalBarrel, 42, 9);
479  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 4) : EcalPnDiodeDetId(EcalBarrel, 42, 9);
480  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 5) : EcalPnDiodeDetId(EcalBarrel, 42, 10);
481  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 42, 5) : EcalPnDiodeDetId(EcalBarrel, 42, 10);
482  default: return EcalPnDiodeDetId(0);
483  }
484  break;
485  case 43:
486  switch(lmmod){
487  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 1) : EcalPnDiodeDetId(EcalBarrel, 43, 6);
488  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 2) : EcalPnDiodeDetId(EcalBarrel, 43, 7);
489  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 2) : EcalPnDiodeDetId(EcalBarrel, 43, 7);
490  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 3) : EcalPnDiodeDetId(EcalBarrel, 43, 8);
491  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 3) : EcalPnDiodeDetId(EcalBarrel, 43, 8);
492  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 4) : EcalPnDiodeDetId(EcalBarrel, 43, 9);
493  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 4) : EcalPnDiodeDetId(EcalBarrel, 43, 9);
494  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 5) : EcalPnDiodeDetId(EcalBarrel, 43, 10);
495  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 43, 5) : EcalPnDiodeDetId(EcalBarrel, 43, 10);
496  default: return EcalPnDiodeDetId(0);
497  }
498  break;
499  case 44:
500  switch(lmmod){
501  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 1) : EcalPnDiodeDetId(EcalBarrel, 44, 6);
502  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 2) : EcalPnDiodeDetId(EcalBarrel, 44, 7);
503  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 2) : EcalPnDiodeDetId(EcalBarrel, 44, 7);
504  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 3) : EcalPnDiodeDetId(EcalBarrel, 44, 8);
505  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 3) : EcalPnDiodeDetId(EcalBarrel, 44, 8);
506  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 4) : EcalPnDiodeDetId(EcalBarrel, 44, 9);
507  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 4) : EcalPnDiodeDetId(EcalBarrel, 44, 9);
508  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 5) : EcalPnDiodeDetId(EcalBarrel, 44, 10);
509  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 44, 5) : EcalPnDiodeDetId(EcalBarrel, 44, 10);
510  default: return EcalPnDiodeDetId(0);
511  }
512  break;
513  case 45:
514  switch(lmmod){
515  case 1: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 1) : EcalPnDiodeDetId(EcalBarrel, 45, 6);
516  case 2: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 2) : EcalPnDiodeDetId(EcalBarrel, 45, 7);
517  case 3: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 2) : EcalPnDiodeDetId(EcalBarrel, 45, 7);
518  case 4: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 3) : EcalPnDiodeDetId(EcalBarrel, 45, 8);
519  case 5: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 3) : EcalPnDiodeDetId(EcalBarrel, 45, 8);
520  case 6: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 4) : EcalPnDiodeDetId(EcalBarrel, 45, 9);
521  case 7: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 4) : EcalPnDiodeDetId(EcalBarrel, 45, 9);
522  case 8: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 5) : EcalPnDiodeDetId(EcalBarrel, 45, 10);
523  case 9: return pnA ? EcalPnDiodeDetId(EcalBarrel, 45, 5) : EcalPnDiodeDetId(EcalBarrel, 45, 10);
524  default: return EcalPnDiodeDetId(0);
525  }
526  break;
527  default: return EcalPnDiodeDetId(0);
528  }
529 
530  }
531  else{
532  EcalScDetId scid(EEDetId(_id).sc());
533  int ix(scid.ix());
534  int iy(scid.iy());
535  int dee(MEEEGeom::dee(ix, iy, scid.zside()));
536  int lmmod(MEEEGeom::lmmod(ix, iy));
537 
538  switch(dee){
539  case 1:
540  switch(lmmod){
541  case 1: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 1) : EcalPnDiodeDetId(EcalEndcap, 50, 6);
542  case 2: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 2) : EcalPnDiodeDetId(EcalEndcap, 50, 7);
543  case 3: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 3) : EcalPnDiodeDetId(EcalEndcap, 50, 8);
544  case 4: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 4) : EcalPnDiodeDetId(EcalEndcap, 50, 9);
545  case 5: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 3) : EcalPnDiodeDetId(EcalEndcap, 50, 8);
546  case 6: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 1) : EcalPnDiodeDetId(EcalEndcap, 50, 6);
547  case 7: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 2) : EcalPnDiodeDetId(EcalEndcap, 50, 7);
548  case 8: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 4) : EcalPnDiodeDetId(EcalEndcap, 50, 9);
549  case 9: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 6) : EcalPnDiodeDetId(EcalEndcap, 50, 1);
550  case 10: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 7) : EcalPnDiodeDetId(EcalEndcap, 50, 2);
551  case 11: return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 8) :*/ EcalPnDiodeDetId(EcalEndcap, 50, 3);
552  case 12: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 9) : EcalPnDiodeDetId(EcalEndcap, 50, 4);
553  case 13: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 10) : EcalPnDiodeDetId(EcalEndcap, 50, 5);
554  case 14: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 8) : EcalPnDiodeDetId(EcalEndcap, 50, 3);
555  case 15: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 6) : EcalPnDiodeDetId(EcalEndcap, 50, 1);
556  case 16: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 7) : EcalPnDiodeDetId(EcalEndcap, 50, 2);
557  case 17: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 10) : EcalPnDiodeDetId(EcalEndcap, 50, 5);
558  case 18: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 5) : EcalPnDiodeDetId(EcalEndcap, 50, 10);
559  case 19: return pnA ? EcalPnDiodeDetId(EcalEndcap, 51, 9) : EcalPnDiodeDetId(EcalEndcap, 50, 4);
560  default: return EcalPnDiodeDetId(0);
561  }
562  case 2:
563  switch(lmmod){
564  case 1: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 1) : EcalPnDiodeDetId(EcalEndcap, 46, 6);
565  case 2: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 2) : EcalPnDiodeDetId(EcalEndcap, 46, 7);
566  case 3: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 3) : EcalPnDiodeDetId(EcalEndcap, 46, 8);
567  case 4: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 4) : EcalPnDiodeDetId(EcalEndcap, 46, 9);
568  case 5: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 3) : EcalPnDiodeDetId(EcalEndcap, 46, 8);
569  case 6: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 1) : EcalPnDiodeDetId(EcalEndcap, 46, 6);
570  case 7: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 2) : EcalPnDiodeDetId(EcalEndcap, 46, 7);
571  case 8: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 4) : EcalPnDiodeDetId(EcalEndcap, 46, 9);
572  case 9: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 6) : EcalPnDiodeDetId(EcalEndcap, 46, 1);
573  case 10: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 7) : EcalPnDiodeDetId(EcalEndcap, 46, 2);
574  case 11: return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 8) :*/ EcalPnDiodeDetId(EcalEndcap, 46, 3);
575  case 12: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 9) : EcalPnDiodeDetId(EcalEndcap, 46, 4);
576  case 13: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 10) : EcalPnDiodeDetId(EcalEndcap, 46, 5);
577  case 14: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 8) : EcalPnDiodeDetId(EcalEndcap, 46, 3);
578  case 15: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 6) : EcalPnDiodeDetId(EcalEndcap, 46, 1);
579  case 16: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 7) : EcalPnDiodeDetId(EcalEndcap, 46, 2);
580  case 17: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 10) : EcalPnDiodeDetId(EcalEndcap, 46, 5);
581  case 18: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 5) : EcalPnDiodeDetId(EcalEndcap, 46, 10);
582  case 19: return pnA ? EcalPnDiodeDetId(EcalEndcap, 47, 9) : EcalPnDiodeDetId(EcalEndcap, 46, 4);
583  default: return EcalPnDiodeDetId(0);
584  }
585  case 3:
586  switch(lmmod){
587  case 1: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 1) : EcalPnDiodeDetId(EcalEndcap, 1, 6);
588  case 2: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 2) : EcalPnDiodeDetId(EcalEndcap, 1, 7);
589  case 3: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 3) : EcalPnDiodeDetId(EcalEndcap, 1, 8);
590  case 4: return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 4) :*/ EcalPnDiodeDetId(EcalEndcap, 1, 9);
591  case 5: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 3) : EcalPnDiodeDetId(EcalEndcap, 1, 8);
592  case 6: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 1) : EcalPnDiodeDetId(EcalEndcap, 1, 6);
593  case 7: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 2) : EcalPnDiodeDetId(EcalEndcap, 1, 7);
594  case 8: return /*pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 4) :*/ EcalPnDiodeDetId(EcalEndcap, 1, 9);
595  case 9: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 6) : EcalPnDiodeDetId(EcalEndcap, 1, 1);
596  case 10: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 7) : EcalPnDiodeDetId(EcalEndcap, 1, 2);
597  case 11: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 8) : EcalPnDiodeDetId(EcalEndcap, 1, 3);
598  case 12: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 9) : EcalPnDiodeDetId(EcalEndcap, 1, 4);
599  case 13: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 10) : EcalPnDiodeDetId(EcalEndcap, 1, 5);
600  case 14: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 8) : EcalPnDiodeDetId(EcalEndcap, 1, 3);
601  case 15: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 6) : EcalPnDiodeDetId(EcalEndcap, 1, 1);
602  case 16: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 7) : EcalPnDiodeDetId(EcalEndcap, 1, 2);
603  case 17: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 10) : EcalPnDiodeDetId(EcalEndcap, 1, 5);
604  case 18: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 5) : EcalPnDiodeDetId(EcalEndcap, 1, 10);
605  case 19: return pnA ? EcalPnDiodeDetId(EcalEndcap, 2, 9) : EcalPnDiodeDetId(EcalEndcap, 1, 4);
606  default: return EcalPnDiodeDetId(0);
607  }
608  case 4:
609  switch(lmmod){
610  case 1: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 1) : EcalPnDiodeDetId(EcalEndcap, 5, 6);
611  case 2: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 2) : EcalPnDiodeDetId(EcalEndcap, 5, 7);
612  case 3: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 3) : EcalPnDiodeDetId(EcalEndcap, 5, 8);
613  case 4: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 4) : EcalPnDiodeDetId(EcalEndcap, 5, 9);
614  case 5: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 3) : EcalPnDiodeDetId(EcalEndcap, 5, 8);
615  case 6: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 1) : EcalPnDiodeDetId(EcalEndcap, 5, 6);
616  case 7: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 2) : EcalPnDiodeDetId(EcalEndcap, 5, 7);
617  case 8: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 4) : EcalPnDiodeDetId(EcalEndcap, 5, 9);
618  case 9: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 6) : EcalPnDiodeDetId(EcalEndcap, 5, 1);
619  case 10: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 7) : EcalPnDiodeDetId(EcalEndcap, 5, 2);
620  case 11: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 8) : EcalPnDiodeDetId(EcalEndcap, 5, 3);
621  case 12: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 9) : EcalPnDiodeDetId(EcalEndcap, 5, 4);
622  case 13: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 10) : EcalPnDiodeDetId(EcalEndcap, 5, 5);
623  case 14: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 8) : EcalPnDiodeDetId(EcalEndcap, 5, 3);
624  case 15: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 6) : EcalPnDiodeDetId(EcalEndcap, 5, 1);
625  case 16: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 7) : EcalPnDiodeDetId(EcalEndcap, 5, 2);
626  case 17: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 10) : EcalPnDiodeDetId(EcalEndcap, 5, 5);
627  case 18: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 5) : EcalPnDiodeDetId(EcalEndcap, 5, 10);
628  case 19: return pnA ? EcalPnDiodeDetId(EcalEndcap, 6, 9) : EcalPnDiodeDetId(EcalEndcap, 5, 4);
629  default: return EcalPnDiodeDetId(0);
630  }
631  default: return EcalPnDiodeDetId(0);
632  }
633 
634  }
635  }
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:94
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:93
bool isCrystalId(DetId const &)
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:284
unsigned dccId(DetId const &)
bool ecaldqm::qualityOK ( int  _quality)
unsigned ecaldqm::rtHalf ( DetId const &  _id)

Definition at line 135 of file EcalDQMCommonUtils.cc.

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

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

136  {
137  if(_id.subdetId() == EcalBarrel){
138  int ic(EBDetId(_id).ic());
139  if((ic - 1) / 20 > 4 && (ic - 1) % 20 < 10) return 1;
140  }
141  else{
142  unsigned iDCC(dccId(_id) - 1);
143  if((iDCC == kEEm05 || iDCC == kEEp05) && EEDetId(_id).ix() > 50) return 1;
144  }
145 
146  return 0;
147  }
unsigned dccId(const EcalElectronicsId &_id)
std::vector< DetId > ecaldqm::scConstituents ( EcalScDetId const &  _scid)

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

193  {
194  std::vector<DetId> res;
195 
196  int ixbase((_scid.ix() - 1) * 5);
197  int iybase((_scid.iy() - 1) * 5);
198 
199  for(int ix(1); ix <= 5; ++ix){
200  for(int iy(1); iy <= 5; ++iy){
201  if(EEDetId::validDetId(ixbase + ix, iybase + iy, _scid.zside()))
202  res.push_back(EEDetId(ixbase + ix, iybase + iy, _scid.zside()));
203  }
204  }
205 
206  return res;
207  }
Definition: Electron.h:4
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
void ecaldqm::setElectronicsMap ( EcalElectronicsMapping const *  _map)

Definition at line 486 of file EcalDQMCommonUtils.cc.

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

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

487  {
488  std::lock_guard<std::mutex> lock(mapMutex);
489  if(electronicsMap) return;
490  electronicsMap = _map;
491  }
std::mutex mapMutex
EcalElectronicsMapping const * electronicsMap(0)
void ecaldqm::setGeometry ( CaloGeometry const *  _geom)

Definition at line 534 of file EcalDQMCommonUtils.cc.

References CommonMethods::lock().

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

535  {
536  std::lock_guard<std::mutex> lock(mapMutex);
537  if(geometry) return;
538  geometry = _geom;
539  }
std::mutex mapMutex
void ecaldqm::setTopology ( CaloTopology const *  _geom)

Definition at line 558 of file EcalDQMCommonUtils.cc.

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

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

559  {
560  std::lock_guard<std::mutex> lock(mapMutex);
561  if(topology) return;
562  topology = _geom;
563  }
CaloTopology const * topology(0)
std::mutex mapMutex
void ecaldqm::setTrigTowerMap ( EcalTrigTowerConstituentsMap const *  _map)

Definition at line 510 of file EcalDQMCommonUtils.cc.

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

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

511  {
512  std::lock_guard<std::mutex> lock(mapMutex);
513  if(trigtowerMap) return;
514  trigtowerMap = _map;
515  }
std::mutex mapMutex
EcalTrigTowerConstituentsMap const * trigtowerMap(0)
std::string ecaldqm::smName ( unsigned  _dccId)

Definition at line 333 of file EcalDQMCommonUtils.cc.

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

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

334  {
335  std::stringstream ss;
336 
337  unsigned iSM(_dccId - 1);
338 
339  if(iSM <= kEEmHigh)
340  ss << "EE-" << std::setw(2) << std::setfill('0') << (((iSM - kEEmLow + 6) % 9) + 1);
341  else if(iSM <= kEBmHigh)
342  ss << "EB-" << std::setw(2) << std::setfill('0') << (iSM - kEBmLow + 1);
343  else if(iSM <= kEBpHigh)
344  ss << "EB+" << std::setw(2) << std::setfill('0') << (iSM - kEBpLow + 1);
345  else if(iSM <= kEEpHigh)
346  ss << "EE+" << std::setw(2) << std::setfill('0') << (((iSM - kEEpLow + 6) % 9) + 1);
347 
348  return ss.str();
349  }
EcalLogicID ecaldqm::subdetID ( EcalSubdetector  _subdet)

Definition at line 16 of file LogicIDTranslation.cc.

References EcalBarrel, EcalEndcap, and Exception.

17  {
18  switch(_subdet){
19  case EcalBarrel:
20  return EcalLogicID("EB", 1000000000UL);
21  case EcalEndcap:
22  return EcalLogicID("EE", 2000000000UL);
23  default:
24  throw cms::Exception("UndefinedLogicID");
25  }
26  }
unsigned ecaldqm::tccId ( const DetId _id)

Definition at line 63 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 82 of file EcalDQMCommonUtils.cc.

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

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

Definition at line 119 of file LogicIDTranslation.cc.

Referenced by fetchAndFill().

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

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

EcalLogicID ecaldqm::towerID ( EcalElectronicsId const &  _id)

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

49  {
50  unsigned iDCC(_id.dccId() - 1);
51  if(iDCC <= kEEmHigh || iDCC >= kEEpLow){
52  return EcalLogicID("EE_readout_tower",
53  2110000000UL + 100 * (601 + iDCC) + _id.towerId(),
54  601 + iDCC, _id.towerId());
55  }
56  else{
57  int ism(iDCC <= kEBmHigh ? 19 + iDCC - kEBmLow : 1 + iDCC - kEBpLow);
58  return EcalLogicID("EB_trigger_tower",
59  1021000000UL + 10000 * ism + _id.towerId(),
60  ism, _id.towerId());
61  }
62  }
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
unsigned ecaldqm::towerId ( DetId const &  )
unsigned ecaldqm::towerId ( EcalElectronicsId const &  )
unsigned ecaldqm::towerId ( const DetId _id)

Definition at line 89 of file EcalDQMCommonUtils.cc.

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

90  {
91  unsigned subdet(_id.subdetId());
92 
93  if(subdet == EcalBarrel) return EBDetId(_id).tower().iTT();
94  else if(subdet == EcalTriggerTower) return EcalTrigTowerDetId(_id).iTT();
95  else if(subdet == EcalEndcap){
96  if(isEcalScDetId(_id)) return getElectronicsMap()->getDCCandSC(EcalScDetId(_id)).second;
97  else return getElectronicsMap()->getElectronicsId(EEDetId(_id)).towerId();
98  }
99 
100  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::towerId(" << std::hex << uint32_t(_id) << ")" << std::endl;
101 
102  return 0;
103  }
EcalElectronicsMapping const * getElectronicsMap()
int towerId() const
get the tower id
std::pair< int, int > getDCCandSC(EcalScDetId id) const
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:59
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
bool isEcalScDetId(const DetId &_id)
int iTT() const
sequential index within one DCC
unsigned ecaldqm::towerId ( const EcalElectronicsId _id)

Definition at line 106 of file EcalDQMCommonUtils.cc.

References EcalElectronicsId::towerId().

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

Definition at line 112 of file EcalDQMCommonUtils.cc.

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

113  {
114  unsigned subdet(_id.subdetId());
115 
116  if(subdet == EcalBarrel)
117  return EBDetId(_id).tower().iTT();
118  else if(subdet == EcalTriggerTower)
119  return getElectronicsMap()->iTT(EcalTrigTowerDetId(_id));
120  else if(subdet == EcalEndcap && !isEcalScDetId(_id))
122 
123  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::ttId(" << std::hex << uint32_t(_id) << ")" << std::endl;
124 
125  return 0;
126  }
EcalElectronicsMapping const * getElectronicsMap()
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
int ttId() const
get the tower id
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:59
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
bool isEcalScDetId(const DetId &_id)
int iTT() const
sequential index within one DCC
unsigned ecaldqm::ttId ( const EcalElectronicsId _id)

Definition at line 129 of file EcalDQMCommonUtils.cc.

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

130  {
132  }
EcalElectronicsMapping const * getElectronicsMap()
int ttId() const
get the tower id
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
int ecaldqm::zside ( DetId const &  )
int ecaldqm::zside ( const DetId _id)

Definition at line 210 of file EcalDQMCommonUtils.cc.

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

211  {
212  uint32_t rawId(_id);
213 
214  switch(_id.subdetId()){
215  case EcalBarrel:
216  return (((rawId >> 16) & 0x1) == 1 ? 1 : -1);
217  case EcalEndcap:
218  return (((rawId >> 14) & 0x1) == 1 ? 1 : -1);
219  case EcalTriggerTower:
220  return (((rawId >> 15) & 0x1) == 1 ? 1 : -1);
221  case EcalLaserPnDiode:
222  return (((rawId >> 4) & 0x7f) > kEBpLow ? 1 : -1);
223  default:
224  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::zside(" << std::hex << uint32_t(_id) << ")" << std::endl;
225  }
226 
227  return 0;
228  }
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37

Variable Documentation

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

Definition at line 463 of file EcalDQMCommonUtils.cc.

unsigned ecaldqm::memarr[]
Initial value:

Definition at line 9 of file EcalDQMCommonUtils.cc.

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