Skip to content

Commit e34607f

Browse files
committed
set tick0_time using detector clocks services in wirecell simulation
1 parent 173c953 commit e34607f

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/params.jsonnet

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,14 @@ base {
120120
// For running in LArSoft, the simulation must be in fixed time mode.
121121
fixed: true,
122122

123-
// The "absolute" time (ie, relative to trigger time?) that the lower edge
124-
// of final readout tick #0 should correspond to. This is a
125-
// "fixed" notion.
126-
local tick0_time = -205*wc.us, // updated in January 2025, front porch in data = 410 ticks
127-
128123
// Open the ductor's gate a bit early.
129124
local response_time_offset = $.det.response_plane / $.lar.drift_speed,
130125
local response_nticks = wc.roundToInt(response_time_offset / $.daq.tick),
131126

132127
ductor : {
133128
nticks: $.daq.nticks + response_nticks,
134129
readout_time: self.nticks * $.daq.tick,
135-
start_time: tick0_time - response_time_offset,
130+
start_time: $.sim.tick0_time - response_time_offset,
136131
},
137132

138133
// To counter the enlarged duration of the ductor, a Reframer

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/simparams.jsonnet

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ base {
7676
continuous: false,
7777
fluctuate: false,
7878

79+
// The "absolute" time (ie, relative to trigger time?) that the lower edge
80+
// of final readout tick #0 should correspond to. This is a
81+
// "fixed" notion.
82+
// note: should be overriden by extVar in main jsonnet to maintain consistency
83+
// with the larsoft clock service
84+
local tick0_time = -200*wc.us,
85+
7986
//ductor : super.ductor {
8087
// start_time: $.daq.start_time - $.elec.fields.drift_dt + $.trigger.time,
8188
//},

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ local params = base {
2828
// Electron drift speed, assumes a certain applied E-field
2929
drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us,
3030
},
31+
sim: super.sim {
32+
// front porch size [us]
33+
tick0_time: std.extVar('tick0_time') * wc.us,
34+
}
3135
};
3236

3337
local tools = tools_maker(params);

sbndcode/WireCell/wcsimsp_sbnd.fcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "detectorclocks_sbnd.fcl"
12
BEGIN_PROLOG
23

34
sbnd_wcls: {
@@ -68,6 +69,8 @@ sbnd_wcls_simsp.wcls_main.structs: {
6869
lifetime: 100.0
6970
## Electron drift speed, assumes 0.5 kV/cm and 88.4 K. Units: mm/us
7071
driftSpeed: 1.563
72+
## simulated front porch size [us]
73+
tick0_time: @local::sbnd_detectorclocks.TriggerOffsetTPC
7174
}
7275

7376
# ------------------------------------------------------------------------------------ #

0 commit comments

Comments
 (0)