Direct Access to Kanga Files - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Direct Access to Kanga Files

Description:

From compiled ROOT macros. Fast, rates from 0.5 - 10 Khz. 05/14/03. Eric Charles. 1 ... Also some example macros. A few talks about how it all works ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 15
Provided by: hepun6
Category:
Tags: access | direct | files | kanga | macros

less

Transcript and Presenter's Notes

Title: Direct Access to Kanga Files


1
Direct Access to Kanga Files
  • A description of content and some features of
    the new Kanga

2
Outline
  • Content of new Kanga Files
  • standard micro candidate data
  • composite candidate geneology
  • Four-momentum and vertex data for selected
    candidates
  • Using the new Kanga Files
  • From BaBar Framework jobs
  • From ROOT prompt
  • building the shared library
  • browsing the data
  • From compiled ROOT macros
  • Fast, rates from 0.5 - 10 Khz

3
Micro Data Format
Data on branches
Branch
Eid
Meta Data (Tag and List names)
Tag
BtaStdHep
MicroTruMap
BtaCand_ifrQ
BtaXxxQual references
BtaCand_pidQ
BtaCand_pidI
BtaCand_trkQ
BtaCandTrkAdp
BtaCandTrkPar
Track Refs
BtaCandNeutAdp
BtaCandNeutPar
BtaCandTrk
Neutral Refs
BtaCandNeut
BtaXxxMap
BtaCand references
BtaXxx
Bta
4
Composite Data Format
Data on branches
Branch
Tracks Refs Neutral Refs
CmpCandTrk
CmpCandNeut
CmpCandCons
Daughter References
CmpCandComp
BtaCand References P4 and Vtx information
CmpXxxMap
CmpXxx
Cmp
CmpCandComp is the set of all stored candidates
composite daughters, the various CmpXxxMap are
just the top level candidates.
Meta Data (Map and List names)
5
Running on the new Micro
  • Build minimal BetaUser application
  • setenv BetaKanga yes
  • setenv BetaPhysMicro no
  • already have composites, so don't need
    CompositionSequences
  • setenv BetaBdbMicro no
  • Special tcl file for test data format
  • BetaUser/CM2Apr2003.tcl
  • Set up the input
  • setenv RooInputStream ltstreamgt (for composites)
  • setenv RooInputCollection ltcollectiongt

6
Kanga Shared Library
  • For browsing Kanga files from ROOT.
  • Check out the packages with Kanga code
  • RooUtils, StdHepDataR, BtaDataR, TagDataR,
    EidDataR, RooFramework, BbrInteractive.
  • Build the libraries, dicts. and shared library
  • gmake lib
  • gmake BbrInteractive.root
  • This builds a shared library
  • (ie) shlib/Linux24/libBbrInterative_X.Y.Z_ROOT.so
  • X.Y.Z is the RELEASE (ie 12.5.0-roo-4)

7
Browsing Kanga files
  • From ROOT load the Kanga shared library
  • gSystemgtLoad(libBbrInteractive_X.Y.Z_ROOT.so)
  • Build a KangaReader for the input file
  • RooKangaMicroCmp aCol(collection,stream)
  • collection the filename,
  • stream the name of the tree (ie BSemiExcl).
  • Get the data tree
  • KanTree kTree aCol.theTree()
  • A KanTree is just a special kind of TTree for
    Kanga.

8
Browsing KanTrees
  • To get a list of branches
  • kTree-gtbranchTypes()-gtPrint()
  • This is a bit more concise that kTree-gtPrint()
  • Includes the type of objects on each branch.
  • To make some plots
  • kTree-gtDraw(CmpListMap.getN())
  • Draws the number of entries in the List list.
  • kTree-gtDraw(CmpListMapV.vtxZ())
  • Draws the z position of the vertex for each
    Candidate.
  • Note the extra V to get the actual data vector
  • kTree-gtDraw(CmpListMapV.p4().Rho())
  • Draws the magnitude of the momemtnum.

9
Using a KangaReader
  • To load an event
  • aCol.GetEntry(5)
  • loads the 6th entry (counting starts at 0)
  • To get access to some data
  • aCol.CmpCandComp()
  • returns the vector of Composite candidates
  • aCol.CmpCandComp()-gtgetN()
  • returns the number of Composite candidates
  • aCol.CmpCandComp()-gtoperator(0)
  • returns a pointer to the first Composite candidate

10
Access to BtaCandidate Maps
  • Declare the map to the KangaReader
  • aCol.addCmpMap(mapName)
  • for user maps (ie DirtyBtoD0)
  • aCol.addBtaMap(mapName)
  • for micro maps (ie Bta)
  • Re-initialize the Kanga Reader
  • aCol.Init(aCol.theTree())
  • This is to set the branches right for the new
    maps
  • Get the map (or associated list) back
  • aCol.cmpCandMap(mapName) or cmpCandList
  • returns a pointer to the Map or List

11
RooFramework Executable
  • Very simple utility application for making simple
    plots directly from Kanga files
  • Just an event loop with hooks to do a few simple
    tasks each event
  • Uses Kanga Reader to access data, easy to
    convert to fully interactive use
  • Simple to use, just build RooFramework.bin
  • syntax RooFramework ltoptionsgt files
  • Can run on multiple input files
  • -s stream flag to set input stream name
  • -o output flag to set output file name

12
RooFramework Modes
  • No options
  • Simply counts events
  • -ecal flag
  • Fills a histogram of the EMC raw energy
  • -micro flag
  • Fills a standard set (50) of histograms
  • 13 Cal, 14 Trk, 12 Pid, 10 Ifr plots.
  • -c listname flag
  • Fills momentum and vertex plots for the composite
    candidates on a list

13
RooFramework Speed
Speed depends on number of branches read but
rates near 10 Khz feasible
14
Some Documentation
  • Generated ROOT documentation for all of the the
    Kanga classes
  • http//www.slac.stanford.edu/echarles/KangaHtml/
  • Also some example macros
  • A few talks about how it all works
  • http//www.slac.stanford.edu/echarles/work/Kanga/
Write a Comment
User Comments (0)
About PowerShow.com