CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Enumerations | Functions | Variables
ecaldqm Namespace Reference

Classes

class  CertificationClient
 
class  ClusterTask
 
class  DQWorker
 
class  DQWorkerClient
 
class  DQWorkerTask
 
class  EnergyTask
 
class  IntegrityClient
 
class  IntegrityTask
 
class  LaserClient
 
class  LaserTask
 
class  LedTask
 
struct  MEData
 
struct  MeInfo
 
class  MeInfoMap
 
class  MESet
 
class  MESetChannel
 
class  MESetDet0D
 
class  MESetDet1D
 
class  MESetDet2D
 
class  MESetEcal
 
class  MESetNonObject
 
class  MESetTrend
 
class  OccupancyClient
 
class  OccupancyTask
 
class  PedestalTask
 
class  PNIntegrityTask
 
class  PNPresampleTask
 
class  PresampleClient
 
class  PresampleTask
 
class  RawDataClient
 
class  RawDataTask
 
class  SelectiveReadoutClient
 
class  SelectiveReadoutTask
 
class  SetWorker
 
class  SummaryClient
 
class  TestPulseTask
 
class  TimingClient
 
class  TimingTask
 
class  TowerStatusTask
 
class  TrigPrimClient
 
class  TrigPrimTask
 

Typedefs

typedef DQWorker *(* WorkerFactory )(const edm::ParameterSet &, const edm::ParameterSet &)
 

Enumerations

enum  BinningType { kCrystal, kSuperCrystal, kTriggerTower }
 
enum  Collections {
  kSource, kEcalRawData, kGainErrors, kChIdErrors,
  kGainSwitchErrors, kTowerIdErrors, kBlockSizeErrors, kMEMTowerIdErrors,
  kMEMBlockSizeErrors, kMEMChIdErrors, kMEMGainErrors, kEBSrFlag,
  kEESrFlag, kEBDigi, kEEDigi, kPnDiodeDigi,
  kTrigPrimDigi, kTrigPrimEmulDigi, kEBUncalibRecHit, kEEUncalibRecHit,
  kEBRecHit, kEERecHit, kEBBasicCluster, kEEBasicCluster,
  kEBSuperCluster, kEESuperCluster, kRun, kLumiSection,
  nProcessedObjects, nCollections = kRun
}
 
enum  Directions { kLeft, kRight }
 
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  ObjectType {
  kFullEE, kEEp, kEEm, kEEpFar,
  kEEpNear, kEEmFar, kEEmNear, kSM
}
 
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

MonitorElementbookME (DQMStore *dqmStore, const std::string &name, const std::string &title, const std::string &className, ObjectType otype, BinningType btype=kCrystal, int ism=0, double lowZ=0., double highZ=0., const char *option="s")
 
void calcBins (int binWidth, int divisor, long int start_time, long int last_time, long int current_time, long int &binDiff, long int &diff)
 
bool ccuExists (unsigned, unsigned)
 
void checkElectronicsMap ()
 
void checkTrigTowerMap ()
 
TObject * cloneIt (MonitorElement *me, std::string histo)
 
unsigned dccId (const DetId &)
 
unsigned dccId (const EcalElectronicsId &)
 
unsigned dccId (unsigned)
 
const std::set< unsigned > dccNoMEM (nomemarr, nomemarr+10)
 
 DEFINE_ECALDQM_WORKER (PNIntegrityTask)
 
 DEFINE_ECALDQM_WORKER (CertificationClient)
 
 DEFINE_ECALDQM_WORKER (PresampleTask)
 
 DEFINE_ECALDQM_WORKER (TrigPrimClient)
 
 DEFINE_ECALDQM_WORKER (PNPresampleTask)
 
 DEFINE_ECALDQM_WORKER (RawDataClient)
 
 DEFINE_ECALDQM_WORKER (SelectiveReadoutClient)
 
 DEFINE_ECALDQM_WORKER (TimingTask)
 
 DEFINE_ECALDQM_WORKER (IntegrityClient)
 
 DEFINE_ECALDQM_WORKER (IntegrityTask)
 
 DEFINE_ECALDQM_WORKER (EnergyTask)
 
 DEFINE_ECALDQM_WORKER (OccupancyTask)
 
 DEFINE_ECALDQM_WORKER (SummaryClient)
 
 DEFINE_ECALDQM_WORKER (PresampleClient)
 
 DEFINE_ECALDQM_WORKER (OccupancyClient)
 
 DEFINE_ECALDQM_WORKER (TimingClient)
 
 DEFINE_ECALDQM_WORKER (PedestalTask)
 
 DEFINE_ECALDQM_WORKER (TowerStatusTask)
 
 DEFINE_ECALDQM_WORKER (TestPulseTask)
 
 DEFINE_ECALDQM_WORKER (LaserTask)
 
 DEFINE_ECALDQM_WORKER (LedTask)
 
 DEFINE_ECALDQM_WORKER (LaserClient)
 
 DEFINE_ECALDQM_WORKER (RawDataTask)
 
 DEFINE_ECALDQM_WORKER (TrigPrimTask)
 
 DEFINE_ECALDQM_WORKER (SelectiveReadoutTask)
 
 DEFINE_ECALDQM_WORKER (ClusterTask)
 
const EcalElectronicsMappingelectronicsMap (0)
 
void fillME (MonitorElement *me, const EEDetId &id, double wz=1., double wprof=1.)
 
void fillME (MonitorElement *me, const EcalScDetId &id, double wz=1., double wprof=1.)
 
void fillME (MonitorElement *me, const EcalTrigTowerDetId &id, double wz=1., double wprof=1.)
 
void getAverageFromTProfile (TProfile *p, double &mean, double &rms)
 
double getBinContentME (MonitorElement *me, const EEDetId &id)
 
double getBinContentME (MonitorElement *me, const EcalScDetId &id)
 
double getBinContentME (MonitorElement *me, const EcalTrigTowerDetId &id)
 
double getBinEntriesME (MonitorElement *me, const EEDetId &id)
 
double getBinEntriesME (MonitorElement *me, const EcalScDetId &id)
 
double getBinEntriesME (MonitorElement *me, const EcalTrigTowerDetId &id)
 
double getBinErrorME (MonitorElement *me, const EEDetId &id)
 
double getBinErrorME (MonitorElement *me, const EcalScDetId &id)
 
double getBinErrorME (MonitorElement *me, const EcalTrigTowerDetId &id)
 
int getBinME (MonitorElement *me, const EEDetId &id)
 
int getBinME (MonitorElement *me, const EcalScDetId &id)
 
int getBinME (MonitorElement *me, const EcalTrigTowerDetId &id)
 
unsigned getEEPnDCC (unsigned, unsigned)
 
const EcalElectronicsMappinggetElectronicsMap ()
 
void getMeanRms (TObject *pre, TObject *cur, double &mean, double &rms)
 
unsigned getNSuperCrystals (unsigned)
 
const
EcalTrigTowerConstituentsMap
getTrigTowerMap ()
 
bool isEcalScDetId (const DetId &_id)
 
unsigned memDCCIndex (unsigned)
 
void setBinContentME (MonitorElement *me, const EEDetId &id, double content)
 
void setBinContentME (MonitorElement *me, const EcalScDetId &id, double content)
 
void setBinContentME (MonitorElement *me, const EcalTrigTowerDetId &id, double content)
 
void setBinEntriesME (MonitorElement *me, const EEDetId &id, double entries)
 
void setBinEntriesME (MonitorElement *me, const EcalScDetId &id, double entries)
 
void setBinEntriesME (MonitorElement *me, const EcalTrigTowerDetId &id, double entries)
 
void setBinErrorME (MonitorElement *me, const EEDetId &id, double error)
 
void setBinErrorME (MonitorElement *me, const EcalScDetId &id, double error)
 
void setBinErrorME (MonitorElement *me, const EcalTrigTowerDetId &id, double error)
 
void setElectronicsMap (const EcalElectronicsMapping *)
 
void setTrigTowerMap (const EcalTrigTowerConstituentsMap *)
 
void shift (TH1 *h, Directions d, int bins)
 
void shift2Left (TH1 *h, int bins)
 
void shift2Right (TH1 *h, int bins)
 
void shiftAxis (TH1 *h, Directions d, double shift)
 
std::string smName (unsigned _dccId)
 
unsigned tccId (const DetId &)
 
unsigned tccId (const EcalElectronicsId &)
 
unsigned towerId (const DetId &)
 
unsigned towerId (const EcalElectronicsId &)
 
const
EcalTrigTowerConstituentsMap
trigtowerMap (0)
 
