Code Libraries - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Code Libraries

Description:

By 'tools' I mean (mostly) packages which contain routines which ... C type functions like asin() Architecture-dependent limits. complex double data type ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 24
Provided by: markfi2
Category:
Tags: asin | code | libraries

less

Transcript and Presenter's Notes

Title: Code Libraries


1
Code Libraries
  • Tools for BTeV developers and users
  • By tools I mean (mostly) packages which contain
    routines which can be called from your code

2
Rationale and Goals
  • The tools referred to are
  • Libraries, classes, components that developers
    can use as building blocks
  • Often HEP-specific
  • Some key goals of well-chosen libraries
  • Uniformity within Experiment
  • Avoid some time-consuming effort
  • Increase confidence of correctness
  • Improve Consciousness about and effectiveness of
    Object Oriented design

3
Caveats
  • The support model for each tool should be
    understood
  • Local response to bug reports and essential
    feature needs, or
  • A good, stable and adequate user-oriented support
    team, or
  • A well-established product thought to be very
    well tested and meeting all needs

4
Caveats
  • Some tools are needed but are not available in a
    good form
  • Non-OO or poorly designed packages nonetheless
    may be valuable
  • BTeV must decide among
  • Redo the tool
  • Try to join the support team and improve from
    within
  • Live with the flawed tool
  • Have individual BTeV developers each develop
    those features they need

5
Categories
  • Framework-related
  • Handling extraordinary occurrences
  • Database-related
  • Physics-related
  • Simple Physics Objects
  • Particles and properties
  • Simulation etc covered elsewhere
  • Mathematics
  • Linear Algebra
  • Random Numbers
  • Minimization
  • Special Functions
  • Numerical Algorithms
  • Histograms and Ntuples
  • Accumulation
  • Visualization
  • Persistency
  • Geometric Visualization
  • Programming utilities

6
Sources
  • HEP community
  • CLHEP
  • LHC
  • Root
  • HepVis
  • CERNLIB M
  • FNAL developers
  • ZOOM
  • Other tools
  • Non-HEP World of C
  • std library
  • Boost and similar efforts
  • gsl (GNU Scientific Library) in C

7
Framework-related
  • Error Logging
  • Idea is to have a single uniform mechanism which
    allows messages and warnings to be routed to
    multiple destinations, with controlled filtering
    and statistics
  • ZOOM ErrorLogger
  • In use by D0, CDF
  • Simple user (message-issuer) interface
  • Semantics like cout ltlt
  • Probably meets all BTeV warning and error logging
    needs

8
Framework-related
  • RCP Run Control Parameters
  • Interface to database of parameters
  • M. Paterno
  • In use at D0, CDF
  • Probably meets BTeV needs
  • ZOOM Exceptions
  • Extends C exceptions mechanism to include
    signal-like capabilities (e.g. handlers,
    ignore-and-proceed, etc.)
  • Can coordinate with ErrorLogger

9
Physics- Related
  • CLHEP Vector
  • 3- and 4-vectors, Rotations and Transformations
  • Rich set of methods
  • Same as ZOOM PhysicsVectors
  • Geant4 used CLHEP Vector but has switched to its
    own class, causing users some hassle this issue
    is not resolved right now

10
Physics-Related
  • HepPDT
  • Particle properties, as in the PDG
  • Monte-carlo particle numbering scheme
  • Values and errors on quantities
  • Multiple tables allowed
  • Decay information
  • Allows for custom decay chains

11
Physics-Related
  • StdHepC
  • C successor to StdHep
  • Interface to all the common event generators
  • Deals with specific particles (with a momentum,
    helicity, etc.) utilizes HepPDT to know
    particle properties
  • Deals with collisions, events, runs
  • Uses HepMC classes developed by ATLAS for event
    container
  • Can read/write HEPEVT common block
  • HepPDT and StdHepC are in CLHEP with Lynn
    Garren as editor
  • So one can expect BTeV needs to be met

12
Mathematics
  • CERNLIB support is going away
  • Have to identify how BTeV will continue to have
    those CERNLIB tools which it needs mostly
    mathematical
  • Linear Algebra
  • CLHEP Matrix
  • ZOOM LinearAlgebra
  • Neither of the above is perfect either is OK.
    There are also packages from the non-HEP
    community, but probably among the free packages,
    these are best.
  • Situation needs to be resolved.
  • Specialized Matrix operations
  • For covariance matrices and operations needed for
    Kalman filter
  • Should be lean, mean and fast
  • Real need being addressed by ZOOM

