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
63 changes: 63 additions & 0 deletions dune/DUNEWireCell/dune-vd/nf.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// This provides some noise filtering related pnodes,

local g = import 'pgraph.jsonnet';
local wc = import 'wirecell.jsonnet';

function(params, anode, chndbobj, n, name='')
{
local status = {
type: 'mbOneChannelStatus',
name: name,
data: {
Threshold: 3.5,
Window: 5,
Nbins: 250,
Cut: 14,
anode: wc.tn(anode),
},
},
local single = {
type: 'mbOneChannelNoise',
name: name,
data: {
noisedb: wc.tn(chndbobj),
anode: wc.tn(anode),
},
},
local grouped = {
type: 'mbCoherentNoiseSub',
name: name,
data: {
noisedb: wc.tn(chndbobj),
anode: wc.tn(anode),
},
},

local obnf = g.pnode({
type: 'OmnibusNoiseFilter',
name: name,
data: {

// This is the number of bins in various filters
nsamples: params.nf.nsamples,

//maskmap: { chirp: "bad", noisy: "bad" },
channel_filters: [
// wc.tn(single)
],
grouped_filters: [
// wc.tn(grouped),
],
channel_status_filters: [
// wc.tn(status),
],
noisedb: wc.tn(chndbobj),
intraces: 'orig%d' % n, // frame tag get all traces
outtraces: 'raw%d' % n,
},
// }, uses=[chndbobj, anode, single, grouped, status], nin=1, nout=1),
}, uses=[chndbobj, anode, single], nin=1, nout=1),


pipe: g.pipeline([obnf], name=name),
}.pipe
34 changes: 13 additions & 21 deletions dune/DUNEWireCell/dune-vd/params.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
local wc = import "wirecell.jsonnet";
local base = import "pgrapher/common/params.jsonnet";

