Update SW Tutorial authored by Lorenzo Scavarda's avatar Lorenzo Scavarda
......@@ -10,12 +10,13 @@ The main components of the SW are:
2. Create n-tuple
3. Read n-tuple
4. Energy resolution calculation
5. Other macros
## TreeWave generation
## 1. TreeWave generation
This macro converts the binary file.dat acquired by the Digitizer into a ROOT file (the TreeWave.root). This file is a TTree containing in different branches all the samplings and the temperature of the signals divided for different crystals.
## Create n-tuple
## 2. Create n-tuple
The second step is: `/$HOME/foot_turin/Script/PythonScript/sw_standalone/create_ntuple.py`.
......@@ -63,7 +64,7 @@ example:
`> python analyze.py TreeWave.root 0 10000 -c 0 1 2 3 4 5 6 7 8 -d 1024 -b 12 -o fout_ntuple.root -f -s 1000 -p PulseWF`
## Read n-tuple
## 3. Read n-tuple
Once all the signals quantities are stored in n-tuples, the class `/$HOME/foot_turin/Script/PythonScript/sw_standalone/read_ntuple.py` allows to quickly generate all the histograms/plots required by the user.
......@@ -162,3 +163,11 @@ and some OPTIONAL arguments:
example:
`> python analyze_ntuple.py fout_ntuple.root 0 10000 -c 0 1 2 3 4 5 6 7 8 -o data_analysis.root -r 0 -exp CNAO_2021_11_17 -t 4`
## 4. Energy Resolution
The function in `$HOME/foot_turin/Script/PythonScript/sw_standalone/energy_resolution.py` performs the energy resolution evaluation from the Amplitude and Charge histograms created in step 3. It is called by the Jupyter Notebook script in `$HOME/foot_turin/Script/PythonScript/sw_standalone/notebook/FitCalorimeterDistribution.ipynb`
## 5. Other macros
- In the directory `$HOME/foot_turin/Script/PythonScript/sw_standalone/tb_analysis` sub-directories related to specific test beams are present. Each sub-directories have a set of scripts used to perform a dedicated analysis in that specific test beam. Often same scripts are present in different test beam sub-directories but with different numbers/configuration values hard-coded. This structure has been done in order to avoid one single script with thousends line commented each related to a different test beam.
- In the directory `$HOME/foot_turin/Script/PythonScript/sw_standalone/notebook` several Jupyter Notebook scripts are present. Most of them were created to perform a dedicated study/analysis.
\ No newline at end of file