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

Go to the source code of this file.

Functions

 while (1)
 
 fclose (fg1)
 
 fclose (fg2)
 
 fclose (fg3)
 
 fclose (fg4)
 
 fclose (fg5)
 
 fclose (fg6)
 
std::cout<< "Livermore"<< std::endl;for(Int_t j=0;j< nlines1;j++){if((ratio_liv[j] > 1.03)||(ratio_liv[j]< 0.97)) std::cout<< "Difference above 3% :"<< x1[j]<< ", "<< ratio_liv[j]<< std::endl;}std::cout<< "penelope"<< std::endl;for(Int_t j=0;j< nlines1;j++){if((ratio_pen[j] > 1.03)||(ratio_pen[j]< 0.97)) std::cout<< "Difference above 3% :"<< x1[j]<< ", "<< ratio_pen[j]<< std::endl;}std::cout<< "opt0"<< std::endl;for(Int_t j=0;j< nlines1;j++){if((ratio_opt0[j] > 1.03)||(ratio_opt0[j]< 0.97)) std::cout<< "Difference above 3% :"<< x1[j]<< ", "<< ratio_opt0[j]<< std::endl;}std::cout<< "opt3"<< std::endl;for(Int_t j=0;j< nlines1;j++){if((ratio_opt3[j] > 1.03)||(ratio_opt3[j]< 0.97)) std::cout<< "Difference above 3% :"<< x1[j]<< ", "<< ratio_opt3[j]<< std::endl;}std::cout<< "opt4"<< std::endl;for(Int_t j=0;j< nlines1;j++){if((ratio_opt4[j] > 1.03)||(ratio_opt4[j]< 0.97)) std::cout<< "Difference above 3% :"<< x1[j]<< ", "<< ratio_opt4[j]<< std::endl;}TGraph *gr1_ratio=new TGraph(nlines1, x1, ratio_liv);TGraph *gr2_ratio=new TGraph(nlines1, x1, ratio_pen);TGraph *gr3_ratio=new TGraph(nlines1, x1, ratio_opt0);TGraph *gr4_ratio=new TGraph(nlines1, x1, ratio_opt3);TGraph *gr5_ratio=new TGraph(nlines1, x1, ratio_opt4);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 SetLineWidth (0.3)
 
gr2 SetMarkerColor (2)
 
gr2 SetMarkerStyle (21)
 
gr2 SetMarkerSize (0.2)
 
gr2 SetLineColor (2)
 
gr2 Draw ("CP")
 
gr3 SetMarkerColor (3)
 
gr3 SetLineColor (3)
 
gr4 SetMarkerColor (4)
 
gr4 SetLineColor (4)
 
gr5 SetMarkerColor (6)
 
gr5 SetLineColor (6)
 
gr6 SetMarkerColor (9)
 
gr6 SetLineColor (9)
 
leg SetFillColor (0)
 
leg AddEntry (gr1,"Reference data","lp")
 
leg AddEntry (gr2,"Geant4 - Livermore","lp")
 
leg AddEntry (gr3,"Geant4 - Penelope","lp")
 
leg AddEntry (gr4,"Geant4 - opt0","lp")
 
leg AddEntry (gr5,"Geant4 - opt3","lp")
 
leg AddEntry (gr6,"Geant4 - opt4","lp")
 
leg Draw ()
 
c1 Print ("Flexi_dose_rate_distribution.jpg")
 
gr1_ratio SetTitle ("Dose rate distribution - RATIO")
 
gr2_ratio Draw ("P")
 
gr5_ratio SetMarkerSize (1)
 
leg AddEntry (gr1_ratio,"Geant4 - Livermore","lp")
 
leg AddEntry (gr2_ratio,"Geant4 - Penelope","lp")
 
leg AddEntry (gr3_ratio,"Geant4 - opt0","lp")
 
leg AddEntry (gr4_ratio,"Geant4 - opt3","lp")
 
leg AddEntry (gr5_ratio,"Geant4 - opt4","lp")
 
