Skip to content
Snippets Groups Projects
Commit 7ff5d957 authored by Wouter Deconinck's avatar Wouter Deconinck Committed by Andre Sailer
Browse files

feat: accept HepMC3 ROOT input files in ddsim

This enables ddsim to accept `--inputFiles example.hepmc3.tree.root` files as produced by the [HepMC3 rootIO writers](https://gitlab.cern.ch/hepmc/HepMC3/-/tree/master/rootIO/include/HepMC3).

There are two rootIO writers: `WriterRoot` writes HepMC3 objects to a ROOT file, while `WriterRootTree` writes a ROOT TTree with events. There are two corresponding rootIO readers. When HepMC3's `deduce_reader` is passed a `.root` file, it only [attempts to use](https://gitlab.cern.ch/hepmc/HepMC3/-/blob/master/include/HepMC3/ReaderFactory.h#L107) the `WriterRootTree`.

Since `.root` is a bit too generic as an extension (it does not indicate the data model) and since ddsim already uses multiple extensions in output formates, e.g. `.edm4hep.root`, I considered that the intent is best conveyed with `.hepmc3.tree.root` (making it clear that the HepMC3 data model is used, stored in TTrees, inside the ROOT file format).

With this change it is now also possible to run ddsim against remote HepMC3 events on an xrootd server, e.g.
```
ddsim --compactFile $DD4hepINSTALL/DDDetectors/compact/SiD.xml -N 10 --inputFiles root://dtn-eic.jlab.org//work/eic2/users/wdconinc/pythia8NCDIS_5x41_minQ2\=1_beamEffects_xAngle\=-0.025_hiDiv_vtxfix_1.hepmc3.tree.root --outputFile output.edm4hep.root
```
parent cc4c4c54
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment