EnergyResolution¶
Description¶
Applies energy smearing matrix to the input histograms of events binned in
Transformations¶
The object contains at least two transformations. One matrix transformation and at least one smear transformation.
Matrix transformation¶
The matrix transformation computes the smearing matrix depending on three parameters
Inputs¶
matrix.Edges
– a histogram defining the bin edges.
The transformations reads only the bins definitions. The actual data from the histogram is not requested and the taintflag is not propagated.
Outputs¶
matrix.FakeMatrix
– smearing matrix.
By default the output matrix is used to propagate the taintstatus only. The actual matrix is sparse and is stored internally. propagate_matrix option should be set in order to matrix.FakeMatrix to be written.
Variables¶
Eres_a
— ,Eres_b
— andEres_c
—
are the parameters of the energy resolution formula. See below.
Smear transformation¶
Inputs¶
smear.FakeMatrix
— smearing matrix. Binded automatically when transformation is created.smear.Ntrue
— one-dimensional histogram of number of events .smear.Ntrue_02
— another histogram of the same shape(optional).…
Outputs¶
smear.Nrec
— one-dimensional smeared histogram of number of eventssmear.Nrec_02
— the second histogram smeared.…
Subsequent transformations¶
Subsequent transformations are named smear_02, smear_03 etc.
Arguments and functions¶
There is a pythonic constructor defined in gna.constructors:
- EnergyResolution(parameters, propagate_matrix=False)
initializes energy resolution with a list of parameters (should contain three items) and a boolean flag that may trigger the matrix.FakeMatrix output to be written.
The constructor creates a single smear transformation with a single input and corresponding output.
The EnergyResolution object contains the following methods:
- add_transformation(name=’’)
adds a new smear transformation with name, passed as input, or generated automatically. Returns new transformation.
- add_input(inputname=’’, output=’name’)
adds a new input/output pair to the last smear transformation. The names are either set as arguments or generated automatically. Returns newly created input.
- add_input(output, inputname=’’, output=’name’)
adds a new input/output pair to the last smear transformation. The names are either set as arguments or generated automatically. The output, passed as argument is connected to the newly created input. Returns new output.
The inputs of a single transformation are all processed, even if only one of them is tainted. For the description see the tutorial.
Also, since the constructor of the object creates a transformation with an input, first call to any of the add_input() method will use this input if it is unbound.
Tests¶
Use the following commands for the usage example and testing:
./tests/detector/test_eres.py -s
Implementation¶
The smeared histo
where
That probability is given by:
where
where

Energy resolution bundle scheme.¶