Skip to content

Commit a6e4961

Browse files
Merge pull request #645 from SBNSoftware/feature/jzennamo_updateclock
Updating Clock to the New Porch Size
2 parents b708b47 + e3d4717 commit a6e4961

5 files changed

Lines changed: 17 additions & 5 deletions

File tree

sbndcode/Utilities/detectorclocks_sbnd.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sbnd_detectorclocks: @local::standard_detectorclocks
1313

1414
sbnd_detectorclocks.TrigModuleName: "triggersim"
1515
sbnd_detectorclocks.InheritClockConfig: true
16-
sbnd_detectorclocks.TriggerOffsetTPC: -0.2e3 # Time [us] for TPC readout start w.r.t. trigger time
16+
sbnd_detectorclocks.TriggerOffsetTPC: -0.205e3 # Time [us] for TPC readout start w.r.t. trigger time
1717
sbnd_detectorclocks.FramePeriod: 1.3e3 # Frame period [us]
1818
sbnd_detectorclocks.ClockSpeedTPC: 2. # TPC clock speed in MHz
1919
sbnd_detectorclocks.ClockSpeedOptical: 500. # Optical clock speed in MHz

sbndcode/WireCell/cfg/pgrapher/common/params.jsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ local wc = import "wirecell.jsonnet";
156156
// Parameters related to simulation, not given elsewhere.
157157
sim : {
158158

159+
// The "absolute" time (ie, relative to trigger time?) that the lower edge
160+
// of final readout tick #0 should correspond to. This is a
161+
// "fixed" notion.
162+
tick0_time: 0,
163+
159164
// The number of impact bins per wire region gives the
160165
// granularity of the simulation convolution in the transverse
161166
// dimension. Typically should match what the granularity at

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ base {
121121
fixed: true,
122122

123123
// 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
124+
// of final readout tick #0 should correspond to.
125+
// this is the default value unless overridden with extVar in main
126+
tick0_time: -205 * wc.us,
127127

128128
// Open the ductor's gate a bit early.
129129
local response_time_offset = $.det.response_plane / $.lar.drift_speed,
@@ -132,7 +132,7 @@ base {
132132
ductor : {
133133
nticks: $.daq.nticks + response_nticks,
134134
readout_time: self.nticks * $.daq.tick,
135-
start_time: tick0_time - response_time_offset,
135+
start_time: $.sim.tick0_time - response_time_offset,
136136
},
137137

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

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)