key4hep / k4FWCore

Core Components for the Gaudi-based Key4hep Framework
Apache License 2.0
10 stars 26 forks source link

Expose PDG table from Geant4 as Gaudi service? #196

Open atolosadelgado opened 3 months ago

atolosadelgado commented 3 months ago

Hi,

It is possible to access the PDG table from Geant4 with few lines of C++ code [link]. The motivation would be to work with a set of particle properties which is consistent across the whole workflow.

Do you think that accessing such particle properties is something useful? If so, can we create a Gaudi service that encapsulates an expose the PDG table?

Best, Alvaro

andresailer commented 3 months ago

There is a ParticlePropertySvc in Gaudi which does that already?

atolosadelgado commented 3 months ago

Thank you for pointing to that! That service exposes the particle properties coming from a file. To my understanding, experiments have their own particle table and they overwrite Geant4 particle properties.

However, I think we are using Geant4 particle data table for FCCee at the moment (for full simulation). Therefore I thought it could be useful to expose the Geant4 particle properties to have consistency across the fullsim workflow. As I said, it is few lines of C++, so it can be easily integrated within the algorithm that needs it and doing so we avoid the implementation of a dedicated service.

andresailer commented 3 months ago

For particles that Geant4 doesn't know we use https://github.com/AIDASoft/DD4hep/blob/master/DDG4/examples/particle.tbl (at least for CLD).

atolosadelgado commented 3 months ago

Aah, fair enough then. Is that table.tbl file readable by the LHCb service you found?

andresailer commented 3 months ago

The default for gaudi looks like this as far as I understand: https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiTestSuite/tests/data/ParticleTable.txt?ref_type=heads