unsigned ttId (const DetId &)
 
unsigned ttId (const EcalElectronicsId &)
 
template<class W >
DQWorkerworkerFactory (const edm::ParameterSet &_params, const edm::ParameterSet &_paths)
 

Variables

std::string const collectionName [nCollections]
 
const std::set< unsigned > dccNoMEM
 
const EcalElectronicsMappingelectronicsMap
 
unsigned nomemarr [] = {kEEm09, kEEm01, kEEm04, kEEm05, kEEm06, kEEp09, kEEp01, kEEp04, kEEp05, kEEp06}
 
const
EcalTrigTowerConstituentsMap
trigtowerMap
 

Typedef Documentation

typedef DQWorker*(* ecaldqm::WorkerFactory)(const edm::ParameterSet &, const edm::ParameterSet &)

Definition at line 64 of file DQWorker.h.

Enumeration Type Documentation

Enumerator
kCrystal 
kSuperCrystal 
kTriggerTower 

Definition at line 30 of file GeometryHelper.h.

Enumerator
kSource 
kEcalRawData 
kGainErrors 
kChIdErrors 
kGainSwitchErrors 
kTowerIdErrors 
kBlockSizeErrors 
kMEMTowerIdErrors 
kMEMBlockSizeErrors 
kMEMChIdErrors 
kMEMGainErrors 
kEBSrFlag 
kEESrFlag 
kEBDigi 
kEEDigi 
kPnDiodeDigi 
kTrigPrimDigi 
kTrigPrimEmulDigi 
kEBUncalibRecHit 
kEEUncalibRecHit 
kEBRecHit 
kEERecHit 
kEBBasicCluster 
kEEBasicCluster 
kEBSuperCluster 
kEESuperCluster 
kRun 
kLumiSection 
nProcessedObjects 
nCollections 

Definition at line 6 of file Collections.h.

6  {
7  kSource, // 0
8  kEcalRawData, // 1
9  kGainErrors, // 2
10  kChIdErrors, // 3
11  kGainSwitchErrors, // 4
12  kTowerIdErrors, // 5
13  kBlockSizeErrors, // 6
14  kMEMTowerIdErrors, // 7
16  kMEMChIdErrors, // 9
17  kMEMGainErrors, // 10
18  kEBSrFlag, // 11
19  kEESrFlag, // 12
20  kEBDigi, // 13
21  kEEDigi, // 14
22  kPnDiodeDigi, // 15
23  kTrigPrimDigi, // 16
24  kTrigPrimEmulDigi, // 17
25  kEBUncalibRecHit, // 18
26  kEEUncalibRecHit, // 19
27  kEBRecHit, // 20
28  kEERecHit, // 21
29  kEBBasicCluster, // 22
30  kEEBasicCluster, // 23
31  kEBSuperCluster, // 24
32  kEESuperCluster, // 25
33  kRun, // 26
34  kLumiSection, // 27
35  nProcessedObjects, // 28
36  nCollections = kRun // 26
37  };
static const char *const kSource
Enumerator
kLeft 
kRight 

Definition at line 21 of file UtilFunctions.h.

21  {
22  kLeft,
23  kRight
24  };
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
kFullEE 
kEEp 
kEEm 
kEEpFar 
kEEpNear 
kEEmFar 
kEEmNear 
kSM 

Definition at line 21 of file GeometryHelper.h.

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

23  {
33  kEBpLow = kEBp01, kEBpHigh = kEBp18
34  };

Function Documentation

MonitorElement * ecaldqm::bookME ( DQMStore dqmStore,
const std::string &  name,
const std::string &  title,
const std::string &  className,
ObjectType  otype,
BinningType  btype = kCrystal,
int  ism = 0,
double  lowZ = 0.,
double  highZ = 0.,
const char *  option = "s" 
)

Definition at line 48 of file GeometryHelper.cc.

References DQMStore::book2D(), DQMStore::bookProfile2D(), Numbers::ix0EE(), Numbers::iy0EE(), kCrystal, kEEm, kEEmFar, kEEmNear, kEEp, kEEpFar, kEEpNear, kFullEE, kSM, kSuperCrystal, kTriggerTower, NULL, ecaldqm::MeInfoMap::set(), SiStripMonitorClusterAlca_cfi::xmax, SiStripMonitorClusterAlca_cfi::xmin, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.

49  {
50  if( !dqmStore ) return NULL;
51 
52  if( className != "TH2F" && className != "TProfile2D" ) return NULL;
53 
54  Double_t xmin, ymin;
55  Double_t xmax, ymax;
56 
57  xmin = ymin = 0.;
58  xmax = ymax = 0.;
59 
60  switch(otype){
61  case kFullEE:
62  xmax = 200.;
63  ymax = 100.;
64  break;
65  case kEEp:
66  case kEEm:
67  xmax = 100.;
68  ymax = 100.;
69  break;
70  case kEEpFar:
71  case kEEmFar:
72  xmin = 50.;
73  xmax = 100.;
74  ymax = 100.;
75  break;
76  case kEEpNear:
77  case kEEmNear:
78  xmax = 50.;
79  ymax = 100.;
80  break;
81  case kSM:
82  xmin = Numbers::ix0EE(ism);
83  xmax = xmin + 50;
84  ymin = Numbers::iy0EE(ism);
85  ymax = ymin + 50;
86  break;
87  }
88 
89  Int_t nBinsX, nBinsY;
90 
91  switch(btype){
92  case kCrystal:
93  case kTriggerTower:
94  nBinsX = (Int_t)(xmax - xmin);
95  nBinsY = (Int_t)(ymax - ymin);
96  break;
97  case kSuperCrystal:
98  nBinsX = (Int_t)(xmax - xmin) / 5;
99  nBinsY = (Int_t)(ymax - ymin) / 5;
100  break;
101  default:
102  nBinsX = nBinsY = 0;
103  break;
104  }
105 
106  MonitorElement *me;
107 
108  if( className == "TH2F" )
109  me = dqmStore->book2D(name, title, nBinsX, xmin, xmax, nBinsY, ymin, ymax);
110  else
111  me = dqmStore->bookProfile2D(name, title, nBinsX, xmin, xmax, nBinsY, ymin, ymax, lowZ, highZ);
112 
113  MeInfoMap::set( me, otype, btype, ism );
114 
115  return me;
116  }
#define NULL
Definition: scimark2.h:8
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:770
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:809
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::string className(const T &t)
Definition: ClassName.h:30
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1330
void ecaldqm::calcBins ( int  binWidth,
int  divisor,
long int  start_time,
long int  last_time,
long int  current_time,
long int &  binDiff,
long int &  diff 
)

Definition at line 27 of file UtilFunctions.cc.

Referenced by EBTrendClient::analyze(), EETrendClient::analyze(), EETrendTask::analyze(), and EBTrendTask::analyze().

28  {
29 
30  // changing arguments : binDiff, diff
31 
32  // binWidth : time interval
33  // divisor : time unit - for minute case divisor is 60 and for hour case 3600
34  // start_time : initial time when the job started
35  // last_time : the last updated time before calling the current "analyze" function
36  // current_time : the current time inside "analyze" fucntion
37  // binDiff : the bin difference for the current time compared to the bin location of the last time
38  // diff : time difference between the current time and the last time
39 
40  long int diff_current_start = current_time - start_time;
41  long int diff_last_start = last_time - start_time;
42 
43  // --------------------------------------------------
44  // Calculate time interval and bin width
45  // --------------------------------------------------
46 
47  binDiff = diff_current_start/divisor/binWidth - diff_last_start/divisor/binWidth;
48  diff = (current_time - last_time)/divisor;
49 
50  if(diff >= binWidth) {
51  while(diff >= binWidth) diff -= binWidth;
52  }
53 
54  } // calcBins
bool ecaldqm::ccuExists ( unsigned  _dccId,
unsigned  _towerId 
)
inline

Definition at line 268 of file EcalDQMCommonUtils.h.

References getNSuperCrystals(), and kEEpLow.

Referenced by ecaldqm::RawDataTask::runOnRawData().

268  {
269  if(_towerId == 69 || _towerId == 70) return true;
270  else if((_dccId == 8 || _dccId == 53) && _towerId >= 18 && _towerId <= 24) return false;
271  else if(_dccId <= kEEmHigh + 1 || _dccId >= kEEpLow + 1){
272  if(_towerId > getNSuperCrystals(_dccId)) return false;
273  }
274 
275  return true;
276  }
unsigned getNSuperCrystals(unsigned)
void ecaldqm::checkElectronicsMap ( )
inline

Definition at line 300 of file EcalDQMCommonUtils.h.

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

Referenced by dccId(), getElectronicsMap(), setElectronicsMap(), tccId(), towerId(), and ttId().

300  {
301  if(!electronicsMap) throw cms::Exception("InvalidCall") << "ElectronicsMapping not initialized" << std::endl;
302  }
const EcalElectronicsMapping * electronicsMap
void ecaldqm::checkTrigTowerMap ( )
inline

Definition at line 304 of file EcalDQMCommonUtils.h.

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

Referenced by getTrigTowerMap(), and setTrigTowerMap().

304  {
305  if(!trigtowerMap) throw cms::Exception("InvalidCall") << "TrigTowerConstituentsMap not initialized" << std::endl;
306  }
const EcalTrigTowerConstituentsMap * trigtowerMap
TObject * ecaldqm::cloneIt ( MonitorElement me,
std::string  histo 
)

Definition at line 255 of file UtilFunctions.cc.

References MonitorElement::getRootObject(), run_regression::ret, AlCaHLTBitMon_QueryRunRegistry::string, and indexGen::title.

Referenced by EBTrendClient::analyze(), and EETrendClient::analyze().

255  {
256 
257  // The cloned object, ret should be deleted after using it.
258 
259  TObject* ret = 0;
260 
261  if(!me) return ret;
262 
263  std::string title = histo + " Clone";
264  ret = (TObject*) (me->getRootObject()->Clone(title.c_str()));
265 
266  return ret;
267  }
TObject * getRootObject(void) const
unsigned ecaldqm::dccId ( const DetId _id)
inline

Definition at line 78 of file EcalDQMCommonUtils.h.

References checkElectronicsMap(), EcalElectronicsId::dccId(), EcalElectronicsMapping::DCCid(), EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalTriggerTower, electronicsMap, edm::hlt::Exception, EcalElectronicsMapping::getDCCandSC(), EcalElectronicsMapping::getElectronicsId(), EcalPnDiodeDetId::iDCCId(), isEcalScDetId(), DetId::rawId(), and DetId::subdetId().

