Xcoll release 0.8.0
What's Changed
- Improvements to the Geant4 interface:
- Ensuring compatibility with the latest BDSIM version (in the develop branch.
- More robust implementation of Geant4 environment compilation, compatible with different BDSIM versions.
- Neutral and unstable particles (when using the latest BDSIM version) can be handled.
- Large speed-up in tracking (
Xcollpostprocessing on returned particles was very inefficient). - New collimator type:
Geant4CollimatorTipwhich has a thin layer of different material on the jaw (code by @gbrogginess). - Automatically adapt the mass of the reference particle to the mass used by Geant4, if known.
- One can select which particle types to return from Geant4.
- Improvements to the
LossMap:- Importing from a json failed due to a check for Geant4-collimators in a non-existing line. Fixed.
- Plotting now can make the distinction between warm and cold losses, and can optionally provide a zoom plot. These can be provided as arguments to
LossMap.plot()or can be set on the line in general usingline.metadata['collimation'] = {'cold_losses': [[s1_start, s1_end], [s2_start, s2_end], ...], 'warm_losses': ..., 's_range': {betatron: [s_start, s_stop], ...}}. Note that eithercolde_lossesorwarm_losseshas to be provided, and that thes_rangesare named ranges to able to do e.g.plot(zoom='betatron'). - Some fixes in the aperture losses and in the different properties.
- Aperture interpolation failed when time-dependent variables are present and activated (e.g. during an
RFSweep). These are now temporarily deactivated during interpolation atLossMapinstantiation / particle adding.
- Fix in FLUKA name for
MoGR64. - The CollimatorDatabase now accepts the
s-position as arguments for each collimator (to specify the position when noMarkerorDriftis present in the line for that collimator).
Develop Updates
- Bugfix: old and/or malformed config files were blocking.
- Geant4: after tracking, the C++ code auto-sizes the return array (the capacity check is done in Xcoll).
- Changed API of beam element transformations active by @szymonlopaciuk in #164.
- Update monitor to handle zero emittance case by @JPTS2 in #170.
- Emit moni zero emit by @JPTS2 in #171.
- The built-in material database is built dynamically at import, but this was making the package import very slow (due to cascading look-ups). This is now fixed.
- When installing a collimator, the check if the element name already exists is sped up.
- The
Constantsclass now allows to define extra metadata data to its elements. Used e.g. for particle masses where besides the name and the mass, also thepdg_idis provided.
New Contributors
Full Changelog: v0.7.2...v0.8.0