2 # File: triggersim_singlewindow_icarus.fcl
3 # Purpose: Runs a chain to simulate ICARUS trigger primitives.
4 # Author: Gianluca Petrillo (petrillo@slac.stanford.edu)
5 # Date: February 8, 2021
8 # This is a top-level configuration that can be run directly.
9 # The selection of thresholds and trigger configurations reflects the ones used
10 # for commissioning runs 4759-4787 (documented in the spreadsheet:
11 # https://docs.google.com/spreadsheets/d/1VabkSa9ogYl8pkoGGjin9DLpe3lCVOsfQtgKX4QrutM
16 # * pmtbaselines (PMTWaveformBaselines): computes baselines for all PMT
18 # * discrimopdaq (DiscriminatePMTwaveforms): from each PMT extracts a gate
19 # signal according to each of the configured thresholds;
20 # for each threshold all gates are stored in their own data product
21 # * lvdsgatesOR (LVDSgates): pairs each of the discriminated waveforms above
22 # to reproduce the 192 hardware channels from PMT feeding the trigger
23 # the pairing is performed as an OR of the two gates in the pair;
24 # * trigslidewindowOR6m (SlidingWindowTrigger): applies a sliding window of 30
25 # PMT and keeps only the central ones of the two central ones of east
26 # cryostat (C:0); it uses OR paired output from LVDS simulation;
27 # * effSlidingOR6m (SlidingWindowTriggerEfficiencyPlots): produces plots of
28 # efficiency of a trigger requiring patterns of sliding window triggers,
29 # with minimum LVDS trigger primitives in each sliding window, to be
30 # present at the same time and in coincidence with a 1.6 us beam gate;
35 # | LVDS | windows | req | beam | readout | efficiency |
36 # | threshold | logic | gate | | | gate | buffer | post | module | tag |
37 # | 400 | 600 | AND | OR | 200ns | 6 m | | | | | | |
38 # ------+-----+-----+-----+-----+-------+---------|-----+-------+--------+------+----------------+-------+
39 # 4774 | x | | | x | x | #2 | 3 | 10 us | 50 us | 70% | effSlidingOR6m | M3 |
40 # 4775 | x | | | x | x | #2 | 4 | 10 us | 50 us | 70% | effSlidingOR6m | M4 |
41 # 4778 | x | | | x | x | #2 | 5 | 10 us | 50 us | 70% | effSlidingOR6m | M5 |
42 # 4786 | x | | | x | x | #5 | 3 | 10 us | 70 us | 70% | effSlidingOR6m | M3 |
43 # 4785 | x | | | x | x | #5 | 4 | 10 us | 50 us | 70% | effSlidingOR6m | M4 |
44 # 4779 | x | | | x | x | #5 | 5 | 10 us | 50 us | 70% | effSlidingOR6m | M5 |
45 # 4771 | x | | | x | x | #2,#5 | 3 | 10 us | 50 us | 70% | effSlidingOR6m | M3 |
46 # 4772 | x | | | x | x | #2,#5 | 4 | 10 us | 50 us | 70% | effSlidingOR6m | M4 |
47 # 4762 | x | | | x | x | #2,#5 | 5 | | 50 us | 70% | effSlidingOR6m | M5 |
48 # 4768 | x | | | x | x | #2,#5 | 3+3 | 10 us | 50 us | 70% | effSlidingOR6m | M3O3 |
49 # 4766 | x | | | x | x | #2,#5 | 4+4 | 10 us | 50 us | 70% | effSlidingOR6m | M4O4 |
50 # 4763 | x | | | x | x | #2,#5 | 5+5 | 10 us | 50 us | 70% | effSlidingOR6m | M5O5 |
51 # 4989 | x | | | x | x | #2,#5 | 3 | 10 us | 50 us | 70% | effSlidingOR6m | M3 |
52 # 4773 | | x | | x | x | #2 | 3 | 10 us | 50 us | 70% | effSlidingOR6m | M3 |
53 # 4776 | | x | | x | x | #2 | 4 | 10 us | 50 us | 70% | effSlidingOR6m | M4 |
54 # 4777 | | x | | x | x | #2 | 5 | 10 us | 50 us | 70% | effSlidingOR6m | M5 |
55 # 4787 | | x | | x | x | #5 | 3 | 10 us | 50 us | 70% | effSlidingOR6m | M3 |
56 # 4784 | | x | | x | x | #5 | 4 | 10 us | 50 us | 70% | effSlidingOR6m | M4 |
57 # 4783 | | x | | x | x | #5 | 5 | 10 us | 50 us | 70% | effSlidingOR6m | M5 |
58 # 4759 | | x | | x | x | #2,#5 | 3 | 10 us | 50 us | 70% | effSlidingOR6m | M3 |
59 # 4760 | | x | | x | x | #2,#5 | 4 | 10 us | 50 us | 70% | effSlidingOR6m | M4 |
60 # 4761 | | x | | x | x | #2,#5 | 5 | 10 us | 50 us | 70% | effSlidingOR6m | M5 |
61 # 4765 | | x | | x | x | #2,#5 | 4+4 | 10 us | 50 us | 70% | effSlidingOR6m | M4O4 |
62 # 4769 | | x | | x | x | #2,#5 | 3+3 | 10 us | 50 us | 70% | effSlidingOR6m | M3M3 |
63 # 4764 | | x | | x | x | #2,#5 | 5+5 | 10 us | 50 us | 70% | effSlidingOR6m | M5O5 |
64 # 4642 | | x | | x | x | | 0 | | 100 us | 50% | | |
65 # 4663 | | x | | x | x | ?? | 2 | 1.6us | 100 us | 50% | effSlidingOR6m | ?? |
66 # 4690 | | x | | x | x | | 0 | | 100 us | 70% | | |
67 # 4740 | | x | | x | x | | 0 | | 25 us | 60% | | |
68 # 4795 | | x | | x | x | | 0 | | 25 us | 60% | | |
69 # 4811 | | x | | x | x | | 0 | | 25 us | 60% | | |
75 # * optical detector readout: `opdaq`
81 # 20210208 (petrillo@slac.stanford.edu) [v1.0]
82 # : original version based on `run_trigger_gate_simulation_icarus.fcl` v2.1
88 # The two `LVDSgates` module instances produce each multiple sets of trigger
89 # gates that can be used for trigger study.
91 # In addition, debugging log files are produced (settings are at the bottom).
93 # Only selected data product from the input file are retained in the output,
94 # in addition to all the ones produced by this job:
95 # * all standard products from event generation
96 # * particle propagated in argon by GEANT4 simulation
97 # * optical detector waveforms
103 # * simulated optical detector readout: `opdaq`
109 # * GeometryService (DiscriminatePMTwaveforms)
110 # * DetectorClocksService (most/all modules)
111 # * TFileService (TriggerEfficiencyPlots)
117 # 20210208 (petrillo@slac.stanford.edu) [v1.0]
118 # : original version from `run_trigger_gate_simulation_icarus.fcl`
121 # ------------------------------------------------------------------------------
127 # ------------------------------------------------------------------------------
130 # bad PMT channels (off or too noisy)
131 # missing_pmt_channels: @local::icarus_trigger_channel_ignore_202101
134 # beam gate window duration (BNB: 1.6 us; NuMI: 9.5 us)
135 BeamGateDuration:
"10 us"
137 # discrimination thresholds:
138 PMTthresholds: [ 400, 600 ]
141 # PMT discriminated signal width
144 # special pairing for 30-PMT windows pairing the single PMT together
145 icarus_trigger_channel_pairings_nosingle: [
148 [ 0, 2 ], [ 1, 4 ], [ 3, 6 ], [ 5, 8 ], [ 7, 9 ], [ 10, 12 ], [ 11, 14 ], [ 13, 16 ],
149 [ 15, 18 ], [ 17, 19 ], [ 20, 22 ], [ 21, 24 ], [ 23, 26 ], [ 25, 28 ], [ 27, 29 ],
150 [ 30, 32 ], [ 31, 34 ], [ 33, 36 ], [ 35, 38 ], [ 37, 39 ], [ 40, 42 ], [ 41, 44 ], [ 43, 46 ],
151 [ 45, 48 ], [ 47, 49 ], [ 50, 52 ], [ 51, 54 ], [ 53, 56 ], [ 55, 58 ], [ 57, 59 ],
152 [ 60, 62 ], [ 61, 64 ], [ 63, 66 ], [ 65, 68 ], [ 67, 69 ], [ 70, 72 ], [ 71, 74 ], [ 73, 76 ],
153 [ 75, 78 ], [ 77, 79 ], [ 80, 82 ], [ 81, 84 ], [ 83, 86 ], [ 85, 88 ], [ 87, 89 ],
156 [ 90, 92 ], [ 91, 94 ], [ 93, 96 ], [ 95, 98 ], [ 97, 99 ], [ 100,102 ], [ 101,104 ], [ 103,106 ],
157 [ 105,108 ], [ 107,109 ], [ 110,112 ], [ 111,114 ], [ 113,116 ], [ 115,118 ], [ 117,119 ],
158 [ 120,122 ], [ 121,124 ], [ 123,126 ], [ 125,128 ], [ 127,129 ], [ 130,132 ], [ 131,134 ], [ 133,136 ],
159 [ 135,138 ], [ 137,139 ], [ 140,142 ], [ 141,144 ], [ 143,146 ], [ 145,148 ], [ 147,149 ],
160 [ 150,152 ], [ 151,154 ], [ 153,156 ], [ 155,158 ], [ 157,159 ], [ 160,162 ], [ 161,164 ], [ 163,166 ],
161 [ 165,168 ], [ 167,169 ], [ 170,172 ], [ 171,174 ], [ 173,176 ], [ 175,178 ], [ 177,179 ],
164 [ 180,182 ], [ 181,184 ], [ 183,186 ], [ 185,188 ], [ 187,189 ], [ 190,192 ], [ 191,194 ], [ 193,196 ],
165 [ 195,198 ], [ 197,199 ], [ 200,202 ], [ 201,204 ], [ 203,206 ], [ 205,208 ], [ 207,209 ],
166 [ 210,212 ], [ 211,214 ], [ 213,216 ], [ 215,218 ], [ 217,219 ], [ 220,222 ], [ 221,224 ], [ 223,226 ],
167 [ 225,228 ], [ 227,229 ], [ 230,232 ], [ 231,234 ], [ 233,236 ], [ 235,238 ], [ 237,239 ],
168 [ 240,242 ], [ 241,244 ], [ 243,246 ], [ 245,248 ], [ 247,249 ], [ 250,252 ], [ 251,254 ], [ 253,256 ],
169 [ 255,258 ], [ 257,259 ], [ 260,262 ], [ 261,264 ], [ 263,266 ], [ 265,268 ], [ 267,269 ],
172 [ 270,272 ], [ 271,274 ], [ 273,276 ], [ 275,278 ], [ 277,279 ], [ 280,282 ], [ 281,284 ], [ 283,286 ],
173 [ 285,288 ], [ 287,289 ], [ 290,292 ], [ 291,294 ], [ 293,296 ], [ 295,298 ], [ 297,299 ],
174 [ 300,302 ], [ 301,304 ], [ 303,306 ], [ 305,308 ], [ 307,309 ], [ 310,312 ], [ 311,314 ], [ 313,316 ],
175 [ 315,318 ], [ 317,319 ], [ 320,322 ], [ 321,324 ], [ 323,326 ], [ 325,328 ], [ 327,329 ],
176 [ 330,332 ], [ 331,334 ], [ 333,336 ], [ 335,338 ], [ 337,339 ], [ 340,342 ], [ 341,344 ], [ 343,346 ],
177 [ 345,348 ], [ 347,349 ], [ 350,352 ], [ 351,354 ], [ 353,356 ], [ 355,358 ], [ 357,359 ]
179 ] # icarus_trigger_channel_pairings_nosingle
182 # settings for plotting efficiency under patterns of sliding window triggers
183 # firing during beam time
194 SlidingWindowTriggerPatternsWindowPair: [
195 { inMainWindow: 1 inOppositeWindow: 1 },
196 { inMainWindow: 2 inOppositeWindow: 2 },
197 { inMainWindow: 3 inOppositeWindow: 3 },
198 { inMainWindow: 4 inOppositeWindow: 4 },
199 { inMainWindow: 5 inOppositeWindow: 5 },
200 { inMainWindow: 6 inOppositeWindow: 6 }
201 ] # SlidingWindowTriggerPatternsWindowPair
206 @sequence::SlidingWindowTriggerPatternsWindowPair
210 # list of the sliding windows that are enabled (all others are disabled)
215 # ------------------------------------------------------------------------------
220 # ------------------------------------------------------------------------------
223 # this provides: file service, random management (unused),
224 # Geometry, detector properties and clocks
225 @table::icarus_common_services
227 # currently unused (remove the line if they start mattering):
228 LArPropertiesService: @erase
229 DetectorPropertiesService: @erase
235 # ------------------------------------------------------------------------------
240 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
245 # label of input digitized optical waveform data product
248 # produce plots on the extracted baseline
249 PlotBaselines:
true #
default
251 # tag of the module output to console via message facility
252 OutputCategory:
"PMTWaveformBaselines" #
default
257 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
262 # input optical waveform data product tag:
266 Baselines:
"pmtbaselines" #
from data products
270 # choosing the discrimination algorithm: fixed length gates
272 TriggerGateBuilder: {
273 @table::icarus_fixedtriggergate #
from trigger_icarus.fcl
275 ChannelThresholds: @local::PMTthresholds
279 } # TriggerGateBuilder
281 # select which thresholds to save (the algorithm *must* provide them!);
282 # omitted: save all thresholds that the algorithm provides (above)
283 # SelectThresholds: [ 5, 15 ]
285 # message facility stream
286 OutputCategory:
"DiscriminatePMTwaveforms"
291 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
298 # select the thresholds to process (mandatory)
301 # CombinationMode: mostly either "AND" or "OR"
304 # use the standard ICARUS pairing
305 ChannelPairing: @local::icarus_trigger_channel_pairings_nosingle
307 # input does not include these channels:
310 # message facility stream
311 LogCategory:
"LVDSgatesOR"
316 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
317 trigslidewindowOR6m: {
321 TriggerGatesTag:
"lvdsgatesOR"
327 # number of optical channel used as offset for sliding window [as WindowSize]
330 # enable only the central window of each PMT wall
335 # name of the category used for the output
336 LogCategory:
"SlidingWindowTriggerOR"
338 } # trigslidewindowOR6m
341 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
348 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
353 TriggerGatesTag: trigslidewindowOR6m
355 # select the thresholds to process (mandatory)
358 # sliding window patterns to be simulated
361 # duration of the beam gate (BNB: 1.6 us; NuMI: 9.5 us)
362 BeamGateDuration: @local::BeamGateDuration
364 # write event information in a simple tree for further investigation (disabled)
365 # EventTreeName: "EventsSlidingOR"
367 # dump event information on screen (disabled)
368 # EventDetailsLogCategory: ""
370 # we plot events wherever theirs interactions are
371 PlotOnlyActiveVolume:
false
373 # message facility stream
374 LogCategory:
"SlidingWindowTriggerEfficiencyPlotsOR"
379 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
384 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
394 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
399 # ------------------------------------------------------------------------------
404 @table::icarus_rootoutput #
from rootoutput_icarus.fcl
406 # each entry is "class_label_instance_process"
409 "keep simb::MCTruths_*_*_*",
410 "keep simb::MCFluxs_*_*_*",
411 "keep simb::MCFluxsimb::MCTruthvoidart::Assns_*_*_*",
412 "keep simb::GTruths_*_*_*",
413 "keep simb::GTruthsimb::MCTruthvoidart::Assns_*_*_*",
414 "keep simb::MCParticles_largeant__G4",
415 "keep simb::MCParticlesimb::MCTruthsim::GeneratedParticleInfoart::Assns_largeant__G4",
416 "keep sim::SimEnergyDeposits_largeant_*_G4",
417 # "keep sim::SimPhotonss_largeant__G4", # enable for optical efficiency studies
418 "keep *_opdaq_*_DetSim",
426 # ------------------------------------------------------------------------------
427 # add debug output to its own file
429 services.message.destinations.TriggerThresholdLog: {
434 DiscriminatePMTwaveforms: { limit: -1 }
435 default: { limit: 0 }
437 } #
services.messages.destinations.TriggerThresholdLog
439 services.message.destinations.LVDSORLog: {
444 LVDSgatesOR: { limit: -1 }
445 default: { limit: 0 }
447 } #
services.messages.destinations.LVDSORLog
449 services.message.destinations.SlidingWindowORLog: {
451 filename:
"SlidingWindowTrigger-OR.log"
454 SlidingWindowTriggerOR: { limit: -1 }
455 default: { limit: 0 }
457 } #
services.messages.destinations.SlidingWindowORLog
460 services.message.destinations.SlidingORplotsLog: {
462 filename:
"SlidingWindowTriggerEfficiency_Count_Plots-OR.log"
465 SlidingWindowTriggerEfficiencyPlotsOR: { limit: -1 }
466 default: { limit: 0 }
468 } #
services.messages.destinations.SlidingORplotsLog
471 # ------------------------------------------------------------------------------
472 # --- Configuration override guide
473 # ------------------------------------------------------------------------------
475 # The default values of the trigger configuration are in one way or the other
476 # coming from `trigger_icarus.fcl`.
479 # ------------------------------------------------------------------------------
480 # The "trigger builder" algorithm performs the discrimination and generates the
484 # Each time the waveform is beyond the set ADC threshold, a gate is opened for
485 # a certain time, that is the duration in microseconds set here:
487 # physics.producers.discrimopdaq.TriggerGateBuilder.GateDuration: @local::icarus_fixedtriggergate.GateDuration
490 # ------------------------------------------------------------------------------
491 # Channels are combined in pairs. Pairing is fixed by cabling the PMT readout
492 # boards to the PMTs. Some channels are special and are left alone.
494 # The pattern is set here:
497 # physics.producers.lvdsgatesOR.ChannelPairing: @local::icarus_trigger_channel_pairings
499 # ------------------------------------------------------------------------------
BEGIN_PROLOG BeamGateDuration pmtthr physics producers trigtilewindowORS Thresholds
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics sequence::physics pathW services
BEGIN_PROLOG SlidingWindowTriggerPatterns
process_name drop raw::OpDetWaveforms_DataApr2016RecoStage1_saturation_ * physics
BEGIN_PROLOG LVDSsignalWidth
BEGIN_PROLOG could also be dds filename
physics producers trigslidewindowOR6mW physics effSlidingOR6mW physics end_paths
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG lvdsgatesOR
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 plotsOR
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows EnabledWindows
BEGIN_PROLOG GateDuration
BEGIN_PROLOG missing_pmt_channels
BEGIN_PROLOG SlidingWindowTriggerPatternsSingleWindow
BEGIN_PROLOG triggeremu_data_config_icarus settings sequence::triggeremu_data_config_icarus settings PMTADCthresholds CombinationMode
BEGIN_PROLOG triggeremu_data_config_icarus settings sequence::triggeremu_data_config_icarus settings PMTADCthresholds sequence::triggeremu_data_config_icarus settings PMTADCthresholds WindowSize
outputs out1 outputCommands
physics producers discrimopdaq OpticalWaveforms
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 module_type
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG discrimopdaq
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsWindowPair END_PROLOG trigslidewindowOR6m output outputs
process_name sequence::icarus_reco_cluster3d physics trigger_paths
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG process_name