Creating and filling AIDA objects and plotting them in JAIDA
Description
1D and 2D Histograms, Clouds (Unbinned histogram), Profile 1D and 2D, DataPointSets and functions are created and plotted using JAIDA.
Python program
Click to retrieve the Python script of the example.
After having setup correctly your environment for PI, you need also to set theenvironment to use JAIDA, by typing (Bash shell):
. setup_JAida.sh
afterwards, you can run the example typing :
python -i jaidaDemo.py
Program flow
- The Python module AidaProxy is imported. This module loads the dictionary for the PI classes, making them available in the Python environment in the global namespace.
- 1D and 2D HIstograms, Clouds and Profile are booked
- The histograms, clouds and profiles are filled with various random data using functions available from the Python random package
- The JAIDA plotter is created using the pi_aida class Plotter which implements the AIDA IPlotter interface. This class loads a JAIDA plotter plug-in.
- Using the AIDA Plotter interface a zone containing 3x3 regions is created
- The 1D and 2D HIstograms, Clouds and Profile are plotted in various regions. For the clouds an automatic binning is used for plotting
- The 1D histogram is fitted with a gaussian function
- The resulting fitted function is plotted on top of the histogram
- A xy DataPointSet is created from the Profile1D data and plotted
- A DataPoint Set created from a 1D vector of points with asymmetric errors is created and plotted