File indexing completed on 2025-12-16 09:31:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 import hep.aida.*;
0027 import java.util.Random;
0028 import java.io.IOException;
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 public class plotResults
0040 {
0041 public static void main(String[] argv) throws IOException
0042 {
0043 String fileName="Pol01.aida";
0044 if (argv.length>0) {
0045 fileName=argv[0];
0046 System.out.println("using file name "+fileName);
0047 }
0048
0049 IAnalysisFactory af = IAnalysisFactory.create();
0050 ITree tree = af.createTreeFactory().create(fileName,"xml");
0051
0052 IHistogram1D h1 = (IHistogram1D) tree.find("1");
0053 IHistogram1D h2 = (IHistogram1D) tree.find("2");
0054 IHistogram1D h3 = (IHistogram1D) tree.find("3");
0055 IHistogram1D h4 = (IHistogram1D) tree.find("4");
0056
0057 IPlotterFactory pf = af.createPlotterFactory();
0058 IPlotter plotterPhoton = pf.create("Photon");
0059 plotterPhoton.createRegions(2,2);
0060 plotterPhoton.region(0).plot(h1);
0061 plotterPhoton.region(1).plot(h2);
0062 plotterPhoton.region(2).plot(h3);
0063 plotterPhoton.region(3).plot(h4);
0064 plotterPhoton.show();
0065
0066 IHistogram1D h5 = (IHistogram1D) tree.find("5");
0067 IHistogram1D h6 = (IHistogram1D) tree.find("6");
0068 IHistogram1D h7 = (IHistogram1D) tree.find("7");
0069 IHistogram1D h8 = (IHistogram1D) tree.find("8");
0070
0071 IPlotter plotterElectron = pf.create("Electron");
0072 plotterElectron.createRegions(2,2);
0073 plotterElectron.region(0).plot(h5);
0074 plotterElectron.region(1).plot(h6);
0075 plotterElectron.region(2).plot(h7);
0076 plotterElectron.region(3).plot(h8);
0077 plotterElectron.show();
0078
0079 IHistogram1D h9 = (IHistogram1D) tree.find("9");
0080 IHistogram1D h10 = (IHistogram1D) tree.find("10");
0081 IHistogram1D h11 = (IHistogram1D) tree.find("11");
0082 IHistogram1D h12 = (IHistogram1D) tree.find("12");
0083
0084 IPlotter plotterPositron = pf.create("Positron");
0085 plotterPositron.createRegions(2,2);
0086 plotterPositron.region(0).plot(h9);
0087 plotterPositron.region(1).plot(h10);
0088 plotterPositron.region(2).plot(h11);
0089 plotterPositron.region(3).plot(h12);
0090 plotterPositron.show();
0091 }
0092 }