19#include "BDSBunchBox.hh"
21#include "BDSException.hh"
22#include "BDSParticleCoordsFull.hh"
24#include "parser/beam.h"
26#include "Randomize.hh"
27#include "CLHEP/Units/PhysicalConstants.h"
29BDSBunchBox::BDSBunchBox():
41BDSBunchBox::~BDSBunchBox()
47 G4Transform3D beamlineTransformIn,
48 const G4double beamlineSIn)
84 G4double x =
X0 + envelopeX * (1-2*G4RandFlat::shoot());
85 G4double y =
Y0 + envelopeY * (1-2*G4RandFlat::shoot());
86 G4double z =
Z0 + envelopeZ * (1-2*G4RandFlat::shoot());
87 G4double xp = envelopeXp * (1-2*G4RandFlat::shoot());
88 G4double yp = envelopeYp * (1-2*G4RandFlat::shoot());
89 G4double zp = envelopeZp * (1-2*G4RandFlat::shoot());
90 G4ThreeVector dir(xp,yp,zp);
96 G4double t =
T0 + envelopeT * (1.- 2.*G4RandFlat::shoot());
97 G4double E =
E0 + envelopeE * (1 - 2.*G4RandFlat::shoot());
virtual void CheckParameters()
virtual BDSParticleCoordsFull GetNextParticleLocal()
virtual void SetOptions(const BDSParticleDefinition *beamParticle, const GMAD::Beam &beam, const BDSBunchType &distrType, G4Transform3D beamlineTransformIn=G4Transform3D::Identity, const G4double beamlineS=0)
The base class for bunch distribution generators.
G4double T0
Centre of distributions.
G4double S0
Centre of distributions.
G4double Z0
Centre of distributions.
G4double X0
Centre of distributions.
G4double E0
Centre of distributions.
G4double Y0
Centre of distributions.
virtual void SetOptions(const BDSParticleDefinition *beamParticle, const GMAD::Beam &beam, const BDSBunchType &distrType, G4Transform3D beamlineTransformIn=G4Transform3D::Identity, const G4double beamlineS=0)
virtual void CheckParameters()
General exception with possible name of object and message.
A set of particle coordinates including energy and weight.
Wrapper for particle definition.
Improve type-safety of native enum data type in C++.
double envelopeE
for the circle/square/box beam distribution
double envelopeYp
for the circle/square/box beam distribution
double envelopeX
for the circle/square/box beam distribution
double envelopeXp
for the circle/square/box beam distribution
double envelopeY
for the circle/square/box beam distribution
double envelopeT
for the circle/square/box beam distribution