@@ -62,6 +62,7 @@ class sbnd::crt::CRTStripHitProducer : public art::EDProducer {
6262
6363 std::string fFEBDataModuleLabel ;
6464 uint16_t fADCThreshold ;
65+ uint16_t fADCSaturation ;
6566 std::vector<double > fErrorCoeff ;
6667 bool fAllowFlag1 ;
6768 bool fApplyTs0Window ;
@@ -88,6 +89,7 @@ sbnd::crt::CRTStripHitProducer::CRTStripHitProducer(fhicl::ParameterSet const& p
8889 : EDProducer{p}
8990 , fFEBDataModuleLabel (p.get<std::string>(" FEBDataModuleLabel" ))
9091 , fADCThreshold (p.get<uint16_t >(" ADCThreshold" ))
92+ , fADCSaturation (p.get<uint16_t >(" ADCSaturation" ))
9193 , fErrorCoeff (p.get<std::vector<double >>(" ErrorCoeff" ))
9294 , fAllowFlag1 (p.get<bool >(" AllowFlag1" ))
9395 , fApplyTs0Window (p.get<bool >(" ApplyTs0Window" ))
@@ -273,6 +275,10 @@ std::vector<sbnd::crt::CRTStripHit> sbnd::crt::CRTStripHitProducer::CreateStripH
273275 const uint16_t adc1 = sipm1.pedestal < sipm_adcs[adc_i] ? sipm_adcs[adc_i] - sipm1.pedestal : 0 ;
274276 const uint16_t adc2 = sipm2.pedestal < sipm_adcs[adc_i+1 ] ? sipm_adcs[adc_i+1 ] - sipm2.pedestal : 0 ;
275277
278+ // Saturated?
279+ const bool sat1 = sipm_adcs[adc_i] >= fADCSaturation ;
280+ const bool sat2 = sipm_adcs[adc_i+1 ] >= fADCSaturation ;
281+
276282 // Keep hit if both SiPMs above threshold
277283 if (adc1 > fADCThreshold && adc2 > fADCThreshold )
278284 {
@@ -290,7 +296,7 @@ std::vector<sbnd::crt::CRTStripHit> sbnd::crt::CRTStripHitProducer::CreateStripH
290296 if (pos - err < 0 )
291297 err = pos;
292298
293- stripHits.emplace_back (offline_channel_id, t0, t1, ref_time_s, pos, err, adc1, adc2);
299+ stripHits.emplace_back (offline_channel_id, t0, t1, ref_time_s, pos, err, adc1, adc2, sat1, sat2 );
294300 }
295301 }
296302
0 commit comments