Referenced by DCCEventBlock::addHeaderToCollection(), LaserSorter::analyze(), DCCEESRPBlock::checkSrpIdAndNumbSRFlags(), EcalDCCHeaderBlock::EcalDCCHeaderBlock(), ESDCCHeaderBlock::ESDCCHeaderBlock(), EcalDQMBinningService::findBinsDCC_(), EcalDQMBinningService::findOffset(), ecaldqm::MESetEcal::generateNames(), LinkBoardElectronicIndex::print(), EcalElectronicsMapping::pseudoStripConstituents(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::SelectiveReadoutTask::runOnSrFlag_(), ecaldqm::TowerStatusTask::runOnTowerStatus(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), EcalElectronicsMapper::setActiveDCC(), ESKCHIPBlock::setDccId(), ESDCCHeaderBlock::setId(), EcalDCCHeaderBlock::setId(), EcalElectronicsMapping::tccConstituents(), and EcalElectronicsMapping::ttConstituents().

78  {
80 
81  unsigned subdet(_id.subdetId());
82 
83  if(subdet == EcalBarrel) return electronicsMap->DCCid(EBDetId(_id));
84  else if(subdet == EcalTriggerTower) return electronicsMap->DCCid(EcalTrigTowerDetId(_id));
85  else if(subdet == EcalEndcap){
86  if(isEcalScDetId(_id)) return electronicsMap->getDCCandSC(EcalScDetId(_id)).first;
87  else return electronicsMap->getElectronicsId(EEDetId(_id)).dccId();
88  }
89  else if(subdet == EcalLaserPnDiode) return EcalPnDiodeDetId(_id).iDCCId();
90 
91  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::dccId(" << _id.rawId() << ")" << std::endl;
92 
93  return 0;
94  }
const EcalElectronicsMapping * electronicsMap
std::pair< int, int > getDCCandSC(EcalScDetId id) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
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
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool isEcalScDetId(const DetId &_id)
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
void checkElectronicsMap()
unsigned ecaldqm::dccId ( const EcalElectronicsId _id)
inline

Definition at line 96 of file EcalDQMCommonUtils.h.

References EcalElectronicsId::dccId().

96  {
97  return _id.dccId();
98  }
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
unsigned ecaldqm::dccId ( unsigned  _index)
inline

Definition at line 100 of file EcalDQMCommonUtils.h.

References prof2calltree::count, and dccNoMEM.

100  {
101  // for DCCs with no MEM - map the index in an array of DCCs with no MEM to the DCC ID
102  unsigned iDCC(0);
103  unsigned count(0);
104 
105  while(count <= _index)
106  if(dccNoMEM.find(iDCC++) == dccNoMEM.end()) count++;
107 
108  return iDCC;
109  }
const std::set< unsigned > dccNoMEM
const std::set<unsigned> ecaldqm::dccNoMEM ( nomemarr  ,
nomemarr+  10 
)
ecaldqm::DEFINE_ECALDQM_WORKER ( PNIntegrityTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( CertificationClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PresampleTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TrigPrimClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PNPresampleTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( RawDataClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( SelectiveReadoutClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TimingTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( IntegrityClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( IntegrityTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( EnergyTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( OccupancyTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( SummaryClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PresampleClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( OccupancyClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TimingClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PedestalTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TowerStatusTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TestPulseTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( LaserTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( LedTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( LaserClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( RawDataTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TrigPrimTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( SelectiveReadoutTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( ClusterTask  )
const EcalElectronicsMapping* ecaldqm::electronicsMap ( )
void ecaldqm::fillME ( MonitorElement me,
const EEDetId id,
double  wz = 1.,
double  wprof = 1. 
)

Definition at line 119 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), ecaldqm::MeInfoMap::get(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), EcalElectronicsMapping::getTriggerElectronicsId(), EcalElectronicsMapping::getTrigTowerDetId(), info(), kCrystal, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, kTriggerTower, python.multivaluedict::map(), ecaldqm::MeInfo::otype, x, and detailsBasic3DVector::y.

120  {
121 
122  if( !me ) return;
123 
124  const MeInfo *info = MeInfoMap::get( me );
125 
126  if( !info ) return;
127 
128  if(info->btype == kCrystal){
129 
130  float x = id.ix() - 0.5;
131  float y = id.iy() - 0.5;
132  if( info->otype == kSM && id.zside() < 0 ) x = 100 - x;
133  if( info->otype == kFullEE && id.zside() > 0 ) x += 100;
134 
135  if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
136  else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
137  return;
138 
139  }else if(info->btype == kSuperCrystal){
140 
141  EcalScDetId scid( Numbers::getEcalScDetId( id ) );
142  fillME( me, scid, wz, wprof );
143  return;
144 
145  }else if(info->btype == kTriggerTower){
146 
149  EcalTrigTowerDetId ttid( map->getTrigTowerDetId( teid.tccId(), teid.ttId() ) );
150  fillME( me, ttid, wz, wprof );
151  return;
152 
153  }
154 
155  }
static const TGPicture * info(bool iBackgroundIsBlack)
void fillME(MonitorElement *me, const EEDetId &id, double wz=1., double wprof=1.)
EcalTrigTowerDetId getTrigTowerDetId(int TCCid, int iTT) const
Builds a EcalTrigTowerDetID from the TCCid &amp; TriggerTower index in TCC.
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
void Fill(long long x)
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
Kind kind(void) const
Get the type of the monitor element.
static const EcalScDetId getEcalScDetId(const EEDetId &id)
Definition: Numbers.cc:676
Definition: DDAxes.h:10
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::fillME ( MonitorElement me,
const EcalScDetId id,
double  wz = 1.,
double  wprof = 1. 
)

Definition at line 158 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), ecaldqm::MeInfoMap::get(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), info(), EEDetId::ix(), EEDetId::iy(), kCrystal, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, python.multivaluedict::map(), ecaldqm::MeInfo::otype, AlCaHLTBitMon_ParallelJobs::p, x, detailsBasic3DVector::y, and EEDetId::zside().

159  {
160 
161  if( !me ) return;
162 
163  const MeInfo *info = MeInfoMap::get( me );
164 
165  if( !info ) return;
166 
167  if(info->btype == kCrystal){
168 
170  std::pair<int,int> p = map->getDCCandSC( id );
171  std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
172  for(unsigned u = 0; u < vcry.size(); u++){
173  EEDetId cid( vcry[u] );
174 
175  float x = cid.ix() - 0.5;
176  float y = cid.iy() - 0.5;
177  if( info->otype == kSM && cid.zside() < 0 ) x = 100 - x;
178  if( info->otype == kFullEE && cid.zside() > 0 ) x += 100;
179 
180  if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
181  else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
182 
183  }
184  return;
185 
186  }else if(info->btype == kSuperCrystal){
187 
188  float x = id.ix() * 5 - 2.5;
189  float y = id.iy() * 5 - 2.5;
190  if( info->otype == kSM && id.zside() < 0 ) x = 100 - x;
191  if( info->otype == kFullEE && id.zside() > 0 ) x += 100;
192 
193  if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
194  else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
195  return;
196 
197  }
198 
199  }
static const TGPicture * info(bool iBackgroundIsBlack)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
std::pair< int, int > getDCCandSC(EcalScDetId id) const
void Fill(long long x)
Kind kind(void) const
Get the type of the monitor element.
Definition: DDAxes.h:10
T get(const Candidate &c)
Definition: component.h:55
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void ecaldqm::fillME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  wz = 1.,
double  wprof = 1. 
)

Definition at line 202 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), ecaldqm::MeInfoMap::get(), info(), EEDetId::ix(), EEDetId::iy(), kCrystal, kFullEE, MonitorElement::kind(), kSM, kTriggerTower, ecaldqm::MeInfo::otype, x, detailsBasic3DVector::y, and EEDetId::zside().

203  {
204 
205  if( !me ) return;
206 
207  const MeInfo *info = MeInfoMap::get( me );
208 
209  if( !info ) return;
210 
211  if(info->btype == kTriggerTower || info->btype == kCrystal){
212 
213  std::vector<DetId> vcry = *( Numbers::crystals( id ) );
214  for(unsigned u = 0; u < vcry.size(); u++){
215  EEDetId cid( vcry[u] );
216 
217  float x = cid.ix() - 0.5;
218  float y = cid.iy() - 0.5;
219  if( info->otype == kSM && cid.zside() < 0 ) x = 100 - x;
220  if( info->otype == kFullEE && cid.zside() > 0 ) x += 100;
221 
222  if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
223  else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
224  }
225  return;
226 
227  }
228 
229  }
static const TGPicture * info(bool iBackgroundIsBlack)
void Fill(long long x)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
Definition: DDAxes.h:10
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::getAverageFromTProfile ( TProfile *  p,
double &  mean,
double &  rms 
)

Definition at line 189 of file UtilFunctions.cc.

References i, pileupCalc::nbins, mathSSE::sqrt(), and detailsBasic3DVector::y.

Referenced by getMeanRms().

189  {
190 
191  // changing arguments : mean, rms
192  mean = rms = 0.0;
193 
194  if(!p) return;
195 
196  int nbins = p->GetXaxis()->GetNbins();
197  double y = 0.0;
198  double y2 = 0.0;
199  for(int i=1; i<=nbins; i++){
200  y += p->GetBinContent(i);
201  y2 += y*y;
202  }
203  mean = y/nbins;
204  rms = std::sqrt(y2/nbins - mean*mean);
205 
206  } // getAverageFromTProfile
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:48
double ecaldqm::getBinContentME ( MonitorElement me,
const EEDetId id 
)

Definition at line 383 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

384  {
385  if( !me ) return 0.;
386  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;
387 
388  return ((TH1 *)me->getRootObject())->GetBinContent( getBinME( me, id ) );
389  }
int getBinME(MonitorElement *me, const EEDetId &id)
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
double ecaldqm::getBinContentME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 392 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

393  {
394  if( !me ) return 0.;
395  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;
396 
397  return ((TH1 *)me->getRootObject())->GetBinContent( getBinME( me, id ) );
398  }
int getBinME(MonitorElement *me, const EEDetId &id)
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
double ecaldqm::getBinContentME ( MonitorElement me,
const EcalTrigTowerDetId id 
)

Definition at line 401 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info(), MonitorElement::kind(), and kTriggerTower.

402  {
403  if( !me ) return 0.;
404  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;
405 
406  const MeInfo *info = MeInfoMap::get( me );
407  if( !info || info->btype != kTriggerTower ) return 0.;
408 
409  std::vector<DetId> *crystals = Numbers::crystals( id );
410  if( !crystals->size() ) return 0.;
411 
412  return ((TH1 *)me->getRootObject())->GetBinContent( getBinME( me, EEDetId( crystals->at(0) ) ) );
413  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
double ecaldqm::getBinEntriesME ( MonitorElement me,
const EEDetId id 
)

Definition at line 449 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TPROFILE2D, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

450  {
451  if( !me ) return 0.;
452  if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return 0.;
453 
454  return ((TProfile2D *)me->getRootObject())->GetBinEntries( getBinME( me, id ) );
455  }
int getBinME(MonitorElement *me, const EEDetId &id)
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
double ecaldqm::getBinEntriesME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 458 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TPROFILE2D, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

459  {
460  if( !me ) return 0.;
461  if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return 0.;
462 
463  return ((TProfile2D *)me->getRootObject())->GetBinEntries( getBinME( me, id ) );
464  }
int getBinME(MonitorElement *me, const EEDetId &id)
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
double ecaldqm::getBinEntriesME ( MonitorElement me,
const EcalTrigTowerDetId id 
)

Definition at line 467 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TPROFILE2D, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info(), MonitorElement::kind(), and kTriggerTower.

468  {
469  if( !me ) return 0.;
470  if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return 0.;
471 
472  const MeInfo *info = MeInfoMap::get( me );
473  if( !info || info->btype != kTriggerTower ) return 0.;
474 
475  std::vector<DetId> *crystals = Numbers::crystals( id );
476  if( !crystals->size() ) return 0.;
477 
478 
479  return ((TProfile2D *)me->getRootObject())->GetBinEntries( getBinME( me, EEDetId( crystals->at(0) ) ) );
480  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
double ecaldqm::getBinErrorME ( MonitorElement me,
const EEDetId id 
)

Definition at line 416 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

417  {
418  if( !me ) return 0.;
419  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;
420 
421  return ((TH1 *)me->getRootObject())->GetBinError( getBinME( me, id ) );
422  }
int getBinME(MonitorElement *me, const EEDetId &id)
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
double ecaldqm::getBinErrorME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 425 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

426  {
427  if( !me ) return 0.;
428  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;
429 
430  return ((TH1 *)me->getRootObject())->GetBinError( getBinME( me, id ) );
431  }
int getBinME(MonitorElement *me, const EEDetId &id)
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
double ecaldqm::getBinErrorME ( MonitorElement me,
const EcalTrigTowerDetId id 
)

Definition at line 434 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info(), MonitorElement::kind(), and kTriggerTower.

435  {
436  if( !me ) return 0.;
437  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;
438 
439  const MeInfo *info = MeInfoMap::get( me );
440  if( !info || info->btype != kTriggerTower ) return 0.;
441 
442  std::vector<DetId> *crystals = Numbers::crystals( id );
443  if( !crystals->size() ) return 0.;
444 
445  return ((TH1 *)me->getRootObject())->GetBinError( getBinME( me, EEDetId( crystals->at(0) ) ) );
446  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
int ecaldqm::getBinME ( MonitorElement me,
const EEDetId id 
)

Definition at line 232 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH3F, MonitorElement::DQM_KIND_TPROFILE, ecaldqm::MeInfoMap::get(), info(), ecaldqm::MeInfo::ism, ecalpyutils::ism(), Numbers::ix0EE(), Numbers::iy0EE(), kEEm, kEEmFar, kEEmNear, kEEp, kEEpFar, kEEpNear, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, ecaldqm::MeInfo::otype, and pileupReCalc_HLTpaths::scale.

Referenced by getBinContentME(), getBinEntriesME(), getBinErrorME(), setBinContentME(), setBinEntriesME(), and setBinErrorME().

233  {
234  if( !me ) return -1;
235  int kind = me->kind();
236  if( kind < MonitorElement::DQM_KIND_TH2F ||
238  kind == MonitorElement::DQM_KIND_TH3F ) return -1;
239 
240  const MeInfo *info = MeInfoMap::get( me );
241  if( !info ) return -1;
242 
243  int ix = id.ix();
244  int iy = id.iy();
245  int zside = id.zside();
246  int nx;
247  int ism = info->ism;
248 
249  if(info->otype == kSM){
250 
251  if(zside > 0){
252  ix -= Numbers::ix0EE(ism);
253  iy -= Numbers::iy0EE(ism);
254  }else{
255  ix = 101 - ix - Numbers::ix0EE(ism);
256  iy -= Numbers::iy0EE(ism);
257  }
258  nx = 50;
259 
260  }else{
261 
262  switch(info->otype){
263  case kFullEE:
264  if(zside > 0) ix += 100;
265  nx = 200;
266  break;
267  case kEEp:
268  if(zside < 0) return -1;
269  nx = 100;
270  break;
271  case kEEm:
272  if(zside > 0) return -1;
273  nx = 100;
274  break;
275  case kEEpFar:
276  if(zside < 0 || ix > 50) return -1;
277  nx = 50;
278  break;
279  case kEEpNear:
280  if(zside < 0 || ix < 51) return -1;
281  ix -= 50;
282  nx = 50;
283  break;
284  case kEEmFar:
285  if(zside > 0 || ix > 50) return -1;
286  nx = 50;
287  break;
288  case kEEmNear:
289  if(zside > 0 || ix < 51) return -1;
290  ix -= 50;
291  nx = 50;
292  break;
293  default:
294  return -1;
295  }
296 
297  }
298 
299  int scale = info->btype == kSuperCrystal ? 5 : 1;
300  ix = (ix - 1) / scale + 1;
301  iy = (iy - 1) / scale + 1;
302  nx = nx / scale;
303 
304  return iy * (nx + 2) + ix;
305  }
static const TGPicture * info(bool iBackgroundIsBlack)
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:770
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:809
Kind kind(void) const
Get the type of the monitor element.
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
T get(const Candidate &c)
Definition: component.h:55
int ecaldqm::getBinME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 308 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH3F, MonitorElement::DQM_KIND_TPROFILE, ecaldqm::MeInfoMap::get(), info(), ecaldqm::MeInfo::ism, ecalpyutils::ism(), Numbers::ix0EE(), Numbers::iy0EE(), kEEm, kEEmFar, kEEmNear, kEEp, kEEpFar, kEEpNear, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, and ecaldqm::MeInfo::otype.

309  {
310  if( !me ) return -1;
311  int kind = me->kind();
312  if( kind < MonitorElement::DQM_KIND_TH2F ||
314  kind == MonitorElement::DQM_KIND_TH3F ) return -1;
315 
316  const MeInfo *info = MeInfoMap::get( me );
317  if( !info ) return -1;
318 
319  if(info->btype != kSuperCrystal) return -1;
320 
321  int ix = id.ix();
322  int iy = id.iy();
323  int zside = id.zside();
324  int nx;
325  int ism = info->ism;
326 
327  if(info->otype == kSM){
328 
329  if(zside > 0){
330  ix -= Numbers::ix0EE(ism) / 5;
331  iy -= Numbers::iy0EE(ism) / 5;
332  }else{
333  ix = 21 - ix - Numbers::ix0EE(ism) / 5;
334  iy -= Numbers::iy0EE(ism) / 5;
335  }
336  nx = 10;
337 
338  }else{
339 
340  switch(info->otype){
341  case kFullEE:
342  if(zside > 0) ix += 20;
343  nx = 40;
344  break;
345  case kEEp:
346  if(zside < 0) return -1;
347  nx = 20;
348  break;
349  case kEEm:
350  if(zside > 0) return -1;
351  nx = 20;
352  break;
353  case kEEpFar:
354  if(zside < 0 || ix > 10) return -1;
355  nx = 10;
356  break;
357  case kEEpNear:
358  if(zside < 0 || ix < 11) return -1;
359  ix -= 10;
360  nx = 10;
361  break;
362  case kEEmFar:
363  if(zside > 0 || ix > 10) return -1;
364  nx = 10;
365  break;
366  case kEEmNear:
367  if(zside > 0 || ix < 11) return -1;
368  ix -= 10;
369  nx = 10;
370  break;
371  default:
372  return -1;
373  }
374 
375  }
376 
377  return iy * (nx + 2) + ix;
378 
379  }
static const TGPicture * info(bool iBackgroundIsBlack)
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:770
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:809
Kind kind(void) const
Get the type of the monitor element.
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
T get(const Candidate &c)
Definition: component.h:55
int ecaldqm::getBinME ( MonitorElement me,
const EcalTrigTowerDetId id 
)
unsigned ecaldqm::getEEPnDCC ( unsigned  _dee,
unsigned  _ab 
)
inline

Definition at line 214 of file EcalDQMCommonUtils.h.

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

214  {
215  switch(_dee){
216  case 1: // EE+F -> FEDs 649-653/0
217  if(_ab == 0) return 650;
218  else return 651;
219  case 2: // EE+N -> FEDs 604-608/0
220  if(_ab == 0) return 605;
221  else return 606;
222  case 3: // EE-N -> FEDs 601-603, 608/1, 609
223  if(_ab == 0) return 601;
224  else return 602;
225  case 4: // EE-F -> FEDs 646-648, 653/1, 654
226  if(_ab == 0) return 647;
227  else return 646;
228  default:
229  return 600;
230  }
231  }
const EcalElectronicsMapping * ecaldqm::getElectronicsMap ( )
inline
void ecaldqm::getMeanRms ( TObject *  pre,
TObject *  cur,
double &  mean,
double &  rms 
)

Definition at line 211 of file UtilFunctions.cc.

References getAverageFromTProfile(), mergeVDriftHistosByStation::name, and mathSSE::sqrt().

Referenced by EBTrendClient::analyze(), and EETrendClient::analyze().

211  {
212 
213  // changing arguments : mean, rms
214 
215  mean = rms = 0.0;
216 
217  if(!cur) return;
218 
219  TString name(cur->IsA()->GetName());
220 
221  if(name.Contains("TProfile")) {
222  getAverageFromTProfile((TProfile*)cur,mean,rms);
223  }
224  else if(name.Contains("TH2")) {
225  if(pre) {
226  mean = ((TH2F*)cur)->GetEntries() - ((TH2F*)pre)->GetEntries();
227  if(mean < 0) return;
228  rms = std::sqrt(mean);
229  }
230  else {
231  mean = ((TH2F*)cur)->GetEntries();
232  if(mean < 0) return;
233  rms = std::sqrt(mean);
234  }
235  float nxybins = ((TH2F*)cur)->GetNbinsX()*((TH2F*)cur)->GetNbinsY();
236  if(nxybins < 1.) nxybins = 1.;
237  mean /= nxybins;
238  rms /= nxybins;
239  }
240  else if(name.Contains("TH1")) {
241  if(pre) {
242  ((TH1F*)pre)->Sumw2();
243  ((TH1F*)pre)->Add((TH1F*)pre,(TH1F*)cur,-1,1);
244  mean = ((TH1F*)pre)->GetMean();
245  rms = ((TH1F*)pre)->GetRMS();
246  }
247  else {
248  mean = ((TH1F*)cur)->GetMean();
249  rms = ((TH1F*)cur)->GetRMS();
250  }
251  }
252 
253  } // getMeanRms
void getAverageFromTProfile(TProfile *p, double &mean, double &rms)
T sqrt(T t)
Definition: SSEVec.h:48
unsigned ecaldqm::getNSuperCrystals ( unsigned  _dccId)
inline

Definition at line 233 of file EcalDQMCommonUtils.h.

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

Referenced by ccuExists(), EcalDQMBinningService::getBinningSM_(), ecaldqm::SelectiveReadoutClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::PresampleClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::IntegrityClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::OccupancyClient::producePlots(), and ecaldqm::LaserClient::producePlots().

233  {
234 
235  unsigned iSM(_dccId - 1);
236 
237  if(iSM >= kEBmLow && iSM <= kEBpHigh) return 68;
238 
239  switch(iSM){
240  case kEEm05:
241  case kEEp05:
242  return 41;
243  case kEEm07:
244  case kEEm03:
245  case kEEp07:
246  case kEEp03:
247  return 34;
248  case kEEm09:
249  case kEEm01:
250  case kEEm04:
251  case kEEm06:
252  case kEEp09:
253  case kEEp01:
254  case kEEp04:
255  case kEEp06:
256  return 33;
257  case kEEm08:
258  case kEEm02:
259  case kEEp08:
260  case kEEp02:
261  return 32;
262  default:
263  return 0;
264  }
265 
266  }
const EcalTrigTowerConstituentsMap * ecaldqm::getTrigTowerMap ( )
inline
bool ecaldqm::isEcalScDetId ( const DetId _id)
inline

Definition at line 192 of file EcalDQMCommonUtils.h.

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

Referenced by dccId(), ecaldqm::DQWorkerClient::fillQuality_(), EcalDQMBinningService::findBinsCrystal_(), EcalDQMBinningService::findBinsProjEta_(), EcalDQMBinningService::findBinsProjPhi_(), EcalDQMBinningService::findBinsSuperCrystal_(), EcalDQMBinningService::findBinsTriggerTower_(), tccId(), towerId(), and ttId().

192  {
193  return (_id.subdetId() == EcalEndcap) && ((_id.rawId() >> 15) & 0x1);
194  }
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
unsigned ecaldqm::memDCCIndex ( unsigned  _dccid)
inline

Definition at line 111 of file EcalDQMCommonUtils.h.

References dccNoMEM, and getHLTprescales::index.

Referenced by EcalDQMBinningService::findOffset().

111  {
112  unsigned index(0);
113  unsigned iDCC(0);
114 
115  while(iDCC < _dccid)
116  if(dccNoMEM.find(iDCC++) == dccNoMEM.end()) index++;
117 
118  index -= 1;
119 
120  return index;
121  }
const std::set< unsigned > dccNoMEM
void ecaldqm::setBinContentME ( MonitorElement me,
const EEDetId id,
double  content 
)

Definition at line 483 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, ws_sso_content_reader::content, MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), EcalElectronicsMapping::getTriggerElectronicsId(), info(), kCrystal, MonitorElement::kind(), kSuperCrystal, kTriggerTower, python.multivaluedict::map(), and EcalElectronicsMapping::ttConstituents().

484  {
485  if( !me ) return;
486  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;
487 
488  const MeInfo *info = MeInfoMap::get( me );
489  if( !info ) return;
490 
491  if(info->btype == kCrystal){
492 
493  ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, id ), content );
494  return;
495 
496  }else if(info->btype == kSuperCrystal){
497 
498  EcalScDetId scid( Numbers::getEcalScDetId( id ) );
499  ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, id ), content );
500  return;
501 
502  }else if(info->btype == kTriggerTower){
503 
506  std::vector<DetId> vcry = map->ttConstituents( teid.tccId(), teid.ttId() );
507  for(unsigned u = 0; u < vcry.size(); u++)
508  ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, EEDetId(vcry[u]) ), content );
509  return;
510 
511  }
512  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
Kind kind(void) const
Get the type of the monitor element.
std::vector< DetId > ttConstituents(int tccId, int tt) const
Get the constituent detids for this dccId.
TObject * getRootObject(void) const
static const EcalScDetId getEcalScDetId(const EEDetId &id)
Definition: Numbers.cc:676
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::setBinContentME ( MonitorElement me,
const EcalScDetId id,
double  content 
)

Definition at line 515 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, ws_sso_content_reader::content, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), info(), kCrystal, MonitorElement::kind(), kSuperCrystal, python.multivaluedict::map(), and AlCaHLTBitMon_ParallelJobs::p.

516  {
517  if( !me ) return;
518  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;
519 
520  const MeInfo *info = MeInfoMap::get( me );
521  if( !info ) return;
522 
523  if(info->btype == kCrystal){
524 
526  std::pair<int,int> p = map->getDCCandSC( id );
527  std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
528  for(unsigned u = 0; u < vcry.size(); u++)
529  ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, EEDetId(vcry[u]) ), content );
530  return;
531 
532  }else if(info->btype == kSuperCrystal){
533 
534  ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, id ), content );
535  return;
536 
537  }
538  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
std::pair< int, int > getDCCandSC(EcalScDetId id) const
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void ecaldqm::setBinContentME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  content 
)

Definition at line 541 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, ws_sso_content_reader::content, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info(), kCrystal, MonitorElement::kind(), and kTriggerTower.

542  {
543  if( !me ) return;
544  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;
545 
546  const MeInfo *info = MeInfoMap::get( me );
547  if( !info ) return;
548 
549  if(info->btype == kCrystal || info->btype == kTriggerTower){
550 
551  std::vector<DetId> *crystals = Numbers::crystals( id );
552  for(unsigned u = 0; u < crystals->size(); u++)
553  ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, EEDetId(crystals->at(u)) ), content );
554  return;
555 
556  }
557  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::setBinEntriesME ( MonitorElement me,
const EEDetId id,
double  entries 
)

Definition at line 637 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TPROFILE2D, python.tagInventory::entries, ecaldqm::MeInfoMap::get(), getBinME(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), EcalElectronicsMapping::getTriggerElectronicsId(), info(), kCrystal, MonitorElement::kind(), kSuperCrystal, kTriggerTower, python.multivaluedict::map(), and EcalElectronicsMapping::ttConstituents().

638  {
639  if( !me ) return;
640  if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return;
641 
642  const MeInfo *info = MeInfoMap::get( me );
643  if( !info ) return;
644 
645  if(info->btype == kCrystal){
646 
647  ((TProfile2D *)me->getRootObject())->SetBinEntries( getBinME( me, id ), entries );
648  return;
649 
650  }else if(info->btype == kSuperCrystal){
651 
652  EcalScDetId scid( Numbers::getEcalScDetId( id ) );
653  ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, id ), entries );
654  return;
655 
656  }else if(info->btype == kTriggerTower){
657 
660  std::vector<DetId> vcry = map->ttConstituents( teid.tccId(), teid.ttId() );
661  for(unsigned u = 0; u < vcry.size(); u++)
662  ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(vcry[u]) ), entries );
663  return;
664 
665  }
666 
667  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
Kind kind(void) const
Get the type of the monitor element.
std::vector< DetId > ttConstituents(int tccId, int tt) const
Get the constituent detids for this dccId.
TObject * getRootObject(void) const
static const EcalScDetId getEcalScDetId(const EEDetId &id)
Definition: Numbers.cc:676
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::setBinEntriesME ( MonitorElement me,
const EcalScDetId id,
double  entries 
)

