Back in 2005, I made a guide for undergraduate students, explaining how to measure cosmic rays, for a lab class I was teaching.

Lab guide cover

This repo contains some macros to calculate radioactive source efficiencies (MC), fit parameters (Gauss and WMean), and the confidence level of the fits (CL).

The theory and lab techniques are explained in the lab-guide cosmicrad.pdf. LaTeX files for this document are provided. This is my first attempt to design a layout for a document in LaTeX.

The code uses some snippets of code from the good ol' Numerical Recipes http://www.nr.com.

Feel free to edit this work and add any improvements.

Compiling and running

Compile

C programs:

$ gcc filename.c -o filename -lm

C++ programs:

$ g++ filename.cpp -o filename

Run

$ ./filename