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)
 
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)
 
CertificationClientpCertificationClient (0)
 
ClusterTaskpClusterTask (0)
 
EnergyTaskpEnergyTask (0)
 
IntegrityClientpIntegrityClient (0)
 
IntegrityTaskpIntegrityTask (0)
 
LaserClientpLaserClient (0)
 
LaserTaskpLaserTask (0)
 
LedTaskpLedTask (0)
 
OccupancyClientpOccupancyClient (0)
 
OccupancyTaskpOccupancyTask (0)
 
PedestalTaskpPedestalTask (0)
 
PNIntegrityTaskpPNIntegrityTask (0)
 
PNPresampleTaskpPNPresampleTask (0)
 
PresampleClientpPresampleClient (0)
 
PresampleTaskpPresampleTask (0)
 
RawDataClientpRawDataClient (0)
 
RawDataTaskpRawDataTask (0)
 
SelectiveReadoutClientpSelectiveReadoutClient (0)
 
SelectiveReadoutTaskpSelectiveReadoutTask (0)
 
SummaryClientpSummaryClient (0)
 
TestPulseTaskpTestPulseTask (0)
 
TimingClientpTimingClient (0)
 
TimingTaskpTimingTask (0)
 
TowerStatusTaskpTowerStatusTask (0)
 
TrigPrimClientpTrigPrimClient (0)
 
TrigPrimTaskpTrigPrimTask (0)
 
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

SetWorker CertificationClientInstance ("CertificationClient", pCertificationClient)
 
SetWorker ClusterTaskInstance ("ClusterTask", pClusterTask)
 
std::string const collectionName [nCollections]
 
const std::set< unsigned > dccNoMEM
 
const EcalElectronicsMappingelectronicsMap
 
SetWorker EnergyTaskInstance ("EnergyTask", pEnergyTask)
 
SetWorker IntegrityClientInstance ("IntegrityClient", pIntegrityClient)
 
SetWorker IntegrityTaskInstance ("IntegrityTask", pIntegrityTask)
 
SetWorker LaserClientInstance ("LaserClient", pLaserClient)
 
SetWorker LaserTaskInstance ("LaserTask", pLaserTask)
 
SetWorker LedTaskInstance ("LedTask", pLedTask)
 
unsigned nomemarr [] = {kEEm09, kEEm01, kEEm04, kEEm05, kEEm06, kEEp09, kEEp01, kEEp04, kEEp05, kEEp06}
 
SetWorker OccupancyClientInstance ("OccupancyClient", pOccupancyClient)
 
SetWorker OccupancyTaskInstance ("OccupancyTask", pOccupancyTask)
 
SetWorker PedestalTaskInstance ("PedestalTask", pPedestalTask)
 
SetWorker PNIntegrityTaskInstance ("PNIntegrityTask", pPNIntegrityTask)
 
SetWorker PNPresampleTaskInstance ("PNPresampleTask", pPNPresampleTask)
 
SetWorker PresampleClientInstance ("PresampleClient", pPresampleClient)
 
SetWorker PresampleTaskInstance ("PresampleTask", pPresampleTask)
 
SetWorker RawDataClientInstance ("RawDataClient", pRawDataClient)
 
SetWorker RawDataTaskInstance ("RawDataTask", pRawDataTask)
 
SetWorker SelectiveReadoutClientInstance ("SelectiveReadoutClient", pSelectiveReadoutClient)
 
SetWorker SelectiveReadoutTaskInstance ("SelectiveReadoutTask", pSelectiveReadoutTask)
 
SetWorker SummaryClientInstance ("SummaryClient", pSummaryClient)
 
SetWorker TestPulseTaskInstance ("TestPulseTask", pTestPulseTask)
 
SetWorker TimingClientInstance ("TimingClient", pTimingClient)
 
SetWorker TimingTaskInstance ("TimingTask", pTimingTask)
 
SetWorker TowerStatusTaskInstance ("TowerStatusTask", pTowerStatusTask)
 
SetWorker TrigPrimClientInstance ("TrigPrimClient", pTrigPrimClient)
 
SetWorker TrigPrimTaskInstance ("TrigPrimTask", pTrigPrimTask)
 
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 32 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 23 of file UtilFunctions.h.

23  {
24  kLeft,
25  kRight
26  };
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 23 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, and ecaldqm::MeInfoMap::set().

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:773
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:812
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:845
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::string className(const T &t)
Definition: ClassName.h:30
void set(const std::string &name, int value)
set the flag, with a run-time name
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:1175
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 29 of file UtilFunctions.cc.

References evf::utils::start_time.

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