Definition at line 670 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TPROFILE2D, python.tagInventory::entries, ecaldqm::MeInfoMap::get(), getBinME(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), info(), kCrystal, MonitorElement::kind(), kSuperCrystal, python.multivaluedict::map(), and AlCaHLTBitMon_ParallelJobs::p.

671  {
672  if( !me ) return;
673  if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return;
674 
675  const MeInfo *info = MeInfoMap::get( me );
676  if( !info ) return;
677 
678  if(info->btype == kCrystal){
679 
681  std::pair<int,int> p = map->getDCCandSC( id );
682  std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
683  for(unsigned u = 0; u < vcry.size(); u++)
684  ((TProfile2D *)me->getRootObject())->SetBinEntries( getBinME( me, EEDetId(vcry[u]) ), entries );
685  return;
686 
687  }else if(info->btype == kSuperCrystal){
688 
689  ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, id ), entries );
690  return;
691 
692  }
693  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
std::pair< int, int > getDCCandSC(EcalScDetId id) const
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void ecaldqm::setBinEntriesME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  entries 
)

Definition at line 696 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TPROFILE2D, python.tagInventory::entries, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info(), kCrystal, MonitorElement::kind(), and kTriggerTower.

697  {
698  if( !me ) return;
699  if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return;
700 
701  const MeInfo *info = MeInfoMap::get( me );
702  if( !info ) return;
703 
704  if(info->btype == kCrystal || info->btype == kTriggerTower){
705 
706  std::vector<DetId> *crystals = Numbers::crystals( id );
707  for(unsigned u = 0; u < crystals->size(); u++)
708  ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(crystals->at(u)) ), entries );
709  return;
710 
711  }
712  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::setBinErrorME ( MonitorElement me,
const EEDetId id,
double  error 
)

