LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
plot.C
Go to the documentation of this file.
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 // This macro needs the output ROOT file
6 // *********************************************************************
7 {
8 gROOT->Reset();
9 gStyle->SetPalette(1);
10 gROOT->SetStyle("Plain");
11 Double_t scale;
12 
13 c1 = new TCanvas ("c1","",20,20,1000,500);
14 
15 // The command below stands for:
16 // IF 1 THEN 2
17 system ("ls wholeNuclearDNA_* 2> /dev/null && hadd -f wholeNuclearDNA.root wholeNuclearDNA_*.root");
18 
19 TFile f("wholeNuclearDNA.root");
20 
21 TNtuple* ntuple;
22 ntuple = (TNtuple*)f.Get("ntuple");
23 
24 c1->cd(1);
25 gStyle->SetOptStat(000000);
26 
27 ntuple->SetMarkerColor(2);
28 ntuple->SetMarkerStyle(20);
29 ntuple->SetMarkerSize(1);
30 ntuple->Draw("x/1000:y/1000:z/1000","flagVolume==1","");
31 
32 ntuple->SetMarkerColor(4);
33 ntuple->SetMarkerStyle(24);
34 ntuple->Draw("x/1000:y/1000:z/1000","flagVolume==2","same");
35 
36 }
system("rm -rf microbeam.root")
TFile f("microbeam.root")
TNtuple * ntuple
Definition: plot.C:20
Double_t scale
Definition: plot.C:24
c1
Definition: plot.C:27