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

Go to the source code of this file.

Functions

TFile f1 ("./opt3.root")
 
h1 SetTitle ("1 TeV muon in 3 m iron : kinetic energy at exit (GeV)")
 
h1 GetXaxis () -> SetTitle("Ekine (GeV)")
 
h1 GetYaxis () -> SetTitle("nb/GeV")
 
h1 SetStats (kFALSE)
 
h1 SetLineColor (kBlue)
 
h1 Draw ("HIST")
 
in open ("mars14.ascii")
 
 while (1)
 
in close ()
 
h1f SetLineColor (kRed)
 
h1f Draw ("SAME")
 
legend AddEntry (h1,"local (Urban90)","l")
 
legend AddEntry (h1f,"Mars14 simul ","L")
 
legend Draw ()
 

Variables

TH1D * h1 = (TH1D*) f1.Get("10")
 
ifstream in
 
int nb_bins = 100
 
float x_min = 950.
 
float x_max = 1000.
 
TH1F * h1f = new TH1F("h1f","",nb_bins,x_min,x_max)
 
Float_t x
 
Float_t y
 
TLegend * legend = new TLegend(0.2,0.55,0.45,0.70)
 

Function Documentation

legend AddEntry ( h1  ,
"local (Urban90)"  ,
"l"   
)
legend AddEntry ( h1f  ,
"Mars14 simul "  ,
"L"   
)
in close ( )
h1 Draw ( "HIST"  )
h1f Draw ( "SAME"  )
legend Draw ( )
TFile f1 ( "./opt3.root"  )
h1 GetXaxis ( ) -> SetTitle("Ekine (GeV)")
h1 GetYaxis ( ) -> SetTitle("nb/GeV")
in open ( "mars14.ascii"  )
h1 SetLineColor ( kBlue  )
h1f SetLineColor ( kRed  )
h1 SetStats ( kFALSE  )
h1 SetTitle ( "1 TeV muon in 3 m iron : kinetic energy at exit (GeV)"  )
while ( )

Definition at line 37 of file tramu.C.

References y.

37  {
38  in >> x >> y ;
39  if (!in.good()) break;
40  h1f->Fill(x,y);
41  }
TH1F * h1f
Definition: tramu.C:34
Float_t y
Definition: tramu.C:36
ifstream in
Definition: tramu.C:27
Float_t x
Definition: tramu.C:36

Variable Documentation

TH1D* h1 = (TH1D*) f1.Get("10")

Definition at line 6 of file tramu.C.

TH1F* h1f = new TH1F("h1f","",nb_bins,x_min,x_max)

Definition at line 34 of file tramu.C.

ifstream in

Definition at line 27 of file tramu.C.

TLegend* legend = new TLegend(0.2,0.55,0.45,0.70)

Definition at line 49 of file tramu.C.

int nb_bins = 100

Definition at line 31 of file tramu.C.

Float_t x

Definition at line 36 of file tramu.C.

float x_max = 1000.

Definition at line 33 of file tramu.C.

float x_min = 950.

Definition at line 32 of file tramu.C.

Float_t y

Definition at line 36 of file tramu.C.

Referenced by while().