Definition at line 560 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH1F, relativeConstraints::error, ecaldqm::MeInfoMap::get(), getBinME(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), EcalElectronicsMapping::getTriggerElectronicsId(), info(), kCrystal, MonitorElement::kind(), kSuperCrystal, kTriggerTower, python.multivaluedict::map(), and EcalElectronicsMapping::ttConstituents().

561  {
562  if( !me ) return;
563  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;
564 
565  const MeInfo *info = MeInfoMap::get( me );
566  if( !info ) return;
567 
568  if(info->btype == kCrystal){
569 
570  ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, id ), error );
571  return;
572 
573  }else if(info->btype == kSuperCrystal){
574 
575  EcalScDetId scid( Numbers::getEcalScDetId( id ) );
576  ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, id ), error );
577  return;
578 
579  }else if(info->btype == kTriggerTower){
580 
583  std::vector<DetId> vcry = map->ttConstituents( teid.tccId(), teid.ttId() );
584  for(unsigned u = 0; u < vcry.size(); u++)
585  ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(vcry[u]) ), error );
586  return;
587 
588  }
589  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
Kind kind(void) const
Get the type of the monitor element.
std::vector< DetId > ttConstituents(int tccId, int tt) const
Get the constituent detids for this dccId.
TObject * getRootObject(void) const
static const EcalScDetId getEcalScDetId(const EEDetId &id)
Definition: Numbers.cc:676
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::setBinErrorME ( MonitorElement me,
const EcalScDetId id,
double  error 
)

Definition at line 592 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TH1F, relativeConstraints::error, ecaldqm::MeInfoMap::get(), getBinME(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), info(), kCrystal, MonitorElement::kind(), kSuperCrystal, python.multivaluedict::map(), and AlCaHLTBitMon_ParallelJobs::p.

593  {
594  if( !me ) return;
595  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;
596 
597  const MeInfo *info = MeInfoMap::get( me );
598  if( !info ) return;
599 
600  if(info->btype == kCrystal){
601 
603  std::pair<int,int> p = map->getDCCandSC( id );
604  std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
605  for(unsigned u = 0; u < vcry.size(); u++)
606  ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(vcry[u]) ), error );
607  return;
608 
609  }else if(info->btype == kSuperCrystal){
610 
611  ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, id ), error );
612  return;
613 
614  }
615  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
std::pair< int, int > getDCCandSC(EcalScDetId id) const
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void ecaldqm::setBinErrorME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  error 
)

Definition at line 618 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, relativeConstraints::error, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info(), kCrystal, MonitorElement::kind(), and kTriggerTower.

619  {
620  if( !me ) return;
621  if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;
622 
623  const MeInfo *info = MeInfoMap::get( me );
624  if( !info ) return;
625 
626  if(info->btype == kCrystal || info->btype == kTriggerTower){
627 
628  std::vector<DetId> *crystals = Numbers::crystals( id );
629  for(unsigned u = 0; u < crystals->size(); u++)
630  ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(crystals->at(u)) ), error );
631  return;
632 
633  }
634  }
static const TGPicture * info(bool iBackgroundIsBlack)
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:55
void ecaldqm::setElectronicsMap ( const EcalElectronicsMapping _map)
inline

Definition at line 283 of file EcalDQMCommonUtils.h.

References checkElectronicsMap(), and electronicsMap.

Referenced by EcalDQMonitorClient::beginRun(), EcalDQMonitorTask::beginRun(), and EcalDQMBinningService::postBeginRun().

283  {
284  if(electronicsMap) return;
285  electronicsMap = _map;
287  }
const EcalElectronicsMapping * electronicsMap
void checkElectronicsMap()
void ecaldqm::setTrigTowerMap ( const EcalTrigTowerConstituentsMap _map)
inline

Definition at line 294 of file EcalDQMCommonUtils.h.

References checkTrigTowerMap(), and trigtowerMap.

Referenced by EcalDQMonitorClient::beginRun(), EcalDQMonitorTask::beginRun(), and EcalDQMBinningService::postBeginRun().

294  {
295  if(trigtowerMap) return;
296  trigtowerMap = _map;
298  }
const EcalTrigTowerConstituentsMap * trigtowerMap
void checkTrigTowerMap()
void ecaldqm::shift ( TH1 *  h,
Directions  d,
int  bins 
)

Definition at line 56 of file UtilFunctions.cc.

References h, i, j, kLeft, kRight, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by shift2Left(), and shift2Right().

57  {
58  if(!bins || !h) return;
59  if(h->GetXaxis()->IsVariableBinSize()) return;
60 
61  if(bins < 0){
62  bins = -bins;
63  d = d==kRight ? kLeft : kRight;
64  }
65 
66  if(!h->GetSumw2()) h->Sumw2();
67  int nBins = h->GetXaxis()->GetNbins();
68  if(bins >= nBins){
69  h->Reset();
70  return;
71  }
72 
73  // the first bin goes to underflow
74  // each bin moves to the right
75 
76  int firstBin, lastBin, bound, increment;
77  switch(d){
78  case kRight:
79  firstBin = nBins + 1;
80  lastBin = 0;
81  bound = bins;
82  increment = -1;
83  break;
84  case kLeft:
85  firstBin = 0;
86  lastBin = nBins + 1;
87  bound = nBins - bins + 1;
88  increment = 1;
89  break;
90  default:
91  return;
92  }
93 
94  int shift = increment * bins;
95 
96  if( h->IsA() == TClass::GetClass("TProfile") ){
97 
98  TProfile *p = static_cast<TProfile *>(h);
99 
100  // by shifting n bin to the left, the number of entries are
101  // reduced by the number in n bins including the underflow bin.
102  double nentries = p->GetEntries();
103  for(int i = firstBin; i != firstBin + shift; i += increment) nentries -= p->GetBinEntries(i);
104  p->SetEntries(nentries);
105 
106  TArrayD* sumw2 = p->GetSumw2();
107 
108  for(int i = firstBin; i != bound; i += increment){
109  // GetBinContent returns binContent/binEntries
110  p->SetBinContent( i, p->GetBinContent( i+shift ) * p->GetBinEntries( i+shift ) );
111  p->SetBinEntries( i, p->GetBinEntries( i+shift ) );
112  sumw2->SetAt( sumw2->GetAt( i+shift ), i );
113  }
114 
115  for(int i = bound; i != lastBin + increment; i += increment){
116  p->SetBinContent( i, 0 );
117  p->SetBinEntries( i, 0 );
118  sumw2->SetAt( 0., i );
119  }
120 
121  }else if( h->InheritsFrom("TH2") ){
122 
123  TH2 *h2 = static_cast<TH2 *>(h);
124  int nBinsY = h2->GetYaxis()->GetNbins();
125 
126  // assumes sum(binContent) == entries
127  double nentries = h2->GetEntries();
128  for(int i = firstBin; i != firstBin + shift; i += increment)
129  for(int j=0 ; j<=nBinsY+1 ; j++) nentries -= h2->GetBinContent(i,j);
130 
131  h2->SetEntries(nentries);
132 
133  for(int i = firstBin; i != bound; i += increment)
134  for(int j = 0; j <= nBinsY + 1; j++)
135  h2->SetBinContent( i, j, h2->GetBinContent(i+shift, j) );
136 
137  for(int i = bound; i != lastBin + increment; i += increment)
138  for(int j = 0; j <= nBinsY + 1; j++)
139  h2->SetBinContent( i, j, 0 );
140 
141  }else if( h->InheritsFrom("TH1") ){ // any other histogram class
142 
143  // assumes sum(binContent) == entries
144  double nentries = h->GetEntries();
145  for(int i = firstBin; i != firstBin + shift; i += increment) nentries -= h->GetBinContent(i);
146 
147  h->SetEntries(nentries);
148 
149  for(int i = firstBin; i != bound; i += increment)
150  h->SetBinContent( i, h->GetBinContent(i+shift) );
151 
152  for(int i = bound; i != lastBin + increment; i += increment)
153  h->SetBinContent( i, 0 );
154  }
155 
156 
157  }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static unsigned int const shift
void ecaldqm::shift2Left ( TH1 *  h,
int  bins 
)

Definition at line 164 of file UtilFunctions.cc.

References kLeft, and shift().

