java.lang.Object
simpa.acc.api.Beam
- Direct Known Subclasses:
- EllipseBeam
- 
Constructor SummaryConstructorsConstructorDescriptionBeam(List<Particle> particles, ReferenceOrbit refOrbit, PotentialProvider potProvider, String name) Low level constructor.Beam(BeamSampler beamSampler, double nomMomentum, ReferenceOrbit refOrbit, double longiPos, PotentialProvider potProvider, double mass, double charge, int nbOfSamples, String name) Construct a beam with the given parameters.
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.commons.math3.geometry.euclidean.threed.Vector3DCalculates the position vector in the global coordinate system calculated from the average particle positions.copy(Beam b, PotentialProvider pp) getName()doublevoidvoidsetReferenceOrbit(ReferenceOrbit refOrb) 
- 
Constructor Details- 
Beampublic Beam(List<Particle> particles, ReferenceOrbit refOrbit, PotentialProvider potProvider, String name) Low level constructor. Makes the caller fully responsible that the data is coherent and makes sense. Use this only if absolutely necessary !! Construct a beam from a list of particles and the given nominal momentum. The nominal momentum is used during tracking by thePhaseSpaceObserverto calculate the dp/p.- Parameters:
- particles- List of particles in the beam.
- refOrbit- The reference orbit. It should be the same which was used to create the particles.
- potProvider- The potential provider. It should be the same which was used to create the particles.
- name- Name of the beam. Each particle will be named using the beam name ad a number concatenated after. This can be modified later if needed. It is also used to create a directory in which the phase space coordinates are written during tracking.
 
- 
Beampublic Beam(BeamSampler beamSampler, double nomMomentum, ReferenceOrbit refOrbit, double longiPos, PotentialProvider potProvider, double mass, double charge, int nbOfSamples, String name) throws KnownFatalException Construct a beam with the given parameters.- Parameters:
- beamSampler- A beam sampler object.
- nomMomentum- The momentum of the beam [GeV/c]
- refOrbit- The reference orbit
- longiPos- The longitudinal position of the beam along the reference orbit [m]. At the moment until no RF fields are implemented all particles have this position initially.
- potProvider- The potential provider
- mass- Mass of the particles
- charge- Charge of the particles
- nbOfSamples- Number of particle in the beam
- name- Name of the beam. Each particle will be named using the beam name ad a number concatenated after. This can be modified later if needed. It is also used to create a directory in which the phase space coordinates are written during tracking.
- Throws:
- KnownFatalException- If something goes wrong.
 
 
- 
- 
Method Details- 
setName
- 
getParticles
- 
getNominalMomentumpublic double getNominalMomentum()- Returns:
- The average momentum of the particles in the beam [GeV/c]
 
- 
getReferenceOrbit- Returns:
- Reference orbit of the sequence to which the beam belongs. This might change when the beam is transfered from one sequence to another.
 
- 
setReferenceOrbit- Parameters:
- refOrb- Reference orbit of the sequence to which the beam belongs. This must be updated when the beam is transfered from one sequence to another.
 
- 
getPotentialProvider- Returns:
- The potential provider object which is used to calculate the vector potential in the canonical momentum .
 
- 
getName- Returns:
- name of the beam
 
- 
calculateBeamPositionpublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D calculateBeamPosition()Calculates the position vector in the global coordinate system calculated from the average particle positions. It can be used to determine the longitudinal position along the reference orbit. @see PathUtils#getClosestIndex getClosestIndex- Returns:
- Absolute position vector.
 
- 
copy- Returns:
- A Deep copy of of all particles in the beam, but the tracking state is freshly created. The vector potential updated according to the potential provider. Creates the copy with the given potential provider.
 
 
-