-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New metadata classes to perform calibration and odds analysis over a TRestDataSet #392
Conversation
…over a TRestDataSet
for more information, see https://pre-commit.ci
/// This class is meant to perform the calibration of different runs | ||
class TRestCalibration : public TRestMetadata { | ||
private: | ||
// Name of the output file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave one white space between data member definitions so that is easier to read the documentation line corresponding to the metadata member.
Also I think doxygen requires to use a triple ///
comment.
/// TRestCalibration performs the calibration of a TRestDataSet, the | ||
/// calibration is performed over different peaks provided in the config | ||
/// file, in which the first peak should corresponds to the maximum in the | ||
/// spectrum histogram. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand then that the peaks are sorted in descending energy order? First peak highest energy, latest peak the lowest energy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, the requirement is that the first peak should correspond to the maximum in the spectra. The rest of the peaks could be randomly ordered.
These new classes are clearly in a new type of metadata class that uses the dataset to generate a new column on the input dataset. We should think that there might appear more classes of this type. Perhaps we should create a new directory to put those closes inside, together with I would also think about introducing a name root to these classes, such as |
Co-authored-by: Javier Galan <javier.galan@unizar.es>
Co-authored-by: Javier Galan <javier.galan@unizar.es>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
New metadata clasess have been added under framework:
TRestCalibration
is meant to perform the calibration of aTRestDataSet
, the calibration is performed over different peaks provided in the config file. If an output file name is provided a new dataset will be generated with the corresponding metadata and calibration constants, while adding a new observable,calib_energy
. In addition, the spectrum and the fit results will be stored in the output file.TRestOdds
performs the log odds of the different observables given in the config file and for a particular dataSet. To perform the log odds first the probability density funcion (PDF) is obtained for a set of observables in the desired range and used to compute the log odds. New observables are created in the output dataSetodds_obsName
and the addition of all of them inodds_total
. If an input odds file is provided, the different PDFs are retrieved from the input file.