1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#ifndef DQM_CASTORMONITOR_CASTORDIGIMONITOR_H
#define DQM_CASTORMONITOR_CASTORDIGIMONITOR_H
#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
#include "CalibFormats/CastorObjects/interface/CastorCoderDb.h"
#include "CalibFormats/CastorObjects/interface/CastorDbService.h"
#include "CondFormats/CastorObjects/interface/CastorPedestal.h"
#include "CondFormats/CastorObjects/interface/CastorPedestalWidth.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "FWCore/Common/interface/TriggerNames.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "CondFormats/CastorObjects/interface/CastorChannelQuality.h"
#include "CondFormats/DataRecord/interface/CastorChannelQualityRcd.h"
//#include "FWCore/Framework/interface/Run.h"
class CastorDigiMonitor {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
CastorDigiMonitor(const edm::ParameterSet &ps, edm::ConsumesCollector &&);
~CastorDigiMonitor();
void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &);
void processEvent(edm::Event const &event,
const CastorDigiCollection &cast,
const edm::TriggerResults &trig,
const CastorDbService &cond);
void endRun();
void getDbData(const edm::EventSetup &);
int ModSecToIndex(int module, int sector);
void fillTrigRes(edm::Event const &event, const edm::TriggerResults &TrigResults, double Etot);
private:
edm::ESGetToken<CastorChannelQuality, CastorChannelQualityRcd> castorChannelQualityToken_;
std::string subsystemname_;
int fVerbosity;
int ievt_;
float Qrms_DEAD;
MonitorElement *hBX, *hpBXtrig;
MonitorElement *hpTrigRes;
MonitorElement *h2QrmsTSvsCh;
MonitorElement *hQIErms[10];
MonitorElement *hTSratio;
MonitorElement *h2TSratio;
MonitorElement *h2status;
MonitorElement *h2digierr;
MonitorElement *h2repsum;
MonitorElement *h2qualityMap;
MonitorElement *hReport;
MonitorElement *h2QmeantsvsCh;
MonitorElement *h2QmeanMap;
MonitorElement *hModule;
MonitorElement *hSector;
MonitorElement *hdigisize;
MonitorElement *h2towEMvsHAD;
MonitorElement *htowE;
int TS_MAX = 10;
float RatioThresh1 = 0.;
float QIEerrThreshold = 0.0001;
double QrmsTS[224][10], QmeanTS[224][10];
const int TSped = 0;
};
#endif
|