Skip to content

Commit 2b757bd

Browse files
m-filaoschulz
authored andcommitted
fix some typos
1 parent e96c4a4 commit 2b757bd

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The following example demonstrates a simple use of the package:
5353
using HEPExampleProject
5454
using Random
5555

56-
# define random number generator for reproducability
56+
# define random number generator for reproducibility
5757
RNG = Xoshiro(137)
5858

5959
# Define some input parameters for the HEP process

src/constants.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
ELECTRON_MASS
33
4-
The mass of the electron in its rest frame, given as 0.51099895000 MeV
4+
The mass of the electron in its rest frame, given as 0.51099895000 MeV.
55
66
This value is taken from the PDG 2020 recommended values of the fundamental physical constants.
77
@@ -16,7 +16,7 @@ Base.@irrational ELECTRON_MASS 0.51099895000 BigFloat(0.51099895000) # MeV
1616
"""
1717
MUON_MASS
1818
19-
The mass of the muon in its rest frame, given as 105.6583755 MeV
19+
The mass of the muon in its rest frame, given as 105.6583755 MeV.
2020
2121
This value is taken from the PDG 2020 recommended values of the fundamental physical constants.
2222

src/cross_section.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ julia> differential_cross_section(E_in, cos_theta)
4545
function differential_cross_section(E_in, cos_theta)
4646
T = typeof(E_in)
4747

48-
# enfore the irrational constants to be the same type as E_in
48+
# enforce the irrational constants to be the same type as E_in
4949
alpha = convert(T,ALPHA)
5050
me = convert(T,ELECTRON_MASS)
5151
mmu = convert(T,MUON_MASS)
@@ -93,7 +93,7 @@ julia> total_cross_section(E_in)
9393
function total_cross_section(E_in)
9494
T = typeof(E_in)
9595

96-
# enfore the irrational constants to be the same type as E_in
96+
# enforce the irrational constants to be the same type as E_in
9797
alpha = convert(T,ALPHA)
9898
me = convert(T,ELECTRON_MASS)
9999
mmu = convert(T,MUON_MASS)

src/event_generation/serial.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
max_weight(E_in)
33
4-
Return the maximum weight, i.e. the maxmaximum value of [`differential_cross_section`](@ref) for specified initial electron energy `E_in.
4+
Return the maximum weight, i.e. the maximum value of [`differential_cross_section`](@ref) for specified initial electron energy `E_in`.
55
66
# Example
77
```jldoctest
@@ -38,17 +38,17 @@ flat random distribution in the cosine of the scattering angle and azimuthal ang
3838
julia> rng = MersenneTwister(137)
3939
julia> event_list = generate_flat_events_cpu(rng, 1e3, 1000);
4040
```
41-
The `;` should be used at the end of the last promt to suppress printing the whole event list.
41+
The `;` should be used at the end of the last prompt to suppress printing the whole event list.
4242
4343
# Notes
4444
- This method generates weighted events where the weights are derived from the differential cross section. For unweighted events, use [`generate_events_cpu`](@ref).
4545
"""
4646
function generate_flat_events_cpu(rng::AbstractRNG,E_in::T,nevents::Int) where {T<:Real}
4747
cth_arr = 2 .* rand(rng,nevents) .- 1
4848
phi_arr = (2*pi) .* rand(rng,nevents)
49-
weigth_list = differential_cross_section.(E_in,cth_arr)
49+
weight_list = differential_cross_section.(E_in,cth_arr)
5050

51-
event_list = Event.(E_in,cth_arr,phi_arr,weigth_list)
51+
event_list = Event.(E_in,cth_arr,phi_arr,weight_list)
5252

5353
return event_list
5454
end

src/event_generation/threadsafe.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ differential cross-section for the process.
1414
"""
1515
function generate_flat_event(E_in::T) where {T<:Real}
1616
cth = 2 * rand(T) - 1
17-
phi = rand(T)
17+
phi = 2 * pi * rand(T)
1818
weight = differential_cross_section(E_in,cth)
1919

2020
event= Event(E_in,cth,phi,weight)

src/events.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Event e-e+ -> mu-mu+
5050
5151
muon: (9.5, 2.0, 1.0, 8.0)
5252
53-
anti muon: (10.5, -2.0, -1.0, -8.0)
53+
anti-muon: (10.5, -2.0, -1.0, -8.0)
5454
5555
weight: 1.2
5656
```
@@ -101,15 +101,15 @@ function Base.show(io::IO, m::MIME"text/plain", event::Event)
101101
\telectron: $(event.electron_momentum)
102102
\tpositron: $(event.positron_momentum)
103103
\tmuon: $(event.muon_momentum)
104-
\tanti muon: $(event.anti_muon_momentum)
104+
\tanti-muon: $(event.anti_muon_momentum)
105105
\tweight: $(event.weight)
106106
""")
107107
return nothing
108108
end
109109

110110
###
111111
# accessor functions
112-
# see FourMomentumBase.jl for a more exhaused list
112+
# see FourMomentumBase.jl for a more exhausted list
113113
###
114114

115115
function muon_cos_theta(event)

src/four_momentum.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Computes the Minkowski dot product of two four-momentum vectors. The dot product
127127
Minkowski metric `(+,-,-,-)`. For ``p_i = (E_i,p_i^x,p_i^y,p_i^z)`` with ``i=1,2``, the result is:
128128
129129
```math
130-
p_1 \\cdot p_2 = E_1E_2 - p_1^xp_2^x - p_1^yp_2^y + p_1^zp_2^z
130+
p_1 \\cdot p_2 = E_1E_2 - p_1^xp_2^x - p_1^yp_2^y - p_1^zp_2^z
131131
```
132132
133133
# Example
@@ -150,7 +150,7 @@ end
150150
function _construct_moms_from_coords(E_in, cos_theta, phi)
151151
T = typeof(E_in)
152152

153-
# enfore the irrational constants to be the same type as E_in
153+
# enforce the irrational constants to be the same type as E_in
154154
me = convert(T,ELECTRON_MASS)
155155
mmu = convert(T,MUON_MASS)
156156

test/four_momentum.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RNG = MersenneTwister(137)
3131
@test isapprox(p1_plus_p2.z,z1 + z2)
3232
end
3333

34-
@testset "substraction" begin
34+
@testset "subtraction" begin
3535
p1_minus_p2 = @inferred p1 - p2
3636
@test isapprox(p1_minus_p2.en,en1 - en2)
3737
@test isapprox(p1_minus_p2.x,x1 - x2)

0 commit comments

Comments
 (0)