nectarchain.trr_verification_package.charge_resolution.main#
- main()[source]#
The
main()function is the entry point of the linearity test script. It parses the command-line arguments, processes the specified runs, and generates plots to visualize the linearity and charge resolution of the detector. The function performs the following key steps: 1. Parses the command-line arguments using theget_args()function, which sets up the argument parser and handles the input parameters. 2. Iterates through the specified run list, processing each run using theChargeResolutionTestToolclass. This tool initializes, sets up, starts and finishes the processing for each run, returning the relevant output data. 3. Generates three subplots: - The first subplot shows the estimated charge vs the voltage of FF (calibration) for both high and low gain channels. - The charge resolution vs the charge. (using low gain for points above 200 pe and high gain below that) - The third subplot shows the ratio of high-gain to low-gain charge. 5. Saves the generated plots to the specified output directory. 6. Generates an additional plot to visualize the charge resolution, including the statistical limit.