CDCalibrator update - Histograms and Fitting routine#109
Open
hannahkleis-ctrl wants to merge 12 commits into
Open
CDCalibrator update - Histograms and Fitting routine#109hannahkleis-ctrl wants to merge 12 commits into
hannahkleis-ctrl wants to merge 12 commits into
Conversation
The Makefile needed to be update to use the TLinearFitter in Root --> takes the correct libraries now
The histograms are changed to be only in raw charge without the calibrated energy. The calibration is now in the code only and takes the correct values of the initial p/n strip calibration of the calibration.dat file. Additionally, a new fitting routine is implemented which allows to select the data on the diagonal by using linear functions determined by certain parameters. As well as the TLinearFitter from root is used and the robust fitting. Furthermore, the residuals are calculated and drawn between the data which is inside the cuts and the fit.
Include the parameters to control the cuts/selection of the data as well as the robust fitting percentage.
Same as for the Setting.hh commit
The new parameters to control the fit in the CDCablibrator are implemented and can be updated, if needed.
changed the new histograms with only raw charge
lpgaff
requested changes
Jun 5, 2026
| } | ||
|
|
||
| //Residuals | ||
| if(validFit && cd_pQ_nQ[i][j][k]->GetEntries() > 0){ |
Contributor
There was a problem hiding this comment.
is this test with validFit really necessary? Why not just use continue statements in the early part of this nested loop and immediately skip to the next channel? It will save time in the execution and also save many lines of code and complexities.
If you really want to have the print statement to the user that the channel is skipped, just put that inside the if statement just before you call continue;
Contributor
Author
There was a problem hiding this comment.
Are those changes, I made in the last commit for the CDCalibrator.cc file, what you meant by that?
Co-authored-by: Liam Gaffney <[email protected]>
Adjusted the parameters in the CDCalibrator which were suggested to be changed
Changed the handling of the missing strips with the continue as suggested
Adjusted the default values to the correct ones as set as default in the Setting.cc file
Updated the number of Bins from 8192 to 1024 to help with memory issues Co-authored-by: Carlotta Porzio <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CDCalibrator and settings are updated as well as the Makefile (to use TLinearFitter).
In the CDCalibrator only the histograms with the raw charge (n & p) are created and then the calibration parameters of the p-side is taken for the calibrated p-strip from the calibration file. The Histograms with the p-side on the x-axis and the n-side on the y-axis is taken for the calibration of the P-side and the other way around for the N-side calibration.
The fitting routine is adapted and is basically made out of two steps:
Additionally, the residuals of the datapoints inside the cuts and the fitresults are plotted for each strip and saved in the pdf for further investigations of the fit.