Quickstart
Installation
import Pkg
Pkg.add(url = "https://github.com/AndreasKirchner/MonteCarloGlauber.jl")Then load the package:
using MonteCarloGlauberSample Events
n1 = Lead()
n2 = Lead()
w = 0.5
s_NN = 2760
k = 1
p = 0.0
participants = Participants(n1, n2, w, s_NN, k, p)
events = rand(participants, 10_000)Multithreaded Sampling
To use all threads when sampling many events:
events = rand(threaded(participants), 100_000)Basic Observables
mult = multiplicity.(events)
coll = getfield.(events, :n_coll)
b = impactParameter.(events)
Evaluate an Event on a Grid
Participant objects are callable and return the fluctuating thickness at (x, y):
evt = events[1]
profile = [evt(x, y) for x in -10:0.5:10, y in -10:0.5:10]