5 dataLabel_(ps.getParameter<edm::InputTag>(
"dataLabel")),
6 emulLabel_(ps.getParameter<edm::InputTag>(
"emulLabel")),
7 ZSBadTPThreshold_(ps.getParameter< std::vector<int> >(
"ZSBadTPThreshold")),
8 ZSAlarmThreshold_(ps.getParameter< std::vector<int> >(
"ZSAlarmThreshold"))
15 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
16 prefixME_.append(
"/");
52 for (
int isZS = 0; isZS <= 1; ++isZS) {
63 problem_folder +=
"Problem TPs/";
91 for (
int isZS = 0; isZS <= 1; ++isZS) {
102 problem_folder +=
"Problem OOT TPs/";
131 "TotalBadTPs_HCAL_vs_LS",
132 "Total Number of Bad HCAL TPs vs lumi section",
136 "TotalBadTPs_HB_vs_LS",
137 "Total Number of Bad HB TPs vs lumi section",
141 "TotalBadTPs_HE_vs_LS",
142 "Total Number of Bad HE TPs vs lumi section",
146 "TotalBadTPs_HF_vs_LS",
147 "Total Number of Bad HF TPs vs lumi section",
152 "TotalBadTPs_HO_vs_LS",
153 "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 dbe_->
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 dbe_->
book2D(name, title, 65, -32.5, 32.5, 72, 0.5, 72.5);
648 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
MonitorElement * bad_tps_oot[2]
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)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * good_tps_oot[2]
MonitorElement * ProblemsVsLB_HF
#define DEFINE_FWK_MODULE(type)
std::map< ErrorFlag, MonitorElement * > problem_et_oot[2][2]
std::vector< int > AllowedCalibTypes_
std::vector< T >::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
MonitorElement * create_fg_correlation(const std::string &folder, const std::string &name)
MonitorElement * create_tp_correlation(const std::string &folder, const std::string &name)
MonitorElement * fg_corr_oot[2][2]
LuminosityBlockNumber_t luminosityBlock() const
std::map< ErrorFlag, MonitorElement * > problem_et[2][2]
MonitorElement * errorflag_oot[2]
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
bool IsAllowedCalibType()
const T & max(const T &a, const T &b)
MonitorElement * ProblemsVsLB_HB
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
std::vector< int > ZSBadTPThreshold_
MonitorElement * good_tps[2]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * create_et_histogram(const std::string &folder, const std::string &name)
MonitorElement * create_errorflag(const std::string &folder, const std::string &name)
MonitorElement * TPOccupancyPhiHFP_
MonitorElement * fg_corr[2][2]
bool isHF(int etabin, int depth)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * ProblemsVsLB_HE
std::map< ErrorFlag, MonitorElement * > problem_map_oot[2]
HcalTrigPrimMonitor(const edm::ParameterSet &ps)
TProfile * getTProfile(void) const
MonitorElement * tp_corr_oot[2][2]
MonitorElement * create_map(const std::string &folder, const std::string &name)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
MonitorElement * bad_tps[2]
MonitorElement * TPOccupancyPhi_
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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)
std::vector< int > ZSAlarmThreshold_
void setCurrentFolder(const std::string &fullpath)
std::map< ErrorFlag, MonitorElement * > problem_map[2]
MonitorElement * tp_corr[2][2]
MonitorElement * create_summary(const std::string &folder, const std::string &name)