AlcapDAQ  1
plot_max.c
Go to the documentation of this file.
1 {
2 char title[80];
3 gROOT->SetStyle("Plain");
4 gStyle->SetOptStat(0);
5 gStyle->SetOptFit(1111);
6 TCanvas *c1 = new TCanvas();
7 
8 // double regions[] = { };
9 int channels[] = { 0, 1, 2, 3, 4, 5, 6, 7};
10 
11 c1->Divide(3,2);
12 for(int j = 0; j < 6; j++) {
13  int i = channels[j];
14  c1->cd(j+1);
15  TF1 *gaus = (TF1*)gROOT->GetFunction("gaus");
16  gaus->SetLineColor(kRed);
17  gaus->SetLineWidth(1);
18  sprintf(title, "py%d", i);
19  TH1 *py = maxSample->ProjectionY(title,i+1,i+1);
20  sprintf(title, "Channel %d", i);
21  py->SetTitle(title);
22 // py->GetXaxis()->SetRange(regions[i-1] - 2000, regions[i-1] + 2000);
23  py->Draw("E1");
24 // py->Fit("gaus","LR","SAME",regions[i-1] - 2000, regions[i-1] + 2000);
25 }
26 
27 }