13
Mathematics
  • ZOOM Special Functions
  • Wraps gsl special functions
  • Improves the interface
  • Adds a few that were missing
  • CLHEP Random
  • Several excellent generators
  • All the distributions mentioned in PDG book (plus
    Landau)
  • A random engine is an object
  • This makes it easy to design with multiple
    independent streams
  • Boost has a random library.
  • Superior in terms of C design
  • But CLHEP Random is more comprehensive

14
Mathematics
  • Minimization MINUIT (?)
  • This is part of CERNLIB M so support and porting
    issues are cloudy
  • C versions becoming available
  • f2c translation is in ROOT
  • ZOOM preparing C package with identical
    algorithms plus extensions made natural by
    object-oriented nature
  • Algorithms
  • Several CERNLIB M algorithms might be useful
  • Most can be found in C, in gsl.
  • Nobody (that I am aware of) has yet sytematically
    created good C interfaces to these
  • But for any specific case, it will not be
    difficult

15
Histograms and Ntuples
  • Two types of activity
  • Accumulation
  • And in-program read-back
  • Examination
  • Via good graphics
  • With statistics and fitting
  • Production of publication-quality figures
  • These functions, while related, are not
    necessarily both addressed well by the same
    package

16
Histograms and Ntuples
  • Before choosing tools/packages, should answer a
    strategic question
  • Do we want accumulation code to use an interface
    wrapper that lets us attach different underlying
    packages without hanging code?
  • Or do we want to settle on one good package and
    code directly to that?
  • Available interface layers
  • HepTuple
  • Works with ROOT, HBOOK, HistoScope
  • Has a bit of historical baggage
  • AIDA
  • Developed recently LHC
  • May not do Ntuples yet
  • Underlying implementations might not include
    ROOT-based

17
Histograms and Ntuples
  • Several choices for base package
  • Root
  • Physicists voting with their feet
  • HBOOK
  • But is it vulnerable ? M
  • Java Analysis STudio
  • (Newer AIDA implementations)
  • Commercial products
  • No recommendation here, but
  • Even if one package is settled upon, it might be
    right for safety and development easy to use one
    of the interface wrappers

18
Persistency
  • Ways to write out data such that it can be read
    back later, in a different program
  • Some examples, of vastly different natures
  • XDR
  • Databases
  • XML
  • ROOT
  • ROOT is in this sense both a floor wax
    (persistency) and a desert topping
    (histograms/Ntuples)
  • S. Panacek will say a bit more about ROOT

19
Programming Utilities
  • std library
  • Clearly people should learn what is there and use
    it when applicable.
  • Containers
  • This part used to be called the STL, Standard
    Template Library
  • Includes vectorltwhatevergt, a good string class,
    and associative arrays (map and set)
  • Algorithms
  • For example, sort but many others
  • Numerics
  • C type functions like asin()
  • Architecture-dependent limits
  • complex ltdoublegt data type
  • Generalized numeric algorithms

20
Programming Utilities
  • Various goodies from ZOOM and CLHEP
  • CLHEP Evaluator
  • ZMtimer
  • Fast specialized allocators
  • Graded asserts
  • Generic factory classes
  • Look at what is available and
  • ASK FOR WHAT IS NEEDED!
  • Places like BOOST
  • Smart pointers
  • Thread concepts

21
Geometric Visualization
  • HepVis
  • Shapes for physics
  • Tubes, balls, tracks
  • Uses OpenInventor
  • A true programming tool
  • Call the routines from code
  • Can link with Geant4
  • Good for event displays etc.
  • One shouldnt do pattern recognition without the
    aid of a graphic display tool

22
Summary
  • IMHO, BTeV should from the start agree on using
  • ZOOM ErrorLogger
  • RCP
  • HepPDT
  • StdHepC
  • ZOOM SpecialFunctions
  • CLHEP Random
  • ROOT (?)
  • HepVis
  • std library
  • Learn what is there
  • Use wherever applicable

23
Summary
  • And should apply pressure if necessary to
    encourage completion of
  • Lean and fast matrix code for tracking purposes
  • MINUIT C replacement
  • And should determine to decide on
  • A general matrix package
  • Which CERNLIB Algorithms are seriously needed
  • Interface scheme and underlying package for
    histograms and Ntuples
  • A persistency mechanism
  • And should worry about
  • Physics Vector divergences between CLHEP and
    Geant4
  • Histogram/Ntuple package if not ROOT
Write a Comment
User Comments (0)
About PowerShow.com