c1 Print ("Flexi_dose_rate_distribution_ratio.jpg")
 

Variables

Int_t n_points_granero =13
 
Float_t x1 [n_points_granero]
 
Float_t y1 [n_points_granero]
 
Float_t ratio_liv [n_points_granero]
 
Float_t x
 
Float_t y
 
Int_t ncols_granero
 
Int_t nlines1 =0
 
FILE * fg2 =fopen("geant4_dose_Flexi_livermore.txt", "r")
 
Int_t n_points_geant4 =398
 
Float_t x2 [n_points_geant4]
 
Float_t y2 [n_points_geant4]
 
Int_t ncols_geant4_liv
 
Int_t nlines2 =0
 
FILE * fg3 =fopen("geant4_dose_Flexi_penelope.txt", "r")
 
Float_t x3 [n_points_geant4]
 
Float_t y3 [n_points_geant4]
 
Float_t ratio_pen [n_points_granero]
 
Int_t ncols_geant4_penelope
 
Int_t nlines3 =0
 
FILE * fg4 =fopen("geant4_dose_Flexi_opt0.txt", "r")
 
Float_t x4 [n_points_geant4]
 
Float_t y4 [n_points_geant4]
 
Float_t ratio_opt0 [n_points_granero]
 
Int_t ncols_geant4_opt0
 
Int_t nlines4 =0
 
FILE * fg5 =fopen("geant4_dose_Flexi_opt3.txt", "r")
 
Float_t x5 [n_points_geant4]
 
Float_t y5 [n_points_geant4]
 
Float_t ratio_opt3 [n_points_granero]
 
Int_t ncols_geant4_opt3
 
Int_t nlines5 =0
 
FILE * fg6 =fopen("geant4_dose_Flexi_opt4.txt", "r")
 
Float_t x6 [n_points_geant4]
 
Float_t y6 [n_points_geant4]
 
Float_t ratio_opt4 [n_points_granero]
 
Int_t ncols_geant4_opt4
 
Int_t nlines6 =0
 
TGraph * gr1 = new TGraph (nlines1, x1, y1)
 
TGraph * gr2 = new TGraph (nlines2, x2, y2)
 
TGraph * gr3 = new TGraph (nlines3, x3, y3)
 
TGraph * gr4 = new TGraph (nlines4, x4, y4)
 
TGraph * gr5 = new TGraph (nlines5, x5, y5)
 
TGraph * gr6 = new TGraph (nlines6, x6, y6)
 
TLegend * leg = new TLegend(0.3, 0.5, 0.6, 0.8)
 

Function Documentation

leg AddEntry ( gr1  ,
"Reference data"  ,
"lp"   
)
leg AddEntry ( gr2  ,
"Geant4 - Livermore"  ,
"lp"   
)
leg AddEntry ( gr3  ,
"Geant4 - Penelope"  ,
"lp"   
)
leg AddEntry ( gr4  ,
"Geant4 - opt0"  ,
"lp"   
)
leg AddEntry ( gr5  ,
"Geant4 - opt3"  ,
"lp"   
)
leg AddEntry ( gr6  ,
"Geant4 - opt4"  ,
"lp"   
)
leg AddEntry ( gr1_ratio  ,
"Geant4 - Livermore"  ,
"lp"   
)
leg AddEntry ( gr2_ratio  ,
"Geant4 - Penelope"  ,
"lp"   
)
leg AddEntry ( gr3_ratio  ,
"Geant4 - opt0"  ,
"lp"   
)
leg AddEntry ( gr4_ratio  ,
"Geant4 - opt3"  ,
"lp"   
)
leg AddEntry ( gr5_ratio  ,
"Geant4 - opt4"  ,
"lp"   
)
gr1 Draw ( "AP"  )
gr2 Draw ( "CP"  )
leg Draw ( )
h2 Draw ( "P"  )
fclose ( fg1  )

Referenced by while().

