File tree Expand file tree Collapse file tree
sbndcode/Trigger/PMTSoftware Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments