Skip to content

Commit 30b810b

Browse files
committed
add fcl configurable ADC to PE conversion
1 parent 6d53206 commit 30b810b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sbndcode/Trigger/PMTSoftware/PMTMCMetricProducer_module.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class sbnd::trigger::PMTMCMetricProducer : public art::EDProducer {
6262
std::string OpDetWaveformsLabel;
6363
opdet::sbndPDMapAlg fPDSMap;
6464
float fStartTime;
65+
float fADCtoPE;
6566

6667
float us_to_ticks = 500.;
6768
float ticks_to_us = 1./us_to_ticks;
@@ -80,6 +81,7 @@ sbnd::trigger::PMTMCMetricProducer::PMTMCMetricProducer(fhicl::ParameterSet cons
8081
OpDetWaveformsLabel = p.get< std::string >("OpDetWaveformsLabel");
8182
fStartTime = p.get<float>("StartTime");
8283
fChannelsToIgnore = p.get<std::vector<int>>("ChannelsToIgnore",{});
84+
fADCtoPE = p.get<float>("ADCtoPE");
8385

8486
// Call appropriate produces<>() functions here.
8587
produces< std::vector<sbnd::trigger::pmtSoftwareTrigger>>();
@@ -128,7 +130,7 @@ void sbnd::trigger::PMTMCMetricProducer::produce(art::Event& e)
128130

129131
auto flash_baseline = estimateBaseline(flash);
130132
auto flash_peak_it = std::min_element(flash.begin(),flash.end());
131-
auto flash_peakpe = (flash_baseline-(*flash_peak_it))/12.5;
133+
auto flash_peakpe = (flash_baseline-(*flash_peak_it))/fADCtoPE;
132134
auto flash_peaktime = ((flash_peak_it-flash.begin()))*ticks_to_us + readout_start;
133135

134136
trig_metrics.foundBeamTrigger = true;

0 commit comments

Comments
 (0)