Refactor and improve features for ddsim
* Move DD4hepSimulation et al into python module DDSim, needed for proper importing * Can now control magneticfield setup, gun, particle handler, output via command line. ** added ConfigHelper and daughter classes implementing these options DDSim/DDSim/Helper, easily extensible to additional features ** also easier changing of these parameters via steering file See example/steeringFile.py *** No more functions, no more "global GeV" ** --help string can be given by using @property, see e.g. Helper/Output.py * added optional argcomplete, allows command line "tab"complete for all command line options (and values!) Needs argcomplete (sudo pip install argcomplete), bash completion and bash (or zsh). and 'eval "$(register-python-argcomplete ddsim)"' * move import statements to reduce startup time until "--help", mandatory to reduce latency for argcomplete
Showing
- DDSim/DD4hepSimulation.py 148 additions, 87 deletionsDDSim/DD4hepSimulation.py
- DDSim/Helper/ConfigHelper.py 45 additions, 0 deletionsDDSim/Helper/ConfigHelper.py
- DDSim/Helper/Gun.py 17 additions, 0 deletionsDDSim/Helper/Gun.py
- DDSim/Helper/MagneticField.py 16 additions, 0 deletionsDDSim/Helper/MagneticField.py
- DDSim/Helper/Output.py 36 additions, 0 deletionsDDSim/Helper/Output.py
- DDSim/Helper/ParticleHandler.py 54 additions, 0 deletionsDDSim/Helper/ParticleHandler.py
- DDSim/Helper/__init__.py 1 addition, 0 deletionsDDSim/Helper/__init__.py
- DDSim/__init__.py 1 addition, 0 deletionsDDSim/__init__.py
- ddsim 1 addition, 1 deletionddsim
Loading
Please register or sign in to comment