149 if (
num->GetXaxis()->GetXbins()->GetSize() == 0 &&
num->GetYaxis()->GetXbins()->GetSize() == 0) {
150 eff =
new TProfile2D(effName.c_str(),
152 num->GetXaxis()->GetNbins(),
153 num->GetXaxis()->GetXmin(),
154 num->GetXaxis()->GetXmax(),
155 num->GetYaxis()->GetNbins(),
156 num->GetYaxis()->GetXmin(),
157 num->GetYaxis()->GetXmax());
158 }
else if (
num->GetXaxis()->GetXbins()->GetSize() != 0 &&
num->GetYaxis()->GetXbins()->GetSize() == 0) {
159 eff =
new TProfile2D(effName.c_str(),
161 num->GetXaxis()->GetNbins(),
162 num->GetXaxis()->GetXbins()->GetArray(),
163 num->GetYaxis()->GetNbins(),
164 num->GetYaxis()->GetXmin(),
165 num->GetYaxis()->GetXmax());
166 }
else if (
num->GetXaxis()->GetXbins()->GetSize() == 0 &&
num->GetYaxis()->GetXbins()->GetSize() != 0) {
167 eff =
new TProfile2D(effName.c_str(),
169 num->GetXaxis()->GetNbins(),
170 num->GetXaxis()->GetXmin(),
171 num->GetXaxis()->GetXmax(),
172 num->GetYaxis()->GetNbins(),
173 num->GetYaxis()->GetXbins()->GetArray());
175 eff =
new TProfile2D(effName.c_str(),
177 num->GetXaxis()->GetNbins(),
178 num->GetXaxis()->GetXbins()->GetArray(),
179 num->GetYaxis()->GetNbins(),
180 num->GetYaxis()->GetXbins()->GetArray());
182 eff->SetTitle(effName.c_str());
183 eff->SetXTitle(
num->GetXaxis()->GetTitle());
184 eff->SetYTitle(
num->GetYaxis()->GetTitle());
185 eff->SetZTitle(
"Efficiency");
186 eff->SetOption(
"colztexte");
187 eff->GetZaxis()->SetRangeUser(-0.001, 1.001);
188 eff->SetStats(kFALSE);
189 for (
int i = 0;
i <
num->GetSize();
i++) {
191 if (
int(den->GetBinContent(
i)) > 0.)
192 e = double(
num->GetBinContent(
i)) /
double(den->GetBinContent(
i));
195 low = TEfficiency::Wilson((
double)den->GetBinContent(
i), (double)
num->GetBinContent(
i), 0.683,
false);
196 high = TEfficiency::Wilson((
double)den->GetBinContent(
i), (double)
num->GetBinContent(
i), 0.683,
true);
200 eff->SetBinContent(
i,
e);
201 eff->SetBinEntries(
i, 1);
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())