Goal is to improve the behaviour of the VMM simulation in the sTGC digitization and broadly remove redundant information and useless code/files. If possible, these changes should be used for the planned November reprocessing. Previously, the behaviour of the VMM was taken care of into the VMMSim class which was slow, extremely confusing and not working in some fringe cases. Previous VMM simulation would track the state of channels through dead/ready/read states for small time steps which would be computationally heavy and the code was very impractical (see confusing) to read.
We now streamline the whole sTGC DigitizationTool so that the processing of VMM deadtime and strip neighborOn logic is clear to follow. Some important values for the VMM can now be directly controlled via the python steering scripts instead of having to manually change txt files.
The result is the removal of the whole sTGC VMMSim class. Also included in the MR is the removal of extraneous CSC files (unused), functions and redundant variables.
The changes of !57643 (merged) are already implemented in this MR as well.
The basic logic for the new deadtime simulation is as follows:
- If two digits are within the VMM merging time window of 30ns, the 2nd digit in time is merged within the 1st one.
- If a digit is above the VMM charge threshold it triggers the VMM to read the charge (save the digit to become RDO) and causes all following digits in the VMMDeadtime window to be lost due to the VMM being in a dead state.
The basic logic for the new strip neighborOn simulation is as follows:
- Follows the same logic as the basic deadtime simulation outlined above.
- If a strip is above threshold and triggers the VMM into the read state, the neighbourOn functionality also forces the neighbouring strips to read the charges to VMM even if below threshold. Practically this means that any below-threshold digit is saved to become RDO if a neighbouring strip is above threshold, saved to VMM, and within a time window defined as the VMM merging window.
Tests are currently ongoing to further validate these changes. So far the deadtime implementation works well and outperforms the VMMSim class implementation. The neighborOn logic for strips currently increases the number of strips in a cluster by AT MOST TWO for muon-only clusters, indicating a correct implementation. General number of strips per layer is increased by 20-30%. Currently awaiting on results of jobs with more statistics.