30  {
31 
32  // changing arguments : binDiff, diff
33 
34  // binWidth : time interval
35  // divisor : time unit - for minute case divisor is 60 and for hour case 3600
36  // start_time : initial time when the job started
37  // last_time : the last updated time before calling the current "analyze" function
38  // current_time : the current time inside "analyze" fucntion
39  // binDiff : the bin difference for the current time compared to the bin location of the last time
40  // diff : time difference between the current time and the last time
41 
42  long int diff_current_start = current_time - start_time;
43  long int diff_last_start = last_time - start_time;
44 
45  // --------------------------------------------------
46  // Calculate time interval and bin width
47  // --------------------------------------------------
48 
49  binDiff = diff_current_start/divisor/binWidth - diff_last_start/divisor/binWidth;
50  diff = (current_time - last_time)/divisor;
51 
52  if(diff >= binWidth) {
53  while(diff >= binWidth) diff -= binWidth;
54  }
55 
56  } // calcBins
unsigned long long start_time
Definition: procUtils.cc:98
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 257 of file UtilFunctions.cc.

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

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

257  {
258 
259  // The cloned object, ret should be deleted after using it.
260 
261  TObject* ret = 0;
262 
263  if(!me) return ret;
264 
265  std::string title = histo + " Clone";
266  ret = (TObject*) (me->getRootObject()->Clone(title.c_str()));
267 
268  return ret;
269  }
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:45
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:39
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 
)
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, vdt::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  }
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:919
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:679
x
Definition: VDTMath.h:216
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:56
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, vdt::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 EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
std::pair< int, int > getDCCandSC(EcalScDetId id) const
void Fill(long long x)
Kind kind(void) const
Get the type of the monitor element.
x
Definition: VDTMath.h:216
T get(const Candidate &c)
Definition: component.h:56
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, vdt::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  }
void Fill(long long x)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
x
Definition: VDTMath.h:216
T get(const Candidate &c)
Definition: component.h:56
void ecaldqm::getAverageFromTProfile ( TProfile *  p,
double &  mean,
double &  rms 
)

Definition at line 191 of file UtilFunctions.cc.

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

Referenced by getMeanRms().

191  {
192 
193  // changing arguments : mean, rms
194  mean = rms = 0.0;
195 
196  if(!p) return;
197 
198  int nbins = p->GetXaxis()->GetNbins();
199  double y = 0.0;
200  double y2 = 0.0;
201  for(int i=1; i<=nbins; i++){
202  y += p->GetBinContent(i);
203  y2 += y*y;
204  }
205  mean = y/nbins;
206  rms = std::sqrt(y2/nbins - mean*mean);
207 
208  } // getAverageFromTProfile
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:46
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:56
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 int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:812
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:56
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 int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:812
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:56
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 213 of file UtilFunctions.cc.

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

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

213  {
214 
215  // changing arguments : mean, rms
216 
217  mean = rms = 0.0;
218 
219  if(!cur) return;
220 
221  TString name(cur->IsA()->GetName());
222 
223  if(name.Contains("TProfile")) {
224  getAverageFromTProfile((TProfile*)cur,mean,rms);
225  }
226  else if(name.Contains("TH2")) {
227  if(pre) {
228  mean = ((TH2F*)cur)->GetEntries() - ((TH2F*)pre)->GetEntries();
229  if(mean < 0) return;
230  rms = std::sqrt(mean);
231  }
232  else {
233  mean = ((TH2F*)cur)->GetEntries();
234  if(mean < 0) return;
235  rms = std::sqrt(mean);
236  }
237  float nxybins = ((TH2F*)cur)->GetNbinsX()*((TH2F*)cur)->GetNbinsY();
238  if(nxybins < 1.) nxybins = 1.;
239  mean /= nxybins;
240  rms /= nxybins;
241  }
242  else if(name.Contains("TH1")) {
243  if(pre) {
244  ((TH1F*)pre)->Sumw2();
245  ((TH1F*)pre)->Add((TH1F*)pre,(TH1F*)cur,-1,1);
246  mean = ((TH1F*)pre)->GetMean();
247  rms = ((TH1F*)pre)->GetRMS();
248  }
249  else {
250  mean = ((TH1F*)cur)->GetMean();
251  rms = ((TH1F*)cur)->GetRMS();
252  }
253  }
254 
255  } // getMeanRms
void getAverageFromTProfile(TProfile *p, double &mean, double &rms)
T sqrt(T t)
Definition: SSEVec.h:46
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:45
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
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
CertificationClient* ecaldqm::pCertificationClient ( )
ClusterTask* ecaldqm::pClusterTask ( )
EnergyTask* ecaldqm::pEnergyTask ( )
IntegrityClient* ecaldqm::pIntegrityClient ( )
IntegrityTask* ecaldqm::pIntegrityTask ( )
LaserClient* ecaldqm::pLaserClient ( )
LaserTask* ecaldqm::pLaserTask ( )
LedTask* ecaldqm::pLedTask ( )
OccupancyClient* ecaldqm::pOccupancyClient ( )
OccupancyTask* ecaldqm::pOccupancyTask ( )
PedestalTask* ecaldqm::pPedestalTask ( )
PNIntegrityTask* ecaldqm::pPNIntegrityTask ( )
PNPresampleTask* ecaldqm::pPNPresampleTask ( )
PresampleClient* ecaldqm::pPresampleClient ( )
PresampleTask* ecaldqm::pPresampleTask ( )
RawDataClient* ecaldqm::pRawDataClient ( )
RawDataTask* ecaldqm::pRawDataTask ( )
SelectiveReadoutClient* ecaldqm::pSelectiveReadoutClient ( )
SelectiveReadoutTask* ecaldqm::pSelectiveReadoutTask ( )
SummaryClient* ecaldqm::pSummaryClient ( )
TestPulseTask* ecaldqm::pTestPulseTask ( )
TimingClient* ecaldqm::pTimingClient ( )
TimingTask* ecaldqm::pTimingTask ( )
TowerStatusTask* ecaldqm::pTowerStatusTask ( )
TrigPrimClient* ecaldqm::pTrigPrimClient ( )
TrigPrimTask* ecaldqm::pTrigPrimTask ( )
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
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:679
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:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
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:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
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:679
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:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
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:56
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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:56
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, 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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
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:679
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:56
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, 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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:919
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:56
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, 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  }
int getBinME(MonitorElement *me, const EEDetId &id)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
T get(const Candidate &c)
Definition: component.h:56
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 58 of file UtilFunctions.cc.

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

