Geant4  10.01.p03
G4SPSPosDistribution Class Reference

Andrea Dotti Feb 2015 Important: This is a shared class between threads. More...

#include <G4SPSPosDistribution.hh>

+ Collaboration diagram for G4SPSPosDistribution:

Classes

struct  thread_data_t
 

Public Member Functions

 G4SPSPosDistribution ()
 
 ~G4SPSPosDistribution ()
 
void SetPosDisType (G4String)
 Important: This is a shared class between threads. More...
 
void SetPosDisShape (G4String)
 
void SetCentreCoords (G4ThreeVector)
 
void SetPosRot1 (G4ThreeVector)
 
void SetPosRot2 (G4ThreeVector)
 
void SetHalfX (G4double)
 
void SetHalfY (G4double)
 
void SetHalfZ (G4double)
 
void SetRadius (G4double)
 
void SetRadius0 (G4double)
 
void SetBeamSigmaInR (G4double)
 
void SetBeamSigmaInX (G4double)
 
void SetBeamSigmaInY (G4double)
 
void SetParAlpha (G4double)
 
void SetParTheta (G4double)
 
void SetParPhi (G4double)
 
void ConfineSourceToVolume (G4String)
 
void SetBiasRndm (G4SPSRandomGenerator *a)
 
void SetVerbosity (G4int a)
 
G4ThreeVector GenerateOne ()
 
G4String GetPosDisType () const
 
G4String GetPosDisShape () const
 
G4ThreeVector GetCentreCoords () const
 
G4double GetHalfX () const
 
G4double GetHalfY () const
 
G4double GetHalfZ () const
 
G4double GetRadius () const
 
G4ThreeVector GetSideRefVec1 () const
 
G4ThreeVector GetSideRefVec2 () const
 
G4ThreeVector GetSideRefVec3 () const
 
G4String GetSourcePosType () const
 
G4ThreeVector GetParticlePos () const
 

Private Member Functions

void GenerateRotationMatrices ()
 
void GeneratePointSource (G4ThreeVector &outoutPos)
 
void GeneratePointsInBeam (G4ThreeVector &outoutPos)
 
void GeneratePointsInPlane (G4ThreeVector &outoutPos)
 
void GeneratePointsOnSurface (G4ThreeVector &outputPos)
 
void GeneratePointsInVolume (G4ThreeVector &outputPos)
 
G4bool IsSourceConfined (G4ThreeVector &outputPos)
 

Private Attributes

G4String SourcePosType
 
G4String Shape
 
G4ThreeVector CentreCoords
 
G4ThreeVector Rotx
 
G4ThreeVector Roty
 
G4ThreeVector Rotz
 
G4double halfx
 
G4double halfy
 
G4double halfz
 
G4double Radius
 
G4double Radius0
 
G4double SR
 
G4double SX
 
G4double SY
 
G4double ParAlpha
 
G4double ParTheta
 
G4double ParPhi
 
G4bool Confine
 
G4String VolName
 
G4int verbosityLevel
 
G4Cache< thread_data_tThreadData
 
G4Mutex a_mutex
 
G4SPSRandomGeneratorPosRndm
 

Detailed Description

Andrea Dotti Feb 2015 Important: This is a shared class between threads.

Only one thread should use the set-methods here. Note that this is exactly what is achieved using UI commands. If you use the set methods to set defaults in your application take care that only one thread is executing them. In addition take care of calling these methods before the run is started Do not use these setters during the event loop

Definition at line 156 of file G4SPSPosDistribution.hh.

Constructor & Destructor Documentation

G4SPSPosDistribution::G4SPSPosDistribution ( )

Definition at line 67 of file G4SPSPosDistribution.cc.

References a_mutex, CentreCoords, Confine, G4MUTEXINIT, halfx, halfy, halfz, CLHEP::HepXHat(), CLHEP::HepYHat(), CLHEP::HepZHat(), ParAlpha, ParPhi, ParTheta, Radius, Radius0, Rotx, Roty, Rotz, Shape, SourcePosType, SR, SX, SY, verbosityLevel, and VolName.

+ Here is the call graph for this function:

G4SPSPosDistribution::~G4SPSPosDistribution ( )

Definition at line 92 of file G4SPSPosDistribution.cc.

References a_mutex, and G4MUTEXDESTROY.

Member Function Documentation

