HistSmear

Description

Applies (energy) smearing matrix to the histogram of events binned in Evis.

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

  1. 'smear.Ntrue' — one-dimensional histogram of number of events Ntrue.

  2. 'smear.SmearMatrix' —­square smearing matrix of number of events C.

Outputs

  1. 'smear.Nrec' — one-dimensional smeared histo of number of events Nvis

Arguments

  1. 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 Nvis and true Ntrue are connected through a matrix transformation:

Nirec=jCijNjvis,

where Nirec is a reconstructed number of events in a i-th bin, Njvis is a true number of events in a j-th bin and Cij is a probability for events to flow from j-th to i bin.

The matrix C usually satisfies the following condition:

iCij=1

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.