Ability To Redefine Beam After a Component
A useful feature would be to redefine the design particle after a particular element. In the rfkicker-syncbrho branch I have introduced the feature to update the nominal rigidity along the beamline due to acceleration from cavities (still in testing) but this can only update the rigidity.
If we have a target and want a beamline for a particular secondary particle, it would be useful to define that rigidity for the subsequent components instead of having to specify “scaling” for potentially hundreds of elements individually. Of course, this could be done with some python if preparing the whole model in pybdsim or even preparing an additional gmad file, but having a mechanism would be useful.
e.g. proton → target → pion
The beam command goes into a unique instance of the parser/beam.h class. This has two particle definitions (design and beam). So we couldn’t have another or even multiple new definitions there easily. Perhaps a new parser class would be useful.
Parameters required:
- particle type (name / pgd ID as string)
- E
- P
- Ek
In BDSParticleDefinition we have the code to check only one of these is set and calculate the others.
This would require the rfkicker-syncbrho branch to be merged into develop first before proceeding I think on this topic.
Comments (1)
-
reporter - Log in to comment
To clarify after re-reading this… this would only be for particle type and momentum (or E or Ek). Not the actual distribution (e.g. gauss). This is purely for calculating real fields from normalised strengths.