2 # File: run_trigger_gate_simulation_icarus.fcl
3 # Purpose: Runs a chain to simulate ICARUS trigger primitives.
4 # Author: Gianluca Petrillo (petrillo@slac.stanford.edu)
5 # Date: December 18, 2019
8 # This is a top-level configuration that can be run directly.
12 # * pmtbaselines (PMTWaveformBaselines): computes baselines for all PMT
14 # * discrimopdaq (DiscriminatePMTwaveforms): from each PMT extracts a gate
15 # signal according to each of the configured thresholds;
16 # for each threshold all gates are stored in their own data product
17 # * lvdsgatesAND (LVDSgates): pairs each of the discriminated waveforms above
18 # to reproduce the 192 hardware channels from PMT feeding the trigger;
19 # the pairing is performed as an AND of the two gates in the pair;
20 # * lvdsgatesOR (LVDSgates): pairs each of the discriminated waveforms above
21 # to reproduce the 192 hardware channels from PMT feeding the trigger
22 # the pairing is performed as an OR of the two gates in the pair;
23 # * trigslidewindowOR (SlidingWindowTrigger): applies a sliding window of 30
24 # PMT with 50% overlap (5 windows per TPC), using the OR paired output
25 # from LVDS simulation;
26 # * trigslidewindowAND (SlidingWindowTrigger): applies a sliding window of 30
27 # PMT with 50% overlap (5 windows per TPC), using the AND paired output
28 # from LVDS simulation;
29 # * effSingleOR (MajorityTriggerEfficiencyPlots): produces plots of efficiency
30 # of a trigger requiring at least 1, 2, 3, etc. LVDS trigger primitives to
31 # be present at the same time and in coincidence with a 1.6 us beam gate;
32 # * effSingleAND (MajorityTriggerEfficiencyPlots): produces plots of efficiency
33 # of a trigger requiring at least 1, 2, 3, etc. LVDS trigger primitives to
34 # be present at the same time and in coincidence with a 1.6 us beam gate;
35 # * effSlidingOR (SlidingWindowTriggerEfficiencyPlots): produces plots of
36 # efficiency of a trigger requiring patterns of sliding window triggers,
37 # with minimum LVDS trigger primitives in each sliding window, to be
38 # present at the same time and in coincidence with a 1.6 us beam gate;
39 # * effSlidingAND (SlidingWindowTriggerEfficiencyPlots): produces plots of
40 # efficiency of a trigger requiring patterns of sliding window triggers,
41 # with minimum LVDS trigger primitives in each sliding window, to be
42 # present at the same time and in coincidence with a 1.6 us beam gate;
47 # The two `LVDSgates` module instances produce each multiple sets of trigger
48 # gates that can be used for trigger study.
50 # In addition, debugging log files are produced (settings are at the bottom).
52 # Only selected data product from the input file are retained in the output,
53 # in addition to all the ones produced by this job:
54 # * all standard products from event generation
55 # * particle propagated in argon by GEANT4 simulation
56 # * optical detector waveforms
62 # * simulated optical detector readout: `opdaq`
68 # * GeometryService (DiscriminatePMTwaveforms)
69 # * DetectorClocksService (most/all modules)
70 # * TFileService (TriggerEfficiencyPlots)
76 # 20200917 (petrillo@slac.stanford.edu) [v2.2]
77 # : added baseline extraction
79 # 20200403 (petrillo@slac.stanford.edu) [v2.1]
80 # : fixed the labels of the trigger and end paths
82 # 20200403 (petrillo@slac.stanford.edu) [v2.0]
83 # : added sliding window trigger plots
85 # 20191218 (petrillo@slac.stanford.edu) [v1.0]
95 # settings to plot efficiency under the requirement of this number of LVDS
96 # trigger primitives to be firing during beam time
99 # settings for plotting efficiency under patterns of sliding window triggers
100 # firing during beam time
152 # this provides: file service, random management (unused),
153 # Geometry, detector properties and clocks
154 @table::icarus_common_services
156 # currently unused (remove the line if they start mattering):
157 LArPropertiesService: @erase
158 DetectorPropertiesService: @erase
168 # --------------------------------------------------------------------------
173 # label of input digitized optical waveform data product
176 # produce plots on the extracted baseline
177 PlotBaselines:
true #
default
179 # tag of the module output to console via message facility
180 OutputCategory:
"PMTWaveformBaselines" #
default
185 # --------------------------------------------------------------------------
190 # input optical waveform data product tag:
194 # Baselines: "pmtbaselines" # from data products
198 # choosing the discrimination algorithm: fixed length gates
200 # TriggerGateBuilder: @local::icarus_dynamictriggergate
201 TriggerGateBuilder: @local::icarus_fixedtriggergate #
from trigger_icarus.fcl
204 # select which thresholds to save (the algorithm *must* provide them!);
205 # omitted: save all thresholds that the algorithm provides
206 # SelectThresholds: [ 5, 15 ]
208 # message facility stream
209 OutputCategory:
"DiscriminatePMTwaveforms"
214 # --------------------------------------------------------------------------
221 # select the thresholds to process (mandatory)
222 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
224 # CombinationMode: mostly either "AND" or "OR"
227 # use the standard ICARUS pairing
232 # message facility stream
233 LogCategory:
"LVDSgatesAND"
238 # --------------------------------------------------------------------------
239 trigslidewindowAND: {
243 TriggerGatesTag:
"lvdsgatesAND"
245 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
251 # number of optical channel used as offset for sliding window [as WindowSize]
254 # name of the category used for the output
255 LogCategory:
"SlidingWindowTriggerAND"
257 } # trigslidewindowAND
260 # --------------------------------------------------------------------------
267 # select the thresholds to process (mandatory)
268 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
270 # CombinationMode: mostly either "AND" or "OR"
273 # use the standard ICARUS pairing
278 # message facility stream
279 LogCategory:
"LVDSgatesOR"
284 # --------------------------------------------------------------------------
289 TriggerGatesTag:
"lvdsgatesOR"
291 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
297 # number of optical channel used as offset for sliding window [as WindowSize]
300 # name of the category used for the output
301 LogCategory:
"SlidingWindowTriggerOR"
306 # --------------------------------------------------------------------------
313 # --------------------------------------------------------------------------
318 TriggerGatesTag: lvdsgatesAND
320 # select the thresholds to process (mandatory)
321 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
323 # minimum number of trigger primitives required for the trigger to fire
326 # duration of the beam gate (BNB: 1.6 us; NuMI: 9.5 us)
327 BeamGateDuration:
"9.5 us"
329 BeamGateStart:
"0 us"
331 # write event information in a simple for further investigation
332 #EventTreeName: "EventsSingleAND"
334 # dump event information on screen (same stream as the rest)
335 EventDetailsLogCategory:
""
337 # message facility stream
338 LogCategory:
"MajorityTriggerEfficiencyPlotsAND"
348 # select the thresholds to process (mandatory)
349 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
351 # minimum number of trigger primitives required for the trigger to fire
354 # duration of the beam gate (BNB: 1.6 us; NuMI: 9.5 us)
355 BeamGateDuration:
"9.5 us"
357 BeamGateStart:
"0 us"
359 # write event information in a simple tree for further investigation (disabled)
360 # EventTreeName: "EventsSingleOR"
362 # dump event information on screen (disabled)
363 # EventDetailsLogCategory: ""
365 # message facility stream
366 LogCategory:
"MajorityTriggerEfficiencyPlotsOR"
371 # --------------------------------------------------------------------------
376 TriggerGatesTag: trigslidewindowAND
378 # select the thresholds to process (mandatory)
379 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
381 # sliding window patterns to be simulated
384 # duration of the beam gate (BNB: 1.6 us; NuMI: 9.5 us)
385 BeamGateDuration:
"9.5 us" #
from trigger_icarus.fcl
387 BeamGateStart:
"0 us"
389 # write event information in a simple tree for further investigation
390 # EventTreeName: "EventsSlidingAND"
392 # dump event information on screen (same stream as the rest)
393 # EventDetailsLogCategory: ""
395 # message facility stream
396 LogCategory:
"SlidingWindowTriggerEfficiencyPlotsAND"
406 # select the thresholds to process (mandatory)
407 Thresholds: @local::icarus_triggergate_basic.ChannelThresholds #
from trigger_icarus.fcl
409 # sliding window patterns to be simulated
412 # duration of the beam gate (BNB: 1.6 us; NuMI: 9.5 us)
413 BeamGateDuration:
"9.5 us" #
from trigger_icarus.fcl
415 BeamGateStart:
"0 us"
417 # write event information in a simple tree for further investigation (disabled)
418 # EventTreeName: "EventsSlidingOR"
420 # dump event information on screen (disabled)
421 # EventDetailsLogCategory: ""
423 # message facility stream
424 LogCategory:
"SlidingWindowTriggerEfficiencyPlotsOR"
427 # --------------------------------------------------------------------------
432 triggerAND: [ pmtbaselines,
discrimopdaq, lvdsgatesAND , trigslidewindowAND ]
435 plotsAND: [ effSingleAND , effSlidingAND ]
450 @table::icarus_rootoutput #
from rootoutput_icarus.fcl
452 # each entry is "class_label_instance_process"
455 # "keep simb::MCTruths_*_*_*",
456 # "keep simb::MCFluxs_*_*_*",
457 # "keep simb::MCFluxsimb::MCTruthvoidart::Assns_*_*_*",
458 # "keep simb::GTruths_*_*_*",
459 # "keep simb::GTruthsimb::MCTruthvoidart::Assns_*_*_*",
460 # "keep simb::MCParticles_largeant__G4",
461 # "keep simb::MCParticlesimb::MCTruthsim::GeneratedParticleInfoart::Assns_largeant__G4",
462 # "keep sim::SimEnergyDeposits_largeant_*_G4",
463 # "keep sim::SimPhotonss_largeant__G4", # enable for optical efficiency studies
464 "keep *_opdaq_*_DetSim",
472 # ------------------------------------------------------------------------------
473 # add debug output to its own file
475 #services.message.destinations.TriggerThresholdLog: {
477 # filename: "TriggerThresholds.log"
480 # DiscriminatePMTwaveforms: { limit: -1 }
481 # default: { limit: 0 }
483 #} # services.messages.destinations.TriggerThresholdLog
485 #services.message.destinations.LVDSANDLog: {
487 # filename: "LVDS-AND.log"
490 # LVDSgatesAND: { limit: -1 }
491 # default: { limit: 0 }
493 #} # services.messages.destinations.LVDSANDLog
495 #services.message.destinations.SlidingWindowANDLog: {
497 # filename: "SlidingWindowTrigger-AND.log"
500 # SlidingWindowTriggerAND: { limit: -1 }
501 # default: { limit: 0 }
503 #} # services.messages.destinations.SlidingWindowANDLog
505 #services.message.destinations.LVDSORLog: {
507 # filename: "LVDS-OR.log"
510 # LVDSgatesOR: { limit: -1 }
511 # default: { limit: 0 }
513 #} # services.messages.destinations.LVDSORLog
515 #services.message.destinations.SlidingWindowORLog: {
517 # filename: "SlidingWindowTrigger-OR.log"
520 # SlidingWindowTriggerOR: { limit: -1 }
521 # default: { limit: 0 }
523 #} # services.messages.destinations.SlidingWindowORLog
526 #services.message.destinations.SingleANDplotsLog: {
528 # filename: "MajorityTriggerEfficiency_Count_Plots-AND.log"
531 # MajorityTriggerEfficiencyPlotsAND: { limit: -1 }
532 # default: { limit: 0 }
534 #} # services.messages.destinations.SingleANDplotsLog
536 #services.message.destinations.SingleORplotsLog: {
538 # filename: "MajorityTriggerEfficiency_Count_Plots-OR.log"
541 # MajorityTriggerEfficiencyPlotsOR: { limit: -1 }
542 # default: { limit: 0 }
544 #} # services.messages.destinations.SingleORplotsLog
546 #services.message.destinations.SlidingANDplotsLog: {
548 # filename: "SlidingWindowTriggerEfficiency_Count_Plots-AND.log"
551 # SlidingWindowTriggerEfficiencyPlotsAND: { limit: -1 }
552 # default: { limit: 0 }
554 #} # services.messages.destinations.SlidingANDplotsLog
556 #services.message.destinations.SlidingORplotsLog: {
558 # filename: "SlidingWindowTriggerEfficiency_Count_Plots-OR.log"
561 # SlidingWindowTriggerEfficiencyPlotsOR: { limit: -1 }
562 # default: { limit: 0 }
564 #} # services.messages.destinations.SlidingORplotsLog
567 # ------------------------------------------------------------------------------
568 # --- Configuration override guide
569 # ------------------------------------------------------------------------------
571 # The default values of the trigger configuration are in one way or the other
572 # coming from `trigger_icarus.fcl`.
575 # ------------------------------------------------------------------------------
576 # The "trigger builder" algorithm performs the discrimination and generates the
580 # Each time the waveform is beyond the set ADC threshold, a gate is opened for
581 # a certain time, that is the duration in microseconds set here:
583 # physics.producers.discrimopdaq.TriggerGateBuilder.GateDuration: @local::icarus_fixedtriggergate.GateDuration
585 # For studying the trigger efficiency, different thresholds must be considered;
586 # thresholds, in ADC counts from the baseline, are set here:
588 # physics.producers.discrimopdaq.TriggerGateBuilder.ChannelThresholds: @local::icarus_fixedtriggergate.ChannelThresholds
591 # ------------------------------------------------------------------------------
592 # Channels are combined in pairs. Pairing is fixed by cabling the PMT readout
593 # boards to the PMTs. Some channels are special and are left alone.
595 # When changing these settings here, always change both lvdsgatesAND and
598 # The pattern is set here:
600 # physics.producers.lvdsgatesAND.ChannelPairing: @local::icarus_trigger_channel_pairings
601 # physics.producers.lvdsgatesOR.ChannelPairing: @local::icarus_trigger_channel_pairings
603 # ------------------------------------------------------------------------------
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 MinimumSingleTriggerPrimitives
BEGIN_PROLOG icarus_trigger_channel_ignore
BEGIN_PROLOG SlidingWindowTriggerPatterns
process_name drop raw::OpDetWaveforms_DataApr2016RecoStage1_saturation_ * physics
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 icarus_trigger_channel_pairings
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingOR
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
size_t Stride(bool allow_default)
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 trigslidewindowOR
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