#include <ZDCTestConstantVsLB.h>
Definition at line 16 of file ZDCTestConstantVsLB.h.
◆ ZDCTestConstantVsLB()
dqm_algorithms::ZDCTestConstantVsLB::ZDCTestConstantVsLB |
( |
| ) |
|
◆ ~ZDCTestConstantVsLB()
dqm_algorithms::ZDCTestConstantVsLB::~ZDCTestConstantVsLB |
( |
| ) |
|
|
virtual |
◆ clone()
dqm_core::Algorithm * dqm_algorithms::ZDCTestConstantVsLB::clone |
( |
| ) |
|
|
virtual |
◆ execute()
dqm_core::Result * dqm_algorithms::ZDCTestConstantVsLB::execute |
( |
const std::string & |
name, |
|
|
const TObject & |
data, |
|
|
const dqm_core::AlgorithmConfig & |
config |
|
) |
| |
|
virtual |
Definition at line 66 of file ZDCTestConstantVsLB.cxx.
74 if(
object.
IsA()->InheritsFrom(
"TH2" ) ) {
77 throw dqm_core::BadConfig( ERS_HERE,
name,
"dimension > 2 " );
80 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH2" );
84 TH1 *projection =
histogram->ProjectionX(
"projection");
85 int Xbins =
histogram->GetXaxis()->GetNbins();
92 bool yellowflag =
false;
93 bool greenflag =
true;
95 TGraphErrors* ge =
new TGraphErrors;
99 if (projection->GetBinContent(
ilb+1) >= minstat)
107 TFitResultPtr fit_res = ge->Fit(
"pol0",
"QNS0");
110 result->status_ = dqm_core::Result::Yellow;
114 double mean = fit_res->Value(0);
116 std::vector<int> yellowLBs;
117 std::vector<double> yellowR;
118 for (
int ip = 0;
ip<ge->GetN() ;
ip++)
121 ge->GetPoint(
ip,
x,
y);
122 double ey = ge->GetErrorY(
ip);
123 double r = TMath::Abs((
y -
mean ) / ey);
127 yellowLBs.push_back(
x);
128 yellowR.push_back(
r);
132 for (
size_t iy=0;iy<yellowLBs.size();iy++)
134 int LB = yellowLBs.at(iy);
135 double R = yellowR.at(iy);
137 sprintf(ctag,
"Bad LB %d with R",
LB);
141 if (yellowLBs.size() > NsigMultRed)
152 result->status_ = dqm_core::Result::Yellow;
◆ printDescription()
void dqm_algorithms::ZDCTestConstantVsLB::printDescription |
( |
std::ostream & |
out | ) |
|
|
virtual |
Definition at line 29 of file ZDCTestConstantVsLB.cxx.
35 message +=
"Description: Calculates the mean of the LB dependence\n";
36 message +=
"A constant fit is performed, for bins with minimum statistics, and outliers are reported. Yellow is for any 5 sigma deviations, red is for 10 or more\n";
37 message +=
" Overflow (and Underflow) bins are not included\n";
◆ m_name
std::string dqm_algorithms::ZDCTestConstantVsLB::m_name |
|
protected |
The documentation for this class was generated from the following files:
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")