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
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
Please read the introduction before
attempting to use the Workbook.
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
June/July 2005: Workbook updated to be completely CM2-compatible
25 July 2005: Generation, Simulation, Reconstruction pages
combined into new simreco page.
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.
A release-based package of ascii documentation on various aspects of
Introduction to BaBar
Takes the user through getting an account, desktop setup and account setup.
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.
Provides background on HEP detectors in general and the BaBar detector
Tells the user where to go for information other than this Workbook.
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..
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.
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.)
Brief introduction to the object conditions database and links to more
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.
A brief introduction to CM2.
Discusses the basics of tcl and uses it to link together a path in the
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
Making minor changes to existing code.
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.
More about the Framework. As an example, modify
the analysis module to allow framework interactive control of
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.
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.
Getting large jobs done more quickly while taking the load off the
Introduction to the C++ analysis package ROOT
Further use of the C++ analysis package ROOT
Using ROOT for real physics analyses.
Extracting results from an NTuple.
Further use of PAW: setting up a default macros directory, producing
publication-ready plots in PAW.
Selecting a sensible release to run your code on updating to newer
releases and alternative package tags.
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.
Graphical tool for viewing detector structure and events.
Reconstructing real data from detector output. Generating Monte Carlo
Simulating the interaction between the generated
event and the detector, and reconstructing the output.
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.
The developer's perspective on SRT.
Using an OO design approach to make proper use of C++.
Covers an assortment of advanced topics that some users may not need
Tutorial for CM2 users by Chris Hearty describing how to generate
ntuples using CM2 tools.
Adapting the BetaMiniUser package for your own analysis
Getting new packages included in the BaBar software release structure
Designing classes that work properly in the database.
Guidelines for working outside of the BaBar C++ world.
The following information relates to the Workbook project itself.
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
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