This is the material used during my course (Course website).
-
Introduction to the course: pdf
-
References and pointers in C++. Constant. Namespace. Introduction to Class.: pdf examples
-
Classes and objects in C++. Interface and attributes. Constructors. Separating interface and implementation. Header and source files: pdf examples
-
Header and source files. Dynamic memory allocation. Destructor. Using class std::vector: pdf examples
-
Destructor. const member functions. Default arguments for functions. Applications in C++. Arguments from command line. external libraries. Introduction to ROOT: pdf examples
-
Simple instructions for ROOT setup and configuration of ROOT and the shell environment: md
-
Numerical convolution: Gaussian detector resolution and monochromatic source. Gaussian convolution of exponential decay length distribution. Dynamically allocated object as data members. Overloading operators. Adding operators to class Datum: pdf examples
-
Overloading operators and friend methods. Static data members and methods. Application to compute weighted average: pdf examples
-
Example of static data member in class Datum. Enumerators. use case for std::map, std::pair, and std::vector. class Vector3D: pdf examples
-
Input/Output with TTree and TFile. Random Generators in ROOT. Using ROOT classes for functions and fitting: md examples
-
Data storage with TTree. Input and output. Branches with variable size: md examples
-
Input/Output of custom class objects with TTree. Reading of TTree created by others: Application for analysis of TTree. Creating custom analysis class: md examples
-
Object oriented programming: Inheritance. Base and derived class. Polymorphism with virtual methods. Examples of Shape, Particle, Person, Function and their use case: pdf examples
-
Strategy pattern: examples and applications: Numerical integration methods. custom Function class: md examples
-
Composition pattern: examples and applications: leaf and composites in graphical applications. Example of a solar system simulation with composite objects: md examples
-
Templates and generic programming in C++. Template functions and classes. STL containers. Error handling with exceptions: pdf examples
-
Makefile: usage and examples: md
-
Introduction to Python. Main differences with C/C++. Introduction to jupyter: md, examples
-
Python basics: semantics, flow control, built-in, functions, modules. Inline help: jupyter notebook, examples
-
Data structure in python: sequences. Lists, Tuples. Example of plotting with matplotlib. Motion of a body under gravity: jupyter notebook, examples
-
Data types in python: Dictionaries and sets. Comprehensions. data analysis with sets, lists, dicts. Plotting a histogram. NumPy arrays: revisiting motion of a body under gravity. Animated plots with matplotlib. Function with multiple return values in python : jupyter notebook, examples
-
Numpy and array-oriented programming with
ndarray
. Example of random walk with arrays. File I/O and handling in python. Functions with variable number of arguments. Command line arguments for python programs : jupyter notebook, examples -
Hands-on exercises in laboratory: md