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!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

How to write Kanga files in Beta

Writing Kanga files reading from Objy
Writing Kanga files reading from Kanga

Writing Kanga from Objy


Assuming you're using bdbFilterMicro.tcl :

   # Setup output
   sourceFoundFile RooSequences/RooSequence.tcl
   sourceFoundFile RooSequences/RooOutputSequence.tcl
   sourceFoundFile RooSequences/RooWriteMicro.tcl
   module disable RooEventUpdate
   module disable RooBuildEnv


   # in case of simulation fetch the MC truth
   if [info exists env(BetaMCAll)] {
  catch { sourceFoundFile G3DataP/G3BdbReadSim.tcl }
  catch { sourceFoundFile StdHepDataP/StdHepBdbReadSim.tcl }
  catch { sourceFoundFile TruthTools/TruthToolsSequence.tcl }
  mod disable TaggingControl
  talkto BtaLoadMcCandidates {
      createMicroStd set true
  }
   } elseif [info exists env(BetaMCMicro)] {
  catch { sourceFoundFile StdHepDataP/StdHepBdbReadAod.tcl }
   }

# If you want to write out MC generator information,
# comment out the next two lines.
   mod disable StdHepRooLoad
   mod disable StdHepRooLoad2

# finish setting up the Roo output
   sequence append EventSource RooBuildEnv
   path append Everything RooSequence
   sourceFoundFile RooSequences/RooWriteMicro.tcl

# Setup of output stream (must be done after path is created)
# environmental variable kangaColl contains the name of your output kanga file
   rooSetOutput $env(kangaColl) microDST

Writing Kanga from Kanga


Assuming you're using kangaFilterMicro.tcl and want to write micro and tag only (i.e., not monte carlo truth):
   # set the kanga file for skimming
   sourceFoundFile RooSequences/RooOutputSequence.tcl
   set roonum 2
   sourceFoundFile RooSequences/RooWriteMicro.tcl
   talkto RooEventOutput {
        output stream $outputStream $kangaColl
        output paths  $outputStream Everything
   }
   mod disable StdHepRooLoad
   mod disable StdHepRooLoad2



If you want to write the micro, tag and monte carlo truth, you should
uncomment the following lines at the end of kangaFilterMicro.tcl and
set the environmental variable RooOutputFile:

   ## See if we want to write an output file for filtered events
   #if [ info exists env(RooOutputFile) ] {
   #    sourceFoundFile RooSequences/RooOutputSequence.tcl
   #    rooSetOutput $env(RooOutputFile)
   #    rooAll Esd Write 2
   #    rooAll Tag Write 2
   #}







This page is maintained by
Vuko Brigljevic
Last update: jun 28 2003 by kevin flood