function(response_plane) base {
function(params) base {
// This section will be overwritten in simparams.jsonnet
det : {

Expand All @@ -14,7 +14,7 @@ function(response_plane) base {
// Only one CRP is defined in this geometry
// CRMs are oneside anodes

response_plane: response_plane,
response_plane: params.response_plane,

local upper_crp_x = 325.00*wc.cm, //300.507*wc.cm,
local upper_resp_x = upper_crp_x-self.response_plane,
Expand All @@ -36,56 +36,48 @@ function(response_plane) base {
daq: super.daq {

tick: 0.5*wc.us, // check this in the TDR, LArSoft

nticks: 9375, // 1.6 mm/us per 0.5 us assuming 6000 mm drift leght.
nticks: params.nticks, //9375, // 1.6 mm/us per 0.5 us assuming 6000 mm drift leght.

//readout_time: self.tick*self.nticks,

//nreadouts: 1,

//start_time: 0.0*wc.s,

//stop_time: self.start_time + self.nreadouts*self.readout_time,

//first_frame_number: 0,
},

adc: super.adc {

// Set 0 for now
//baselines: [0*wc.millivolt, 0*wc.millivolt, 0*wc.millivolt],

//resolution: 12,

//fullscale: [0.2*wc.volt, 1.6*wc.volt],

// Copied from pdsp. induction plane: 2350 ADC, collection plane: 900 ADC
// baselines: [1003.4*wc.millivolt,1003.4*wc.millivolt,507.7*wc.millivolt],
// fullscale: [0.2*wc.volt, 1.6*wc.volt],

},

// Take BNL cold electronics on ProtoDUNE as reference here
elec: super.elec {

type: "ColdElecResponse",

gain: 12*wc.mV/wc.fC,

shaping: 1.2*wc.us,

postgain: 1.0,

// copied from pdsp
gain: 14*wc.mV/wc.fC,
shaping: 2.2 * wc.us,
postgain: 1.1365,
start: 0,
},





sim: super.sim {

// For running in LArSoft, the simulation must be in fixed time mode.
fixed: true,

},

overall_short_padding: 0.2*wc.ms,
sys_status: false,
sys_resp: {
start: 0.0 * wc.us,
Expand All @@ -100,7 +92,7 @@ function(response_plane) base {

// Based on the simulations made for the 50L prototype
fields: [
"dunevd-resp-isoc3views.json.bz2",
"dunevd-resp-isoc3views-18d92.json.bz2",
],

// fixme: this is for microboone and probably bogus for
Expand Down
37 changes: 21 additions & 16 deletions dune/DUNEWireCell/dune-vd/wcls-nf-sp.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,45 @@ process_name: wclsdatanfsp
services:
{
#message: @local::dune_message_services_prod_debug
TimeTracker: {}
RandomNumberGenerator: {}
# TimeTracker: {}
# RandomNumberGenerator: {}
# @table::dunefdvd_simulation_services
@table::protodune_services
# @table::protodune_services
# @table::dunefdvd_1x6x6_3view_simulation_services
# @table::protodune_rawdecoding_services
# @table::protodune_simulation_services
# @table::protodune_data_services
TFileService: {
closeFileFast: true # default
fileName: "%ifb_raw_anal.root"
tmpDir: "<parent-path-of-filename>" # default
}
IFBeam: {}
# TFileService: {
# closeFileFast: true # default
# fileName: "%ifb_raw_anal.root"
# tmpDir: "<parent-path-of-filename>" # default
# }
# IFBeam: {}
}


source: {
module_type: RootInput
saveMemoryObjectThreshold: 10485760
# source: {
# module_type: RootInput
# saveMemoryObjectThreshold: 10485760

#inputCommands: ["drop *", "keep raw::RawDigits_*_*_*"]
#inputCommands: ["drop *", "keep *_*_*_Swizzler"]
}
# #inputCommands: ["drop *", "keep raw::RawDigits_*_*_*"]
# #inputCommands: ["drop *", "keep *_*_*_Swizzler"]
# }

physics :{
producers: {
nfspl1 : {
module_type : WireCellToolkit
wcls_main: {
tool_type: WCLS
# Pgrapher, TbbFlow
apps: ["Pgrapher"]

logsinks: ["stdout"]
loglevels: ["debug", "pgraph:info"]

# Libraries in which to look for WCT components
plugins: ["WireCellGen", "WireCellSigProc", "WireCellRoot", "WireCellPgraph", "WireCellLarsoft"]
plugins: ["WireCellGen", "WireCellSigProc", "WireCellRoot", "WireCellPgraph", "WireCellTbb", "WireCellLarsoft"]

# The tool marshals the art::Event to these visitors before.
# See notes below in params.
Expand Down Expand Up @@ -101,6 +103,9 @@ physics :{
}
# ext-code, code
structs : {
# number of time samples
nticks: @local::dunefdvd_detproperties.NumberTimeSamples

# for nticks calculation in common/params.jsonnet: elec
driftSpeed: 1.565

Expand Down
25 changes: 16 additions & 9 deletions dune/DUNEWireCell/dune-vd/wcls-nf-sp.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@


local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect"
local raw_input_label = std.extVar('raw_input_label'); // eg "daq"
local reality = std.extVar('reality');
local sigoutform = std.extVar('signal_output_form'); // eg "sparse" or "dense"


local wc = import 'wirecell.jsonnet';
local g = import 'pgraph.jsonnet';

local raw_input_label = std.extVar('raw_input_label'); // eg "daq"

local base = import 'pgrapher/experiment/dune-vd/params.jsonnet';
local response_plane = std.extVar('response_plane')*wc.cm;
local channel_per_crm = std.extVar('channel_per_crm');
local params = base(response_plane) {

local params_maker = import 'pgrapher/experiment/dune-vd/params.jsonnet';
local fcl_params = {
response_plane: std.extVar('response_plane')*wc.cm,
nticks: std.extVar('nticks')
};
local params = params_maker(fcl_params) {
lar: super.lar {
drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us,
},
Expand All @@ -54,8 +57,6 @@ local wcls = wcls_maker(params, tools);
//local nf_maker = import "pgrapher/experiment/pdsp/nf.jsonnet";
//local chndb_maker = import "pgrapher/experiment/pdsp/chndb.jsonnet";

local sp_maker = import 'pgrapher/experiment/dune-vd/sp.jsonnet';

//local planemaps = {
// dunevd_3view: {"1":0, "2":3, "4":2},
// default: {"1":0, "2":1, "4":2}
Expand Down Expand Up @@ -146,6 +147,7 @@ local chndb = [{
// local nf_maker = import 'pgrapher/experiment/dune10kt-1x2x6/nf.jsonnet';
// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb[n], n, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)];

local sp_maker = import 'pgrapher/experiment/dune-vd/sp.jsonnet';
local sp = sp_maker(params, tools, { sparse: sigoutform == 'sparse' });
local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes];

Expand Down Expand Up @@ -177,11 +179,16 @@ local spmagnify = [

local spmagnify_pipe = [g.pipeline([spmagnify[n]], name='spmagnifypipes%d' % n) for n in anode_iota];

local magoutput = 'dune-vd-sp-check.root';
local magnify = import 'pgrapher/experiment/pdsp/magnify-sinks.jsonnet';
local sinks = magnify(tools, magoutput);

local nfsp_pipes = [
g.pipeline([
chsel_pipes[n],
sp_pipes[n],
spmagnify_pipe[n],
// spmagnify_pipe[n],
// sinks.decon_pipe[n],
],
'nfsp_pipe_%d' % n)
for n in anode_iota
Expand Down Expand Up @@ -217,7 +224,7 @@ local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0);
local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.sp_signals, sink]);

local app = {
type: 'Pgrapher',
type: 'Pgrapher', //Pgrapher, TbbFlow
data: {
edges: g.edges(graph),
},
Expand Down
89 changes: 89 additions & 0 deletions dune/DUNEWireCell/dune-vd/wcls-sim-drift-simchannel-nf-sp.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#include "services_dune.fcl"

process_name: wclssim
physics :{
producers: {
plopper : {
module_type : BlipMaker
}
tpcrawdecoder : {
module_type : WireCellToolkit
wcls_main: {
tool_type: WCLS
apps: ["Pgrapher"]
# apps: ["TbbFlow"]

logsinks: ["stdout:info", "wcls-sim-drift-simchannel.log:debug"]
loglevels: ["debug"]

plugins: ["WireCellPgraph", "WireCellGen","WireCellSio","WireCellRoot","WireCellLarsoft","WireCellTbb"]

// needs to be found via your WIRECELL_PATH
configs: ["pgrapher/experiment/dune-vd/wcls-sim-drift-simchannel-nf-sp.jsonnet"]


// Contract note: these exact "type:name" must be used to identify
// the configuration data structures for these components in the Jsonnet.

inputers: ["wclsSimDepoSource:"]
outputers: [
"wclsSimChannelSink:postdrift",
"wclsFrameSaver:spsignals"
]

// Make available parameters via Jsonnet's std.extVar()
params: {
# file: wires
# dunevd10kt-1x6x6-3view-wires-v1.json.bz2
# dunevd10kt-1x6x6-3view30deg-wires-v1.json.bz2
# dunevd10kt-1x6x6-2view-wires-v1.json.bz2
files_wires: "dunevd10kt-1x6x6-3view30deg-wires-v1.json.bz2"
# file: fields
# dunevd-resp-isoc3views-18d92.json.bz2 30,-30,90
# pcbro-response-avg-12d50.json.bz2 2view prototype
files_fields: "dunevd-resp-isoc3views-18d92.json.bz2"
# file: noise
# dunevd10kt-1x6x6-3view-noise-spectra-v1.json.bz2
# dunevd10kt-1x6x6-3view30deg-noise-spectra-v1.json.bz2
# dunevd10kt-1x6x6-2view-noise-spectra-v1.json.bz2
files_noise: "dunevd10kt-1x6x6-3view30deg-noise-spectra-v1.json.bz2"
}
structs: {
# number of time samples
nticks: @local::dunefdvd_detproperties.NumberTimeSamples
# Longitudinal diffusion constant [cm2/ns] 4.0e-9
DL: @local::dunefd_largeantparameters.LongitudinalDiffusion
# Transverse diffusion constant [cm2/ns] 8.8e-9
DT: @local::dunefd_largeantparameters.TransverseDiffusion
# Electron lifetime [us] #10.4e3
lifetime: 10.4e3 #@local::dunefdvd_detproperties.Electronlifetime
# Electron drift speed, assumes a certain applied E-field [mm/us]
driftSpeed: 1.565
# G4RefTime [us]
G4RefTime: @local::dunefd_detectorclocks.G4RefTime
# response plane [cm]
response_plane: 18.92
}

}
}
}
p1 : [ plopper, tpcrawdecoder ]
outputFiles : [ out ]

trigger_paths : [ p1 ]
end_paths: [ outputFiles ]
}
outputs: {
out: {
module_type: RootOutput
// fileName: "%ifb_wcsim.root"
fileName: "wcsim.root"

outputCommands : [
// "drop *", "keep recob::Wires_*_*_*"
"keep *_*_*_*"
]

}
}
Loading