fclose ( fg2  )
fclose ( fg3  )
fclose ( fg4  )
fclose ( fg5  )
fclose ( fg6  )
gr1 GetXaxis ( ) -> SetTitle("Distance from the centre (cm)")
gr1 GetYaxis ( ) -> SetTitle("Normalised dose rate distribution")
c1 Print ( "Flexi_dose_rate_distribution.jpg"  )
c1 Print ( "Flexi_dose_rate_distribution_ratio.jpg"  )
leg SetFillColor ( )
gr2 SetLineColor ( )
gr3 SetLineColor ( )
gr4 SetLineColor ( )
gr5 SetLineColor ( )
gr6 SetLineColor ( )
gr1 SetLineWidth ( )
gr2 SetLineWidth ( 0.  3)
gr1 SetMarkerColor ( )
gr2 SetMarkerColor ( )
gr3 SetMarkerColor ( )
gr4 SetMarkerColor ( )
gr5 SetMarkerColor ( )
gr6 SetMarkerColor ( )
gr2 SetMarkerSize ( 0.  2)
gr5_ratio SetMarkerSize ( )
gr1 SetMarkerStyle ( 20  )
gr2 SetMarkerStyle ( 21  )
std::cout<< "Livermore" << std::endl;for (Int_t j=0; j < nlines1; j++){ if ((ratio_liv[j] > 1.03) || (ratio_liv[j] < 0.97)) std::cout<< "Difference above 3% :"<< x1[j] << ", " << ratio_liv[j] << std::endl;} std::cout<< "penelope" << std::endl;for (Int_t j=0; j < nlines1; j++) { if ((ratio_pen[j] > 1.03) || (ratio_pen[j] < 0.97)) std::cout<< "Difference above 3% :" << x1[j] << ", " << ratio_pen[j] << std::endl;} std::cout<< "opt0" << std::endl;for (Int_t j=0; j < nlines1; j++) { if ((ratio_opt0[j] > 1.03) || (ratio_opt0[j] < 0.97)) std::cout<< "Difference above 3% :" << x1[j] << ", " << ratio_opt0[j] << std::endl;} std::cout<< "opt3" << std::endl;for (Int_t j=0; j < nlines1; j++) { if ((ratio_opt3[j] > 1.03) || (ratio_opt3[j] < 0.97)) std::cout<< "Difference above 3% :" << x1[j] << ", " << ratio_opt3[j] << std::endl;} std::cout<< "opt4" << std::endl;for (Int_t j=0; j < nlines1; j++) { if ((ratio_opt4[j] > 1.03) || (ratio_opt4[j] < 0.97)) std::cout<< "Difference above 3% :" << x1[j] << ", " << ratio_opt4[j] << std::endl;} TGraph *gr1_ratio = new TGraph (nlines1, x1, ratio_liv);TGraph *gr2_ratio = new TGraph (nlines1, x1, ratio_pen);TGraph *gr3_ratio = new TGraph (nlines1, x1, ratio_opt0);TGraph *gr4_ratio = new TGraph (nlines1, x1, ratio_opt3);TGraph *gr5_ratio = new TGraph (nlines1, x1, ratio_opt4);gr1-> SetTitle ( "Dose rate distribution"  )
gr1_ratio SetTitle ( "Dose rate distribution - RATIO"  )
while ( )

Definition at line 10 of file compare_all.C.

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

11  {
12  ncols_granero = fscanf(fg1,"%f %f",&x, &y);
13  if (ncols_granero<0) break;
14  // std::cout << "x " << x << std::endl;
15  x1[nlines1]=x;
16  y1[nlines1]=y;
17  nlines1++;
18 }
Float_t y
Definition: compare_all.C:6
Float_t x1[n_points_granero]
Definition: compare_all.C:5
Int_t nlines1
Definition: compare_all.C:8
Float_t x
Definition: compare_all.C:6
Int_t ncols_granero
Definition: compare_all.C:7
Float_t y1[n_points_granero]
Definition: compare_all.C:5

Variable Documentation

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

