For plotting and fitting, org.lcsim provides an implementation of the Abstract Interfaces for Data Analysis AIDA.
AIDA objects is organized in Trees, which can have a directory structure like a file system.
This tutorial will assume that you are working in JAS3 and have either loaded an existing AIDA file or created objects in AIDA with the org.lcsim plugin. For a first introduction how to create AIDA objects, you could execute one of the AIDA examples or one of the org.lcsim examples in JAS3 or follow Explanation of Analysis101 Driver. If you have executed some of the org.lcsim examples in JAS3, you have already used AIDA in lines like these:
AIDA aida = AIDA.defaultInstance(); ... aida.cloud1D("nTracks").fill(tracks.size()); |
Class name of the AIDA object |
Description |
IHistogram1D, -2D, -3D |
One-, two- and three-dimensional binned histograms
|
ICloud1D, -2D, -3D |
One, two and three-dimensional unbinned histograms
|
IProfile1D, IProfile2D |
One- and two-dimensional profile plots
|
IDataPointSet1D, -2D, -3D |
Sets of one, two- and three-dimensional data points with errors
|
ITuple |
Tuple structure for persistence
|
Lets start with viewing AIDA objects. You can either create them with the AIDA examples, the org.lcsim examples or you can load an existing AIDA file with File->Open File...
in the menu.
All AIDA objects are arranged in trees. You can have many trees open at the same time; they are represented as Folders, . Trees can contain, e.g. Clouds and/or Histograms , with the name of the object appearing next to it. If a folder is closed, double-clicking will open it and display its contents. Similarly, double-clicking on an open folder will close it, so that the contents are hidden.
Trees that are created by the org.lsim examples will have non-descriptive names like |
A double-click on a Cloud or a Histogram will cause JAS3 to plot the contents.
Clouds are automatically displayed with 50 bins over the range of the data. |
If the active page shows source code or the examples, double clicking on an item in the tree will create a new plot page and display the item. |
If you want to display more than one plot on a page, you have to use the context menu.
|
In order to display an item together with an already displayed item, select Overlay on Current Plot
from the context menu
If you just want to include the plot in your presentation, you can copy it to the clipboard with |
JAS3 supports various graphics formats, for both bitmap and vector graphics.
Bitmap graphics are not scalable. JAS3 saves all Plots in their current size. Please make sure to draw the window to the desired width before saving in a bitmap format. |
The following list gives a brief description of the most often used formats
|
Saving Plots is a trivial task in JAS3:
File->Save As...
Save Plot As...
|
In order to save your whole tree with all Cloud and Histogram objects, right-click on the folder icon , and select Save As...
from the context menu. Please select a filename with the extension .aida
so that you will be able to recognize the file later.
Thanks to the close integration of JAS3 and AIDA, a plethora of manipulations is availabe via menus and dialogs. This tutorial can merely give an overview over the most commonly used ones.
Plot Properties...
from the menu. You will see tabs that represent different regions of the plot.The axis properties can be found in the Plot Properties...
entry in the context menu, which you can bring up with a right-click. The Y Axis and X Axis tabs let you specify a range for the respective axis, as well as change the scale to logarithmic. Click the Apply button to make the change visible immediately.
You can change the font of the title or the axis labels. Open the context menu of the label you want to change by right-clicking on the text. The first item in the context menu is either Title Font...
or Axis Font...
depending on where you click.
When overlaying two or more histograms, oftentimes important information is hidden behind the opaque histogram bars. In this case it is convenient to access the context menu with a right click and selecting Fill Histogram Bars
. More sophisticated changes can be made by accessing the Plot Properties...
dialog from the context menu. The Data tab shows all data sets contained in the current plot. Click each data set to access its options. After changing an option, click the Apply button to see the changes.
You can select for each data set whether you want to display it. JAS3 has also the option to plot a secondary Y Axis. You can select which of the two possible axes to associate your data with.
1D Plot Style/2D Plot Style
: This is where you change the color, line width and other display properties of each plot. Click apply after your changes to confirm that this is what you wanted.
You can select what information should be displayed in the statistics box by right-clicking on the statistics box and selecting Statistics Properties...
. If you want the statistics box to disappear completely, right-click on the main plot and select Show Statistics
. This entry is also used to make the box re-appear.
There is currently no option in JAS3 to make the label box disappear. If, for some reason, you do not want to have it displayed, you can select it and resize it to a size of 0. |
JAS3 provides some predefined functions.
Add function
from the context menu by right-clicking on the histogramFit
from the context menu and select the function you want to fit to the data.Plot Properties...
dialog, which you can access from the context menu.Before re-fitting the function, make sure the indicators of all parameters that you want included in the fit are checked. You can modify the Values of each Parameters, which will then be used as the new starting point for the fit. Click the checkbox labelled Fit to uncheck it, then click it again to start the new fit.
For further information on fitting, please visit Fitting Through The GUI and Fitting Tutorial