Update SW Tutorial authored by Lorenzo Scavarda's avatar Lorenzo Scavarda
......@@ -19,8 +19,24 @@ This macro converts the binary file.dat acquired by the Digitizer into a ROOT fi
The second step is: `/$HOME/foot_turin/Script/PythonScript/sw_standalone/create_ntuple.py`.
This macro aims at processing the TreeWave.root generating the major quantities required by the analysis (amplitude, charge, baseline, fit paramters, etc.) and saving them in another ROOT file.
This class aims at processing the TreeWave.root generating the major quantities required by the analysis (amplitude, charge, baseline, fit paramters, etc.) and saving them in another ROOT file.
The list of the class methods are:
- `def _init_(self, dir_in, ch_list, isFitAn, dig, bit, save_canvas, pulse_folder)`: class constructor
- `def constant_numbers(self, bit)`: it defines some constant numbers
- `def open_tree(self)`: it opens the input TreeWave.root file
- `def init_data(self)`: it initialises the arrays to store the main quantities (amplitude, charge, etc.)
- `def reset_data(self)`: it resets the arrays each event
- `def baseline(self, c_id)`: it calculates the signal baseline
- `def pulse_analysis(self, c_id)`: it perform the signals evaluation. In particular it performs `ADC[i]-baseline`, it creates the signal histogram and it calculates amplitude and charge
- `def ntuple_store(self, fout)`: it creates the output file where store the n-tuples
- `def temp_conversion(self)`: it performs the temperature conversion from ADC to degree
- `def fit_initialization(self)`: it defines the fit function
- `def fit_analysis(self, c_id)`: it performs the fit analysis and it retrieves all the fit parameters
- `def init_canvas(self)`: it creates the canvas of some PDF pictures
- `def draw_pulses(self, i, c_id, event)`: it draws the signals in the canvas
- `def analyze_tree(self, ev_start, ev_stop, fout)`: main function which recalls all the previous ones.
### How to run
The macro can be run through the `/$HOME/foot_turin/Script/PythonScript/sw_standalone/analyze.py` script.
......
......