19#ifndef BDSBUNCHGAUSSBASE_H
20#define BDSBUNCHGAUSSBASE_H
25#include "G4Transform3D.hh"
27#include "CLHEP/Matrix/SymMatrix.h"
28#include "CLHEP/Matrix/Vector.h"
34 class HepRandomEngine;
59 G4Transform3D beamlineTransformIn = G4Transform3D::Identity,
77 const CLHEP::HepVector& mu,
78 CLHEP::HepSymMatrix& sigma);
86 CLHEP::HepVector meansGM;
87 CLHEP::HepSymMatrix sigmaGM;
Common functionality for a 6D Gaussian distribution.
std::vector< G4double > z0_v
Holder for pre-calculated coordinates.
virtual BDSParticleCoordsFull GetNextParticleLocal()
G4bool offsetSampleMean
Whether to offset the sample mean.
std::vector< G4double > yp_v
Holder for pre-calculated coordinates.
virtual void SetOptions(const BDSParticleDefinition *beamParticle, const GMAD::Beam &beam, const BDSBunchType &distrType, G4Transform3D beamlineTransformIn=G4Transform3D::Identity, const G4double beamlineS=0)
void PreGenerateEvents(G4int nGenerate)
Pre-generate all the particle coordinates and subtract the sample mean.
std::vector< G4double > y0_v
Holder for pre-calculated coordinates.
std::vector< G4double > zp_v
Holder for pre-calculated coordinates.
G4int iPartIteration
Iterator for reading out pre-calculate coordinates.
std::vector< G4double > t_v
Holder for pre-calculated coordinates.
CLHEP::RandMultiGauss * gaussMultiGen
Randon number generator with sigma matrix and mean.
std::vector< G4double > weight_v
Holder for pre-calculated coordinates.
CLHEP::RandMultiGauss * CreateMultiGauss(CLHEP::HepRandomEngine &anEngine, const CLHEP::HepVector &mu, CLHEP::HepSymMatrix &sigma)
std::vector< G4double > E_v
Holder for pre-calculated coordinates.
std::vector< G4double > xp_v
Holder for pre-calculated coordinates.
std::vector< G4double > x0_v
Holder for pre-calculated coordinates.
std::vector< std::vector< G4double > * > coordinates
Convenience vector of vectors for clearing up.
virtual void BeginOfRunAction(G4int numberOfEvents, G4bool batchMode)
virtual BDSParticleCoordsFull GetNextParticleLocalCoords()
Fire random number generator and get coordinates. Can be overloaded if required.
The base class for bunch distribution generators.
G4double beamlineS
Beamline initial S position.
A set of particle coordinates including energy and weight.
Wrapper for particle definition.
Improve type-safety of native enum data type in C++.
Parser namespace for GMAD language. Combination of Geant4 and MAD.