CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.

Learning Lizard/Anaphe/AIDA by examples

Anaphe Version >= 5.0.2

Under these pages one finds self-contained examples demonstrating the use of the AIDA abstract interfaces. The interfaces can be used in C++ programs using the Anaphe implementation libraries, and in python scripts that can be executed using the Lizard interactive tool. For the definitions of the basic AIDA classes (Factories, Histograms, Clouds, Tuples, Functions, Trees, etc) follow the links to the AIDA pages. There one can find other examples using the interfaces written in Java.

Every example is given in up to three versions:

  1. A C++ program making exclusive use of the AIDA interfaces.
  2. A C++ program making direct use of the Anaphe implementation classes, in case the program size can be significantly reduced.
  3. A python script making exclusive use of the AIDA interfaces.

Basics of histograms, functions, tuples, dataPointSets, fitting and plotting

  1. Creating, filling, and printing the contents of an 1-dimensional histogram.
  2. Creating, filling, and plotting an 1-dimensional histogram.
  3. Creating several histogram types in a tree in memory.
  4. Creating and plotting histograms in logical tree mapped to an HBOOK file.
  5. Loading histograms from HBOOK (from the previous example), adding, plotting and saving the result and the original histograms in an XML file.
  6. Fitting an 1-dimensional histogram and plotting the results.
  7. Creating and filling a tuple in an HBOOK file.
  8. Reading back a tuple from an HBOOK file and projecting into a histogram, fitting and saving the results in XML.
  9. Creating and filling a tuple in an XML file.
  10. Reading back a tuple from an XML file and projecting into a histogram, fitting and saving the results in a new XML file.
  11. Creating and plotting a Data Point Set in a logical tree mapped to an XML file.

More on fitting (Python examples)

  1. Simple gaussian fit from the data of a histogram.("exampleFit1.py")
  2. Fitting a gaussian on top of a flat background from the data of a histogram.("exampleFit2.py")
  3. Simple gaussian fit from the data of a cloud.("exampleFit3.py")
  4. Fitting a 2-dimensional histogram using a user function.("exampleFit4.py", "Constant2DFunction.h", "Constant2DFunction.cpp")
  5. Fitting a data point set which is generated from the data of a histogram.("exampleFit5.py")

Interactive Physics analysis using the Analyzer component of Lizard

  1. Histograms are created and filled from user code and plotted with Lizard.


Ioannis PAPADOPOULOS
IT / API