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(
"/");
55 for (
int isZS = 0; isZS <= 1; ++isZS) {
66 problem_folder +=
"Problem TPs/";
94 for (
int isZS = 0; isZS <= 1; ++isZS) {
105 problem_folder +=
"Problem OOT TPs/";
134 "TotalBadTPs_HCAL_vs_LS",
135 "Total Number of Bad HCAL TPs vs lumi section",
139 "TotalBadTPs_HB_vs_LS",
140 "Total Number of Bad HB TPs vs lumi section",
144 "TotalBadTPs_HE_vs_LS",
145 "Total Number of Bad HE TPs vs lumi section",
149 "TotalBadTPs_HF_vs_LS",
150 "Total Number of Bad HF TPs vs lumi section",
155 "TotalBadTPs_HO_vs_LS",
156 "Total Number of Bad HO TPs vs lumi section",
204 std::vector<int> errorflag_per_event[2][2];
205 std::vector<int> errorflag_per_event_oot[2][2];
206 for (
int isZS = 0; isZS <= 1; ++isZS) {
209 errorflag_per_event_oot[isZS][
isHF] = std::vector<int>(
kNErrorFlag, 0);
213 for (
int isZS = 0; isZS <= 1; ++isZS) {
221 data_tp != data_tp_col->end();
223 int ieta = data_tp->id().ieta();
224 int iphi = data_tp->id().iphi();
225 int isHF = data_tp->id().ietaAbs() >= 29 ? 1 : 0;
229 if (data_tp->SOI_compressedEt() > 0) {
246 if (emul_tp == emul_tp_col->end()) {
248 bool pass_ZS_OOT =
true;
250 for (
int i=0;
i<data_tp->size(); ++
i) {
252 int dataEt(data_tp->sample(
i).compressedEt());
272 else if(
abs(ieta) <= 28)
280 int dataEt(data_tp->sample(
i).compressedEt());
301 bool mismatchedEt_noZS =
false;
302 bool mismatchedEt_ZS =
false;
303 bool mismatchedFG_noZS =
false;
304 bool mismatchedFG_ZS =
false;
306 bool mismatchedEt_OOT_noZS =
false;
307 bool mismatchedEt_OOT_ZS =
false;
308 bool mismatchedFG_OOT_noZS =
false;
309 bool mismatchedFG_OOT_ZS =
false;
311 for (
int i=0;
i<data_tp->size(); ++
i) {
312 int dataEt(data_tp->sample(
i).compressedEt());
313 int dataFG(data_tp->sample(
i).fineGrain());
314 int emulEt(emul_tp->sample(
i).compressedEt());
315 int emulFG(emul_tp->sample(
i).fineGrain());
317 int diff =
abs(dataEt - emulEt);
318 bool fill_corr_ZS =
true;
319 bool fill_corr_OOT_ZS =
true;
325 if (dataFG != emulFG) {
327 mismatchedFG_noZS =
true;
333 fill_corr_ZS =
false;
336 mismatchedFG_ZS =
true;
341 mismatchedFG_OOT_noZS =
true;
347 fill_corr_OOT_ZS =
false;
350 mismatchedFG_OOT_ZS =
true;
358 mismatchedEt_noZS =
true;
361 mismatchedEt_ZS =
true;
362 fill_corr_ZS =
false;
366 mismatchedEt_OOT_noZS =
true;
369 mismatchedEt_OOT_ZS =
true;
370 fill_corr_OOT_ZS =
false;
389 if (fill_corr_OOT_ZS) {
397 if (mismatchedEt_noZS) {
401 if (mismatchedEt_ZS) {
405 if (mismatchedFG_noZS) {
409 if (mismatchedFG_ZS) {
413 if (mismatchedEt_noZS || mismatchedFG_noZS)
417 if (mismatchedEt_ZS || mismatchedFG_ZS) {
424 else if(
abs(ieta) <= 28)
434 if (mismatchedEt_OOT_noZS) {
438 if (mismatchedEt_OOT_ZS) {
442 if (mismatchedFG_noZS) {
446 if (mismatchedFG_OOT_ZS) {
450 if (mismatchedEt_OOT_noZS || mismatchedFG_OOT_noZS)
454 if (mismatchedEt_OOT_ZS || mismatchedFG_OOT_ZS) {
466 emul_tp != emul_tp_col->end();
468 int ieta(emul_tp->id().ieta());
469 int iphi(emul_tp->id().iphi());
470 int isHF = emul_tp->id().ietaAbs() >= 29 ? 1 : 0;
473 if (data_tp == data_tp_col->end()) {
475 bool pass_OOT_ZS =
true;
477 for (
int i=0;
i<emul_tp->size(); ++
i) {
478 int emulEt(emul_tp->sample(
i).compressedEt());
499 else if(
abs(ieta) <= 28)
528 for (
int isZS = 0; isZS <= 1; ++isZS) {
531 if (errorflag_per_event[isZS][
isHF][
i] > 0)
533 if (errorflag_per_event_oot[isZS][
isHF][
i] > 0)
597 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
600 return dbe_->
book2D(name, name, 65, -32.5, 32.5, 72, 0.5, 72.5);
605 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
620 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
631 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
642 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
646 return dbe_->
book2D(name, title, 65, -32.5, 32.5, 72, 0.5, 72.5);
651 edm::LogInfo(
"HcalTrigPrimMonitor") <<
"Creating MonitorElement " << name <<
" in folder " << folder <<
"\n";
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)
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]
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_
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
MonitorElement * create_fg_correlation(const std::string &folder, const std::string &name)
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_data_
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()
MonitorElement * ProblemsVsLB_HB
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
Abs< T >::type abs(const T &t)
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")
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)