Skip to content

Commit 7f89b3e

Browse files
author
Mun Jung Jung
committed
update training sample making code
1 parent 4a1735f commit 7f89b3e

3 files changed

Lines changed: 27 additions & 59 deletions

File tree

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/wcls-sim-drift-depoflux-nf-sp-samples_rec.jsonnet

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,26 @@ local wcls_depoflux_writer = g.pnode({
157157
}, nin=1, nout=1, uses=tools.anodes + [tools.field]);
158158

159159
local sp_maker = import 'pgrapher/experiment/sbnd/sp.jsonnet';
160-
local sp = sp_maker(params, tools, { sparse: sigoutform == 'sparse' });
160+
161+
local sp_override = {
162+
sparse: true,
163+
use_roi_debug_mode: true,
164+
save_negative_charge: false, // TODO: no negative charge in gauss, default is false
165+
use_multi_plane_protection: true,
166+
do_not_mp_protect_traditional: false, // TODO: do_not_mp_protect_traditional to make a clear ref, defualt is false
167+
mp_tick_resolution:4,
168+
tight_lf_tag: "",
169+
cleanup_roi_tag: "",
170+
break_roi_loop1_tag: "",
171+
break_roi_loop2_tag: "",
172+
shrink_roi_tag: "",
173+
extend_roi_tag: "",
174+
decon_charge_tag: "",
175+
gauss_tag: "",
176+
wiener_tag: "",
177+
};
178+
179+
local sp = sp_maker(params, tools, sp_override);
161180
local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes];
162181

