diff --git a/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc b/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc index 1f212abd1..93eb61bfa 100644 --- a/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc +++ b/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc @@ -62,6 +62,7 @@ class sbnd::crt::CRTStripHitProducer : public art::EDProducer { std::string fFEBDataModuleLabel; uint16_t fADCThreshold; + uint16_t fADCSaturation; std::vector fErrorCoeff; bool fAllowFlag1; bool fApplyTs0Window; @@ -88,6 +89,7 @@ sbnd::crt::CRTStripHitProducer::CRTStripHitProducer(fhicl::ParameterSet const& p : EDProducer{p} , fFEBDataModuleLabel(p.get("FEBDataModuleLabel")) , fADCThreshold(p.get("ADCThreshold")) + , fADCSaturation(p.get("ADCSaturation")) , fErrorCoeff(p.get>("ErrorCoeff")) , fAllowFlag1(p.get("AllowFlag1")) , fApplyTs0Window(p.get("ApplyTs0Window")) @@ -273,6 +275,10 @@ std::vector sbnd::crt::CRTStripHitProducer::CreateStripH const uint16_t adc1 = sipm1.pedestal < sipm_adcs[adc_i] ? sipm_adcs[adc_i] - sipm1.pedestal : 0; const uint16_t adc2 = sipm2.pedestal < sipm_adcs[adc_i+1] ? sipm_adcs[adc_i+1] - sipm2.pedestal : 0; + // Saturated? + const bool sat1 = sipm_adcs[adc_i] == fADCSaturation; + const bool sat2 = sipm_adcs[adc_i+1] == fADCSaturation; + // Keep hit if both SiPMs above threshold if(adc1 > fADCThreshold && adc2 > fADCThreshold) { @@ -290,7 +296,7 @@ std::vector sbnd::crt::CRTStripHitProducer::CreateStripH if(pos - err < 0) err = pos; - stripHits.emplace_back(offline_channel_id, t0, t1, ref_time_s, pos, err, adc1, adc2); + stripHits.emplace_back(offline_channel_id, t0, t1, ref_time_s, pos, err, adc1, adc2, sat1, sat2); } } diff --git a/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl b/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl index 9aa8e2a26..2de95131c 100644 --- a/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl +++ b/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl @@ -6,6 +6,7 @@ crtstriphitproducer_sbnd: { FEBDataModuleLabel: "crtsim" ADCThreshold: 60 + ADCSaturation: @local::sbnd_crtsim.DetSimParams.AdcSaturation ErrorCoeff: [ 0.26, -0.27, 0.025 ] AllowFlag1: false ApplyTs0Window: false diff --git a/sbndcode/CRT/CRTSimulation/crtsimmodules_sbnd.fcl b/sbndcode/CRT/CRTSimulation/crtsimmodules_sbnd.fcl index 2d9acb68e..ca546268b 100644 --- a/sbndcode/CRT/CRTSimulation/crtsimmodules_sbnd.fcl +++ b/sbndcode/CRT/CRTSimulation/crtsimmodules_sbnd.fcl @@ -58,7 +58,7 @@ standard_sbnd_crtsimparams: { # Minimum time between energy deposits that SiPMs can resolve [ns] SipmTimeResponse: 2.0 - AdcSaturation: 4095 + AdcSaturation: 4089 DeadTime: 22000