Geant4  10.02.p03
hanson.C File Reference

Go to the source code of this file.

Functions

TFile f1 ("./19um.opt0.root")
 
h1 SetTitle ("Angular distribution of 15.7 MeV e- after 19um Au foil")
 
h1 GetXaxis () -> SetTitle("theta (deg)")
 
h1 GetYaxis () -> SetTitle("dN/dOmega")
 
h1 SetStats (kFALSE)
 
h1 SetLineColor (kBlack)
 
h1 Draw ("HIST")
 
TFile f2 ("./19um.opt3.root")
 
h2 SetLineColor (kBlue)
 
h2 Draw ("SAME HIST")
 
TFile f3 ("./19um.local.root")
 
h3 SetLineColor (kGreen)
 
in open ("./19um.ascii")
 
 for (int i=0 ;i< nbdata ;i++)
 
in close ()
 
legend AddEntry (h1,"opt0 ","l")
 
legend AddEntry (h2,"opt3 ","l")
 
legend AddEntry (h3,"local","l")
 
legend AddEntry (pt,"Hanson data","P")
 
legend Draw ()
 

Variables

TH1D * h1 = (TH1D*) f1.Get("12")
 
TH1D * h2 = (TH1D*) f2.Get("12")
 
TH1D * h3 = (TH1D*) f3.Get("12")
 
ifstream in
 
TMarker * pt
 
Double_t x
 
Double_t y
 
int nbdata = 0
 
TLegend * legend = new TLegend(0.6,0.5,0.8,0.68)
 

Function Documentation

◆ AddEntry() [1/4]

legend AddEntry ( h1  ,
"opt0 "  ,
"l"   
)

◆ AddEntry() [2/4]

legend AddEntry ( h2  ,
"opt3 "  ,
"l"   
)

◆ AddEntry() [3/4]

legend AddEntry ( h3  ,
"local"  ,
"l"   
)

◆ AddEntry() [4/4]

legend AddEntry ( pt  ,
"Hanson data"  ,
"P"   
)

◆ close()

in close ( )

◆ Draw() [1/3]

h1 Draw ( "HIST"  )

◆ Draw() [2/3]

h2 Draw ( "SAME HIST"  )

◆ Draw() [3/3]

legend Draw ( )

◆ f1()

TFile f1 ( "./19um.opt0.root"  )

◆ f2()

TFile f2 ( "./19um.opt3.root"  )

◆ f3()

TFile f3 ( "./19um.local.root"  )

◆ for()

for ( )

Definition at line 43 of file hanson.C.

43  {
44  in >> x >> y ;
45  if (!in.good()) break;
46  pt = new TMarker(x,y,22); // 22 for triangle TMatker
47  pt->SetMarkerColor(kRed);
48  pt->Draw();
49  }
Double_t y
Definition: hanson.C:39
Double_t x
Definition: hanson.C:39
ifstream in
Definition: hanson.C:34
TMarker * pt
Definition: hanson.C:38

◆ GetXaxis()

h1 GetXaxis ( ) -> SetTitle("theta (deg)")

◆ GetYaxis()

h1 GetYaxis ( ) -> SetTitle("dN/dOmega")

◆ open()

in open ( "./19um.ascii"  )

◆ SetLineColor() [1/3]

h1 SetLineColor ( kBlack  )

◆ SetLineColor() [2/3]

h16 SetLineColor ( kBlue  )

◆ SetLineColor() [3/3]

h3 SetLineColor ( kGreen  )

◆ SetStats()

h1 SetStats ( kFALSE  )

◆ SetTitle()

h1 SetTitle ( "Angular distribution of 15.7 MeV e- after 19um Au foil"  )

Variable Documentation

◆ h1

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

Definition at line 7 of file hanson.C.

◆ h2

TH1D* h2 = (TH1D*) f2.Get("12")

Definition at line 17 of file hanson.C.

◆ h3

TH1D* h3 = (TH1D*) f3.Get("12")

Definition at line 23 of file hanson.C.

◆ in

ifstream in

Definition at line 34 of file hanson.C.

◆ legend

TLegend* legend = new TLegend(0.6,0.5,0.8,0.68)

Definition at line 53 of file hanson.C.

◆ nbdata

in nbdata = 0

Definition at line 41 of file hanson.C.

◆ pt

TMarker* pt

Definition at line 38 of file hanson.C.

◆ x

Double_t x

Definition at line 39 of file hanson.C.

◆ y

Double_t y

Definition at line 39 of file hanson.C.