Skip to content
Snippets Groups Projects
Commit 943d9e8f authored by David Blyth's avatar David Blyth
Browse files

G4TBMakeSpectrum: added option to specify lambda

parent 20f1a3fc
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ var ( ...@@ -21,6 +21,7 @@ var (
nBins = flag.Int("n", 100, "number of bins") nBins = flag.Int("n", 100, "number of bins")
min = flag.Float64("min", 1, "minimum x value") min = flag.Float64("min", 1, "minimum x value")
max = flag.Float64("max", 4500, "maximum x value") max = flag.Float64("max", 4500, "maximum x value")
lambda = flag.Float64("lambda", 4.0, "average number of electron secondaries per hit")
) )
func printUsage() { func printUsage() {
...@@ -49,7 +50,7 @@ func main() { ...@@ -49,7 +50,7 @@ func main() {
defer reader.Close() defer reader.Close()
RNG := rand.New(rand.NewSource(0)) RNG := rand.New(rand.NewSource(0))
poiss := &distuv.Poisson{Lambda: 4.0, poiss := &distuv.Poisson{Lambda: *lambda,
Src: RNG, Src: RNG,
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment