In this first session we design and implement a new class Complex to implement
mathematical operations between Complex and regular double objects.
- overload operators
+,-,*,/betweenComplexobjects and operator<<for output
Complex a(-1,2), b(0.5, 0.9);
Complex c = a/b;
cout << c << endl;- overload operators for operations with a
doubleon the rhs
Complex i(0,1);
Complex d = i*3 + a + b/2.3 + 1.2;- overload operators for operations with a
doubleon the lhs
Complex z = 3*i + 2/d;The scope of this session is to exercise input/output of TTree with TFile
- Finish implementing class
Complex - prepare dictionary for
Complexto be used in ROOT - generate 10'000 random
Complexnumbers with magnituder<1 - create a
TTreewith a single branch that contains aComplexobject - Store the
TTreeto disk withTFile - Use
TTree::MakeClass("Analyser")function to generate theAnalyserclass from the storedTTree - write a new analysis application to read back the
TTreefrom file using the newAnalyserclass
The scope of this session is the implementation of at least 2 numerical integration Methods with the Strategy Pattern.
- Implement the trapezoid or midpoint Method
- Use a function with known primitive, e.f. the exponential, to compare precision of integration with the MC method
The scope of this session is to read a TTree provided by someone else and perform data analysis.
Specifically, the TTree with contain generator-level and reconstructed information
from simulated proton-proton collisions. All details at CODanalysis.md
Today we simulate the energy loss by ionisation to see the Bethe-Bloch distribution and reproduce the Bragg Peak for the heavy particles.
-
define a class Detector with at least density and length as data members and a function interaction() to compute dE/dx
- for simplicity assume average values for ionisation energy I and Z/A ~ 2
- You can otherwise have A, Z, I as data members of the class Detector or even define another class Material.
- as a reference, we want to study the distributions in water, Pb, and air.
-
Use the Bethe-Bloch formula to compute the average energy loss by ionisation.
-
Emulate the effective energy loss as a Gaussian with the mean given by Bethe-Bloch and width of 5% - (\beta\gamma/1000) * 10%.
-
check the proper implementation of your class and Bethe-Bloch function by making a 2D plot of energy loss as a function of \beta\gamma.
- Use TH2F, TGraph, or TProfile for plotting
- check that the energy loss, normalized to the density, is universal across different material
Now we want to see the Bragg peak.
- Use a proton with the momentum of 5 MeV going through a target of water
- compute the energy loss and plot the energy loss de/dx as a function of penetration path in the material
- you should now see a peak right before the proton is stopped in the material
We can now study the Bragg peak for different materials, particle types, and momenta.
- material: water, Fe, air
- particles: muon, proton, alpha particle, 12C nucleus
- momentum: 5 MeV, 50 MeV, 500 MeV, 5 GeV
As an example make the following 2 plots
- for a water detector and initial momentum of 5 MeV, show dE/dx as a function of the path for different types of particles. use a different color or line type to distinguish the particles.
- for a water detector make the same plots only for protons, but for the various values of momentum. use different color and line type to show different momenta
In this first session on python, we simulate the motion of an object in 3D under the effect of gravity. Use matplotlib.mplot3D module for 3D graphics.
- implement motion with analytical method and plot the trajectory
- implement motion with Euler method and plot the trajectory with a different color
- Plot the distributions of the residuals for
x,y, andzcoordinates as(euler-analytical)/analytical - Introduce the friction term as
-\beta vand use Euler to plot the trajectory - Plot the trajectories simultaneously and compare friction to no-friction
Use python to simulate the Compton scattering spectrum.
Implement a vicinity sensor with Arduino. Real time plot with matplotlib. md