Xcoll release 0.11.0
What's Changed
- New API in
xt.Lineandxt.Environment:line.xcoll.scattering,line.xcoll.collimators, andenv.xcoll(the latter is not used yet). - It is now possible to distinguish primary particles (absorbed by the first collimator they hit) from secondary particles (which have interacted with a collimator before the one they are absorbed by). To activate this, simply do
line.xcoll.scattering.identify_primary_losses(). This functionality is off by default. Particles that are secondary will get a specific state (currently 301), allowing the code to keep track and adapt the lost state codes accordingly. This is then propagated to the lossmap, which will finally plot primary hits in a different colour (allowing one to easily recognise potential hierarchy breaking). Seeexamples/lossmap_identify_primary_losses.pyfor a worked-out example. - Pre-filtering of particles in a
FlukaCollimatoris now controlled by a flag on the assemblyallow_prefiltering. It isTruefor most common assemblies. - The
InteractionRecord.to_pandas()method now has aframeoption, which can be'jaw'(default),'collimator', or'lattice'(the reference frame as in the lattice, e.g. reference orbit). To be able to distinguish between the left and right jaws (needed to get the correct transformations), an internal fieldshape_idis added (but not to the pandas dataframe). - Since the material code overhaul, the material
xc.materials.Carbonrepresents plain carbon. This might be confusing, as e.g. the LHC collimators are made of CFC (xc.materials.CarbonFibreCarbon), which was traditionally calledC. Now, a warning is output when an Everest element gets assigned plain Carbon.
Develop Updates
- Renaming of particle states. See
xcoll/headers/particle_states.py. - Needed dev to solve prototypes in general and fluka beambeamroutine by @andredonadon in #193
- Some renamings to be in line with the latest Xtrack changes.
- Some corrections and changes to FLUKA and Geant4 tracking are made to ensure correct masking, states, and energy sums.
- Added tests for all new functionalities.
Full Changelog: v0.10.1...v0.11.0