27 import java.util.Random;
28 import java.io.IOException;
41 public static void main(String[] argv)
throws IOException
43 String fileName=
"Pol01.aida";
46 System.out.println(
"using file name "+fileName);
49 IAnalysisFactory af = IAnalysisFactory.create();
50 ITree
tree = af.createTreeFactory().create(fileName,
"xml");
52 IHistogram1D
h1 = (IHistogram1D) tree.find(
"1");
53 IHistogram1D
h2 = (IHistogram1D) tree.find(
"2");
54 IHistogram1D
h3 = (IHistogram1D) tree.find(
"3");
55 IHistogram1D h4 = (IHistogram1D) tree.find(
"4");
57 IPlotterFactory pf = af.createPlotterFactory();
58 IPlotter plotterPhoton = pf.create(
"Photon");
59 plotterPhoton.createRegions(2,2);
60 plotterPhoton.region(0).plot(h1);
61 plotterPhoton.region(1).plot(h2);
62 plotterPhoton.region(2).plot(h3);
63 plotterPhoton.region(3).plot(h4);
66 IHistogram1D h5 = (IHistogram1D) tree.find(
"5");
67 IHistogram1D h6 = (IHistogram1D) tree.find(
"6");
68 IHistogram1D
h7 = (IHistogram1D) tree.find(
"7");
69 IHistogram1D
h8 = (IHistogram1D) tree.find(
"8");
71 IPlotter plotterElectron = pf.create(
"Electron");
72 plotterElectron.createRegions(2,2);
73 plotterElectron.region(0).plot(h5);
74 plotterElectron.region(1).plot(h6);
75 plotterElectron.region(2).plot(h7);
76 plotterElectron.region(3).plot(h8);
77 plotterElectron.show();
79 IHistogram1D
h9 = (IHistogram1D) tree.find(
"9");
80 IHistogram1D
h10 = (IHistogram1D) tree.find(
"10");
81 IHistogram1D
h11 = (IHistogram1D) tree.find(
"11");
82 IHistogram1D
h12 = (IHistogram1D) tree.find(
"12");
84 IPlotter plotterPositron = pf.create(
"Positron");
85 plotterPositron.createRegions(2,2);
86 plotterPositron.region(0).plot(h9);
87 plotterPositron.region(1).plot(h10);
88 plotterPositron.region(2).plot(h11);
89 plotterPositron.region(3).plot(h12);
90 plotterPositron.show();