LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
plot.C File Reference

Go to the source code of this file.

Functions

gStyle SetPalette (1)
 
gROOT SetStyle ("Plain")
 
c1 Divide (1, 1)
 
TFile f ("slowing.root")
 
 for (Int_t i=1;i<=nbinsx;i++)
 
gStyle SetOptStat (000000)
 

Variables

 c1 = new TCanvas ("c1","",20,20,800,800)
 
TH1F * h1 = (TH1F*)f.Get("1")
 
 h2 = (TH1F*)f.Get("2")
 
 h3 = (TH1F*)f.Get("3")
 
Int_t nbinsx = h1->GetXaxis()->GetNbins()
 
Double_t y = 0
 
Double_t mini = 0
 
Double_t maxi = 0
 
Double_t largeur = 0
 
Double_t sum = 0
 

Function Documentation

c1 Divide ( ,
 
)
TFile f ( "slowing.root"  )
for ( Int_t  i = 1; i<=nbinsx; i++)

Definition at line 41 of file plot.C.

References c1, util::end(), h2, h3, largeur, and legend.

42  {
43  sum = sum + h1->GetBinContent(i);
44 
45  mini = h1->GetBinLowEdge(i);
46  maxi = mini + h1->GetBinWidth(i);
47  largeur = std::pow(10,maxi)-std::pow(10,mini);
48  // cout << mini << " " << std::pow(10,mini)<< " " << largeur
49  // << " " << maxi << " " << std::pow(10,maxi) << endl;
50  h1->SetBinContent(i,h1->GetBinContent(i)*(1E9/1.6)/largeur);
51  h2->SetBinContent(i,h2->GetBinContent(i)*(1E9/1.6)/largeur);
52  h3->SetBinContent(i,h3->GetBinContent(i)*(1E9/1.6)/largeur);
53 
54  }
h3
Definition: plot.C:19
Double_t maxi
Definition: plot.C:28
Double_t mini
Definition: plot.C:27
TH1F * h2
Definition: plot.C:44
TH1F * h1
Definition: plot.C:41
Double_t sum
Definition: plot.C:31
Double_t largeur
Definition: plot.C:29
gStyle SetOptStat ( 000000  )
gStyle SetPalette ( )
gROOT SetStyle ( "Plain"  )

Variable Documentation

c1 = new TCanvas ("c1","",20,20,800,800)

Definition at line 11 of file plot.C.

h1 = (TH1F*)f.Get("1")

Definition at line 16 of file plot.C.

h2 = (TH1F*)f.Get("2")

Definition at line 18 of file plot.C.

h3 = (TH1F*)f.Get("3")

Definition at line 19 of file plot.C.

Referenced by for().

Double_t largeur = 0

Definition at line 29 of file plot.C.

Referenced by for().

Double_t maxi = 0

Definition at line 28 of file plot.C.

Double_t mini = 0

Definition at line 27 of file plot.C.

Double_t sum = 0
Double_t y = 0

Definition at line 26 of file plot.C.