void G4SPSPosDistribution::ConfineSourceToVolume ( G4String  Vname)

Definition at line 275 of file G4SPSPosDistribution.cc.

References Confine, G4cout, G4endl, G4PhysicalVolumeStore::GetInstance(), G4VPhysicalVolume::GetName(), verbosityLevel, and VolName.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4SPSPosDistribution::GenerateOne ( )

Definition at line 1049 of file G4SPSPosDistribution.cc.

References Confine, G4endl, G4Exception(), GeneratePointsInBeam(), GeneratePointsInPlane(), GeneratePointsInVolume(), GeneratePointsOnSurface(), GeneratePointSource(), IsSourceConfined(), JustWarning, SourcePosType, and ThreadData.

Referenced by G4SingleParticleSource::GeneratePrimaryVertex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::GeneratePointsInBeam ( G4ThreeVector outoutPos)
private

Definition at line 323 of file G4SPSPosDistribution.cc.

References CentreCoords, G4cout, G4endl, G4SPSRandomGenerator::GenRandX(), G4SPSRandomGenerator::GenRandY(), halfx, halfy, PosRndm, Radius, Rotx, Roty, Rotz, Shape, G4INCL::DeJongSpin::shoot(), SX, SY, verbosityLevel, and z.

Referenced by GenerateOne().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::GeneratePointsInPlane ( G4ThreeVector outoutPos)
private

Definition at line 383 of file G4SPSPosDistribution.cc.

References CentreCoords, G4SPSPosDistribution::thread_data_t::CSideRefVec1, G4SPSPosDistribution::thread_data_t::CSideRefVec2, G4SPSPosDistribution::thread_data_t::CSideRefVec3, G4cerr, G4cout, G4endl, G4SPSRandomGenerator::GenRandX(), G4SPSRandomGenerator::GenRandY(), halfx, halfy, PosRndm, Radius, Radius0, Rotx, Roty, Rotz, Shape, SourcePosType, ThreadData, verbosityLevel, and z.

Referenced by GenerateOne().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::GeneratePointsInVolume ( G4ThreeVector outputPos)
private

Definition at line 910 of file G4SPSPosDistribution.cc.

References CentreCoords, G4SPSPosDistribution::thread_data_t::CSideRefVec1, G4SPSPosDistribution::thread_data_t::CSideRefVec2, G4SPSPosDistribution::thread_data_t::CSideRefVec3, G4cout, G4endl, G4SPSRandomGenerator::GenRandX(), G4SPSRandomGenerator::GenRandY(), G4SPSRandomGenerator::GenRandZ(), halfx, halfy, halfz, ParAlpha, ParPhi, ParTheta, PosRndm, Radius, Rotx, Roty, Rotz, Shape, SourcePosType, ThreadData, verbosityLevel, and z.

Referenced by GenerateOne().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::GeneratePointsOnSurface ( G4ThreeVector outputPos)
private

Definition at line 503 of file G4SPSPosDistribution.cc.

References CentreCoords, G4SPSPosDistribution::thread_data_t::CSideRefVec1, G4SPSPosDistribution::thread_data_t::CSideRefVec2, G4SPSPosDistribution::thread_data_t::CSideRefVec3, G4cout, G4endl, G4UniformRand, G4SPSRandomGenerator::GenRandPosPhi(), G4SPSRandomGenerator::GenRandPosTheta(), G4SPSRandomGenerator::GenRandX(), G4SPSRandomGenerator::GenRandY(), G4SPSRandomGenerator::GenRandZ(), halfx, halfy, halfz, ParAlpha, ParPhi, ParTheta, G4INCL::Math::pi, PosRndm, Radius, Rotx, Roty, Rotz, Shape, SourcePosType, ThreadData, verbosityLevel, and z.

Referenced by GenerateOne().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::GeneratePointSource ( G4ThreeVector outoutPos)
private

Definition at line 313 of file G4SPSPosDistribution.cc.

References CentreCoords, G4cerr, G4endl, SourcePosType, and verbosityLevel.

Referenced by GenerateOne().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::GenerateRotationMatrices ( )
private

Definition at line 257 of file G4SPSPosDistribution.cc.

References G4cout, G4endl, Rotx, Roty, Rotz, and verbosityLevel.

Referenced by SetPosRot1(), and SetPosRot2().

+ Here is the caller graph for this function:

