From c4db9e2dc56ef01804e059f6d886c33829f42753 Mon Sep 17 00:00:00 2001 From: kkauder Date: Sat, 11 Nov 2023 01:07:05 +0100 Subject: [PATCH] Updated LFHCAL ADC parameters and threshold (#1105) ### Briefly, what does this PR introduce? Updated LFHCAL ADC params from the [digitization table from 10/2](https://brookhavenlab.sharepoint.com/:x:/s/EICPublicSharingDocs/EeICxMJ9vGtPtyq5g4qzcSwBKCqkHDj06KDdSvYQ7pxqrQ?rtime=lD_5kMnT20g). Threshold on the ADC level: 0.3 MeV deposition --> adc = 50 + 0.3 / 1000 * 65536 == 70 --> thresholdValue = 20 ### What kind of change does this PR introduce? - [x] Bug fix (issue #895 ) - [ ] New feature (issue #__) - [ ] Documentation update - [x] Other: Maintenance ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [x] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? Yes. --- src/detectors/FHCAL/FHCAL.cc | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/detectors/FHCAL/FHCAL.cc b/src/detectors/FHCAL/FHCAL.cc index 9882347449..8795cb2d02 100644 --- a/src/detectors/FHCAL/FHCAL.cc +++ b/src/detectors/FHCAL/FHCAL.cc @@ -125,17 +125,24 @@ extern "C" { ) ); + // Make sure digi and reco use the same value + decltype(CalorimeterHitDigiConfig::capADC) LFHCAL_capADC = 65536; + decltype(CalorimeterHitDigiConfig::dyRangeADC) LFHCAL_dyRangeADC = 1 * dd4hep::GeV; + decltype(CalorimeterHitDigiConfig::pedMeanADC) LFHCAL_pedMeanADC = 50; + decltype(CalorimeterHitDigiConfig::pedSigmaADC) LFHCAL_pedSigmaADC = 10; + decltype(CalorimeterHitDigiConfig::resolutionTDC) LFHCAL_resolutionTDC = 10 * dd4hep::picosecond; + app->Add(new JChainMultifactoryGeneratorT( "LFHCALRawHits", {"LFHCALHits"}, {"LFHCALRawHits"}, { .eRes = {}, .tRes = 0.0 * dd4hep::ns, - .capADC = 65536, + .capADC = LFHCAL_capADC, .capTime = 100, - .dyRangeADC = 1 * dd4hep::GeV, - .pedMeanADC = 20, - .pedSigmaADC = 0.8, - .resolutionTDC = 10 * dd4hep::picosecond, + .dyRangeADC = LFHCAL_dyRangeADC, + .pedMeanADC = LFHCAL_pedMeanADC, + .pedSigmaADC = LFHCAL_pedSigmaADC, + .resolutionTDC = LFHCAL_resolutionTDC, .corrMeanScale = 1.0, .readout = "LFHCALHits", .fields = {"layerz"}, @@ -145,13 +152,13 @@ extern "C" { app->Add(new JChainMultifactoryGeneratorT( "LFHCALRecHits", {"LFHCALRawHits"}, {"LFHCALRecHits"}, { - .capADC = 65536, - .dyRangeADC = 1 * dd4hep::GeV, - .pedMeanADC = 20, - .pedSigmaADC = 0.8, - .resolutionTDC = 10 * dd4hep::picosecond, - .thresholdFactor = 1.0, - .thresholdValue = 3.0, + .capADC = LFHCAL_capADC, + .dyRangeADC = LFHCAL_dyRangeADC, + .pedMeanADC = LFHCAL_pedMeanADC, + .pedSigmaADC = LFHCAL_pedSigmaADC, + .resolutionTDC = LFHCAL_resolutionTDC, + .thresholdFactor = 0.0, + .thresholdValue = 20, // 0.3 MeV deposition --> adc = 50 + 0.3 / 1000 * 65536 == 70 .sampFrac = 0.033, .sampFracLayer = { 0.019, // 0