17 template_output.Reset();
19 TH2F tmp_output1(template_output);
20 tmp_output1.SetNameTitle(Form(
"leffpixels_found_%s",template_output.GetName()), Form(
"low efficiency pixels, found, %s", template_output.GetTitle()));
22 TH2F tmp_output2(template_output);
23 tmp_output2.SetNameTitle(Form(
"noisypixels_eff_%s",template_output.GetName()), Form(
"noisy pixels, efficiency, %s", template_output.GetTitle()));
25 TH2F tmp_output3(template_output);
26 tmp_output3.SetNameTitle(Form(
"leffpixels_eff_%s",template_output.GetName()), Form(
"low efficiency pixels, efficiency, %s", template_output.GetTitle()));
28 noisypixels_found_output.SetNameTitle(Form(
"noisypixels_found_%s",template_output.GetName()), Form(
"noisy pixels, found, %s", template_output.GetTitle()));
30 output.push_back(tmp_output1);
31 output.push_back(tmp_output2);
32 output.push_back(tmp_output3);
39 if(
input->GetMaximum()<0.5)
return 0;
41 std::vector<TH2F> vec_found_leff{},vec_found_noisy{},vec_eff_leff{},vec_eff_noisy{};
45 TH2F tmp_eff_noisy, tmp_eff_leff;
46 TH2F tmp_found_leff, tmp_found_noisy;
64 tmp_eff_noisy.SetName(
"tmp_eff_noisy");
65 tmp_eff_noisy.Reset();
67 tmp_eff_leff.SetName(
"tmp_eff_leff");
70 tmp_found_noisy.SetName(
"tmp_found_noisy");
71 tmp_found_noisy.Reset();
73 tmp_found_leff.SetName(
"tmp_found_leff");
74 tmp_found_leff.Reset();
78 const double Threshold_LEFF=5.;
81 for(
int col_ID=1; col_ID<=
input->GetNbinsY(); col_ID++)
83 for(
int row_ID=1; row_ID<=
input->GetNbinsX(); row_ID++)
85 double ratio_leff=0, ratio_noisy=0;
86 double gauss_helper_12 = (col_ID-
p[1][row_ID])/
p[2][row_ID];
87 double gauss_helper_45 = (col_ID-
p[4][row_ID])/
p[5][row_ID];
88 double fit =
p[0][row_ID]*
exp(-0.5*gauss_helper_12*gauss_helper_12)
89 +
p[3][row_ID]*
exp(-0.5*gauss_helper_45*gauss_helper_45) +
p[6][row_ID];
93 double bin_content=
input->GetBinContent(row_ID,col_ID);
95 if(
fit>=bin_content) ratio_leff = std::abs(
fit-bin_content)/
sigma;
96 else ratio_noisy = std::abs(
fit-bin_content)/
sigma;
100 if( ratio_leff > Threshold_LEFF) tmp_found_leff.SetBinContent(row_ID,col_ID,1);
101 if( ratio_noisy > Threshold_NOISY) tmp_found_noisy.SetBinContent(row_ID,col_ID,1);
103 tmp_eff_leff.SetBinContent(row_ID,col_ID,100.*ratio_leff);
104 tmp_eff_noisy.SetBinContent(row_ID,col_ID,100.*ratio_noisy);
110 vec_found_leff.push_back(tmp_found_leff);
111 vec_found_noisy.push_back(tmp_found_noisy);
112 vec_eff_leff.push_back(tmp_eff_leff);
113 vec_eff_noisy.push_back(tmp_eff_noisy);
119 for(
int col_ID=1; col_ID<=
input->GetNbinsY(); col_ID++)
121 for(
int row_ID=1; row_ID<=
input->GetNbinsX(); row_ID++)
123 noisypixels_found_output.Fill(row_ID,col_ID, vec_found_noisy[
m].GetBinContent(row_ID,col_ID));
124 leffpixels_found_output.Fill(row_ID,col_ID, vec_found_leff[
m].GetBinContent(row_ID,col_ID));
128 noisypixels_eff_output.SetBinContent(row_ID,col_ID, vec_eff_noisy[
m].GetBinContent(row_ID,col_ID));
129 leffpixels_eff_output.SetBinContent(row_ID,col_ID, vec_eff_leff[
m].GetBinContent(row_ID,col_ID));
133 if(noisypixels_eff_output.GetBinContent(row_ID,col_ID)<vec_eff_noisy[
m].GetBinContent(row_ID,col_ID))
135 noisypixels_eff_output.SetBinContent(row_ID,col_ID, vec_eff_noisy[
m].GetBinContent(row_ID,col_ID));
137 if(leffpixels_eff_output.GetBinContent(row_ID,col_ID)>vec_eff_leff[
m].GetBinContent(row_ID,col_ID))
139 leffpixels_eff_output.SetBinContent(row_ID,col_ID, vec_eff_leff[
m].GetBinContent(row_ID,col_ID));
147 for(
int col_ID=1; col_ID<=
input->GetNbinsY(); col_ID++)
149 for(
int row_ID=1; row_ID<=
input->GetNbinsX(); row_ID++)
151 if(noisypixels_found_output.GetBinContent(row_ID,col_ID)==
m_methods.size()) noisypixels_found_output.SetBinContent(row_ID,col_ID,1);
152 else noisypixels_found_output.SetBinContent(row_ID,col_ID,0);
154 if(leffpixels_found_output.GetBinContent(row_ID,col_ID)==
m_methods.size()) leffpixels_found_output.SetBinContent(row_ID,col_ID,1);
155 else leffpixels_found_output.SetBinContent(row_ID,col_ID,0);