TBRootAna Users Guide v 0.7

Goes with TBRootAna:  v0r19 and HEAD

What is TBRootAna and what is it good for?

TBRootAna is a root application that can be used to analyze ntuples created from the Athena framework. It provides easy access to the data in the ntuples via a number of classes. Through the modification of the UserAlg class users can create their own analysis code.

The current version works for 2002 Combined Test Beam Data.

Checking out the code from the cvs Repository

This Option is best for people who intend on adding to the code in such a way that it will be useful and readable to others.  If you intend of simply using TBRootAna do something simple and don't want to bother learning cvs and configuring for  CVS checkouts please download a release from the release tarballs page.  Note that the tarballs are not always up to date.

I would recommend reading up on CVS at the cvs homepage. Note that you can checkout a particular version by specifying the tag you wish to checkout by adding the option '-r tag' where tag is some symbolic tag. For example you could use the command 'cvs checkout -P -r v0r19 TBRootAna' to checkout version 0 release 19.

Obtaining Source Tarballs

This option is best for those people not interested in dealing with CVS and who wish to make modest modifications to the code without ever having the intention of checking them in.

Running the code

Modifying the Code


The only place that you will need to make changes is in the UserAlg class. You  will need to modify both the .h and .cxx files. UserAlg functions in a manner  very similar to a Athena algorithm in that the user must modify only three  methods, initialize(), execute() and finalize(). Three important objects are made available to you in UserAlg; Event, Header, and Geometry.  From these three objects all the information contained in the NTuple and the geometry information can be accessed. The Event object can be accessed  via the pointer m_event. Before the execute method is run in UserAlg the information contained in m_event is updated for the current event. The Headers object provides access to all the information contained in the run headers (Global, Slow Control, Hec and Emec).

Full doxygen class documentation is provided for these three objects.

Steps to modify the code
Important things made available to you in UserAlg