Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ```
- Loading branch information