Skip to content

Julia interface to EDM4hep (generic Event Data Model for HEP experiments)

License

Notifications You must be signed in to change notification settings

JuliaHEP/EDM4hep.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dev Build Status codecov

EDM4hep in Julia

Prototype of the EDM4hep (generic Event Data Model for HEP experiments part of Key4hep) for Julia with the goal to have very simple structures (isbits) with the purpose to evaluate its ergonomic design and implementation performance.

See presentations:

Installation

The package has been registered in the General Julia registry therefore its installation is simply using the Pkg packager manager.

julia -e ‘import Pkg; Pkg.add(“EDM4hep”)’

Getting Started

julia> using EDM4hep
julia> using EDM4hep.RootIO
julia> file = "root://eospublic.cern.ch//eos/experiment/fcc/prod/fcc/ee/test_spring2024/240gev/Hbb/CLD_o2_v05/rec/00016562/000/Hbb_rec_16562_1.root"
julia> reader = RootIO.Reader(file)
┌───────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ Attribute     │ Value                                                                                                     
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File Name(s)  │ root://eospublic.cern.ch//eos/experiment/fcc/prod/fcc/ee/test_spring2024/240gev/Hbb/CLD_o2_v05/rec/000165 # of events   │ 100                                                                                                       ⋯
│ IO Format     │ TTree                                                                                                     
│ PODIO version │ 0.99.0                                                                                                    
│ ROOT version  │ 6.28.10                                                                                                   
└───────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────
julia> events = RootIO.get(reader, "events");
julia> evt = events[1];
julia> recps = RootIO.get(reader, evt, "PandoraPFOs");
julia> recps.energy[1:5]
5-element Vector{Float32}:
...