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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/TestEm11/sandia/sandia.C (Version 11.3.0) and /examples/extended/electromagnetic/TestEm11/sandia/sandia.C (Version 5.1)


  1                                                     1 
  2 {                                                 
  3    gROOT->Reset();                                
  4                                                   
  5    // Draw histograms fill by Geant4 TestEm11     
  6    TFile f1("./Ta_1000keV_opt3.root");            
  7    TH1D* h1 = (TH1D*) f1.Get("8");                
  8    h1->SetTitle("Depth dose distribution of 10    
  9    h1->GetXaxis()->SetTitle("Edep (Mev.cm2/g)     
 10    h1->GetYaxis()->SetTitle("MeV*cm2/g");         
 11    h1->SetStats(kFALSE);  // Eliminate statist    
 12    h1->SetLineColor(4);   // blue                 
 13    h1->Draw("HIST");                              
 14 /*                                                
 15    TFile f2("./Ta.1000keV.opt2.root");            
 16    TH1D* h2 = (TH1D*) f2.Get("8");                
 17    h2->SetStats(kFALSE);  // Eliminate statist    
 18    h2->SetLineColor(3);   // green                
 19    h2->Draw("SAME HIST");                         
 20 */                                                
 21 /* data                                           
 22 * G.J.Lockwood et al.                             
 23 *     Sandia report SAND79-0414.UC-34a, Februa    
 24 * O.Kadri et al. NIM B 258 (2007) 381             
 25 */                                                
 26                                                   
 27    ifstream in;                                   
 28    in.open("./data/Ta_1000keV.ascii");            
 29                                                   
 30    TMarker *pt;                                   
 31    Double_t x, y;                                 
 32    // First indicate number of data               
 33    int nbdata = 0;                                
 34    in >> nbdata;                                  
 35    for ( int i = 0 ; i < nbdata ; i++ ) {         
 36       in >> x >> y ;                              
 37       if (!in.good()) break;                      
 38       pt = new TMarker(x,y,22); // 22 for tria    
 39       pt->SetMarkerColor(kRed);                   
 40       pt->Draw();                                 
 41    }                                              
 42    in.close();                                    
 43                                                   
 44    // Print the histograms legend                 
 45    TLegend* legend = new TLegend(0.6,0.55,0.8,    
 46    legend->AddEntry(h1,"ref10-opt3 ","l");        
 47    ////legend->AddEntry(h2,"ref10-opt2 ","l");    
 48    legend->AddEntry(pt,"Sandia data","P");        
 49    legend->Draw();                                
 50 }                                                 
 51