G4ThreeVector G4SPSPosDistribution::GetCentreCoords ( ) const

Definition at line 201 of file G4SPSPosDistribution.cc.

References CentreCoords.

Referenced by G4GeneralParticleSource::ListSource().

+ Here is the caller graph for this function:

G4double G4SPSPosDistribution::GetHalfX ( ) const

Definition at line 206 of file G4SPSPosDistribution.cc.

References halfx.

G4double G4SPSPosDistribution::GetHalfY ( ) const

Definition at line 211 of file G4SPSPosDistribution.cc.

References halfy.

G4double G4SPSPosDistribution::GetHalfZ ( ) const

Definition at line 216 of file G4SPSPosDistribution.cc.

References halfz.

G4ThreeVector G4SPSPosDistribution::GetParticlePos ( ) const

Definition at line 241 of file G4SPSPosDistribution.cc.

References ThreadData.

Referenced by G4SPSAngDistribution::GenerateFocusedFlux().

+ Here is the caller graph for this function:

G4String G4SPSPosDistribution::GetPosDisShape ( ) const

Definition at line 196 of file G4SPSPosDistribution.cc.

References Shape.

Referenced by G4GeneralParticleSource::ListSource().

+ Here is the caller graph for this function:

G4String G4SPSPosDistribution::GetPosDisType ( ) const

Definition at line 191 of file G4SPSPosDistribution.cc.

References SourcePosType.

Referenced by UltraPrimaryGeneratorAction::GeneratePrimaries(), and G4GeneralParticleSource::ListSource().

+ Here is the caller graph for this function:

G4double G4SPSPosDistribution::GetRadius ( ) const

Definition at line 221 of file G4SPSPosDistribution.cc.

References Radius.

G4ThreeVector G4SPSPosDistribution::GetSideRefVec1 ( ) const

Definition at line 245 of file G4SPSPosDistribution.cc.

References ThreadData.

Referenced by G4SPSAngDistribution::GenerateCosineLawFlux(), G4SPSAngDistribution::GenerateIsotropicFlux(), and G4SPSAngDistribution::GenerateUserDefFlux().

+ Here is the caller graph for this function:

G4ThreeVector G4SPSPosDistribution::GetSideRefVec2 ( ) const

Definition at line 249 of file G4SPSPosDistribution.cc.

References ThreadData.

Referenced by G4SPSAngDistribution::GenerateCosineLawFlux(), G4SPSAngDistribution::GenerateIsotropicFlux(), and G4SPSAngDistribution::GenerateUserDefFlux().

+ Here is the caller graph for this function:

G4ThreeVector G4SPSPosDistribution::GetSideRefVec3 ( ) const

Definition at line 253 of file G4SPSPosDistribution.cc.

References ThreadData.

Referenced by G4SPSAngDistribution::GenerateCosineLawFlux(), G4SPSAngDistribution::GenerateIsotropicFlux(), and G4SPSAngDistribution::GenerateUserDefFlux().

+ Here is the caller graph for this function:

G4String G4SPSPosDistribution::GetSourcePosType ( ) const

Definition at line 237 of file G4SPSPosDistribution.cc.

References SourcePosType.

Referenced by G4SPSAngDistribution::GenerateCosineLawFlux(), and G4SPSAngDistribution::GenerateIsotropicFlux().

+ Here is the caller graph for this function:

G4bool G4SPSPosDistribution::IsSourceConfined ( G4ThreeVector outputPos)
private

Definition at line 1023 of file G4SPSPosDistribution.cc.

References Confine, G4cout, G4endl, G4VPhysicalVolume::GetName(), G4TransportationManager::GetNavigatorForTracking(), G4TransportationManager::GetTransportationManager(), G4Navigator::LocateGlobalPointAndSetup(), verbosityLevel, and VolName.

Referenced by GenerateOne().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetBeamSigmaInR ( G4double  r)

Definition at line 160 of file G4SPSPosDistribution.cc.

References SR, SX, and SY.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetBeamSigmaInX ( G4double  r)

Definition at line 166 of file G4SPSPosDistribution.cc.

References SX.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetBeamSigmaInY ( G4double  r)

Definition at line 171 of file G4SPSPosDistribution.cc.

References SY.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetBiasRndm ( G4SPSRandomGenerator a)

Definition at line 226 of file G4SPSPosDistribution.cc.

