What is EzRoot

  • EzRoot is a light weight general purpose cpp file (dual use program/macro) that can analyse data from any nuclear physics experiment without your having to learn root and write a full program.
  • You dont even need to know ROOT and C++ in detail.
  • It's also a learning tool. By reading the code you will quickly become familiar with ROOT.
  • Avoid unstructured, lengthy, unoptimized, difficult to maintain code as written by beginners.
  • EzRoot will immediately generate all your histograms and display them.
  • All you will have to do is edit a setup text file.
  • You will have to add code for mathematically derived parameters like we do in LAMPS.
  • Side-step months of work writing and testing your own ROOT program written from scratch.

Getting and using EzRoot

  1. Download EzRoot01.tgz
  2. Unpack it to get EzRoot.cpp and EzRoot.set
  3. Edit EzRoot.cpp to privide the name of your root file and tree.
  4. Edit EzRoot.set to define your 1d and 2d histograms.
  5. Run the file as a macro ($ root EzRoot.cpp).
  6. The first TH1 and TH2 will be displayed in two separate canvasses
  7. To display the next TH1 issue the command
    c1->cd(); h[1]->Draw(); c1->Modified(); c1->Update();
    from the command line.
    h[n]->Draw()
    would display the nth one-dimensional histogram)
  8. Similarly
    c2->cd(); g[n]->Draw("COLZ"); c2->Modified(); c2->Update();
    will display the nth two-dimensional histogram

Updates to EzRoot

The present version EzRoot01 (7th Aug 2026) is at a preliminary stage. Enhancements are underway:
  1. Reading many .root files (with names in setup file).
  2. Skeleton code for user defined parameters.
  3. Conditions (gates) one-dimensional and two-dimensional.
Thus we can get LAMPS like functionality in a compact general purpose root program.