Add a parameter to take into account the 0 time bin in simulations #154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is useful to convert the bin time of the detected peaks to physical time. This way we can directly compare when the peaks happen for tpc signals and veto signals, overcoming the issues that arise when we take into account the different sampling, trigger delay, ... of the different types of signal.
The fact that a tpc peak happens in bin 256 and a veto peak happens at bin 150, for example, is not directly comparable since for each signal type the bin time is one or another for the same bin (given the sampling for each type) and the signals will be placed at particular bins (given the trigger delay for each type).
When the physical times are comparable we can find interesting information, for example, tpc peaks will always be after the trigger and the physical time distance between the maximum and minimum is related to the drift velocity (an energy deposition near the cathode will produce a peak further in time than an energy deposition near the mesh, whose peak will be almost instantaneous after the trigger and this time difference is related to the time the electrons produced near the cathode take to reach the mesh and produce the peak).
A new observable is added to compute the zero time bin (the bin at which the trigger happens) in simulations and the bin time difference between the peak position and this zero bin gives the physical time from the trigger to the maximum energy deposition (when most electrons reach the mesh).