Referenced by shift2Left(), and shift2Right().

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

References kLeft, and shift().

167  {
168  shift(h, kLeft, bins);
169  }
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 161 of file UtilFunctions.cc.

References kRight, and shift().

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

162  {
163  shift(h, kRight, bins);
164  }
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 173 of file UtilFunctions.cc.

References kLeft, kRight, and pileupCalc::nbins.

174  {
175  if( !h ) return;
176  TAxis *xax = h->GetXaxis();
177  if( h->GetXaxis()->IsVariableBinSize() ) return;
178 
179  double xmax = xax->GetXmax();
180  double xmin = xax->GetXmin();
181  int nbins = xax->GetNbins();
182 
183  if(d == kRight)
184  xax->Set(nbins, xmin - shift, xmax - shift);
185  else if(d == kLeft)
186  xax->Set(nbins, xmin + shift, xmax + shift);
187  }
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:39
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:52
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
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:52
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
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

SetWorker ecaldqm::CertificationClientInstance("CertificationClient", pCertificationClient)
SetWorker ecaldqm::ClusterTaskInstance("ClusterTask", pClusterTask)
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(), FWTableView::setFrom(), and TotemSD::TotemSD().

const std::set<unsigned> ecaldqm::dccNoMEM
const EcalElectronicsMapping* ecaldqm::electronicsMap
SetWorker ecaldqm::EnergyTaskInstance("EnergyTask", pEnergyTask)
SetWorker ecaldqm::IntegrityClientInstance("IntegrityClient", pIntegrityClient)
SetWorker ecaldqm::IntegrityTaskInstance("IntegrityTask", pIntegrityTask)
SetWorker ecaldqm::LaserClientInstance("LaserClient", pLaserClient)
SetWorker ecaldqm::LaserTaskInstance("LaserTask", pLaserTask)
SetWorker ecaldqm::LedTaskInstance("LedTask", pLedTask)
unsigned ecaldqm::nomemarr[] = {kEEm09, kEEm01, kEEm04, kEEm05, kEEm06, kEEp09, kEEp01, kEEp04, kEEp05, kEEp06}

Definition at line 7 of file EcalDQMCommonUtils.cc.

SetWorker ecaldqm::OccupancyClientInstance("OccupancyClient", pOccupancyClient)
SetWorker ecaldqm::OccupancyTaskInstance("OccupancyTask", pOccupancyTask)
SetWorker ecaldqm::PedestalTaskInstance("PedestalTask", pPedestalTask)
SetWorker ecaldqm::PNIntegrityTaskInstance("PNIntegrityTask", pPNIntegrityTask)
SetWorker ecaldqm::PNPresampleTaskInstance("PNPresampleTask", pPNPresampleTask)
SetWorker ecaldqm::PresampleClientInstance("PresampleClient", pPresampleClient)
SetWorker ecaldqm::PresampleTaskInstance("PresampleTask", pPresampleTask)
SetWorker ecaldqm::RawDataClientInstance("RawDataClient", pRawDataClient)
SetWorker ecaldqm::RawDataTaskInstance("RawDataTask", pRawDataTask)
SetWorker ecaldqm::SelectiveReadoutClientInstance("SelectiveReadoutClient", pSelectiveReadoutClient)
SetWorker ecaldqm::SelectiveReadoutTaskInstance("SelectiveReadoutTask", pSelectiveReadoutTask)
SetWorker ecaldqm::SummaryClientInstance("SummaryClient", pSummaryClient)
SetWorker ecaldqm::TestPulseTaskInstance("TestPulseTask", pTestPulseTask)
SetWorker ecaldqm::TimingClientInstance("TimingClient", pTimingClient)
SetWorker ecaldqm::TimingTaskInstance("TimingTask", pTimingTask)
SetWorker ecaldqm::TowerStatusTaskInstance("TowerStatusTask", pTowerStatusTask)
SetWorker ecaldqm::TrigPrimClientInstance("TrigPrimClient", pTrigPrimClient)
SetWorker ecaldqm::TrigPrimTaskInstance("TrigPrimTask", pTrigPrimTask)
const EcalTrigTowerConstituentsMap* ecaldqm::trigtowerMap