It is based on a style file from BaBar.
const int nren=3;
static const double mur[nren] = {1.0,0.25,4.0};
static const double muf[nren] = {1.0,0.25,4.0};
const unsigned int NUMPDF=41;
void AtlasExample()
{
gROOT->SetStyle(
"ATLAS");
auto canvas =
new TCanvas(
"canvas",
"single inclusive jets",50,50,600,600);
auto frame = canvas->
DrawFrame(xmin,ymin,xmax,ymax);
frame->SetYTitle("d#sigma_{jet}/dE_{T,jet} [fb/GeV]");
frame->SetXTitle("E_{T,jet} [GeV]");
frame->GetYaxis()->SetTitleOffset(1.4);
frame->GetXaxis()->SetTitleOffset(1.4);
for (
Int_t icut=0; icut<ncut; icut++) {
for (
Int_t ir=0; ir<nren; ir++) {
g1[ir][icut] = GetGraph(ir,ir,icut,0);
if (!g1[ir][icut]) {
cout << " g1 not found " << endl;
return;
}
}
char daname[100];
sprintf(daname,"data_%d",icut);
for (
Int_t i=0; i< data[icut]->
GetN(); i++) {
if (icut==0) y = r1*y1+r1*r2*r2*x1/50000.;
else y = r1*y1;
}
scale[icut] = MakeBand(g1[0][icut],g1[1][icut],g1[2][icut]);
for (
Int_t ipdf=0; ipdf<NUMPDF; ipdf++) {
gpdf[ipdf][icut]= GetGraph(0,0,icut,ipdf);
if (!gpdf[ipdf][icut]) {
cout << " gpdf not found " << endl;
return;
}
AddtoBand(gpdf[ipdf][icut],scalepdf[icut]);
}
scalepdf[icut]->
Draw(
"zE2");
scale[icut]->
Draw(
"zE2");
}
t->DrawLatex(0.3, 0.85, "#sqrt{s}= 14 TeV");
t->DrawLatex(0.57, 0.85, "|#eta_{jet}|<0.5");
auto l =
new TLegend(0.45,0.65,0.8,0.8,
"",
"NDC");
l->SetBorderSize(0.);
l->SetTextFont(42);
l->AddEntry("data_0", "Data 2009", "ep");
l->AddEntry("scalepdf", "NLO QCD", "lf");
}
{
const char *cuts[5] =
{"0.0 <= |eta| < 0.5",
"0.5 <= |eta| < 1.0",
"1.0 <= |eta| < 1.5",
"1.5 <= |eta| < 2.0",
"2.0 <= |eta| < 3.0"};
const double mur[] = {1.0,0.25,4.0};
const double muf[] = {1.0,0.25,4.0};
TFile *file =
TFile::Open(
"http://root.cern.ch/files/AtlasGraphs.root",
"CACHEREAD");
char gname[100];
char tname[100];
if (ipdf>=0)
sprintf(tname," E_T (mu_r=%g, mu_f=%g);%s Pdf: %d",mur[ir],muf[ifs],cuts[icut],ipdf);
else
sprintf(tname," E_T %s Ms= %d",cuts[icut],-ipdf);
for (int i=1; i<=GMAX; i++) {
sprintf(gname,"full_%d",i);
if (!g1) {
cout << gname << " not found " << endl;
return nullptr;
}
if (strcmp(title,tname)==0) break;
g1 = 0;
}
if (!g1) return nullptr;
return g1;
}
Double_t x1 = 0., y1 = 0.,
x2 = 0., y2 = 0., y0 = 0,
x3 = 0.;
if (y1 < y2) {
y2 = y1;
y1 = tmp;
}
if (binwl == 0.) binwl = binwh;
if (binwh == 0.) binwh = binwl;
}
return g3;
}
cout << " graphs don't have the same number of elements " << endl;
if ( y1==0 || y2==0 )
cerr << "check these points very carefully : AddtoBand() : point " << i << endl;
y0 = y1-y2;
if (y0 != 0) {
if (y0 > 0) {
eyh = EYhigh[i];
eyh =
sqrt(eyh*eyh+y0*y0);
} else {
eyl = EYlow[i];
eyl =
sqrt(eyl*eyl+y0*y0);
}
}
}
}