Geant4 Cross Reference |
1 // ******************************************* 1 // ********************************************************************* 2 // To execute this macro under ROOT, 2 // To execute this macro under ROOT, 3 // 1 - launch ROOT (usually type 'root' at y 3 // 1 - launch ROOT (usually type 'root' at your machine's prompt) 4 // 2 - type '.X plot.C' at the ROOT session 4 // 2 - type '.X plot.C' at the ROOT session prompt 5 // This macro needs the output ROOT file 5 // This macro needs the output ROOT file 6 // ******************************************* 6 // ********************************************************************* 7 { 7 { 8 gROOT->Reset(); 8 gROOT->Reset(); 9 gStyle->SetPalette(1); 9 gStyle->SetPalette(1); 10 gROOT->SetStyle("Plain"); 10 gROOT->SetStyle("Plain"); 11 Double_t scale; 11 Double_t scale; 12 12 13 c1 = new TCanvas ("c1","",20,20,1000,500); 13 c1 = new TCanvas ("c1","",20,20,1000,500); 14 14 15 // The command below stands for: 15 // The command below stands for: 16 // IF 1 THEN 2 16 // IF 1 THEN 2 17 system ("ls wholeNuclearDNA_* 2> /dev/null && 17 system ("ls wholeNuclearDNA_* 2> /dev/null && hadd -f wholeNuclearDNA.root wholeNuclearDNA_*.root"); 18 18 19 TFile f("wholeNuclearDNA.root"); 19 TFile f("wholeNuclearDNA.root"); 20 20 21 TNtuple* ntuple; 21 TNtuple* ntuple; 22 ntuple = (TNtuple*)f.Get("ntuple"); 22 ntuple = (TNtuple*)f.Get("ntuple"); 23 23 24 c1->cd(1); 24 c1->cd(1); 25 gStyle->SetOptStat(000000); 25 gStyle->SetOptStat(000000); 26 26 27 ntuple->SetMarkerColor(2); 27 ntuple->SetMarkerColor(2); 28 ntuple->SetMarkerStyle(20); 28 ntuple->SetMarkerStyle(20); 29 ntuple->SetMarkerSize(1); 29 ntuple->SetMarkerSize(1); 30 ntuple->Draw("x/1000:y/1000:z/1000","flagVolum 30 ntuple->Draw("x/1000:y/1000:z/1000","flagVolume==1",""); 31 31 32 ntuple->SetMarkerColor(4); 32 ntuple->SetMarkerColor(4); 33 ntuple->SetMarkerStyle(24); 33 ntuple->SetMarkerStyle(24); 34 ntuple->Draw("x/1000:y/1000:z/1000","flagVolum 34 ntuple->Draw("x/1000:y/1000:z/1000","flagVolume==2","same"); 35 35 36 } 36 } 37 37