BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions
BDSBunchSphere Class Reference

A bunch distribution that produces an uncorrelated uniform random direction distribution over a sphere. The position, energy and time are all reference. More...

#include <BDSBunchSphere.hh>

Inheritance diagram for BDSBunchSphere:
Inheritance graph
Collaboration diagram for BDSBunchSphere:
Collaboration graph

Public Member Functions

virtual BDSParticleCoordsFull GetNextParticleLocal ()
 
BDSBunchSphereoperator= (const BDSBunchSphere &)=delete
 Assignment and copy constructor not implemented nor used.
 
 BDSBunchSphere (BDSBunchSphere &)=delete
 Assignment and copy constructor not implemented nor used.
 
- Public Member Functions inherited from BDSBunch
 BDSBunch (const G4String &nameIn)
 
virtual void SetOptions (const BDSParticleDefinition *beamParticle, const GMAD::Beam &beam, const BDSBunchType &distrType, G4Transform3D beamlineTransformIn=G4Transform3D::Identity, const G4double beamlineS=0)
 
virtual void CheckParameters ()
 
virtual void Initialise ()
 Any initialisation - to be used after SetOptions, then CheckParameters. More...
 
BDSParticleCoordsFullGlobal GetNextParticle ()
 
virtual G4bool ExpectChangingParticleType () const
 A hint of whether we expect to require and extended particle set (ie pions, kaons, muons). More...
 
virtual BDSParticleCoordsFullGlobal GetNextParticleValid (G4int maxTries=100)
 
virtual void BeginOfRunAction (G4int numberOfEvents)
 
virtual const BDSParticleDefinitionParticleDefinition () const
 Access the beam particle definition. More...
 
virtual void SetGeneratePrimariesOnly (G4bool generatePrimariesOnlyIn)
 
virtual BDSParticleCoordsFull GetNextParticleLocal ()
 
G4bool UseCurvilinearTransform () const
 Access whether there's a finite S offset and therefore we're using a CL transform. More...
 
virtual void RecreateAdvanceToEvent (G4int)
 
G4bool BeamParticleIsAnIon () const
 Access whether the beam particle is an ion or not. More...
 
virtual void UpdateIonDefinition ()
 
G4bool ParticleDefinitionHasBeenUpdated () const
 
G4String Name () const
 

Additional Inherited Members

- Static Public Member Functions inherited from BDSBunch
static G4double CalculateZp (G4double xp, G4double yp, G4double Zp0)
 Calculate zp safely based on other components. More...
 
static void SetEmittances (const BDSParticleDefinition *beamParticle, const GMAD::Beam &beam, G4double &emittGeometricX, G4double &emittGeometricY, G4double &emittNormalisedX, G4double &emittNormalisedY)
 
- Protected Member Functions inherited from BDSBunch
BDSParticleCoordsFullGlobal ApplyTransform (const BDSParticleCoordsFull &localIn) const
 
void ApplyTilt (BDSParticleCoordsFull &localIn) const
 Apply a rotation about unitZ for the local coordinates according to member variable tilt. More...
 
BDSParticleCoordsFullGlobal ApplyCurvilinearTransform (const BDSParticleCoordsFull &localIn) const
 Calculate the global coordinates from curvilinear coordinates of a beam line. More...
 
- Protected Attributes inherited from BDSBunch
G4String name
 Name of distribution. More...
 
G4bool useCurvilinear
 Whether to ignore z and use s and transform for curvilinear coordinates. More...
 
BDSParticleDefinitionparticleDefinition
 Particle definition for bunch - this class owns it. More...
 
G4bool particleDefinitionHasBeenUpdated
 
G4bool finiteTilt
 
G4bool generatePrimariesOnly
 
G4double X0
 Centre of distributions. More...
 
G4double Y0
 Centre of distributions. More...
 
G4double Z0
 Centre of distributions. More...
 
G4double S0
 Centre of distributions. More...
 
G4double T0
 Centre of distributions. More...
 
G4double Xp0
 Centre of distributions. More...
 
G4double Yp0
 Centre of distributions. More...
 
G4double Zp0
 Centre of distributions. More...
 
G4double E0
 Centre of distributions. More...
 
G4double P0
 central momentum More...
 
G4double tilt
 Centre of distributions. More...
 
G4double sigmaT
 Centre of distributions. More...
 
G4double sigmaP
 Centre of distributions. More...
 
G4double sigmaE
 Centre of distributions. More...
 
G4double sigmaEk
 Centre of distributions. More...
 
G4bool finiteSigmaE
 Flags to ignore random number generator in case of no finite E or T. More...
 
G4bool finiteSigmaT
 Flags to ignore random number generator in case of no finite E or T. More...
 

Detailed Description

A bunch distribution that produces an uncorrelated uniform random direction distribution over a sphere. The position, energy and time are all reference.

Author
Laurie Nevay

Definition at line 32 of file BDSBunchSphere.hh.

Constructor & Destructor Documentation

◆ BDSBunchSphere()

BDSBunchSphere::BDSBunchSphere ( )

Definition at line 25 of file BDSBunchSphere.cc.

◆ ~BDSBunchSphere()

virtual BDSBunchSphere::~BDSBunchSphere ( )
inlinevirtual

Definition at line 36 of file BDSBunchSphere.hh.

Member Function Documentation

◆ GetNextParticleLocal()

BDSParticleCoordsFull BDSBunchSphere::GetNextParticleLocal ( )
virtual

Generate a random unit vector for direction and use reference spatial coordinates. No energy spread.

Reimplemented from BDSBunch.

Definition at line 29 of file BDSBunchSphere.cc.

References BDSBunch::E0, BDSBunch::S0, BDSBunch::T0, BDSBunch::X0, BDSBunch::Y0, and BDSBunch::Z0.


The documentation for this class was generated from the following files: