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",
201 std::vector<int> errorflag_per_event[2][2];
202 std::vector<int> errorflag_per_event_oot[2][2];
203 for (
int isZS = 0; isZS <= 1; ++isZS) {
206 errorflag_per_event_oot[isZS][
isHF] = std::vector<int>(
kNErrorFlag, 0);
210 for (
int isZS = 0; isZS <= 1; ++isZS) {
218 data_tp != data_tp_col->end();
220 int ieta = data_tp->id().ieta();
221 int iphi = data_tp->id().iphi();
222 int isHF = data_tp->id().ietaAbs() >= 29 ? 1 : 0;
226 if (data_tp->SOI_compressedEt() > 0) {
243 if (emul_tp == emul_tp_col->end()) {
245 bool pass_ZS_OOT =
true;
247 for (
int i=0;
i<data_tp->size(); ++
i) {
249 int dataEt(data_tp->sample(
i).compressedEt());
269 else if(
abs(ieta) <= 28)
277 int dataEt(data_tp->sample(
i).compressedEt());
298 bool mismatchedEt_noZS =
false;
299 bool mismatchedEt_ZS =
false;
300 bool mismatchedFG_noZS =
false;
301 bool mismatchedFG_ZS =
false;
303 bool mismatchedEt_OOT_noZS =
false;
304 bool mismatchedEt_OOT_ZS =
false;
305 bool mismatchedFG_OOT_noZS =
false;
306 bool mismatchedFG_OOT_ZS =
false;
308 for (
int i=0;
i<data_tp->size(); ++
i) {
309 int dataEt(data_tp->sample(
i).compressedEt());
310 int dataFG(data_tp->sample(
i).fineGrain());
311 int emulEt(emul_tp->sample(
i).compressedEt());
312 int emulFG(emul_tp->sample(
i).fineGrain());
314 int diff =
abs(dataEt - emulEt);
315 bool fill_corr_ZS =
true;
316 bool fill_corr_OOT_ZS =
true;
322 if (dataFG != emulFG) {
324 mismatchedFG_noZS =
true;
330 fill_corr_ZS =
false;
333 mismatchedFG_ZS =
true;
338 mismatchedFG_OOT_noZS =
true;
344 fill_corr_OOT_ZS =
false;
347 mismatchedFG_OOT_ZS =
true;
355 mismatchedEt_noZS =
true;
358 mismatchedEt_ZS =
true;
359 fill_corr_ZS =
false;
363 mismatchedEt_OOT_noZS =
true;
366 mismatchedEt_OOT_ZS =
true;
367 fill_corr_OOT_ZS =
false;
386 if (fill_corr_OOT_ZS) {
394 if (mismatchedEt_noZS) {
398 if (mismatchedEt_ZS) {
402 if (mismatchedFG_noZS) {
406 if (mismatchedFG_ZS) {
410 if (mismatchedEt_noZS || mismatchedFG_noZS)
414 if (mismatchedEt_ZS || mismatchedFG_ZS) {
421 else if(
abs(ieta) <= 28)
431 if (mismatchedEt_OOT_noZS) {
435 if (mismatchedEt_OOT_ZS) {
439 if (mismatchedFG_noZS) {
443 if (mismatchedFG_OOT_ZS) {
447 if (mismatchedEt_OOT_noZS || mismatchedFG_OOT_noZS)
451 if (mismatchedEt_OOT_ZS || mismatchedFG_OOT_ZS) {
463 emul_tp != emul_tp_col->end();
465 int ieta(emul_tp->id().ieta());
466 int iphi(emul_tp->id().iphi());
467 int isHF = emul_tp->id().ietaAbs() >= 29 ? 1 : 0;
470 if (data_tp == data_tp_col->end()) {
472 bool pass_OOT_ZS =
true;
474 for (
int i=0;
i<emul_tp->size(); ++
i) {
475 int emulEt(emul_tp->sample(
i).compressedEt());
496 else if(
abs(ieta) <= 28)
525 for (
int isZS = 0; isZS <= 1; ++isZS) {
528 if (errorflag_per_event[isZS][
isHF][
i] > 0)
530 if (errorflag_per_event_oot[isZS][
isHF][
i] > 0)
594 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
597 return ib.
book2D(name, name, 65, -32.5, 32.5, 72, 0.5, 72.5);
602 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
617 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
628 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
639 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
643 return ib.
book2D(name, title, 65, -32.5, 32.5, 72, 0.5, 72.5);
648 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
651 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_
std::map< ErrorFlag, MonitorElement * > problem_map[2]
MonitorElement * tp_corr[2][2]