#include <DMXParticleSource.hh>
Definition at line 58 of file DMXParticleSource.hh.
◆ DMXParticleSource()
DMXParticleSource::DMXParticleSource |
( |
| ) |
|
Definition at line 68 of file DMXParticleSource.cc.
DMXParticleSourceMessenger * theMessenger
G4ParticleDefinition * particle_definition
static const double twopi
G4Navigator * GetNavigatorForTracking() const
G4ParticleMomentum particle_momentum_direction
G4ThreeVector particle_polarization
static G4TransportationManager * GetTransportationManager()
G4ThreeVector CentreCoords
G4int NumberOfParticlesToBeGenerated
G4ThreeVector G4ParticleMomentum
G4ThreeVector particle_position
◆ ~DMXParticleSource()
DMXParticleSource::~DMXParticleSource |
( |
| ) |
|
◆ ConfineSourceToVolume()
void DMXParticleSource::ConfineSourceToVolume |
( |
G4String |
Vname | ) |
|
Definition at line 134 of file DMXParticleSource.cc.
149 while (!found && i<(
G4int)PVStore->size())
151 tempPV = (*PVStore)[i];
152 found = tempPV->
GetName() == theRequiredVolumeName;
155 <<
" " << theRequiredVolumeName <<
" " << found <<
G4endl;
169 G4cout <<
" **** Error: Volume does not exist **** " <<
G4endl;
static G4PhysicalVolumeStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
◆ GenerateIsotropicFlux()
void DMXParticleSource::GenerateIsotropicFlux |
( |
| ) |
|
Definition at line 273 of file DMXParticleSource.cc.
279 G4double sintheta, sinphi, costheta, cosphi;
282 sintheta = std::sqrt(1. - costheta*costheta);
286 sinphi = std::sin(
Phi);
287 cosphi = std::cos(
Phi);
289 px = -sintheta * cosphi;
290 py = -sintheta * sinphi;
293 G4double ResMag = std::sqrt((px*px) + (py*py) + (pz*pz));
G4GLOB_DLL std::ostream G4cout
G4ParticleMomentum particle_momentum_direction
◆ GenerateMonoEnergetic()
void DMXParticleSource::GenerateMonoEnergetic |
( |
| ) |
|
◆ GeneratePointsInVolume()
void DMXParticleSource::GeneratePointsInVolume |
( |
| ) |
|
Definition at line 195 of file DMXParticleSource.cc.
203 if(
Shape ==
"Sphere") {
212 x = (x*2.*
Radius) - Radius;
213 y = (y*2.*
Radius) - Radius;
214 z = (z*2.*
Radius) - Radius;
218 else if(
Shape ==
"Cylinder") {
232 G4cout <<
"Error: Volume Shape Does Not Exist" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
G4ThreeVector CentreCoords
G4ThreeVector particle_position
◆ GeneratePointSource()
void DMXParticleSource::GeneratePointSource |
( |
| ) |
|
Definition at line 184 of file DMXParticleSource.cc.
191 G4cout <<
"Error SourcePosType is not set to Point" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
G4ThreeVector CentreCoords
G4ThreeVector particle_position
◆ GeneratePrimaryVertex()
void DMXParticleSource::GeneratePrimaryVertex |
( |
G4Event * |
evt | ) |
|
|
virtual |
Implements G4VPrimaryGenerator.
Definition at line 338 of file DMXParticleSource.cc.
350 while(srcconf ==
false) {
369 if(LoopCount == 100000) {
370 G4cout <<
"*************************************" <<
G4endl;
372 G4cout <<
"Either the source distribution >> confinement" <<
G4endl;
373 G4cout <<
"or any confining volume may not overlap with" <<
G4endl;
374 G4cout <<
"the source distribution or any confining volumes" <<
G4endl;
376 G4cout <<
"If you have set confine then this will be ignored" <<
G4endl;
378 G4cout <<
"*************************************" <<
G4endl;
389 G4cout <<
"Error: AngDistType has unusual value" <<
G4endl;
394 G4cout <<
"Error: EnergyDisType has unusual value" <<
G4endl;
401 G4cout <<
"Creating primaries and assigning to vertex" <<
G4endl;
405 G4double pmom = std::sqrt(energy*energy-mass*mass);
411 G4cout <<
"Particle name: " 416 G4cout <<
" NumberOfParticlesToBeGenerated: "
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
void GenerateIsotropicFlux()
void GeneratePointsInVolume()
void SetParticleMomentumDirection(G4ParticleMomentum)
void GenerateMonoEnergetic()
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4ParticleDefinition * particle_definition
void SetMass(G4double mas)
G4ParticleMomentum particle_momentum_direction
void GeneratePointSource()
G4ThreeVector particle_polarization
G4double GetPDGMass() const
void SetCharge(G4double chg)
void SetPrimary(G4PrimaryParticle *pp)
G4bool IsSourceConfined()
G4int NumberOfParticlesToBeGenerated
void SetPolarization(const G4ThreeVector &pol)
G4ThreeVector particle_position
◆ GetParticleEnergy()
G4double DMXParticleSource::GetParticleEnergy |
( |
| ) |
|
|
inline |
◆ IsSourceConfined()
G4bool DMXParticleSource::IsSourceConfined |
( |
| ) |
|
Definition at line 242 of file DMXParticleSource.cc.
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4ThreeVector particle_position
◆ SetAngDistType()
void DMXParticleSource::SetAngDistType |
( |
G4String |
atype | ) |
|
◆ SetCentreCoords()
void DMXParticleSource::SetCentreCoords |
( |
G4ThreeVector |
coordsOfCentre | ) |
|
◆ SetEnergyDisType()
void DMXParticleSource::SetEnergyDisType |
( |
G4String |
DisType | ) |
|
◆ SetHalfZ()
void DMXParticleSource::SetHalfZ |
( |
G4double |
zhalf | ) |
|
◆ SetMonoEnergy()
void DMXParticleSource::SetMonoEnergy |
( |
G4double |
menergy | ) |
|
◆ SetParticleCharge()
void DMXParticleSource::SetParticleCharge |
( |
G4double |
aCharge | ) |
|
|
inline |
◆ SetParticleDefinition()
Definition at line 331 of file DMXParticleSource.cc.
G4ParticleDefinition * particle_definition
G4double GetPDGCharge() const
◆ SetParticleMomentumDirection()
◆ SetPosDisShape()
void DMXParticleSource::SetPosDisShape |
( |
G4String |
shapeType | ) |
|
◆ SetPosDisType()
void DMXParticleSource::SetPosDisType |
( |
G4String |
PosType | ) |
|
◆ SetRadius()
void DMXParticleSource::SetRadius |
( |
G4double |
radius | ) |
|
◆ SetVerbosity()
void DMXParticleSource::SetVerbosity |
( |
G4int |
vL | ) |
|
◆ AngDistType
◆ CentreCoords
◆ Confine
G4bool DMXParticleSource::Confine |
|
private |
◆ EnergyDisType
G4String DMXParticleSource::EnergyDisType |
|
private |
◆ gNavigator
◆ halfz
◆ MaxPhi
◆ MaxTheta
◆ MinPhi
◆ MinTheta
◆ MonoEnergy
◆ NumberOfParticlesToBeGenerated
G4int DMXParticleSource::NumberOfParticlesToBeGenerated |
|
private |
◆ particle_charge
G4double DMXParticleSource::particle_charge |
|
private |
◆ particle_definition
◆ particle_energy
G4double DMXParticleSource::particle_energy |
|
private |
◆ particle_momentum_direction
◆ particle_polarization
◆ particle_position
◆ particle_time
G4double DMXParticleSource::particle_time |
|
private |
◆ Phi
◆ Radius
◆ Shape
◆ SourcePosType
G4String DMXParticleSource::SourcePosType |
|
private |
◆ theMessenger
◆ verbosityLevel
G4int DMXParticleSource::verbosityLevel |
|
private |
◆ VolName
The documentation for this class was generated from the following files: