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10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/electromagnetic/TestEm12/berger/berger.C (Version 11.3.0) and /examples/extended/electromagnetic/TestEm12/berger/berger.C (Version 5.1.p1)


  1 {                                                   1 
  2    gROOT->Reset();                                
  3                                                   
  4   /*                                              
  5    * Mainegra et al. Med. Phys. 32, 685-699 (2    
  6    * Seltzer, Appl. Radiat. Isot. 42 (1991) pa    
  7    * L. Ferrer et al. Cancer Bio. Rad. 22-1 (2    
  8    */                                             
  9                                                   
 10    ifstream in;                                   
 11    in.open("./EGSnrc/100keV-DPK.ascii");          
 12    //in.open("./Etran/100keV-DPK.ascii");         
 13                                                   
 14    // Create a new histogram                      
 15    double x_min = 0;                              
 16    double x_max = 1.2;                            
 17                                                   
 18    int nbdata = 0;                                
 19    in >> nbdata;                                  
 20                                                   
 21    TH1D* h1d = new TH1D("h1d","",nbdata,x_min,    
 22                                                   
 23    Double_t x, y;                                 
 24    for ( int i = 0 ; i < nbdata ; i++ ) {         
 25       in >> x >> y ;                              
 26       if (!in.good()) break;                      
 27       h1d->Fill(x,y);                             
 28    }                                              
 29    in.close();                                    
 30                                                   
 31    // Draw histogram                              
 32    h1d->SetTitle("Dose point kernel : energy d    
 33    h1d->GetXaxis()->SetTitle("d(E/E0)/d(r/r0)     
 34    h1d->GetYaxis()->SetTitle("DPK");              
 35    h1d->SetStats(kFALSE);  // Eliminate statis    
 36    h1d->SetLineColor(kRed);                       
 37    h1d->Draw("L");                                
 38                                                   
 39                                                   
 40    // Draw histograms fill by Geant4 TestEm12     
 41    TFile f1("./100keV_local.root");               
 42    TH1D* h1 = (TH1D*) f1.Get("8");                
 43    h1->SetLineColor(kBlack);                      
 44    h1->Draw("SAME HIST");                         
 45 /*                                                
 46    TFile f2("./10keV.liver.root");                
 47    TH1D* h2 = (TH1D*) f2.Get("8");                
 48    h2->SetLineColor(kBlue);                       
 49    h2->Draw("SAME HIST");                         
 50                                                   
 51    TFile f3("./10keV.penel.root");                
 52    TH1D* h3 = (TH1D*) f3.Get("8");                
 53    h3->SetLineColor(kGreen);                      
 54    h3->Draw("SAME HIST");                         
 55 */                                                
 56    // Print the histograms legend                 
 57    TLegend *legend = new TLegend(0.7,0.6,0.86,    
 58    legend->AddEntry(h1,"local ","l");             
 59    ///legend->AddEntry(h2,"liver ","l");          
 60    ///legend->AddEntry(h3,"penel","l");           
 61    legend->AddEntry(h1d,"EGSnrc","l");            
 62    legend->Draw();                                
 63                                                   
 64 }                                                 
 65