gtsimulation.interaction.G4functions#
Functions
|
The function calls executable binary program that simulate decay of unstable particle and outputs information about products. |
|
The function calls executable binary program that calculate interaction of the charge particle with matter at a given path length and outputs information about secondary particles. |
|
The function calls executable binary program that calculates interaction of the charged particle with the Earth's atmosphere and outputs information about secondary (albedo) particles. |
Classes
|
Text I/O implementation using an in-memory buffer. |
|
The Transformer class is for facilitating re-using transforms without needing to re-create them. |
- gtsimulation.interaction.G4functions.G4Decay(PDG, E)[source]#
The function calls executable binary program that simulate decay of unstable particle and outputs information about products.
- Parameters:
PDG (int) – Particle PDG code
E (float) – Kinetic energy of the particle [MeV]
- Returns:
secondary
Name - Name
PDGcode - PDG encoding
Mass - Mass [MeV]
Charge - Charge
KineticEnergy - Kinetic energy of the particle [MeV]
MomentumDirection - Direction of the velocity of the particle [unit vector]
- Return type:
structured ndarray
- Examples
secondary = G4Decay(2112, 1) # n -> p + e- + anti_nu_esecondary = G4Decay(-2112, 1) # anti_n -> anti_p + e+ + nu_esecondary = G4Decay(211, 1) # pi+ -> mu+ + nu_musecondary = G4Decay(13, 1) # mu- -> e- + anti_nu_e + nu_musecondary = G4Decay(1000060140, 1) # C14 -> N14 + e- + anti_nu_esecondary = G4Decay(1000922380, 1) # U238 -> Th234 + alphasecondary = G4Decay(2212, 1) # p is stable
- gtsimulation.interaction.G4functions.G4Interaction(PDG, E, m, rho, element_name, element_abundance)[source]#
The function calls executable binary program that calculate interaction of the charge particle with matter at a given path length and outputs information about secondary particles.
For this we simulate a cylinder filled with matter with a density rho. Cylinder length is calculated as l = m / rho. The radius of the cylinder R is equal to its length l. The initial coordinate of the particle is (0, 0, 0). The initial velocity is directed along the cylinder axis, which coincides with the Z axis. The simulation stops when the primary particle has died or reached the boundary of the cylinder.
- Parameters:
PDG (int) – Particle PDG code
E (float) – Kinetic energy of the particle [MeV]
m (float) – Path of a particle in [g/cm^2]
rho (float) – Density of medium [g/cm^3]
element_name (list) – List of chemical elements that make up the medium
element_abundance (array_like) – Medium composition, sum must be equal 1
- Returns:
primary
Name - Name
PDGcode - PDG encoding
Mass - Mass [MeV]
Charge - Charge
KineticEnergy - Kinetic energy of the particle [MeV]
MomentumDirection - Direction of the velocity of the particle [unit vector]
Position - Coordinates of the primary particle [m]
LastProcess - Name of the last process in which the primary particle participated (usually ‘Transportation’ or ‘…Inelastic’)
- Return type:
structured ndarray
- gtsimulation.interaction.G4functions.G4Shower(PDG, E, r, v, date)[source]#
The function calls executable binary program that calculates interaction of the charged particle with the Earth’s atmosphere and outputs information about secondary (albedo) particles.
The program creates a spherical layer with a thickness of 80 + 0.5 km, which is divided into layers with a thickness of 1 km. The air density for each layer is assumed to be constant and is calculated using the atmospheric model NRLMSISE-00. All calculations are carried out in the GEO coordinate system.
- Parameters:
PDG (int) – Particle PDG code
E (float) – Kinetic energy of the particle [MeV]
r (float array) – Coordinates of the primary particle in GEO [m]
v (float array) – Velocity of the primary particle in GEO [unit vector]
date (datetime) – Current datetime
- Returns:
primary
Name - Name
PDGcode - PDG encoding
Mass - Mass [MeV]
Charge - Charge
PositionInteraction - Coordinates of the interaction of the primary particle [m]
LastProcess - Name of the last process in which the primary particle participated
secondary
Name - Name
PDGcode - PDG encoding
Mass - Mass [MeV]
Charge - Charge
Position - Coordinates of the secondary (albedo) particle in GEO [m]
MomentumDirection - Direction of the velocity of the particle in GEO [unit vector]
KineticEnergy - Kinetic energy of the particle [MeV]
VertexPosition - Coordinates of the secondary (albedo) particle in GEO at the birth point [m]
VertexMomentumDirection - Direction of the velocity of the particle in GEO at the birth point [unit vector]
VertexKineticEnergy - Kinetic energy of the particle at the birth point [MeV]
- Rtype primary:
structured ndarray
- Rtype secondary:
structured ndarray
Examples
primary, secondary = G4Shower(2212, 10e3, [6378137 + 80000, 0, 0], [-1, 0, 1], datetime(2020, 1, 1)primary, secondary = G4Shower(1000020040, 20e3, [0, 0, 6356752 + 60000], [0, 1, -2], datetime(2014, 1, 1)