Closed ingoncalves closed 1 year ago
@jodafons, @jlieberm, @edmaregidio for me it's clear!
Thanks @micaelverissimo! Shall we merge the PR then?
Super clear description. only one comment to change. About the changes, did you check with the output (e.g Zee et) before the changes is the same after you introduce this modification?
Unfortunately, we don't have any CI to compare with some reference file. I would like to merge this after this comparison. Example: Zee et energy from the cluster vs after, for this test you just only need to run HIT->ESD->AOD (don't need to rerun the Geant4 step, only the reconstruction).
Hi, @jodafons. Thanks for your feedback!
I totally agree with you. I'll do this test and as soon as I get the result I'll let you know.
@ingoncalves, could please check the conflicts? Or can I close this?
There are several conflicts with this pull request. Do we need this for now @jodafons?
Not sure, @jlieberm could you check if this PR will be include into the release (today)?
Closing this since there is no activity.
Until now, Optimal Filter's weights are being designed by an external tool and hardcoded into Lorenzetti's code. In this PR, we fully implement the Optimal Filter estimator, including some useful features:
Each of these features is detailed below.
We had to refactor and implement some tools. Pulse Shape code was extracted from
PulseGenerator
into a new tool calledCaloPulseShapeMaker
. This allows us to reuse the pulse shape in the Optimal Filter design.Optimal Filter and Pulse Shape
Optimal Filter now uses the pulse shape associated with each cell through
CaloPulseShapeMaker
. It is initialized in thegeometry/DetectorATLASModel/python/CaloCellBuilder.py
files as:Control the number of constraints (OF1 and OF2)
The number of constraints used in the Optimal Filter optimization process can be controlled. In the
geometry/DetectorATLASModel/python/DetectorLayers.py
file, we useUseOF2 = True
to configure the Optimal Filter with two restrictions (phase and pedestal immunity). Setting this flag toFalse
gives us the OF1 implementation, which uses only the phase immunity restriction. See an example below.Calibration with Minimum Bias datasets
We can also calibrate the Optimal Filter by using the covariance matrix of the noise (noise whitening). To do so, we need to provide a noise dataset file, which is a text file composed of a matrix (each cell separated by whitespace, and one row per line).
For instance, if a cell uses a pulse with 7 samples, the noise dataset should be like
with as many rows as you need.
In possession of these datasets, we can enable the calibration by using the
OFCalibrationFile
property as follows:Speedup with static coefficients
As the Optimal Filter coefficients are now calculated in runtime, it may slow down the simulation process. If this is an issue for you, you can use pre-calculated static weights. This skips the entire weight calculation step, speeding up the simulation. To do so, use the
OFWeights
property as follows: