HistSmear¶
Description¶
Applies (energy) smearing matrix to the histogram of events binned in \(E_{\text{vis}}\).
HistSmear class may be used to implement, for example, Daya Bay IAV smearing. The IAV uncertainty may be implemented by connecting the output of RenormalizeDiag transformation as the input to HistSmear.
Inputs¶
'smear.Ntrue'
— one-dimensional histogram of number of events \(N_{\text{true}}\).'smear.SmearMatrix'
—square smearing matrix of number of events \(C\).
Outputs¶
'smear.Nrec'
— one-dimensional smeared histo of number of events \(N_{\text{vis}}\)
Arguments¶
bool upper
. If true HistSmear will ensure that the matrix is upper diagonal. Useful for the cases of energy leak type smearing.
Tests¶
Use the following commands for the usage example and testing:
./tests/detector/test_esmear.py -s
./tests/detector/test_iavunc.py -s
Implementation¶
The smeared histo \(N_{\text{vis}}\) and true \(N_{\text{true}}\) are connected through a matrix transformation:
where \(N^{\text{rec}}_i\) is a reconstructed number of events in a i-th bin, \(N^{\text{vis}}_j\) is a true number of events in a j-th bin and \(C_{ij}\) is a probability for events to flow from j-th to i bin.
The matrix \(C\) usually satisfies the following condition:
for most of the histogram bins. Exceptions are bins in the beginning and end of the histogram. Events from these bins leak outside the histogram, so the sum may be less than one.