AlcapDAQ  1
plot_mins.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  c1->Divide(4,2);
8 
9  for(int i = 1; i <= 8; i++) {
10  c1->cd(i);
11  TF1 *gaus = (TF1*)gROOT->GetFunction("gaus");
12  gaus->SetLineColor(kRed);
13  gaus->SetLineWidth(1);
14  sprintf(title, "py%d", i);
15 
16  TH1 *py = minSample->ProjectionY(title,i,i);
17  sprintf(title, "Channel %d", i-1);
18  py->SetTitle(title);
19  // py->GetXaxis()->SetRange(regions[i-1] - 2000, regions[i-1] + 2000);
20  // py->Draw("E1");
21  // py->Fit("gaus","LR","SAME",regions[i-1] - 2000, regions[i-1] + 2000);
22  Int_t x_min = 1000 ;
23  Int_t x_max = 2900 ;
24  py->Fit("gaus","","",x_min, x_max);
25  py->Draw("E1");
26  }
27 
28 }