Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
extended/medical/dna/microdosimetry/plot.C
이 파일의 문서화 페이지로 가기
1 // *********************************************************************
2 // To execute this macro under ROOT,
3 // 1 - launch ROOT (usually type 'root' at your machine's prompt)
4 // 2 - type '.X plot.C' at the ROOT session prompt
5 // 3 - OR directly type 'root plot.C'
6 // *********************************************************************
7 {
8 gROOT->Reset();
9 gStyle->SetPalette(1);
10 gROOT->SetStyle("Plain");
12 
13 c1 = new TCanvas ("c1","",20,20,1000,500);
14 c1->Divide(2,1);
15 
16 system ("rm -rf microdosimetry.root");
17 system ("hadd -O microdosimetry.root microdosimetry_*.root");
18 
19 TFile f("microdosimetry.root");
20 
21 TNtuple* ntuple;
22 ntuple = (TNtuple*)f.Get("microdosimetry");
23 
24 c1->cd(1);
25  gStyle->SetOptStat(000000);
26 
27  // All
28  ntuple->SetFillColor(2);
29  ntuple->Draw("flagProcess","","B");
30 
31  gPad->SetLogy();
32 
33 c1->cd(2);
34 
35  // Electrons
36  ntuple->SetMarkerColor(2);
37  ntuple->Draw("x:y:z/1000","flagParticle==1","");
38 
39  // Protons
40  ntuple->SetMarkerColor(4);
41  ntuple->SetMarkerSize(4);
42  ntuple->Draw("x:y:z/1000","flagParticle==2","same");
43 
44  // Hydrogen
45  ntuple->SetMarkerColor(3);
46  ntuple->SetMarkerSize(3);
47  ntuple->Draw("x:y:z/1000","flagParticle==3","same");
48 
49 }
G4double Double_t
system("rm -rf microbeam.root")
TTree * ntuple
Double_t scale