All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
seedservice_icarus.fcl
Go to the documentation of this file.
1 #
2 # File: seedservice_icarus.fcl
3 # Purpose: preset configurations for random number generator seeds in ICARUS.
4 # Author: Gianluca Petrillo (petrillo@slac.stanford.edu)
5 # Date: September 9, 2022
6 #
7 # A "standard" configuration for ICARUS random number generators is defined:
8 #
9 # services.NuRandomService: @local::icarus_default_NuRandomService
10 #
11 # includes it in a job configuration.
12 #
13 # This configuration file includes all the presets from LArSoft, and it adds
14 # one with per-event seed policy but with a fallback policy as described in
15 # LArSoft Redmine issue #26116 and icaruscode issues #243.
16 #
17 # This configuration should be good enough for all applications.
18 #
19 
20 #include "seedservice.fcl"
21 
22 BEGIN_PROLOG
23 #-------------------------------------------------------------------------------
24 
25 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
26 # Per-event with random fallback
27 #
28 # This policy guarantees reproducibility for all random numbers used while
29 # processing an event, just like the perEvent policy does.
30 # In addition, it explicitly assigns an unreproducible random number sequence
31 # for use before the first event is encountered (as for example in a generator
32 # randomly selecting before the job starts which pools to extract pre-generated
33 # events from, like the CORSIKA implementation in LArSoft does).
34 #
35 # In practice, there may be some way to reproduce also the "unreproducible"
36 # random sequence by setting the master seed to the value printed by the job;
37 # although the success of this process also depends on providing the exact input
38 # data file sequence to the job, which can't be guaranteed when SAM is feeding
39 # the input.
40 #
41 per_event_with_random_fallback_NuRandomService: {
42 
43  @table::per_event_NuRandomService
44 
45  initSeedPolicy: { policy: "random" }
46 
47 } # per_event_with_random_fallback_NuRandomService
48 
49 
50 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
51 # ICARUS "default" seed configuration
52 #
53 # If there are no specific needs, this is the configuration that should be used.
54 #
55 
56 icarus_default_NuRandomService: @local::per_event_with_random_fallback_NuRandomService
57 
58 
59 #-------------------------------------------------------------------------------
60 END_PROLOG