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

Go to the source code of this file.

Functions

 while (1)
 
 fclose (fg1)
 
 fclose (fg2)
 
gPad SetLogy ()
 
gr1 SetTitle ("Dose rate distribution")
 
gr1 GetXaxis () -> SetTitle("Distance from the centre (cm)")
 
gr1 GetYaxis () -> SetTitle("Normalised dose rate distribution")
 
gr1 SetLineWidth (1)
 
gr1 SetMarkerColor (1)
 
gr1 SetMarkerStyle (20)
 
gr1 Draw ("AP")
 
gr2 SetMarkerColor (2)
 
gr2 SetMarkerStyle (21)
 
gr2 SetMarkerSize (0.5)
 
gr2 SetLineColor (2)
 
gr2 Draw ("CP")
 
leg SetFillColor (0)
 
leg AddEntry (gr1,"Reference data","lp")
 
leg AddEntry (gr2,"Geant4 - 20B Events","lp")
 
leg Draw ()
 

Variables

Int_t n_points_dolan = 8
 
Float_t x1 [n_points_dolan]
 
Float_t y1 [n_points_dolan]
 
Float_t x
 
Float_t y
 
Int_t ncols_dolan
 
Int_t nlines1 = 0
 
FILE * fg2 =fopen("geant4_6711_dose.txt", "r")
 
Int_t n_points_geant4 = 398
 
Float_t x2 [n_points_geant4]
 
Float_t y2 [n_points_geant4]
 
Int_t ncols_geant4
 
Int_t nlines2 = 0
 
TGraph * gr1 = new TGraph (nlines1, x1, y1)
 
TGraph * gr2 = new TGraph (nlines2, x2, y2)
 
TCanvas * c1 = new TCanvas("c1", "Graph Draw Options", 200, 10, 600, 400)
 
TLegend * leg = new TLegend(0.3, 0.5, 0.6, 0.8)
 

Function Documentation

leg AddEntry ( gr1  ,
"Reference data"  ,
"lp"   
)
leg AddEntry ( gr2  ,
"Geant4 - 20B Events"  ,
"lp"   
)
gr1 Draw ( "AP"  )
gr2 Draw ( "CP"  )
leg Draw ( )
fclose ( fg1  )

Referenced by while().

fclose ( fg2  )
gr1 GetXaxis ( ) -> SetTitle("Distance from the centre (cm)")
gr1 GetYaxis ( ) -> SetTitle("Normalised dose rate distribution")
leg SetFillColor ( )
gr2 SetLineColor ( )
gr1 SetLineWidth ( )
gPad SetLogy ( )
gr1 SetMarkerColor ( )
gr2 SetMarkerColor ( )
gr2 SetMarkerSize ( 0.  5)
gr1 SetMarkerStyle ( 20  )
gr2 SetMarkerStyle ( 21  )
gr1 SetTitle ( "Dose rate distribution"  )
while ( )

Definition at line 10 of file compare_6711.C.

References fclose(), nlines1, x, and y.

11 {
12  ncols_dolan = fscanf(fg1, "%f %f", &x, &y);
13  if (ncols_dolan<0) break;
14  x1[nlines1]= x;
15  y1[nlines1] = y;
16  nlines1++;
17 }
Int_t nlines1
Definition: compare_6711.C:8
Float_t y1[n_points_dolan]
Definition: compare_6711.C:5
Float_t x1[n_points_dolan]
Definition: compare_6711.C:5
Float_t y
Definition: compare_6711.C:6
Int_t ncols_dolan
Definition: compare_6711.C:7
Float_t x
Definition: compare_6711.C:6

Variable Documentation

TCanvas* c1 = new TCanvas("c1", "Graph Draw Options", 200, 10, 600, 400)

Definition at line 44 of file compare_6711.C.

FILE* fg2 =fopen("geant4_6711_dose.txt", "r")

Definition at line 24 of file compare_6711.C.

TGraph* gr1 = new TGraph (nlines1, x1, y1)

Definition at line 41 of file compare_6711.C.

TGraph* gr2 = new TGraph (nlines2, x2, y2)

Definition at line 42 of file compare_6711.C.

TLegend* leg = new TLegend(0.3, 0.5, 0.6, 0.8)

Definition at line 65 of file compare_6711.C.

Int_t n_points_dolan = 8

Definition at line 4 of file compare_6711.C.

Int_t n_points_geant4 = 398

Definition at line 25 of file compare_6711.C.

Int_t ncols_dolan

Definition at line 7 of file compare_6711.C.

Int_t ncols_geant4

Definition at line 27 of file compare_6711.C.

Int_t nlines1 = 0

Definition at line 8 of file compare_6711.C.

Referenced by while().

Int_t nlines2 = 0

Definition at line 28 of file compare_6711.C.

Float_t x

Definition at line 6 of file compare_6711.C.

Referenced by while().

Float_t x1[n_points_dolan]

Definition at line 5 of file compare_6711.C.

Float_t x2[n_points_geant4]

Definition at line 26 of file compare_6711.C.

Float_t y

Definition at line 6 of file compare_6711.C.

Referenced by while().

Float_t y1[n_points_dolan]

Definition at line 5 of file compare_6711.C.

Float_t y2[n_points_geant4]

Definition at line 26 of file compare_6711.C.