Tutorials

To use tutorials you need at least one data file. You can download ru_sample_4516_0001.root (1.1 Mb) from here.
 Put it into ~/data_dir. If you have data file in another directory or named differently than above imake a soft link to it by executing the following two lines:
  1. cd  ~/data_dir
  2. ln -s yourDataFileWithPathTOIt  ru_sample.root (important to have prefix "ru" because in all tutorials I specify the prefix )
Once you have data file (or link to it) in place you may run any samples:

you have to be in directory   $SasyHomeDir/tutorials to run tutorials

  1. root TutorialName.C   -q    ( -q option tells ROOT to quit when finished with macro. For more options: root -?)
  2. look at output file by doing: root outputFileName.root  ( outputFileName should show up at end of run, or look for recent file in ~/hist )
to run next tutorial you have to restart root. It is because ROOT and SasySoft use global variables and a lot of run time information and it is messy to keep track of all of it. They are valid for one instance of LegsRun and one set of makers. I do not see reason to have two instances of LegsRun and therefore do not want to waste time on implemeting it at the moment  ( 05/23/00). One can of course have two or more  sessions of ROOT and run several runs simultanuosly that way ( on multi-CPU-multi-disk machine for example it may speed up things).
 All macros assume that necessary libraries have been loaded beforehand. I load them automatically in macro rootlogon.C. This macro gets executed  immediately when root starts if it lies in the root macro path. The path may be tweaked inside of .rootrc file in your home directory.  Here is two variables and what they should be equal to:

Unix.*.Root.DynamicPath:    .:$(ROOTSYS)/lib:$(SasyHomeDir)/lib
Unix.*.Root.MacroPath:      .:$(ROOTSYS)/macros:$(SasyHomeDir)/macros
 

  1. A macro that does nothing
  2. Open data file(s) residing in directory ~/data_dir (data_dir could be link to another location)
  3. Create one histogram of polarization states, save it into a root file.
  4. Create 2 histograms with same name ( may be different contents) and save into the same root file but different directories.
  5. Display events with 3D viewer X3D or OPENGL clone - Mesa
  6. Input, output from/to ASCII file.
  7. Working with graphs
Of course it is advisable to look at ROOT tutorials as well. I am describing the way I use ROOT.