Skip to content

Commit 295670f

Browse files
committed
add config fcl for mc producer module
1 parent 28647f5 commit 295670f

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

sbndcode/Trigger/PMTSoftware/PMTMCMetricProducer_module.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ sbnd::trigger::PMTMCMetricProducer::PMTMCMetricProducer(fhicl::ParameterSet cons
7676
: EDProducer{p} // ,
7777
// More initializers here.
7878
{
79-
fPDTypes = p.get<std::vector<std::string>>("PDTypes",{"pmt_coated", "pmt_uncoated"});
80-
OpDetWaveformsLabel = p.get< std::string >("OpDetWaveformsLabel","opdaq");
81-
fStartTime = p.get<float>("StartTime",-1);
79+
fPDTypes = p.get<std::vector<std::string>>("PDTypes");
80+
OpDetWaveformsLabel = p.get< std::string >("OpDetWaveformsLabel");
81+
fStartTime = p.get<float>("StartTime");
8282
fChannelsToIgnore = p.get<std::vector<int>>("ChannelsToIgnore",{});
8383

8484
// Call appropriate produces<>() functions here.
@@ -111,7 +111,7 @@ void sbnd::trigger::PMTMCMetricProducer::produce(art::Event& e)
111111
for(auto const& wvf : (*wvfHandle)) {
112112
int wvf_ch = wvf.ChannelNumber();
113113
auto wvf_ts = wvf.TimeStamp();
114-
auto wvf_end = wvf_ts+wvf.Waveform().size()*2e-3;
114+
auto wvf_end = wvf_ts+wvf.Waveform().size()*ticks_to_us;
115115

116116
if (wvf_end < readout_start || wvf_ts > readout_end ) continue;
117117
if (std::find(fChannelsToIgnore.begin(), fChannelsToIgnore.end(), wvf_ch) != fChannelsToIgnore.end() ) continue;

sbndcode/Trigger/PMTSoftware/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
This directory contains the producer, filter, and analyzer modules for SBND's PMT Software Trigger (also known as PMT Beam metrics).
44

5-
- `PMTMetricProducer` is nearly identical to the version of the producer that runs in the DAQ. The DAQ version can be found in: `sbndaq-artdaq/ArtModules/SBND/SoftwareTrigger/PMTMetricProducer_module.cc`. The input is CAEN1730 Fragments.
5+
- `PMTMetricProducer` is nearly identical to the version of the producer that runs in the DAQ. The DAQ version can be found in: `sbndaq-artdaq/ArtModules/SBND/SoftwareTrigger/PMTMetricProducer_module.cc`. The input is CAEN1730 Fragments. Needs to be run before decoders/before fragments are dropped.
66
- `PMTMCMetricProducer` runs on the detector simulation. The input is `raw::OpDetWaveform`s from the PMTs.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
BEGIN_PROLOG
2+
3+
pmtmcmetricproducer: {
4+
module_type: "PMTMCMetricProducer"
5+
PDTypes: ["pmt_coated","pmt_uncoated"]
6+
OpDetWaveformsLabel: "opdaq"
7+
StartTime: -1
8+
#ChannelsToIgnore: [39, 66, 67, 71, 85, 86, 87, 92, 115, 138, 141, 170, 197, 217, 218, 221, 222, 223, 226, 245, 248, 249, 302]
9+
}
10+
END_PROLOG

0 commit comments

Comments
 (0)