These are changes introduced by @jsztuk for AGIPD correction
The MR was rebased with the master and I have refactored @jsztuk 's chages and it is ready for review
@danilevc @kamile