16 const int bands = 999;
18 const unsigned num = 6;
19 double red[num] = {1.,0.,0.,0.,1.,1.};
20 double green[num] = {0.,0.,1.,1.,1.,0.};
21 double blue[num] = {1.,1.,1.,0.,0.,0.};
22 double stops[num] = {0.,0.2,0.4,0.6,0.8,1.};
23 int fi = TColor::CreateGradientColorTable(num,stops,red,green,blue,bands);
24 for(
int i = 0; i < bands; ++i){
27 gStyle->SetNumberContours(bands);
28 gStyle->SetPalette(bands, colors);
30 double inf = numeric_limits<double>::infinity();
31 TH2D h(
"h",
"Combined Significance;Significance A;Significance B", 55, 0., 5., 55, 0., 5.);
35 for(
int ix = 1; ix <= h.GetNbinsX(); ++ix){
36 double zx = h.GetXaxis()->GetBinCenter(ix);
37 double px = erfc(zx/sqrt(2.));
38 double qx = -2.*log(px);
39 for(
int iy = 1; iy <= h.GetNbinsY(); ++iy){
40 double zy = h.GetYaxis()->GetBinCenter(iy);
41 double py = erfc(zy/sqrt(2.));
42 double qy = -2.*log(py);
45 double p = TMath::Prob(q, 4);
47 double z = cp <= 0. ? -inf
49 : TMath::NormQuantile(cp);
50 h.SetBinContent(ix, iy, z);
55 c.Print(
"combined_significance.pdf");