6 dataLabel_(ps.getParameter<edm::
InputTag>(
"dataLabel")),
7 emulLabel_(ps.getParameter<edm::
InputTag>(
"emulLabel")),
8 ZSBadTPThreshold_(ps.getParameter< std::vector<int> >(
"ZSBadTPThreshold")),
9 ZSAlarmThreshold_(ps.getParameter< std::vector<int> >(
"ZSAlarmThreshold"))
16 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
17 prefixME_.append(
"/");
53 for (
int isZS = 0; isZS <= 1; ++isZS) {
64 problem_folder +=
"Problem TPs/";
92 for (
int isZS = 0; isZS <= 1; ++isZS) {
103 problem_folder +=
"Problem OOT TPs/";
120 =
create_et_histogram(ib,problem_folder +
"TP Values/", subdet +
"OOT Mismatched FG"+zsname);
123 =
create_et_histogram(ib,problem_folder +
"TP Values/", subdet +
"OOT Missing Data"+zsname);
126 =
create_et_histogram(ib,problem_folder +
"TP Values/", subdet +
"OOT Missing Emul"+zsname);
132 "TotalBadTPs_HCAL_vs_LS",
133 "Total Number of Bad HCAL TPs vs lumi section",
137 "TotalBadTPs_HB_vs_LS",
138 "Total Number of Bad HB TPs vs lumi section",
142 "TotalBadTPs_HE_vs_LS",
143 "Total Number of Bad HE TPs vs lumi section",
147 "TotalBadTPs_HF_vs_LS",
148 "Total Number of Bad HF TPs vs lumi section",
153 "TotalBadTPs_HO_vs_LS",
154 "Total Number of Bad HO TPs vs lumi section",
202 std::vector<int> errorflag_per_event[2][2];
203 std::vector<int> errorflag_per_event_oot[2][2];
204 for (
int isZS = 0; isZS <= 1; ++isZS) {
207 errorflag_per_event_oot[isZS][
isHF] = std::vector<int>(
kNErrorFlag, 0);
211 for (
int isZS = 0; isZS <= 1; ++isZS) {
219 data_tp != data_tp_col->end();
221 int ieta = data_tp->id().ieta();
222 int iphi = data_tp->id().iphi();
223 int isHF = data_tp->id().ietaAbs() >= 29 ? 1 : 0;
226 if (data_tp->id().depth()==1)
230 if (data_tp->SOI_compressedEt() > 0) {
249 data_tp->id().ieta(), data_tp->id().iphi(),
251 if (emul_tp == emul_tp_col->end()) {
253 bool pass_ZS_OOT =
true;
255 for (
int i=0;
i<data_tp->size(); ++
i) {
257 int dataEt(data_tp->sample(
i).compressedEt());
277 else if(
abs(ieta) <= 28)
285 int dataEt(data_tp->sample(
i).compressedEt());
306 bool mismatchedEt_noZS =
false;
307 bool mismatchedEt_ZS =
false;
308 bool mismatchedFG_noZS =
false;
309 bool mismatchedFG_ZS =
false;
311 bool mismatchedEt_OOT_noZS =
false;
312 bool mismatchedEt_OOT_ZS =
false;
313 bool mismatchedFG_OOT_noZS =
false;
314 bool mismatchedFG_OOT_ZS =
false;
316 for (
int i=0;
i<data_tp->size(); ++
i) {
317 int dataEt(data_tp->sample(
i).compressedEt());
318 int dataFG(data_tp->sample(
i).fineGrain());
319 int emulEt(emul_tp->sample(
i).compressedEt());
320 int emulFG(emul_tp->sample(
i).fineGrain());
322 int diff =
abs(dataEt - emulEt);
323 bool fill_corr_ZS =
true;
324 bool fill_corr_OOT_ZS =
true;
330 if (dataFG != emulFG) {
332 mismatchedFG_noZS =
true;
338 fill_corr_ZS =
false;
341 mismatchedFG_ZS =
true;
346 mismatchedFG_OOT_noZS =
true;
352 fill_corr_OOT_ZS =
false;
355 mismatchedFG_OOT_ZS =
true;
363 mismatchedEt_noZS =
true;
366 mismatchedEt_ZS =
true;
367 fill_corr_ZS =
false;
371 mismatchedEt_OOT_noZS =
true;
374 mismatchedEt_OOT_ZS =
true;
375 fill_corr_OOT_ZS =
false;
394 if (fill_corr_OOT_ZS) {
402 if (mismatchedEt_noZS) {
406 if (mismatchedEt_ZS) {
410 if (mismatchedFG_noZS) {
414 if (mismatchedFG_ZS) {
418 if (mismatchedEt_noZS || mismatchedFG_noZS)
422 if (mismatchedEt_ZS || mismatchedFG_ZS) {
429 else if(
abs(ieta) <= 28)
439 if (mismatchedEt_OOT_noZS) {
443 if (mismatchedEt_OOT_ZS) {
447 if (mismatchedFG_noZS) {
451 if (mismatchedFG_OOT_ZS) {
455 if (mismatchedEt_OOT_noZS || mismatchedFG_OOT_noZS)
459 if (mismatchedEt_OOT_ZS || mismatchedFG_OOT_ZS) {
471 emul_tp != emul_tp_col->end();
473 int ieta(emul_tp->id().ieta());
474 int iphi(emul_tp->id().iphi());
475 int isHF = emul_tp->id().ietaAbs() >= 29 ? 1 : 0;
480 emul_tp->id().ieta(), emul_tp->id().iphi(),
482 if (data_tp == data_tp_col->end()) {
484 bool pass_OOT_ZS =
true;
486 for (
int i=0;
i<emul_tp->size(); ++
i) {
487 int emulEt(emul_tp->sample(
i).compressedEt());
508 else if(
abs(ieta) <= 28)
537 for (
int isZS = 0; isZS <= 1; ++isZS) {
540 if (errorflag_per_event[isZS][
isHF][
i] > 0)
542 if (errorflag_per_event_oot[isZS][
isHF][
i] > 0)
606 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
609 return ib.
book2D(name, name, 65, -32.5, 32.5, 72, 0.5, 72.5);
614 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
629 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
640 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
651 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
655 return ib.
book2D(name, title, 65, -32.5, 32.5, 72, 0.5, 72.5);
660 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
663 return ib.
book1D(name, name, 256, 0, 256);
MonitorElement * bad_tps_oot[2]
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emu_
MonitorElement * TPOccupancy_
T getUntrackedParameter(std::string const &, T const &) const
void processEvent(const edm::Handle< HcalTrigPrimDigiCollection > &data_tp_col, const edm::Handle< HcalTrigPrimDigiCollection > &emul_tp_col)
bool LumiInOrder(int lumisec)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * ProblemsCurrentLB
MonitorElement * TPOccupancyPhiHFM_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * bookProfile(Args &&...args)
MonitorElement * good_tps_oot[2]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * ProblemsVsLB_HF
#define DEFINE_FWK_MODULE(type)
std::map< ErrorFlag, MonitorElement * > problem_et_oot[2][2]
std::vector< int > AllowedCalibTypes_
virtual void cleanup(void)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
std::vector< HcalTriggerPrimitiveDigi >::const_iterator const_iterator
MonitorElement * TPOccupancyEta_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_data_
void bookHistograms(DQMStore::IBooker &ib, const edm::Run &run, const edm::EventSetup &c)
MonitorElement * fg_corr_oot[2][2]
LuminosityBlockNumber_t luminosityBlock() const
std::map< ErrorFlag, MonitorElement * > problem_et[2][2]
MonitorElement * errorflag_oot[2]
bool IsAllowedCalibType()
MonitorElement * ProblemsVsLB_HB
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
std::vector< int > ZSBadTPThreshold_
MonitorElement * good_tps[2]
MonitorElement * create_summary(DQMStore::IBooker &ib, const std::string &folder, const std::string &name)
MonitorElement * create_map(DQMStore::IBooker &ib, const std::string &folder, const std::string &name)
MonitorElement * create_errorflag(DQMStore::IBooker &ib, const std::string &folder, const std::string &name)
MonitorElement * create_et_histogram(DQMStore::IBooker &ib, const std::string &folder, const std::string &name)
MonitorElement * create_fg_correlation(DQMStore::IBooker &ib, const std::string &folder, const std::string &name)
MonitorElement * TPOccupancyPhiHFP_
MonitorElement * fg_corr[2][2]
bool isHF(int etabin, int depth)
void setCurrentFolder(const std::string &fullpath)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * book2D(Args &&...args)
MonitorElement * ProblemsVsLB_HE
void setup(DQMStore::IBooker &)
MonitorElement * create_tp_correlation(DQMStore::IBooker &ib, const std::string &folder, const std::string &name)
std::map< ErrorFlag, MonitorElement * > problem_map_oot[2]
HcalTrigPrimMonitor(const edm::ParameterSet &ps)
TProfile * getTProfile(void) const
MonitorElement * tp_corr_oot[2][2]
MonitorElement * bad_tps[2]
MonitorElement * TPOccupancyPhi_
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * errorflag[2]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
virtual void setup(DQMStore::IBooker &)
std::vector< int > ZSAlarmThreshold_
tuple folder
Histograms Source for live online DQM in P5
std::map< ErrorFlag, MonitorElement * > problem_map[2]
MonitorElement * tp_corr[2][2]