Title: Ntuple Handling
1Ntuple Handling
Zsolt Molnar CERN IT/API Zsolt.Molnar_at_cern.ch
2Outline
- Ntuple and tag why and how?
- Structure
- Binding and expressions
- What an user sees - example
3Ntuple and Tag
Event
Moment.
Charge
Energy
Mass
Mass
Energy
Reference
Mass
Energy
Reference
4Structure
AIDA_Ntuple For end users (physicist)
AIDA_Tuple For application developers Traditional
approach
NtupleTag For application developers New approach
General ntuple handling
Equally usable
Data access is hidden
Plugin structure
NtupleTag_HepExp Objectivity
NtupleTag_Hbook For dinosaurs
NtupleTag_Future
5Binding
- Allows to concentrate on the analysis
- Ex. no unnecessary index handling
- Independent and general mathematical objects
- If can be stored
- Connected safely in the background
- Optimized for looping
- The typical use of ntuples
6Expressions
- Handled as independent objects
- Ex. mass gt 100, sqrt( pxpx pypy )
- Compiled and loaded on the fly
- Plugins
- Power of compiled and optimized C code
- Even in an interpreted environment
(Python/Lizard) - Optimized
- Minimum compilation time
- Maximum reusability without further compilations
- Parameters, one expression for many ntuples, etc.
7Example as summary
ntuple.project( massgt100, sqrt(mass),
histogram )
float mass for( ntuple.begin()
ntuple.isNotEnd() ntuple.next() ) mass
ntuple.getFloat(3) if( mass gt 100 )
histogram.fill( sqrt(mass) )
Quantityltfloatgt mass ntuple.bind( mass, mass
) for( ntuple.begin() ntuple.isNotEnd()
ntuple.next() ) if( mass gt 100 )
histogram.fill( sqrt(mass) )