163182
local magoutput = 'sbnd-data-check.root';
@@ -178,14 +197,6 @@ local chndb = [{
178197
local nf_maker = import 'pgrapher/experiment/sbnd/nf.jsonnet';
179198
local nf_pipes = [nf_maker(params, tools.anodes[n], chndb[n], n, name='nf%d' % n) for n in anode_iota];
180199

181-
local multipass1 = [
182-
g.pipeline([
183-
sn_pipes[n],
184-
],
185-
'multipass%d' % n)
186-
for n in anode_iota
187-
];
188-
189200
local multipass2 = [
190201
g.pipeline([
191202
sn_pipes[n],
@@ -208,7 +219,6 @@ local multipass2 = [
208219
local f_sp = import 'pgrapher/experiment/sbnd/funcs.jsonnet';
209220

210221
local outtags = ['orig%d' % n for n in anode_iota];
211-
local bi_manifold1 = f.fanpipe('DepoSetFanout', multipass1, 'FrameFanin', 'sn_mag_nf', outtags);
212222
local bi_manifold2 = f_sp.fanpipe('DepoSetFanout', multipass2, 'FrameFanin', 'sn_mag_nf_mod2', outtags, "true");
213223

214224
local retagger_sim = g.pnode({
@@ -333,21 +343,7 @@ local retagger_sp = g.pnode({
333343

334344
local sink_sp = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0);
335345

336-
local graph1 = g.pipeline([
337-
wcls_input_sim.deposet, //sim
338-
setdrifter, //sim
339-
wcls_depoflux_writer, //sim
340-
bi_manifold1, //sim
341-
retagger_sim, //sim
342-
wcls_output_sim.sim_digits, //sim
343-
fanpipe, //sp
344-
retagger_sp, //sp
345-
wcls_output_sp.sp_signals, //sp
346-
sink_sp //sp
347-
]);
348-
349-
350-
local graph2 = g.pipeline([
346+
local graph = g.pipeline([
351347
wcls_input_sim.deposet, //sim
352348
setdrifter, //sim
353349
wcls_depoflux_writer, //sim
@@ -359,8 +355,6 @@ sink_sp //sp
359355

360356
local save_simdigits = std.extVar('save_simdigits');
361357

362-
local graph = if save_simdigits == "true" then graph1 else graph2;
363-
364358
local app = {
365359
type: 'TbbFlow',
366360
data: {

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/wcls-sim-drift-depoflux-nf-sp-samples_tru.jsonnet

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,6 @@ local hio_truth = [g.pnode({
288288
];
289289

290290

291-
local multipass1 = [
292-
g.pipeline([
293-
sn_pipes[n],
294-
],
295-
'multipass%d' % n)
296-
for n in anode_iota
297-
];
298-
299291
local multipass2 = [
300292
g.pipeline([
301293
deposplats[n],
@@ -308,9 +300,6 @@ local multipass2 = [
308300

309301
local f_sp = import 'pgrapher/experiment/sbnd/funcs.jsonnet';
310302
local outtags = ['orig%d' % n for n in anode_iota];
311-
local bi_manifold1 = f.fanpipe('DepoFanout', multipass1, 'FrameFanin', 'sn_mag_nf', outtags);
312-
// local bi_manifold2 = f_sp.fanpipe('DepoFanout', multipass2, 'FrameFanin', 'sn_mag_nf_mod2', outtags, "true");
313-
// local bi_manifold2 = f_sp.fanpipe('DepoFanout', multipass2, 'FrameFanin', 'sn_mag_nf_mod2', outtags, "true");
314303
local bi_manifold2 = f_sp.fanpipe('DepoFanout', multipass2, 'FrameFanin');
315304

316305
local retagger_sim = g.pnode({
@@ -436,21 +425,7 @@ local retagger_sp = g.pnode({
436425

437426
local sink_sp = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0);
438427

439-
local graph1 = g.pipeline([
440-
wcls_input_sim.deposet, //sim
441-
setdrifter, //sim
442-
wcls_deposetsimchannel_sink, //sim
443-
bi_manifold1, //sim // sn_pipes[n]
444-
retagger_sim, //sim
445-
wcls_output_sim.sim_digits, //sim
446-
fanpipe, //sp <- nf_pipes[n], sp_pipes[n] (needs channel selector to do fanout correctly)
447-
retagger_sp, //sp
448-
wcls_output_sp.sp_signals, //sp
449-
sink_sp //sp
450-
]);
451-
452-
453-
local graph2 = g.pipeline([
428+
local graph = g.pipeline([
454429
wcls_input_sim.depos, //sim
455430
drifter, //sim
456431
wcls_deposetsimchannel_sink, //sim
@@ -461,8 +436,6 @@ sink_sp //sp
461436
// local save_simdigits = std.extVar('save_simdigits');
462437
local save_simdigits = "false";
463438

464-
local graph = if save_simdigits == "true" then graph1 else graph2;
465-
466439
local app = {
467440
type: 'TbbFlow',
468441
data: {

sbndcode/WireCell/wcsimsp_sbnd.fcl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ sbnd_wcls_samples_rec: @local::sbnd_wcls
146146
sbnd_wcls_samples_rec.wcls_main.plugins: ["WireCellGen", "WireCellSigProc", "WireCellRoot", "WireCellPgraph", "WireCellLarsoft", "WireCellTbb", "WireCellPytorch", "WireCellHio"]
147147
sbnd_wcls_samples_rec.wcls_main.configs: ["pgrapher/experiment/sbnd/wcls-sim-drift-depoflux-nf-sp-samples_rec.jsonnet"]
148148
sbnd_wcls_samples_rec.wcls_main.inputers: ["wclsSimDepoSetSource:"]
149-
sbnd_wcls_samples_rec.wcls_main.outputers:[ "wclsDepoFluxWriter:postdrift", "wclsFrameSaver:simdigits"]
149+
sbnd_wcls_samples_rec.wcls_main.outputers:["wclsDepoFluxWriter:postdrift",
150+
"wclsFrameSaver:spsaver"]
150151
sbnd_wcls_samples_rec.wcls_main.params: {
151152
## This locates the input SimEnergyDeposits in the art::Event
152153
inputTag: "ionandscint:"
@@ -165,7 +166,7 @@ sbnd_wcls_samples_rec.wcls_main.params: {
165166
## If save_simdigits="false", comment line with "wclsFrameSaver:simdigits" in outputers
166167
## If save_simdigits="true", uncomment line with "wclsFrameSaver:simdigits" in outputers
167168
## this is whether or not to save raw digits!!!
168-
save_simdigits: "true"
169+
save_simdigits: "false"
169170

170171
save_track_id: "true"
171172
}
@@ -189,7 +190,7 @@ sbnd_wcls_samples_tru: @local::sbnd_wcls
189190
sbnd_wcls_samples_tru.wcls_main.plugins: ["WireCellGen", "WireCellSigProc", "WireCellRoot", "WireCellPgraph", "WireCellLarsoft", "WireCellTbb", "WireCellPytorch", "WireCellHio"]
190191
sbnd_wcls_samples_tru.wcls_main.configs: ["pgrapher/experiment/sbnd/wcls-sim-drift-depoflux-nf-sp-samples_tru.jsonnet"]
191192
sbnd_wcls_samples_tru.wcls_main.inputers: ["wclsSimDepoSource:"]
192-
sbnd_wcls_samples_tru.wcls_main.outputers:["wclsDepoFluxWriter:postdrift", "wclsFrameSaver:simdigits"]
193+
sbnd_wcls_samples_tru.wcls_main.outputers:[]
193194
sbnd_wcls_samples_tru.wcls_main.params: {
194195
## This locates the input SimEnergyDeposits in the art::Event
195196
inputTag: "ionandscint:"
@@ -208,7 +209,7 @@ sbnd_wcls_samples_tru.wcls_main.params: {
208209
## If save_simdigits="false", comment line with "wclsFrameSaver:simdigits" in outputers
209210
## If save_simdigits="true", uncomment line with "wclsFrameSaver:simdigits" in outputers
210211
## this is whether or not to save raw digits!!!
211-
save_simdigits: "true"
212+
save_simdigits: "false"
212213

213214
save_track_id: "true"
214215
}

0 commit comments

Comments
 (0)