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",
199 std::vector<int> errorflag_per_event[2][2];
200 std::vector<int> errorflag_per_event_oot[2][2];
201 for (
int isZS = 0; isZS <= 1; ++isZS) {
204 errorflag_per_event_oot[isZS][
isHF] = std::vector<int>(
kNErrorFlag, 0);
208 for (
int isZS = 0; isZS <= 1; ++isZS) {
216 data_tp != data_tp_col->end();
218 int ieta = data_tp->id().ieta();
219 int iphi = data_tp->id().iphi();
220 int isHF = data_tp->id().ietaAbs() >= 29 ? 1 : 0;
224 if (data_tp->SOI_compressedEt() > 0) {
241 if (emul_tp == emul_tp_col->end()) {
243 bool pass_ZS_OOT =
true;
245 for (
int i=0;
i<data_tp->size(); ++
i) {
247 int dataEt(data_tp->sample(
i).compressedEt());
267 else if(
abs(ieta) <= 28)
275 int dataEt(data_tp->sample(
i).compressedEt());
296 bool mismatchedEt_noZS =
false;
297 bool mismatchedEt_ZS =
false;
298 bool mismatchedFG_noZS =
false;
299 bool mismatchedFG_ZS =
false;
301 bool mismatchedEt_OOT_noZS =
false;
302 bool mismatchedEt_OOT_ZS =
false;
303 bool mismatchedFG_OOT_noZS =
false;
304 bool mismatchedFG_OOT_ZS =
false;
306 for (
int i=0;
i<data_tp->size(); ++
i) {
307 int dataEt(data_tp->sample(
i).compressedEt());
308 int dataFG(data_tp->sample(
i).fineGrain());
309 int emulEt(emul_tp->sample(
i).compressedEt());
310 int emulFG(emul_tp->sample(
i).fineGrain());
312 int diff =
abs(dataEt - emulEt);
313 bool fill_corr_ZS =
true;
314 bool fill_corr_OOT_ZS =
true;
320 if (dataFG != emulFG) {
322 mismatchedFG_noZS =
true;
328 fill_corr_ZS =
false;
331 mismatchedFG_ZS =
true;
336 mismatchedFG_OOT_noZS =
true;
342 fill_corr_OOT_ZS =
false;
345 mismatchedFG_OOT_ZS =
true;
353 mismatchedEt_noZS =
true;
356 mismatchedEt_ZS =
true;
357 fill_corr_ZS =
false;
361 mismatchedEt_OOT_noZS =
true;
364 mismatchedEt_OOT_ZS =
true;
365 fill_corr_OOT_ZS =
false;
384 if (fill_corr_OOT_ZS) {
392 if (mismatchedEt_noZS) {
396 if (mismatchedEt_ZS) {
400 if (mismatchedFG_noZS) {
404 if (mismatchedFG_ZS) {
408 if (mismatchedEt_noZS || mismatchedFG_noZS)
412 if (mismatchedEt_ZS || mismatchedFG_ZS) {
419 else if(
abs(ieta) <= 28)
429 if (mismatchedEt_OOT_noZS) {
433 if (mismatchedEt_OOT_ZS) {
437 if (mismatchedFG_noZS) {
441 if (mismatchedFG_OOT_ZS) {
445 if (mismatchedEt_OOT_noZS || mismatchedFG_OOT_noZS)
449 if (mismatchedEt_OOT_ZS || mismatchedFG_OOT_ZS) {
461 emul_tp != emul_tp_col->end();
463 int ieta(emul_tp->id().ieta());
464 int iphi(emul_tp->id().iphi());
465 int isHF = emul_tp->id().ietaAbs() >= 29 ? 1 : 0;
468 if (data_tp == data_tp_col->end()) {
470 bool pass_OOT_ZS =
true;
472 for (
int i=0;
i<emul_tp->size(); ++
i) {
473 int emulEt(emul_tp->sample(
i).compressedEt());
494 else if(
abs(ieta) <= 28)
523 for (
int isZS = 0; isZS <= 1; ++isZS) {
526 if (errorflag_per_event[isZS][
isHF][
i] > 0)
528 if (errorflag_per_event_oot[isZS][
isHF][
i] > 0)
592 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
595 return ib.
book2D(name, name, 65, -32.5, 32.5, 72, 0.5, 72.5);
600 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
615 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
626 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
637 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
641 return ib.
book2D(name, title, 65, -32.5, 32.5, 72, 0.5, 72.5);
646 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
649 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]