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

Bunch halo distribution where the PDF is uniformly distribution in sigma. More...

#include <BDSBunchHaloFlatSigma.hh>

Inheritance diagram for BDSBunchHaloFlatSigma:
Inheritance graph
Collaboration diagram for BDSBunchHaloFlatSigma:
Collaboration graph

Public Member Functions

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 BDSParticleCoordsFull GetNextParticleLocal ()
 
- 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
 

Private Attributes

G4double haloNSigmaXInner
 
G4double haloNSigmaXOuter
 
G4double haloNSigmaYInner
 
G4double haloNSigmaYOuter
 
CLHEP::RandFlat * flatGen
 
G4double alphaX
 Twiss parameter. More...
 
G4double alphaY
 Twiss parameter. More...
 
G4double betaX
 Twiss parameter. More...
 
G4double betaY
 Twiss parameter. More...
 
G4double emitX
 Twiss parameter. More...
 
G4double emitY
 Twiss parameter. More...
 
G4double sigmaX
 Twiss parameter. More...
 
G4double sigmaY
 Twiss parameter. More...
 

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

Bunch halo distribution where the PDF is uniformly distribution in sigma.

Author
Stuart Walker

Definition at line 153 of file BDSBunchHaloFlatSigma.hh.

Constructor & Destructor Documentation

◆ BDSBunchHaloFlatSigma()

BDSBunchHaloFlatSigma::BDSBunchHaloFlatSigma ( )

Definition at line 112 of file BDSBunchHaloFlatSigma.cc.

◆ ~BDSBunchHaloFlatSigma()

virtual BDSBunchHaloFlatSigma::~BDSBunchHaloFlatSigma ( )
inlinevirtual

Definition at line 157 of file BDSBunchHaloFlatSigma.hh.

Member Function Documentation

◆ CheckParameters()

void BDSBunchHaloFlatSigma::CheckParameters ( )
virtual

Check the parameters for the given bunch distribution and exit if they're problematic or unphysical.

Reimplemented from BDSBunch.

Definition at line 184 of file BDSBunchHaloFlatSigma.cc.

References BDSBunch::CheckParameters(), emitX, and emitY.

Referenced by SetOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextParticleLocal()

BDSParticleCoordsFull BDSBunchHaloFlatSigma::GetNextParticleLocal ( )
virtual

Each derived class can override this default method of reference position. If S0 > 0 or derived class changes member bool 'curvilinear' z0 will be treated as S and the global z0 be calculated.

Reimplemented from BDSBunch.

Definition at line 149 of file BDSBunchHaloFlatSigma.cc.

References alphaX, alphaY, betaX, betaY, BDSBunch::CalculateZp(), BDSBunch::E0, BDSBunch::S0, sigmaX, sigmaY, BDSBunch::T0, BDSBunch::X0, BDSBunch::Xp0, BDSBunch::Y0, BDSBunch::Yp0, and BDSBunch::Zp0.

Here is the call graph for this function:

◆ SetOptions()

void BDSBunchHaloFlatSigma::SetOptions ( const BDSParticleDefinition beamParticle,
const GMAD::Beam beam,
const BDSBunchType distrType,
G4Transform3D  beamlineTransformIn = G4Transform3D::Identity,
const G4double  beamlineS = 0 
)
virtual

Extract and set the relevant options from the beam definition. The distribution type is explicitly required as this function may be used inside a nested bunch distribution. This argument is for the most part ignored, but there's no way to have a default for it. Also, some classes can cover multiple input distributions so need to know which one they're meant to be.

Reimplemented from BDSBunch.

Definition at line 124 of file BDSBunchHaloFlatSigma.cc.

References GMAD::BeamBase::alfx, GMAD::BeamBase::alfy, alphaX, alphaY, betaX, betaY, GMAD::BeamBase::betx, GMAD::BeamBase::bety, CheckParameters(), emitX, emitY, GMAD::BeamBase::haloNSigmaXInner, GMAD::BeamBase::haloNSigmaXOuter, GMAD::BeamBase::haloNSigmaYInner, GMAD::BeamBase::haloNSigmaYOuter, BDSBunch::SetEmittances(), BDSBunch::SetOptions(), sigmaX, and sigmaY.

Here is the call graph for this function:

Field Documentation

◆ alphaX

G4double BDSBunchHaloFlatSigma::alphaX
private

Twiss parameter.

Definition at line 168 of file BDSBunchHaloFlatSigma.hh.

Referenced by GetNextParticleLocal(), and SetOptions().

◆ alphaY

G4double BDSBunchHaloFlatSigma::alphaY
private

Twiss parameter.

Definition at line 169 of file BDSBunchHaloFlatSigma.hh.

Referenced by GetNextParticleLocal(), and SetOptions().

◆ betaX

G4double BDSBunchHaloFlatSigma::betaX
private

Twiss parameter.

Definition at line 170 of file BDSBunchHaloFlatSigma.hh.

Referenced by GetNextParticleLocal(), and SetOptions().

◆ betaY

G4double BDSBunchHaloFlatSigma::betaY
private

Twiss parameter.

Definition at line 171 of file BDSBunchHaloFlatSigma.hh.

Referenced by GetNextParticleLocal(), and SetOptions().

◆ emitX

G4double BDSBunchHaloFlatSigma::emitX
private

Twiss parameter.

Definition at line 172 of file BDSBunchHaloFlatSigma.hh.

Referenced by CheckParameters(), and SetOptions().

◆ emitY

G4double BDSBunchHaloFlatSigma::emitY
private

Twiss parameter.

Definition at line 173 of file BDSBunchHaloFlatSigma.hh.

Referenced by CheckParameters(), and SetOptions().

◆ flatGen

CLHEP::RandFlat* BDSBunchHaloFlatSigma::flatGen
private

Definition at line 183 of file BDSBunchHaloFlatSigma.hh.

◆ haloNSigmaXInner

G4double BDSBunchHaloFlatSigma::haloNSigmaXInner
private

Definition at line 178 of file BDSBunchHaloFlatSigma.hh.

◆ haloNSigmaXOuter

G4double BDSBunchHaloFlatSigma::haloNSigmaXOuter
private

Definition at line 179 of file BDSBunchHaloFlatSigma.hh.

◆ haloNSigmaYInner

G4double BDSBunchHaloFlatSigma::haloNSigmaYInner
private

Definition at line 180 of file BDSBunchHaloFlatSigma.hh.

◆ haloNSigmaYOuter

G4double BDSBunchHaloFlatSigma::haloNSigmaYOuter
private

Definition at line 181 of file BDSBunchHaloFlatSigma.hh.

◆ sigmaX

G4double BDSBunchHaloFlatSigma::sigmaX
private

Twiss parameter.

Definition at line 174 of file BDSBunchHaloFlatSigma.hh.

Referenced by GetNextParticleLocal(), and SetOptions().

◆ sigmaY

G4double BDSBunchHaloFlatSigma::sigmaY
private

Twiss parameter.

Definition at line 175 of file BDSBunchHaloFlatSigma.hh.

Referenced by GetNextParticleLocal(), and SetOptions().


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