Open vrm7fj opened 2 months ago
New Class 'PulseRecord':
This class is intended solely for plotting purposes and should not interfere with the existing workflow. The PulseRecord(double volts, int adc, int tot) function temporarily stores the digitized pulses when the HgcrocEmulator is called by either the Hcal or Ecal pipelines and is cleared each time the emulator is invoked. If the pulse is digitized using ADC, the TOT value is set to zero, and vice versa.
To my understanding, the HgcrocEmulator cannot be called by the Ecal and Hcal pipelines at the exact same time. Therefore, when the getter for PulseRecord is called within the HcalDigiProducer, it will only retrieve the digitized information corresponding to the pulses sent for digitization at that moment. If this understanding is incorrect, the class may only be suitable for studying the back Hcal.
HgcrocEmulator
HgcrocEmulator.h has been amended with a mutable vector ‘pulseRecord’ and a getter to access ‘pulseRecord’ to store and access digitizations.
Originally, the TOT digitization for an incoming pulse was set by comparing the voltage (vpeak) of the hit, calculated using the pulse function at the time of the hit that comes with the pulse. However, in ADC digitization, the voltage (bxvolts) is calculated using iADC and the clock cycle. There is a slight difference between the two voltage values. See the following debug print.
If we used the original setting:
if (vpeak > totThreshold) { startTOT = true; }
ADC and TOT digitizations look like this. Note that the ADC digitization does not reach up to 1024 counts here.
Instead, if we modify the code as follows, the complete ADC range is utilized in the digitization:
if (bxvolts > totThreshold){
/startTOT = true;
}
In this branch, the ‘bxvolts > totThreshold’ condition is currently used.
HcalDigiProducer
Once each section in HcalDigiProducer sends pulses to HgcrocEmulator, they are accessed through the getter and temporarily stored in the vector ‘DigiToPlot’, which is cleared for each ‘hitsByID’ in the loop. At the end of each section, the recorded digitized info is written into a text file following the format [Voltage ADC TOT]. The plots I showed above were generated using that text file.
hcal_hardcoded_conditions.py and proposed TOT reconstruction
Please see the following presentation to understand how changes were made to hcal_hardcoded_conditions and how TOT reconstruction can be implemented.
Discussion
Before the implementation of TOT digitization, the histogram of Hcal reconstructed energy was piling up towards the last bins. However, after the implementation, we now observe a smoothed decay in the reconstructed energy. Please note that the appropriate parameters for reconstruction have not yet been configured.
I am updating ldmx-sw, with implemented Hcal TOT digitization.
What are the issues that this addresses?
Check List