165  {
166  shift(h, kLeft, bins);
167  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static unsigned int const shift
void ecaldqm::shift2Right ( TH1 *  h,
int  bins 
)

Definition at line 159 of file UtilFunctions.cc.

References kRight, and shift().

Referenced by ESTrendTask::analyze(), EBTrendClient::analyze(), EETrendClient::analyze(), EETrendTask::analyze(), and EBTrendTask::analyze().

160  {
161  shift(h, kRight, bins);
162  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static unsigned int const shift
void ecaldqm::shiftAxis ( TH1 *  h,
Directions  d,
double  shift 
)

Definition at line 171 of file UtilFunctions.cc.

References kLeft, kRight, pileupCalc::nbins, SiStripMonitorClusterAlca_cfi::xmax, and SiStripMonitorClusterAlca_cfi::xmin.

172  {
173  if( !h ) return;
174  TAxis *xax = h->GetXaxis();
175  if( h->GetXaxis()->IsVariableBinSize() ) return;
176 
177  double xmax = xax->GetXmax();
178  double xmin = xax->GetXmin();
179  int nbins = xax->GetNbins();
180 
181  if(d == kRight)
182  xax->Set(nbins, xmin - shift, xmax - shift);
183  else if(d == kLeft)
184  xax->Set(nbins, xmin + shift, xmax + shift);
185  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static unsigned int const shift
std::string ecaldqm::smName ( unsigned  _dccId)
inline

Definition at line 196 of file EcalDQMCommonUtils.h.

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

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

196  {
197  std::stringstream ss;
198 
199  unsigned iSM(_dccId - 1);
200 
201  if(iSM <= kEEmHigh)
202  ss << "EE-" << std::setw(2) << std::setfill('0') << (((iSM - kEEmLow + 6) % 9) + 1);
203  else if(iSM <= kEBmHigh)
204  ss << "EB-" << std::setw(2) << std::setfill('0') << (iSM - kEBmLow + 1);
205  else if(iSM <= kEBpHigh)
206  ss << "EB+" << std::setw(2) << std::setfill('0') << (iSM - kEBpLow + 1);
207  else if(iSM <= kEEpHigh)
208  ss << "EE+" << std::setw(2) << std::setfill('0') << (((iSM - kEEpLow + 6) % 9) + 1);
209 
210  return ss.str();
211  }
unsigned ecaldqm::tccId ( const DetId _id)
inline

Definition at line 123 of file EcalDQMCommonUtils.h.

References checkElectronicsMap(), EcalBarrel, EcalEndcap, EcalTriggerTower, electronicsMap, edm::hlt::Exception, EcalElectronicsMapping::getTriggerElectronicsId(), isEcalScDetId(), DetId::subdetId(), EcalTriggerElectronicsId::tccId(), and EcalElectronicsMapping::TCCid().

Referenced by DCCTBEventBlock::DCCTBEventBlock(), EcalElectronicsMapper::fillMaps(), EcalDQMBinningService::findBinsNoMap(), EcalDQMBinningService::findBinsTCC_(), EcalElectronicsMapping::pseudoStripConstituents(), EcalElectronicsMapper::resetPointers(), EcalElectronicsMapping::tccConstituents(), and EcalElectronicsMapping::ttConstituents().

123  {
125 
126  unsigned subdet(_id.subdetId());
127 
128  if(subdet == EcalBarrel) return electronicsMap->TCCid(EBDetId(_id));
129  else if(subdet == EcalTriggerTower) return electronicsMap->TCCid(EcalTrigTowerDetId(_id));
130  else if(subdet == EcalEndcap){
131  if(isEcalScDetId(_id)) return 0; // incompatible
133  }
134 
135  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::tccId(" << uint32_t(_id) << ")" << std::endl;
136 
137  return 0;
138  }
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
const EcalElectronicsMapping * electronicsMap
int TCCid(const EBDetId &id) const
returns the TCCid of an EBDetId
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
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)
void checkElectronicsMap()
unsigned ecaldqm::tccId ( const EcalElectronicsId _id)
inline

Definition at line 140 of file EcalDQMCommonUtils.h.

References checkElectronicsMap(), electronicsMap, EcalElectronicsMapping::getTriggerElectronicsId(), and EcalTriggerElectronicsId::tccId().

140  {
142 
144  }
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
const EcalElectronicsMapping * electronicsMap
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
void checkElectronicsMap()
unsigned ecaldqm::towerId ( const DetId _id)
inline

Definition at line 147 of file EcalDQMCommonUtils.h.

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

Referenced by EcalElectronicsMapper::fillMaps(), EcalDQMBinningService::findBinsNoMap(), EcalTPGScale::getTPGInGeV(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnSrFlag_(), and ecaldqm::TowerStatusTask::runOnTowerStatus().

147  {
149 
150  unsigned subdet(_id.subdetId());
151 
152  if(subdet == EcalBarrel){
153  return EBDetId(_id).tower().iTT();
154  }else if(subdet == EcalTriggerTower){
155  return EcalTrigTowerDetId(_id).iTT();
156  }else if(subdet == EcalEndcap){
157  if(isEcalScDetId(_id)) return electronicsMap->getDCCandSC(EcalScDetId(_id)).second;
158  else return electronicsMap->getElectronicsId(EEDetId(_id)).towerId();
159  }
160 
161  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::towerId(" << std::hex << uint32_t(_id) << ")" << std::endl;
162 
163  return 0;
164  }
const EcalElectronicsMapping * electronicsMap
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)
void checkElectronicsMap()
int iTT() const
sequential index within one DCC
unsigned ecaldqm::towerId ( const EcalElectronicsId _id)
inline

Definition at line 166 of file EcalDQMCommonUtils.h.

References EcalElectronicsId::towerId().

166  {
167  return _id.towerId();
168  }
int towerId() const
get the tower id
const EcalTrigTowerConstituentsMap* ecaldqm::trigtowerMap ( )
unsigned ecaldqm::ttId ( const DetId _id)
inline

Definition at line 170 of file EcalDQMCommonUtils.h.

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

Referenced by EcalTPGTowerStatusXMLTranslator::dumpXML(), EcalElectronicsMapper::fillMaps(), EcalDQMBinningService::findBinsNoMap(), EcalTPGTowerStatusXMLTranslator::plot(), cond::PayLoadInspector< DataT >::plot(), EcalDetIdToBeRecoveredProducer::produce(), EcalSelectiveReadoutValidation::setTtEtSums(), EcalSelectiveReadoutSuppressor::setTtFlags(), EcalTrigPrimCompactColl::toEcalTrigPrimDigiCollection(), EcalDumpRaw::tpgTag(), and EcalDumpRaw::ttfTag().

170  {
172 
173  unsigned subdet(_id.subdetId());
174 
175  if(subdet == EcalBarrel)
176  return EBDetId(_id).tower().iTT();
177  else if(subdet == EcalTriggerTower)
178  return electronicsMap->iTT(EcalTrigTowerDetId(_id));
179  else if(subdet == EcalEndcap && !isEcalScDetId(_id))
181 
182  throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::ttId(" << std::hex << uint32_t(_id) << ")" << std::endl;
183 
184  return 0;
185  }
const EcalElectronicsMapping * electronicsMap
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)
void checkElectronicsMap()
int iTT() const
sequential index within one DCC
unsigned ecaldqm::ttId ( const EcalElectronicsId _id)
inline

Definition at line 187 of file EcalDQMCommonUtils.h.

References checkElectronicsMap(), electronicsMap, EcalElectronicsMapping::getTriggerElectronicsId(), and EcalTriggerElectronicsId::ttId().

187  {
190  }
const EcalElectronicsMapping * electronicsMap
int ttId() const
get the tower id
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
void checkElectronicsMap()
template<class W >
DQWorker* ecaldqm::workerFactory ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 69 of file DQWorker.h.

70  {
71  W* worker(new W(_params, _paths));
72  return worker;
73  }

Variable Documentation

std::string const ecaldqm::collectionName[nCollections]
Initial value:
= {
"Source",
"EcalRawData",
"GainErrors",
"ChIdErrors",
"GainSwitchErrors",
"TowerIdErrors",
"BlockSizeErrors",
"MEMTowerIdErrors",
"MEMBlockSizeErrors",
"MEMChIdErrors",
"MEMGainErrors",
"EBSrFlag",
"EESrFlag",
"EBDigi",
"EEDigi",
"PnDiodeDigi",
"TrigPrimDigi",
"TrigPrimEmulDigi",
"EBUncalibRecHit",
"EEUncalibRecHit",
"EBRecHit",
"EERecHit",
"EBBasicCluster",
"EEBasicCluster",
"EBSuperCluster",
"EESuperCluster"
}

Definition at line 39 of file Collections.h.

Referenced by FWTableView::addTo(), BscSD::BscSD(), CaloSD::CaloSD(), EcalDQMonitorTask::EcalDQMonitorTask(), FiberSD::FiberSD(), FP420SD::FP420SD(), HFChamberSD::HFChamberSD(), HFWedgeSD::HFWedgeSD(), HFChamberSD::Initialize(), HFWedgeSD::Initialize(), FiberSD::Initialize(), TotemSD::Initialize(), CaloSD::Initialize(), BscSD::Initialize(), FP420SD::Initialize(), PFTauMVAInputDiscriminantTranslator::PFTauMVAInputDiscriminantTranslator(), EcalDQMonitorTask::runOnCollection(), FWTableView::setFrom(), and TotemSD::TotemSD().

const std::set<unsigned> ecaldqm::dccNoMEM
const EcalElectronicsMapping* ecaldqm::electronicsMap
unsigned ecaldqm::nomemarr[] = {kEEm09, kEEm01, kEEm04, kEEm05, kEEm06, kEEp09, kEEp01, kEEp04, kEEp05, kEEp06}

Definition at line 7 of file EcalDQMCommonUtils.cc.

const EcalTrigTowerConstituentsMap* ecaldqm::trigtowerMap