AlcapDAQ  1
Functions | Variables
plot_ped.c File Reference

Go to the source code of this file.

Functions

gROOT SetStyle ("Plain")
 
gStyle SetOptStat (0)
 
gStyle SetOptFit (1111)
 
c1 Divide (4, 2)
 
 for (int i=1;i<=8;i++)
 

Variables

TCanvas * c1 = new TCanvas()
 

Function Documentation

c1 Divide ( ,
 
)
for ( int  i = 1; i <= 8; i++)

Definition at line 8 of file plot_ped.c.

References gROOT, i, samples, and sprintf().

8  {
9  c1->cd(i);
10  TF1 *gaus = (TF1*)gROOT->GetFunction("gaus");
11  gaus->SetLineColor(kRed);
12  gaus->SetLineWidth(1);
13  sprintf(title, "py%d", i);
14  TH1 *py = samples->ProjectionY(title,i,i);
15  sprintf(title, "Channel %d", i-1);
16  py->SetTitle(title);
17  py->GetXaxis()->SetRange(py->GetMean()-9*py->GetRMS(), py->GetMean()+9*py->GetRMS());
18  py->Draw("E1");
19  py->Fit("gaus","LR","SAME",py->GetMean()-9*py->GetRMS(), py->GetMean()+9*py->GetRMS());
20 }
gStyle SetOptFit ( 1111  )
gStyle SetOptStat ( )
gROOT SetStyle ( "Plain"  )

Variable Documentation

TCanvas* c1 = new TCanvas()

Definition at line 6 of file plot_ped.c.