140 if(
num->GetXaxis()->GetXbins()->GetSize()==0 &&
num->GetYaxis()->GetXbins()->GetSize()==0){
141 eff =
new TProfile2D(effName.c_str(),effName.c_str(),
num->GetXaxis()->GetNbins(),
num->GetXaxis()->GetXmin(),
num->GetXaxis()->GetXmax(),
num->GetYaxis()->GetNbins(),
num->GetYaxis()->GetXmin(),
num->GetYaxis()->GetXmax());
142 }
else if(
num->GetXaxis()->GetXbins()->GetSize()!=0 &&
num->GetYaxis()->GetXbins()->GetSize()==0){
143 eff =
new TProfile2D(effName.c_str(),effName.c_str(),
num->GetXaxis()->GetNbins(),
num->GetXaxis()->GetXbins()->GetArray(),
num->GetYaxis()->GetNbins(),
num->GetYaxis()->GetXmin(),
num->GetYaxis()->GetXmax());
144 }
else if(
num->GetXaxis()->GetXbins()->GetSize()==0 &&
num->GetYaxis()->GetXbins()->GetSize()!=0){
145 eff =
new TProfile2D(effName.c_str(),effName.c_str(),
num->GetXaxis()->GetNbins(),
num->GetXaxis()->GetXmin(),
num->GetXaxis()->GetXmax(),
num->GetYaxis()->GetNbins(),
num->GetYaxis()->GetXbins()->GetArray());
147 eff =
new TProfile2D(effName.c_str(),effName.c_str(),
num->GetXaxis()->GetNbins(),
num->GetXaxis()->GetXbins()->GetArray(),
num->GetYaxis()->GetNbins(),
num->GetYaxis()->GetXbins()->GetArray());
149 eff->SetTitle(effName.c_str());
150 eff->SetXTitle(
num->GetXaxis()->GetTitle() );
151 eff->SetYTitle(
num->GetYaxis()->GetTitle() );
152 eff->SetZTitle(
"Efficiency");
153 eff->SetOption(
"colztexte");
154 eff->GetZaxis()->SetRangeUser(-0.001,1.001);
155 eff->SetStats(kFALSE);
156 for(
int i=0;
i<
num->GetSize();
i++){
158 if (
int(den->GetBinContent(
i))>0.) e= double(
num->GetBinContent(
i))/
double(den->GetBinContent(
i));
160 low=TEfficiency::Wilson((
double)den->GetBinContent(
i),(double)
num->GetBinContent(
i),0.683,
false);
161 high=TEfficiency::Wilson((
double)den->GetBinContent(
i),(double)
num->GetBinContent(
i),0.683,
true);
163 double err = e-low>high-e ? e-low : high-
e;
165 eff->SetBinContent(
i, e );
166 eff->SetBinEntries(
i, 1 );
167 eff->SetBinError(
i,
sqrt(e*e+err*err) );
MonitorElement * bookProfile2D(Args &&...args)