152 if(
num->GetXaxis()->GetXbins()->GetSize()==0 &&
num->GetYaxis()->GetXbins()->GetSize()==0){
153 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());
154 }
else if(
num->GetXaxis()->GetXbins()->GetSize()!=0 &&
num->GetYaxis()->GetXbins()->GetSize()==0){
155 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());
156 }
else if(
num->GetXaxis()->GetXbins()->GetSize()==0 &&
num->GetYaxis()->GetXbins()->GetSize()!=0){
157 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());
159 eff =
new TProfile2D(effName.c_str(),effName.c_str(),
num->GetXaxis()->GetNbins(),
num->GetXaxis()->GetXbins()->GetArray(),
num->GetYaxis()->GetNbins(),
num->GetYaxis()->GetXbins()->GetArray());
161 eff->SetTitle(effName.c_str());
162 eff->SetXTitle(
num->GetXaxis()->GetTitle() );
163 eff->SetYTitle(
num->GetYaxis()->GetTitle() );
164 eff->SetZTitle(
"Efficiency");
165 eff->SetOption(
"colztexte");
166 eff->GetZaxis()->SetRangeUser(-0.001,1.001);
167 eff->SetStats(kFALSE);
168 for(
int i=0;
i<
num->GetSize();
i++){
170 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
171 if (
int(den->GetBinContent(
i))>0.) e= double(
num->GetBinContent(
i))/
double(den->GetBinContent(
i));
173 low=TEfficiency::Wilson((
double)den->GetBinContent(
i),(double)
num->GetBinContent(
i),0.683,
false);
174 high=TEfficiency::Wilson((
double)den->GetBinContent(
i),(double)
num->GetBinContent(
i),0.683,
true);
176 Efficiency( (
double)
num->GetBinContent(
i), (double)den->GetBinContent(
i), 0.683,
e, low, high );
178 double err = e-low>high-e ? e-low : high-
e;
180 eff->SetBinContent(
i, e );
181 eff->SetBinEntries(
i, 1 );
182 eff->SetBinError(
i,
sqrt(e*e+err*err) );
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")