Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class sbnd::crt::CRTStripHitProducer : public art::EDProducer {

std::string fFEBDataModuleLabel;
uint16_t fADCThreshold;
uint16_t fADCSaturation;
std::vector<double> fErrorCoeff;
bool fAllowFlag1;
bool fApplyTs0Window;
Expand All @@ -88,6 +89,7 @@ sbnd::crt::CRTStripHitProducer::CRTStripHitProducer(fhicl::ParameterSet const& p
: EDProducer{p}
, fFEBDataModuleLabel(p.get<std::string>("FEBDataModuleLabel"))
, fADCThreshold(p.get<uint16_t>("ADCThreshold"))
, fADCSaturation(p.get<uint16_t>("ADCSaturation"))
, fErrorCoeff(p.get<std::vector<double>>("ErrorCoeff"))
, fAllowFlag1(p.get<bool>("AllowFlag1"))
, fApplyTs0Window(p.get<bool>("ApplyTs0Window"))
Expand Down Expand Up @@ -273,6 +275,10 @@ std::vector<sbnd::crt::CRTStripHit> 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)
{
Expand All @@ -290,7 +296,7 @@ std::vector<sbnd::crt::CRTStripHit> 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);
}
}

Expand Down
1 change: 1 addition & 0 deletions sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sbndcode/CRT/CRTSimulation/crtsimmodules_sbnd.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down