java.lang.Object
simpa.acc.api.utils.GaussianBeamSampler
- All Implemented Interfaces:
BeamSampler
This class can be used to generate the phase space coordinated for the
particles in a beam with a Gaussian distribution.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a 6D distribution corresponding to the given accelerator optical and beam parameters.GaussianBeamSampler
(TwissParameters tp, double dpOp) Constructs a 6D distribution corresponding to the given accelerator optical and beam parameters.GaussianBeamSampler
(TwissParameters tp, org.apache.commons.math3.random.RandomGenerator randomGenerator) Constructs a 6D distribution corresponding to the given accelerator optical and beam parameters.Based on the beam matrix it constructs a Gaussian beam sampler. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.math3.distribution.MultivariateNormalDistribution
sample
(int n)
-
Constructor Details
-
GaussianBeamSampler
public GaussianBeamSampler(TwissParameters tp, org.apache.commons.math3.random.RandomGenerator randomGenerator) Constructs a 6D distribution corresponding to the given accelerator optical and beam parameters. This assumes that there is no coupling between the planes. All particles are generated at the same longitudinal position.- Parameters:
tp
- Twiss parameters to be used to generate the bunch.randomGenerator
- Random generator to be used to generate the random numbers.
-
GaussianBeamSampler
Constructs a 6D distribution corresponding to the given accelerator optical and beam parameters. This assumes that there is no coupling between the planes. All particles are generated at the same longitudinal position. For emmitance definition see: https://cas.web.cern.ch/sites/default/files/lectures/dourdan-2008/braun-emittance.pdf- Parameters:
tp
- Twiss parameters to be used to generate the bunch.
-
GaussianBeamSampler
Constructs a 6D distribution corresponding to the given accelerator optical and beam parameters. This assumes that there is no coupling between the planes.- Parameters:
tp
- 4D Twiss parameters to be used to generate the bunch. The H and V emittances are taken from the Twiss parametersdpOp
- RMS momentum spread.
-
GaussianBeamSampler
Based on the beam matrix it constructs a Gaussian beam sampler.- Parameters:
bm
- - 6D Beam matrix
-
-
Method Details
-
sample
- Specified by:
sample
in interfaceBeamSampler
-
getDistribution
public org.apache.commons.math3.distribution.MultivariateNormalDistribution getDistribution()
-