Key4hep Discussion

Europe/Zurich
Vidyo

Vidyo

# Key4hep Live Notes

This is a document for taking notes during Key4hep meetings.

Date: November 3, 2020

Agenda: https://indico.cern.ch/event/971454/

Connected: Frank, Briuec, Clement, Jiaheng, Placido, Sang Hyun, Tao, Thomas, Gerardo, Weidong, Pere, Valentin, Joseph, Andre (20min late), Paolo
Apologies:

## Communities Round Table

## Transition of FCCSW to EDM4hep started
* https://github.com/HEP-FCC/FCCSW/tree/edm4hep
Raised some questions and issues:
* Duplicated GeoSvc
   - https://github.com/cepc/CEPCSW/issues/64
(Some mention of key4hep probably good, https://github.com/key4hep/Pandora )
* Some tests build with spack are taking 10x more time to run

* Geri: generation part transition is complete
* Brieuc working on porting the calorimeter reconstruction
* Geri: some tracking code exists
    * work in progress
    * also on Gaussino simulation code
    * following development in LHCb
    * will give presentation about transition
* Valentin: already sharing the geometry service with CEPC
    * proposes to add a `k4Sim` repository
    * should group packages by their dependencies
* Joseph: spack has a tool to display the dependencies
* Weidong: there is still some GEAR dependency in the CEPC geometry service
    * just completeed CEPC workshop in Shanghai
    * FG: should be straight forward to make transition from GEAR to DDRec
    * work has started to run full simulation and reconstruction and produce `edm4hep::ReconstructedParticle`
    * will report on experience in one of the next meetings

## Naming scheme for common key4hep repositories
- start packages with lowercase k4
- Pandora ->**k4Pandora**
    - k4Pandora https://github.com/key4hep/k4Pandora
- K4FWCore -> **k4FWCore**
    - Done
- GMP -> **k4GMPWrapper**
    - WIP https://github.com/key4hep/GMP/issues/20
    - FG: propose to call it `k4MarlinWrapper` (agreed, also ask Andre)
- Valentin has started to make change the names
    - question: how to call the shared libraries ?
    - also have `libk4MarlinWrapper` etc. ?
        - yes, general agreement
- TO DO: rename `k4-spack` to `key4hep-spack` (similar to `key4hep-doc`) meta package
- discussion on not to name libraries with `k4` that could also be used outside of key4hep
    - general agreement

## k4 delphes interface
- its own repository (k4Delphes)? k4Sim?
- EDM4hep_Delphes (pythia8 dependence), also move there?
- package would depend on Gaudi?
- Eventually move EDM4hep interface to Delphes?

* Valentin: proposal to have a `k4Delphes` package
    * also include `EDM4hep_Delphes` but provide option to build it w/o Gaudi/Key4Hep
    * Geri: natural place for this would be Delphes itself
        * need to talk to authors if they would support this - potentially as optional dependency

* Thomas: what should we do in the near term future ?
    * currently some bug fixes and improevements pending
    * Valentin: can continue developments in EDM4hep and later use git feature to extract commit history to new repositry later
    * Thomas started to work on fixing seg-fault (https://github.com/key4hep/EDM4hep/issues/89)

* Clement: fixed some issues in the output configuration-tcl file
    * needed to add a space in front of closing bracket
        * ... to be understood !?
    * created private branch with a version of the Pythia8 binary using EvtGen - should this becaome an extra binary ?
    * Valentin: should eventually be addressed by the k4-framework

* Clement working on using EDM4hep_Delphes for real physics use cases
    * will provide important feedback...


## granularity of packages?

- General favour for higher granularity with dependence on maintainer responsibilties and dependency on other packages
    - Well possible for installation with spack
    - developer side needs investigation


## Abstracts for HSF/WLCG meeting
* https://indico.cern.ch/event/941278/
* November 19-24

* Contributions
    * Spack usage (Valentin)
        * Invited as plenary, no abstract needed
    * podio Developments (Thomas, Benedikt)
        * Abstract accepted

----
* postponed discussion on PODIO/EDM4hep to EDM4hep meeting next week


## Podio

### Discussion: Interplay between Readers, Writers, EventStore and Collections
* https://github.com/AIDASoft/podio/issues/140
* Have to define ownership. Create a consistent interface.
    * EventStore was meant to own things, take things from reader
    * EventStore should pass data to writer and forget about it
        * Writer acts like a sink
        * What about writing to multiple files?
            * Create an entity seperate from the EventStore for this purpose
* Const correctness
    * Metadata implementation not good at keeping it
* CollectionIDTable can change from file to file, but is only read once
* Separate 2 use-cases: users of the data, developers and integrators

* EventStore, at the moment
    * Is filled at the beginning, written out at the end
* TODO (Benedikt): sketch out the model

### Different IO backends
* https://github.com/AIDASoft/podio/issues/131
* How to best pass information/code/libraries to downstream packages?
* Add a factory for the reader?
    * Add SIOReader::getEntries
* Abstract interface for the writers?
    * no reason not to have one

## EDM4hep

## Build system / Target compiler / dependencies

* Full Spack installation now available under /cvmfs/sw.hsf.org
* [ ] update documentation

* docker container working with spack at

    https://github.com/joequant/key4hep-container

* CI running
    * Incremental build every hour
    * Full build 8 hours each day
    * Now making webpage public
    * Send out notices when something breaks
    
* Nightlies can now be built from commits (avoid full rebuilds if nothing changes)
    * being run on https://gitlab.cern.ch/key4hep/k4-deploy
* Automatic generation of setup script
 

### Problem with Root (e.g., 6.20.04) and spack installed gcc

* Cannot create dictionaries
    * std headers not found
    * https://github.com/spack/spack/issues/17488
    * work in progress ...

* Thomas: this seems to be a general issue w/ spack installed compiler
    * Valentin: could be worked around by disabling compiler wrappers

* TODO: document the workaround of adding the compiler symlink

### CMake Template

* Valentin: need to update the HSF CMake project template
    * https://github.com/HSF/tools
    * could be a nice student project
    * [ ] need a project description

----


## K4FWCore

* Problem with writing additional TTree: https://github.com/key4hep/K4FWCore/issues/10
    * work in progress

* Valentin developed branch to updated the CMake configuration for k4FWCore


## MarlinWrapper

* Additional features of the converter https://github.com/key4hep/GMP/issues/18
* rename to `k4MarlinWrapper`
* Placido: working on integrating CLIC/Marlin code

## Delphes "Algorithm" to run from Gaudi

* Investigating services and algorithms to use
* Possibility found for going over all collections
    * Conversion service in Gaudi: convert arbitrary objects into other arbitrary objects
    * E.g., convert EDM4hep to LCIO , FCCedm to EDM4hep, etc.
    * work in progress
    * needs the Delphes2EDM4hep converter merged
* B-tagging information hard to use
    * Similar to metadata problem

* -> no news

## Distributed Computing, Workload Management, Data Management


## Gaudi

* Gaudi v33r2 does not compile (in lcg stack)
* Gaudi cmake-modernisation branch (v34 now v35)
    * :NEW: Branch was merged
        * https://gitlab.cern.ch/gaudi/Gaudi/-/merge_requests/986
    * try with spack recipe?
* Thomas managed to compile v33r2 version
    * observed issue w/ v34
    * to be checked...
*
* Geri: Gaudi has updated the Cmake config in git master
* Valentin: need some work to incorporate this for key4hep

## Grid production system
* Clement: discussion needed on what should/could be taken out of ILCDirac into Dirac to be also usable for everyone else
    * Andre/Andrea have started to include FCC-VO in ILCDirac
* Geri: should have discussion about how to go about this in next meeting

 

## Geometry packages

## First release

* Content:
    * EDM4hep/PODIO
        * need new tags
    * K4FWCore: dataservice, +++
    * Marlin Wrapper
    * DD4hep plugin for EDM4hep output
    * Example
        * [x]: Simulate a few muons and reconstruct with MarlinWrapper
        * [x] need to find someone working on this (from CLIC ?)
        * Clement: could do sth. based on Delphes output and running ilcsoft vertexing in MarlinWrapers
            * might be available by end of month
* How to tag releases
    * using release script from iLCSoft for individual packages

## AOB

* Proposal: discuss simulation programs
    * Gaussino
    * Gaudi integrations
    * ddsim


## Next meeting

* November 17, 2020


## Call for Logos

 

There are minutes attached to this event. Show them.
    • 09:00 09:05
      Introduction 5m
    • 09:50 10:00
      Discussion 10m
      Speakers: Everyone, Valentin Volkl (University of Innsbruck (AT))