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;
191 G4cout <<
"Error SourcePosType is not set to Point" <<
G4endl;
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;
269 particle_momentum_direction = aDirection.unit();
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));
333 particle_definition = aParticleDefinition;
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 SetCentreCoords(G4ThreeVector)
CLHEP::Hep3Vector G4ThreeVector
void SetAngDistType(G4String)
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
G4Navigator * GetNavigatorForTracking() const
void GenerateIsotropicFlux()
const G4String & GetParticleName() const
void GeneratePointsInVolume()
void SetParticleMomentumDirection(G4ParticleMomentum)
void GenerateMonoEnergetic()
static G4PhysicalVolumeStore * GetInstance()
void GeneratePrimaryVertex(G4Event *evt)
G4GLOB_DLL std::ostream G4cout
void SetPosDisType(G4String)
const G4String & GetName() const
DMXParticleSourceMessenger * theMessenger
G4ParticleDefinition * particle_definition
void SetMass(G4double mas)
G4ParticleMomentum particle_momentum_direction
void GeneratePointSource()
G4ThreeVector particle_polarization
static G4TransportationManager * GetTransportationManager()
G4double GetPDGMass() const
void SetPosDisShape(G4String)
G4double energy(const ThreeVector &p, const G4double m)
void SetCharge(G4double chg)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
void SetPrimary(G4PrimaryParticle *pp)
G4ThreeVector CentreCoords
void SetEnergyDisType(G4String)
G4bool IsSourceConfined()
G4int NumberOfParticlesToBeGenerated
G4double GetPDGCharge() const
G4ThreeVector G4ParticleMomentum
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
void SetPolarization(const G4ThreeVector &pol)
void ConfineSourceToVolume(G4String)
G4ThreeVector particle_position
void SetMonoEnergy(G4double)