Babar logo
Workbook HEPIC Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Wkbk. Search
Wkbk. Sitemap
Logging In
Info Resources
Software Infrastructure
CM2 Introduction
Event Store
Modifying Code
Writing and Editing
Framework II
Find Data
Batch Processing
Advanced Infrastructure
New Releases
Main Packages
Event Displays
Contributing Software
Advanced Topics
Make CM2 Ntuples
New Packages
New Packages 2
Persistent Classes
Site Installation
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Workbook for BaBar Offline Users

Note: this is the pre-May 2006 version of the BaBar Workbook, also known as the "kiwi" Workbook (after Jenny Williams' userid, who did most of the development for it—many thanks, Jenny!). This version was revised and updated in spring of 2006 to produce the latest Workbook.

Search for:

See the WorkBook SiteMap for an overview of the contents of the BaBar Workbook

BaBar WebMaster, Workbook editor
We would be grateful for any contributions/suggestions to the workbook.

The color bar graphics indicate the state of completion of each section.

Please read the introduction before attempting to use the Workbook.

Analysis-30 update

All pages have now been updated to analysis-30, R18 data, and SP8 Monte Carlo,
EXCEPT for the Debugging page, the CM2 ntuples tutorial, and the related ROOT III tutorial.

Recent significant updates

21 January 2006: Workbook updated to analysis-30, R18 data, and SP8 MC
14 September 2005: Workbook updated to analysis-26 (release same as analysis-24 but with tag fixes so extra tags are not required to be checked out)
June/July 2005: Workbook updated to be completely CM2-compatible
25 July 2005: Generation, Simulation, Reconstruction pages combined into new simreco page.


Running on Non-SLAC Hosts

The main body of the Workbook always gives instructions that work at SLAC. Most of those instructions will also work at other institutions, but there will always be some small differences. This section of the Workbook provides a place to note those differences.

HOWTO's - Another Source of Guidance for BaBarians

A release-based package of ascii documentation on various aspects of BaBar computing.

Introduction to BaBar

Logging In

Takes the user through getting an account, desktop setup and account setup.

A Quick Tour of the BaBar Offline World

Has the user run a quick BaBar analysis job. The user is told what to type, but the commands are not explained in detail (that comes later). The intent is just to demonstrate that the user can run something.

The BaBar Detector

Provides background on HEP detectors in general and the BaBar detector in particular.

Information Resources

Tells the user where to go for information other than this Workbook.

Software Infrastructure

Unix for BaBar

Discusses how Unix is used in Babar. Provides a quick Unix primer for those who know no Unix, or who have some familiarity with it, but don't consider themselves experts..

Object Oriented Software

Alerts people coming from non-oo backgrounds that they have something new to learn. This section does not attempt to teach people how to program in an object oriented way, but instead refers the user to other introductory documents already on the web.

SRT: the Software Release Tools

Discusses just those parts of SRT and CVS that are necessary to run existing code. (Information on how to contribute new code to the BaBar software repository is covered in a later section.)

completion gif Objectivity: the Conditions Database

Brief introduction to the object conditions database and links to more objectivity information.

Event Store: Accessing Event Information in BaBar's Databases

Description of the information stored in the various BaBar Event Store Databases and specific details of the event information available at nano and micro level.

Introduction to CM2

A brief introduction to CM2.

Frameworks: the Environment for Running

Discusses the basics of tcl and uses it to link together a path in the Framework.

Beta: the Analysis Package

An introduction to the Analysis Package.

Making Minor Modifications to Existing C++ Code (for example, booking a new histogram)

All BaBar offline analysis tasks require the user to make at least minor modifications to existing c++ code. This section covers just enough about c++ to let the user do basic tasks, such as booking a new histogram, without going into details of object oriented design. (A later section goes into more detail on contributing new BaBar software).

Editing Code

Making minor changes to existing code.

Compile, Link and Run

Seeing the results of the minor changes you have made.


Watching the code execute, and basic problem solving.


How to interact with the framework to run simple analysis jobs, find data to run on, and analysing the resultant ntuples in ROOT or PAW.

Framework Continued

More about the Framework. As an example, modify the analysis module to allow framework interactive control of histogram limits.


A look at some of the most important of BaBar's analysis tools. Topics include particle identification, combination of Beta Candidates, vertexing and kinematic fitting, and reconstruction of decay trees.

Finding Data

How to use the bookkeeping tools BbkDatasetTcl and BbkSPModes to find CM2 data sets. An explanation of data set and collection names. condXXboot. How to determine the luminosity of a dataset, and the equivalent luminosity of a Monte Carlo set.

Batch Processing

Getting large jobs done more quickly while taking the load off the interactive machines.

Analysis in ROOT I

Introduction to the C++ analysis package ROOT

Analysis in ROOT II

Further use of the C++ analysis package ROOT

Analysis in ROOT III

Using ROOT for real physics analyses.

Analysis in PAW

Extracting results from an NTuple.

Analysis in PAW II

Further use of PAW: setting up a default macros directory, producing publication-ready plots in PAW.

Advanced Infrastructure

Working with New Releases

Selecting a sensible release to run your code on updating to newer releases and alternative package tags.

The workdir Package

The many uses of the workdir package.

Details on the Main Packages

Until now, the user has been running on standard data already reconstructed. This section takes the user on to generate, simulate and reconstruct data themselves, perturbing each of these processes slightly to see the effects.

Event Display

Graphical tool for viewing detector structure and events.

Generation, Simulation and Reconstruction

Reconstructing real data from detector output. Generating Monte Carlo (simulated data). Simulating the interaction between the generated event and the detector, and reconstructing the output.

Contributing Software

A previous section covered the basics of editing existing c++ code. This section discusses how to contribute whole new classes to the overall software effort.

SRT and CVS Background for Software Contributors

The developer's perspective on SRT.

Writing Code

Using an OO design approach to make proper use of C++.

Advanced Topics

Covers an assortment of advanced topics that some users may not need to know.

How to generate a set of CM2 ntuples using SimpleComposition and BtaTupleMaker

Tutorial for CM2 users by Chris Hearty describing how to generate ntuples using CM2 tools.

New Packages: Making a new Analysis package based on BetaMiniUser

Adapting the BetaMiniUser package for your own analysis

New Packages: Getting your package into CVS

Getting new packages included in the BaBar software release structure

Writing Classes for Persistent Objects

Designing classes that work properly in the database.

Java in BaBar

Guidelines for working outside of the BaBar C++ world.

Installing BaBar Software at a New Site

Workbook Meta-Information

The following information relates to the Workbook project itself.

Back to the BaBar Home Page

Control of the Workbook has passed from its original authors to the BaBar Documentation Master, Ray Cowan, and the BaBar Workbook Sub-WebMaster, Sheila Mclachlin. While this current version still reflects the work of those authors listed below, future comments should be directed to Ray Cowan and Sheila Mclachlin.

Original Project Lead: Joseph Perl (SLAC Computing Services)
Additional Main Authors:
Tracey Marsh (SLAC Computing Services), Leon Rochester (SLAC Group A), Massimiliano Turri (UC Santa Cruz).
Other contributors are credited in the appropriate sections.
See the Guide for Contributors for information on how to contribute to the Workbook project.

Last modification: 13 February 2006
Last significant update: 25 July 2005