Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Revert to integer, round explicitly
Browse files Browse the repository at this point in the history
Adds reference to Tom's comment for context
  • Loading branch information
EinarElen committed Sep 14, 2023
1 parent 2901561 commit 1e739f8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions python/hcal_hardcoded_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@

from LDMX.Conditions.SimpleCSVTableProvider import SimpleCSVIntegerTableProvider, SimpleCSVDoubleTableProvider

HcalTrigPrimConditionsHardcode=SimpleCSVDoubleTableProvider("HcalTrigPrimDigiConditions",["ADC_PEDESTAL","ADC_THRESHOLD","TOT_PEDESTAL","TOT_THRESHOLD","TOT_GAIN"])
HcalTrigPrimConditionsHardcode.validForAllRows([ 1. , # ADC_PEDESTAL -- should match value from HgcrocEmulator
5. , # ADC_THRESHOLD -- current noise is
1., # TOT_PEDESTAL -- currently set to match ADC pedestal
10000.0, # TOT_THRESHOLD -- rather large value...
2.5 ] # TOT_GAIN, ratio of recon TOT gain over recon ADC gain
HcalTrigPrimConditionsHardcode=SimpleCSVIntegerTableProvider("HcalTrigPrimDigiConditions",["ADC_PEDESTAL","ADC_THRESHOLD","TOT_PEDESTAL","TOT_THRESHOLD","TOT_GAIN"])
HcalTrigPrimConditionsHardcode.validForAllRows([ 1 , # ADC_PEDESTAL -- should match value from HgcrocEmulator
5 , # ADC_THRESHOLD -- current noise is
1, # TOT_PEDESTAL -- currently set to match ADC pedestal
10000, # TOT_THRESHOLD -- rather large value...
# Rounding because trigger primitives shouldn't represent floating point operations.
# See https://github.com/LDMX-Software/Hcal/issues/66#issuecomment-1719663799
round(2.5) ] # TOT_GAIN, ratio of recon TOT gain over recon ADC gain
)

adc_pedestal = SimpleCSVDoubleTableProvider("hcal_adc_pedestal",["pedestal"])
Expand Down

0 comments on commit 1e739f8

Please sign in to comment.