References a, a_mutex, and PosRndm.

Referenced by G4SingleParticleSource::G4SingleParticleSource().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetCentreCoords ( G4ThreeVector  coordsOfCentre)

Definition at line 107 of file G4SPSPosDistribution.cc.

References CentreCoords.

Referenced by G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex(), G4AdjointPrimaryGenerator::GenerateFwdPrimaryVertex(), G4GeneralParticleSourceMessenger::SetNewValue(), G4AdjointPrimaryGenerator::SetSphericalAdjointPrimarySource(), and UltraActionInitializer::UltraActionInitializer().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetHalfX ( G4double  xhalf)

Definition at line 135 of file G4SPSPosDistribution.cc.

References halfx.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetHalfY ( G4double  yhalf)

Definition at line 140 of file G4SPSPosDistribution.cc.

References halfy.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetHalfZ ( G4double  zhalf)

Definition at line 145 of file G4SPSPosDistribution.cc.

References halfz.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetParAlpha ( G4double  paralp)

Definition at line 176 of file G4SPSPosDistribution.cc.

References ParAlpha.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetParPhi ( G4double  parphi)

Definition at line 186 of file G4SPSPosDistribution.cc.

References ParPhi.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetParTheta ( G4double  parthe)

Definition at line 181 of file G4SPSPosDistribution.cc.

References ParTheta.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetPosDisShape ( G4String  shapeType)

Definition at line 102 of file G4SPSPosDistribution.cc.

References Shape.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), G4AdjointPrimaryGenerator::SetSphericalAdjointPrimarySource(), and UltraActionInitializer::UltraActionInitializer().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetPosDisType ( G4String  PosType)

Important: This is a shared class between threads.

Only one thread should use the set-methods here. Note that this is achieved by UI commands. If you use these methods to set defaults in your application take care that only one thread is executing them. In addition take care of calling these methods before the run is started Do not use these setters during the event loop

Definition at line 97 of file G4SPSPosDistribution.cc.

References SourcePosType.

Referenced by G4AdjointPrimaryGenerator::G4AdjointPrimaryGenerator(), G4AdjointPrimaryGenerator::SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(), G4GeneralParticleSourceMessenger::SetNewValue(), G4AdjointPrimaryGenerator::SetSphericalAdjointPrimarySource(), and UltraActionInitializer::UltraActionInitializer().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetPosRot1 ( G4ThreeVector  posrot1)

Definition at line 112 of file G4SPSPosDistribution.cc.

References G4cout, G4endl, GenerateRotationMatrices(), Rotx, and verbosityLevel.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), and UltraActionInitializer::UltraActionInitializer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetPosRot2 ( G4ThreeVector  posrot2)

Definition at line 123 of file G4SPSPosDistribution.cc.

References G4cout, G4endl, GenerateRotationMatrices(), Roty, and verbosityLevel.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), and UltraActionInitializer::UltraActionInitializer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetRadius ( G4double  rds)

Definition at line 150 of file G4SPSPosDistribution.cc.

References Radius.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), G4AdjointPrimaryGenerator::SetSphericalAdjointPrimarySource(), and UltraActionInitializer::UltraActionInitializer().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetRadius0 ( G4double  rds)

Definition at line 155 of file G4SPSPosDistribution.cc.

References Radius0.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

void G4SPSPosDistribution::SetVerbosity ( G4int  a)

Definition at line 232 of file G4SPSPosDistribution.cc.

References a, and verbosityLevel.

Referenced by G4SingleParticleSource::SetVerbosity().

+ Here is the caller graph for this function:

Member Data Documentation

G4Mutex G4SPSPosDistribution::a_mutex
private
G4bool G4SPSPosDistribution::Confine
private
G4double G4SPSPosDistribution::halfz
private
G4double G4SPSPosDistribution::ParAlpha
private
G4double G4SPSPosDistribution::ParPhi
private
G4double G4SPSPosDistribution::ParTheta
private
G4double G4SPSPosDistribution::Radius0
private
G4double G4SPSPosDistribution::SR
private

Definition at line 257 of file G4SPSPosDistribution.hh.

Referenced by G4SPSPosDistribution(), and SetBeamSigmaInR().

G4double G4SPSPosDistribution::SX
private
G4double G4SPSPosDistribution::SY
private
G4String G4SPSPosDistribution::VolName
private

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