SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Det. Search
Who's who?
Meetings
FAQ
Images
Archive
Systems
Performance
Intern. region
Vertex Tracker
Drift chamber
DIRC
Calorimeter
IFR
Magnet
Electronics
Trigger
Operations
Run Coordination
Ops. manual
Elec. logbook
BFactory status
Efficiency &
Luminosity
Shifts info
Backgrounds
IR-2 safety
DAQ experts
Upgrade Reports
Track the page
Subscribe to page!
Powered by NetMind
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)
DIRC RECIPES

How to Read the DIRC Mini

This recipe demonstrates how to read the DIRC mini that is being produced in OPR in 10 series releases. When reading the mini, events are processed at about 10 Hz. In principle, almost any work that is done with digis can be done more simply and quicker with the mini. For this sample job, I have added the OPR monitoring module DrcBck to the path to produce some histograms. These seem to be reasonable. Other modules may be added to this path to, for example, re-run the fitting or make an event display. Most of the mini is not currently be kept on disk. If the collection you want is not on disk, you can retrieve it with:

> collstagein -include esd "collection name"
The collection used in this example is currently on disk, so you shouldn't need to stage anything in. So, without any further ado...

How To Produce the Executable

>newrel -s $BFROOT/work/c/convery/ -t 10.2.3b 10.2.3b
(Use your own scratch area, not mine)
>cd 10.2.3b
>srtpath 10.2.3b Linux2
>addpkg workdir
>gmake workdir.setup
>addpkg Bear
>addpkg DrcReco V00-06-86-04
>addpkg DrcData V00-06-68-06
>emacs Bear/AppUserBuild.cc

(Add the lines
#include "KalmanTrack/KalFit.hh"
and
add( new KalFit("KalFit","Kal Fit"));
(this must be added after SkimTagSequence(this))

>physboot1
>setenv BDB_SINGLE_CONTEXT n
(I had trouble working in the bridge federation, not sure why.)
>gmake lib
>gmake Bear.bin

How to Run the Job

>cd workdir
>cp ~convery/babar/10.2.3b/workdir/ReadMini.tcl .
>setenv MiniInputCollection \         /groups/Stream1/0001/8200/P10.0.2bV01fb/00018205/cb001/allevents
>setenv MiniHistoFileName recipe.hbook
>../bin/Linux2/BearApp
> source ReadMini.tcl
> ev beg -nev 100
> exit

Then, enjoy your histograms in recipe.hbook (in the subdirectory drcbck) using PAW or other browser.

How to Do More

(This section under construction)

Any other reconstruction or monitoring code may be added to the path in ReadMini.tcl. Since the executable is Bear, just about any module you would want to use is already present and just needs to be added to the path. If you want to write your own module, it can access this various lists produced in DIRC reconstruction. For example, you can access the lists of DrcRecoHit and DrcTrack with:

DrcRecoHitList* aHitList;
getTmpAList( anEvent, aHitList, IfdStrKey("Default") );

DrcTrackList* aTrkList;
getTmpAList( anEvent, aTrkList, IfdStrKey("Default") );

Mark Convery, Updated 13 Dec 01

How to Do Find the Data

To find out which federation contains your favourite run, use Phil Hart's perl script:

~philiph/perl/col_fed_find.pl 
The script will tell you which slave federation the mini has to be staged to. Next, set your OO_FD_BOOT variable to that federation. Now use collstagein to stage the mini. To get di-muons for run 23220, for example:
~philiph/perl/col_fed_find.pl 23220

> run 23220 is found in phys19 fed in collection
>   groups/AllEvents/0002/3200/P10.2.3gV01fb/00023220/cb001/allevents

setenv OO_FD_BOOT
    /nfs/objyboot2/objy/databases/production/boot/physics/V1/ana/0119/BaBar.BOOT

collstagein -include esd -wait
    /groups/Stream2/0002/3200/P10.2.3gV01fb/00023220/cb001/allevents

collstagein -include esd -wait
    /groups/Stream2/0002/3200/P10.2.3gV01fb/00023220/cb001/allevents


Yes, it looks like you still have to call collstagein twice, once to stage the headers, the second time to stage the "digis". Then define the environment variables for your job and run your application.

Joe Schwiening, Updated 20 Mar 02


Links: 



This page is maintained by Jochen Schwiening