An example to analyze the TMB-Tree in root: =========================================== Go to the directory you want to run root in and % setup D0RunII p15.05.00 % ln -s /d0dist/dist/releases/p15.05.00/tmb_tree/macros macros % cp macros/MakeTMBTreeClasses_so.C . % root root[] .x MakeTMBTreeClasses_so.C root[] .q this makes file TMBTreeClasses_C.so It is not necessary to quit root at this point, you can proceed to the next steps. ********************************************************************* The next set of steps are optional and can be skipped with almost no penalty. They allow you to find out the maximum number of objects/event. You can put these numbers in your macros for higher efficiency. The macros will still work if you don't have them properly set. % root root[].x MakeTMBTreeClasses_so.C (it will only load the .so if it exists already) root[] TFile *f =new TFile("my_tmb_tree.root") to produce temp.h from the inputfile "my_tmb_tree.root" using MakeClass() (see 5.) root[]TMBTree.MakeClass("temp") : to produce temp.h root[] .q make your changes in MYTreeClass.C (TMBTree_bu.C, is a template which one can copy) For the moment: MYTreeClass.h cannot be correctly produced by MakeClass() because TRef and TRefArray are not correctly transported. Therefore edit MYTreeClass.h and put in from temp.h the max size of TClonesArray obtained by MakeClass("temp") (e.g. const Int_t kMaxTrks = 85;) ************************************************************ Now you are ready to start a session. Except for setup D0RunII the above steps are only needed once. After all the initialization you start a session with % root root[] .x MakeTMBTreeClasses_so.C root[] .L MyTreeClass.C++ (this makes a MyTreeClasses_C.so, if you do not change MyTreeClasses.C the next time you should .L MyTreeClass_C.so, saves compilation). root[] MyTreeClass t("my_tmb_tree.root") root[] t.Loop() There is a macro file TMBMCmatch.C which gives an example of how to use TMBTRefs objects to find matches between reconstructed and MC leptons. You can use it instead of TMBTree.C. ----------------------- Nota: 1. to measure the realtime ROOT spends in a processor type gROOT.Time() 2. use '.O 0' to disable CINT optimization. This should be done in some cases where CINT optimization results in segmentation violation