Definition at line 24 of file compare_all.C.

FILE* fg3 =fopen("geant4_dose_Flexi_penelope.txt", "r")

Definition at line 55 of file compare_all.C.

FILE* fg4 =fopen("geant4_dose_Flexi_opt0.txt", "r")

Definition at line 83 of file compare_all.C.

FILE* fg5 =fopen("geant4_dose_Flexi_opt3.txt", "r")

Definition at line 111 of file compare_all.C.

FILE* fg6 =fopen("geant4_dose_Flexi_opt4.txt", "r")

Definition at line 140 of file compare_all.C.

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

Definition at line 167 of file compare_all.C.

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

Definition at line 168 of file compare_all.C.

TGraph* gr3 = new TGraph (nlines3, x3, y3)

Definition at line 169 of file compare_all.C.

TGraph* gr4 = new TGraph (nlines4, x4, y4)

Definition at line 170 of file compare_all.C.

TGraph* gr5 = new TGraph (nlines5, x5, y5)

Definition at line 171 of file compare_all.C.

TGraph* gr6 = new TGraph (nlines6, x6, y6)

Definition at line 172 of file compare_all.C.

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

Definition at line 254 of file compare_all.C.

Int_t n_points_geant4 =398

Definition at line 25 of file compare_all.C.

Int_t n_points_granero =13

Definition at line 4 of file compare_all.C.

Int_t ncols_geant4_liv

Definition at line 27 of file compare_all.C.

Int_t ncols_geant4_opt0

Definition at line 85 of file compare_all.C.

Int_t ncols_geant4_opt3

Definition at line 113 of file compare_all.C.

Int_t ncols_geant4_opt4

Definition at line 142 of file compare_all.C.

Int_t ncols_geant4_penelope

Definition at line 57 of file compare_all.C.

Int_t ncols_granero

Definition at line 7 of file compare_all.C.

Int_t nlines1 =0

Definition at line 8 of file compare_all.C.

Referenced by while().

Int_t nlines2 =0

Definition at line 28 of file compare_all.C.

Int_t nlines3 =0

Definition at line 58 of file compare_all.C.

Int_t nlines4 =0

Definition at line 86 of file compare_all.C.

Int_t nlines5 =0

Definition at line 114 of file compare_all.C.

Int_t nlines6 =0

Definition at line 143 of file compare_all.C.

Float_t ratio_liv[n_points_granero]

Definition at line 5 of file compare_all.C.

Float_t ratio_opt0[n_points_granero]

Definition at line 84 of file compare_all.C.

Float_t ratio_opt3[n_points_granero]

Definition at line 112 of file compare_all.C.

Float_t ratio_opt4[n_points_granero]

Definition at line 141 of file compare_all.C.

Float_t ratio_pen[n_points_granero]

Definition at line 56 of file compare_all.C.

Float_t x

Definition at line 6 of file compare_all.C.

Referenced by while().

Float_t x1[n_points_granero]

Definition at line 5 of file compare_all.C.

Float_t x2[n_points_geant4]

Definition at line 26 of file compare_all.C.

Float_t x3[n_points_geant4]

Definition at line 56 of file compare_all.C.

Float_t x4[n_points_geant4]

Definition at line 84 of file compare_all.C.

Float_t x5[n_points_geant4]

Definition at line 112 of file compare_all.C.

Float_t x6[n_points_geant4]

Definition at line 141 of file compare_all.C.

Float_t y

Definition at line 6 of file compare_all.C.

Referenced by while().

Float_t y1[n_points_granero]

Definition at line 5 of file compare_all.C.

Float_t y2[n_points_geant4]

Definition at line 26 of file compare_all.C.

Float_t y3[n_points_geant4]

Definition at line 56 of file compare_all.C.

Float_t y4[n_points_geant4]

Definition at line 84 of file compare_all.C.

Float_t y5[n_points_geant4]

Definition at line 112 of file compare_all.C.

Float_t y6[n_points_geant4]

Definition at line 141 of file compare_all.C.