53 const TObject&
object,
54 const dqm_core::AlgorithmConfig&
config )
58 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
61 throw dqm_core::BadConfig( ERS_HERE, name,
"dimension > 2 " );
64 throw dqm_core::BadConfig( ERS_HERE, name,
"does not inherit from TH1" );
75 if (greaterthan && lessthan) {
76 ERS_INFO(
"Both GreaterThan and LessThan parameters set: Will check for for both");
81 if (
histogram->GetEntries() < minstat ) {
82 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
97 catch( dqm_core::Exception & ex ) {
98 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
101 TH1* resulthisto =
nullptr;
104 }
else if (
histogram->InheritsFrom(
"TH1")) {
107 throw dqm_core::BadConfig( ERS_HERE, name,
"does not inherit from TH1" );
110 resulthisto->Reset();
114 std::vector<int> LBs;
115 dqm_core::Result*
result =
new dqm_core::Result();
117 for (
int k = range[0]; k <= range[1]; ++k ) {
118 for (
int l = range[2]; l <= range[3]; ++l ) {
119 double inputcont =
histogram->GetBinContent(k,l);
120 double inputerr =
histogram->GetBinError(k,l);
121 double diff=inputcont - bin_threshold;
122 if (inputcont == ignoreval)
continue;
124 double sigma=
diff/inputerr;
125 if (greaterthan &&
diff < 0. )
continue;
126 if (lessthan &&
diff > 0. )
continue;
127 if ( (std::abs(sigma) > nsigmas) && (std::abs(
diff) > maxdiffabs) ) {
128 resulthisto->SetBinContent(k,l,inputcont);
130 if (publish && (
int)LBs.size() < maxpublish){
139 int count = LBs.size();
142 result->object_ = boost::shared_ptr<TObject>(resulthisto);
144 ERS_DEBUG(1,
"Number of bins " << nsigmas <<
" Sigma away from average of "<< bin_threshold <<
" is " <<
count);
145 ERS_DEBUG(1,
"Green threshold: "<< gthreshold <<
" bin(s); Red threshold : " << rthreshold <<
" bin(s) ");
147 if (
count <= gthreshold ) {
148 result->status_ = dqm_core::Result::Green;
149 }
else if (
count < rthreshold ) {
150 result->status_ = dqm_core::Result::Yellow;
152 result->status_ = dqm_core::Result::Red;
static dqm_algorithms::BinContentComp myInstance
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.