48 if(
object.
IsA()->InheritsFrom(
"TH2" ) ) {
50 int dimension =
histogram->GetDimension();
52 throw dqm_core::BadConfig( ERS_HERE,
name,
"dimension != 2 " );
55 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH2" );
63 const int nYBins =
histogram -> GetNbinsY();
78 colflags[0] = ((colflags[0] > 0) && (colflags[0] <= nXBins)) ? colflags[0] : 1;
79 colflags[1] = ((colflags[1] >= colflags[0]) && (colflags[1] <= nXBins)) ? colflags[1] : nXBins;
80 colflags[2] = ((colflags[2] > 0) && (colflags[2] <= nXBins)) ? colflags[2] : 1;
81 colflags[3] = ((colflags[3] >= colflags[2]) && (colflags[3] <= nXBins)) ? colflags[3] : nXBins;
82 bool yellowFlagComp =
false, redFlagComp =
false;
83 int ycnt = 0, rcnt = 0;
86 float epsilon = 1.e-3;
88 for(
int j = colflags[0]; j <= colflags[1]; j++ ) {
89 TString binLabel =
histogram->GetXaxis()->GetBinLabel(j);
90 TH1D *hprojy =
histogram->ProjectionY(Form(
"hpy1yf%02d_%s",j,binLabel.Data()),j,j+1,
"egoff");
92 float uflow = std::abs(hprojy->GetBinContent(0));
93 float oflow = std::abs(hprojy->GetBinContent(nYBins+1));
94 float btotal = hprojy->Integral();
98 if(((uflow > epsilon) || (oflow > epsilon)) && (btotal < epsilon)) {
99 yellowFlagComp =
true;
103 delete hprojy; hprojy = 0;
110 for(
int j = colflags[2]; j <= colflags[3]; j++ ) {
111 TString binLabel =
histogram->GetXaxis()->GetBinLabel(j);
112 TH1D *hprojy =
histogram->ProjectionY(Form(
"hpy1rf%02d_%s",j,binLabel.Data()),j,j+1,
"egoff");
114 float uflow = std::abs(hprojy->GetBinContent(0));
115 float oflow = std::abs(hprojy->GetBinContent(nYBins+1));
116 float btotal = hprojy->Integral();
119 if(((uflow > epsilon) || (oflow > epsilon)) && (btotal < epsilon)) {
123 delete hprojy; hprojy = 0;
130 if(doflags[0] && yellowFlagComp) {
131 result->status_ = dqm_core::Result::Yellow;
133 if(doflags[1] && redFlagComp) {
136 result->tags_[
"YellowMETComponents"] = ycnt;
137 result->tags_[
"RedMETComponents"] = rcnt;