Brazilian Flag Plot

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Hi all,

I am trying to do a Brazilian Flag Plot with C++ in Root. I am really struggeling with this. I do have some random datapoints with uncertainties that I want to put a one-sigma und two-sigma band around. I have found some examples for pyroot, but I am not familiar with that.

double topcrosssection = 984.50;
const int n = 26;
double topmass[n] = {100,105,110,115,120,125,130,140,150,160,170,180,
double susycrosssection[n] = {1521.11,1233.18,1013.76,832.656,689.799,574.981,
	481.397,405.159,342.865,249.409,184.623,139.252,106.194,82.2541,64.5085, 50.9226,
	40.5941,32.6679, 26.4761,21.5949,17.6836,14.6459,10.1363,12.1575,7.17876,8.51615};
double errorsusy[n] = {0.154038,0.154059,0.15408,0.151503,0.15044,0.149895,0.148906,

these are the arrays I am using for that. the errors are percental one so I am doing a for loop after that to apply those.

I am really not sure how to proceed with the brasilian flag plot now.

thank you so much for your help!


if by “Brazilian Flag Plot” you mean an exclusion plot with green and yellow bands such as the ones shown here*, this example will get you started (no idea what the numbers above are, you’ll have to sort them out):

   auto c41 = new TCanvas("c41","c41",200,10,600,400);
   double x[] = {0, 1, 2, 3, 4};
   double y[] = {0, 2, 4, 1, 3};
   double ex[] = {0.1, 0.2, 0.3, 0.4, 0.5};
   double ey[] = {2, 1, 2, 1, 2};
   auto ge = new TGraphErrors(5, x, y, ex, ey);

   double ey2[] = {1, .5, .9, .6, 1};
   auto ge2 = new TGraphErrors(5, x, y, ex, ey2);

If you have more questions about TGraph painting, this is the place where I think the options are documented:

Strongly suggested!

I mean a one and two sigma band arround my datapoints almost exactly like this:


Sure. Have a look at the example above. That should get you started.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.