All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
prodcorsika_proton_intime_icarus_bnb.fcl
Go to the documentation of this file.
1 # File: prodcorsika_proton_intime_icarus_bnb.fcl
2 # Purpose: generation of "intime-cosmic" monte-carlo -- events where a cosmic triggers the beam spill
3 # Author: Gray Putnam (grayputnam@uchicago.edu)
4 # Date: June 26, 2020
5 #
6 # Generates events with cosmic rays in-time with the beam spill.
7 #
8 # This generation is done in three stages:
9 #
10 # First, corsika is run (in proton mode) in an unbiased way to populate
11 # the TPC with cosmic rays.
12 #
13 # Second, a filter (GenInTimeSorter) is run to ensure that at least
14 # one particle enters the TPC in a window around (minT, maxT). This
15 # window is chosen so that any particle which could possibly deposit
16 # light on a photon detector in-time with the beam is passed.
17 #
18 # Third, G4 is run on only those in-time particles and a filter
19 # (FilterSimPhotonTime) is run which removes events which have fewer
20 # than MinTotalEnergy of energy of in-time photon depositions (in units of eV).
21 #
22 # Comments:
23 # -These filters by themselves do not constitute a trigger emulation and
24 # a reco-based trigger emulator should be run downstream. One should
25 # take care to ensure that the two filters do not remove events that
26 # would be passed by the trigger simulation.
27 #
28 # -This file runs G4 only on the "intime" set of particles. One __must__
29 # run G4 using the "intime_g4_icarus.fcl" configuration to ensure that
30 # G4 is run consistently only on the "outtime" particles downstream.
31 #
32 # -In general, this config will filter out a large percentage of the
33 # generated corsika events. One should test what percentage of events
34 # do not pass the filtering in order to tune how many to generate
35 
36 #include "corsika_icarus.fcl"
40 
41 process_name: CosmicsCorsikaPGenAndG4InTime
42 
43 services:
44 {
45  #FileCatalogMetadata: @local::art_file_catalog_mc
46  @table::icarus_gen_services
47  @table::icarus_g4_services
48 }
49 
50 #Start each new event with an empty event.
51 source:
52 {
53  module_type: EmptyEvent
54  timestampPlugin: { plugin_type: "GeneratedEventTimestamp" }
55  maxEvents: 10 # Number of events to create
56  firstRun: 1 # Run number to use for this file
57  firstEvent: 1 # number of first event in the file
58 }
59 
60 # Define and configure some modules to do work on each event.
61 # First modules are defined; they are scheduled later.
62 # Modules are grouped by type.
63 physics:
64 {
65 
66  producers:
67  {
68  generator: @local::icarus_corsika_p
69  larg4intime: @local::icarus_largeant
70  rns: { module_type: "RandomNumberSaver" }
71  }
72 
73  filters:
74  {
76  KeepOnlyMuons: false
77  MinKE: 1e-1 # some energy threshold to produce a PE
78  MaxT: 1900 # [ns] add a little buffer on the far end of the photon time window
79  #MinT: -25202 # [ns]
80  MinT: -200 # [ns] Change: filter to only allow muons starting at the beam spill (with a small buffer)
81  SortParticles: true
82  module_type: "FilterGenInTime"
83  }
84 
85  timefilter: {
86  module_type: "FilterSimPhotonTime"
87  SimPhotonsCollectionLabel: larg4intime
88  # Currently in overlay generation, events are generated
89  # uniformly in a window [0, 1596ns] to approximate a beam spill.
90  # Add a little width here to up that width to 2000ns
91  TimeWindows: [ [-202, 1798] ] # ns
92  MinPhotonEnergy: -1
93  # 100 PE
94  # MinTotalEnergy: 9.7e-4
95  # 25 PE!! That's the ticket!
96  MinTotalEnergy: 0.0002425
97  # 500?
98  # MinTotalEnergy: 0.00485
99  }
100 
101  }
102 
103  #define the producer and filter modules for this path, order matters,
104  #filters reject all following items. see lines starting physics.producers below
106 
107 
108  #define the output stream, there could be more than one if using filters
109  stream1: [ out1 ]
110 }
111 
112 #block to define where the output goes. if you defined a filter in the physics
113 #block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]}
114 #entry in the output stream you want those to go to, where XXX is the label of the filter module(s)
115 outputs:
116 {
117  out1:
118  {
119  module_type: RootOutput
120  fileName: "prodcorsika_intime_proton_icarus_bnb_%tc.root"
121  dataTier: "simulated"
122  compressionLevel: 1
123  fastCloning: false
126  }
127 }
128 
129 #physics.producers.generator.EnergyThreshold: 2.e-1
130 physics.producers.generator.SubBoxLength: "subboxLength 60 "
131 services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005
132 physics.producers.larg4intime.KeepParticlesInVolumes: [ "volDetEnclosure" ]
133 physics.producers.larg4intime.InputLabels: [ "GenInTimeSorter:intime" ]
BEGIN_PROLOG supported so far
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
process_name can override from command line with o or output photon
Definition: runPID.fcl:28
process_name local::throughgoing_selection SelectEvents
BEGIN_PROLOG pandoraTrackRangeCryoW pandoraTrackRangeCryoW rns
process_name drop raw::OpDetWaveforms_DataApr2016RecoStage1_saturation_ * physics
do source
* file
Definition: file_to_url.sh:69
process_name gaushitTPC3 gaushitTPC3 filters
process_name can override from command line with o or output dataTier
Definition: runPID.fcl:28
#define the
source drop raw::ubdaqSoftwareTriggerData_ *_ *_ * maxEvents
Definition: frame-shunt.fcl:6
process_name GenInTimeSorter
process_name gaushit a
physics filters GenInTimeSorter MaxT
process_name larg4intime
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
process_name MinPhotonEnergy
physics simulate
physics filters filter
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
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
do i e
standard_singlep gaussian distribution ie ie ie gaussian gaussian gaussian larg4Main stream1
Definition: multigen.fcl:18
process_name keep raw::RawDigits_ *_ *_ * saveMemoryObjectThreshold
Definition: test_mchdb.fcl:5
process_name showerreco Particles Coinciding wih the Vertex services ScanOptions nu_mu services ScanOptions Number
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsWindowPair END_PROLOG trigslidewindowOR6m output outputs
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG process_name