Skip to content

Commit 894cf13

Browse files
authored
Merge pull request #75 from fmauger/feature-new-primaries
Feature new primaries
2 parents fd289cf + 0df5b03 commit 894cf13

33 files changed

+4286
-15
lines changed

documentation/flsimulate/FLSimulate.md

+31-7
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ registered blessed/official configuration (geometry, simulation,
504504
reconstruction...). Any setup of interest may be registered with an
505505
unique *tag*. The tag is a simple character string which uses an URN
506506
scheme. For example, Falaise version 3.0.0 is released with the
507-
registered simulation setup version 2.1 with tag
507+
registered simulation setup tag 2.1 with tag
508508
`urn:snemo:demonstrator:simulation:2.1. This is the default
509-
simulation setup whcih will be used if not explicitely requested by
509+
simulation setup which will be used if not explicitely requested by
510510
the user.
511511

512512
Thus, in the `flsimulate.simulation` section, the simulation setup tag
@@ -674,6 +674,18 @@ The next image shows the selection of the vertex generator from the
674674
Notice: You Bayeux setup should have been compiled with Qt GUI support to benefit
675675
of the `flsimulate-configure`'s GUI interface.
676676

677+
By `flsimulate-configure` uses a default simulation setup (example: "urn:snemo:demonstrator:simulation:2.1").
678+
You can change to some arbitrary simulation setup with the `--setup-tag` switch:
679+
~~~~~
680+
$ flsimulate-configure --setup-tag "urn:snemo:demonstrator:simulation:2.2"
681+
~~~~~
682+
This will activate a variant context specific to the selected simulation setup.
683+
684+
Be aware that two different simulation setups may not be compatible in terms
685+
of variant context. It means that a variant profile generated and used by
686+
simulation setup X is not automatically usable with simulation setup Y, typically
687+
because the newest Y setup publishes and requires more variant parameters associated to a more complex
688+
and/or realistic description of the experiment.
677689

678690
Using explicit variant settings {#usingflsimulate_variants_explicitsettings}
679691
-------------------------------
@@ -916,17 +928,17 @@ List of available experiments {#usingflsimulate_summaryofavailableexperiments}
916928
-----------------------------
917929

918930
1. SuperNEMO demonstrator:
919-
* Description: The SuperNEMO demonstrator experiment (all phases:
920-
half-commissioning, full demonstrator)
921-
* Tag : `"urn:snemo:demonstrator"`
931+
* Description: The SuperNEMO demonstrator experiment (all phases:
932+
half-commissioning, full demonstrator)
933+
* Tag : `"urn:snemo:demonstrator"`
922934
2. BiPo3 detector (not used yet):
923935
* Description: The BiPo3 detector
924936
* Tag : `"urn:bipo3:detector"`
925937

926938
List of available experimental setups {#usingflsimulate_summaryofavailableexperimentalsetups}
927939
-------------------------------------
928940

929-
1. SuperNEMO demonstrator experimental setup version 1.0:
941+
1. SuperNEMO demonstrator experimental setup tag 1.0:
930942
* Description: The model of the SuperNEMO demonstrator experimental setup
931943
* Tag : `"urn:snemo:demonstrator:setup:1.0"`
932944
* Related experiment: `"urn:snemo:demonstrator"`
@@ -938,7 +950,7 @@ List of available experimental setups {#usingflsimulate_summaryofavailableexperi
938950
List of available simulation setups {#usingflsimulate_summaryofavailablesimulationsetups}
939951
-----------------------------------
940952

941-
1. SuperNEMO demonstrator simulation setup version 2.1 :
953+
1. SuperNEMO demonstrator simulation setup tag 2.1:
942954
* Description: Simulation setup for the SuperNEMO demonstrator detector
943955
* Tag : `"urn:snemo:demonstrator:simulation:2.1"`
944956
* Based on:
@@ -950,6 +962,18 @@ List of available simulation setups {#usingflsimulate_summaryofavailablesimulati
950962
+ Variant system: `"urn:snemo:demonstrator:simulation:2.1:variants"`
951963
+ Blessed profiles: `"urn:snemo:demonstrator:simulation:2.1:variants:profiles:basic-1.0"`
952964
+ Default profile: `"urn:snemo:demonstrator:simulation:2.1:variants:profiles:default"`
965+
2. SuperNEMO demonstrator simulation setup tag 2.2
966+
* Description: Simulation setup for the SuperNEMO demonstrator detector
967+
* Tag : `"urn:snemo:demonstrator:simulation:2.2"`
968+
* Based on:
969+
+ Experimental setup: `"urn:snemo:demonstrator:setup:1.0"`
970+
+ Vertex generation system: `"urn:snemo:demonstrator:simulation:vertexes:4.1"`
971+
+ Primary events generation system : `"urn:snemo:demonstrator:simulation:decays:1.3"`
972+
* Associated to:
973+
+ Services system: `"urn:snemo:demonstrator:simulation:2.2:services"`
974+
+ Variant system: `"urn:snemo:demonstrator:simulation:2.2:variants"`
975+
+ Blessed profiles: `"urn:snemo:demonstrator:simulation:2.2:variants:profiles:basic-1.0"`
976+
+ Default profile: `"urn:snemo:demonstrator:simulation:2.2:variants:profiles:default"`
953977

954978

955979
Available MC hits output profiles {#usingflsimulate_hits_output_profiles}

resources/_resources.cmake

+19
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ ${PROJECT_SOURCE_DIR}/resources/config/common/simulation/primary_events/1.1/vari
8080
${PROJECT_SOURCE_DIR}/resources/config/common/simulation/primary_events/1.1/variants/repository.conf
8181
${PROJECT_SOURCE_DIR}/resources/config/common/simulation/primary_events/1.1/variants/registries/primary_events.conf
8282
${PROJECT_SOURCE_DIR}/resources/config/common/simulation/primary_events/1.1/manager.conf
83+
${PROJECT_SOURCE_DIR}/resources/config/common/simulation/primary_events/1.2/generators/dbd_more.def
8384
${PROJECT_SOURCE_DIR}/resources/config/bipo3/geometry/2.0/README.rst
8485
${PROJECT_SOURCE_DIR}/resources/config/bipo3/geometry/2.0/models/optical_module.geom
8586
${PROJECT_SOURCE_DIR}/resources/config/bipo3/geometry/2.0/models/shielding_5sce_side_top.geom
@@ -316,6 +317,11 @@ ${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_cont
316317
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/1.0/processes/particles.conf
317318
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/1.0/step_hit_processors-no_visu_tracks.conf
318319
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/1.0/manager.conf
320+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.2/README.rst
321+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.2/variants/profiles/default.profile
322+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.2/variants/repository.conf
323+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.2/variants/documentation/flsimulation-variant-doc.rst
324+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.2/manager.conf
319325
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.1/hit_processing/step_hit_processors-only_visu_tracks.conf
320326
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.1/hit_processing/step_hit_processors-no_visu_tracks.conf
321327
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/geant4_control/2.1/README.rst
@@ -403,6 +409,19 @@ ${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/vertexes/4.
403409
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/vertexes/4.1/variants/registries/vertexes.conf
404410
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/vertexes/4.1/variants/registries/commissioning_source.conf
405411
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/vertexes/4.1/manager.conf
412+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/README.rst
413+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/data/energy_spectrum-example-1.data
414+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/README.rst
415+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/generators/versatile_more.def
416+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/models/peg_flat_versatile_variant_models.def
417+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/models/peg_versatile_variant_models.def
418+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/models/peg_tweakable_variant_models.def
419+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/models/peg_common_models.def
420+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/models/peg_generators.csv
421+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/models/peg.def
422+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/repository.conf
423+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/variants/registries/primary_events.conf
424+
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.3/manager.conf
406425
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.0/manager.conf
407426
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.1/README.rst
408427
${PROJECT_SOURCE_DIR}/resources/config/snemo/demonstrator/simulation/primary_events/1.1/manager.conf

resources/config/common/simulation/primary_events/1.1/generators/misc.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
####################################################################
1010
[name="versatile_generator" type="genbb::single_particle_generator"]
11-
#@config Electron with monokinetic energy;group=miscellaneous;variant=if_versatile
11+
#@config Particle with monokinetic energy;group=miscellaneous;variant=if_versatile
1212

1313
#@description Generated particle ("electron", "positron", "gamma", "alpha"):
1414
particle_name : string = @variant(primary_event:generator/if_versatile/particle|"gamma")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- mode: conf-unix; -*-
2+
# List of multi-properties (datatools::multi_properties):
3+
4+
#@description A list of DBD generators
5+
#@key_label "name"
6+
#@meta_label "type"
7+
8+
9+
##############################################
10+
[name="Se82.2nubb_2MeV" type="genbb::wdecay0"]
11+
#@config Two neutrino double beta decay of Se-82, 2nubb;group=DBD/Se82
12+
#energy_sum_min=2~MeV
13+
decay_type : string = "DBD"
14+
decay_isotope : string = "Se82"
15+
decay_dbd_level : integer = 0
16+
decay_dbd_mode : integer = 4 # 2nubb
17+
18+
#@parameter The energy threshold on the electrons' energy sum
19+
energy_min : real as energy = 2 MeV
20+
21+
22+
# #############################################
23+
# [name="Se82.2nubb_SSD" type="genbb::wdecay0"]
24+
# #@config Two neutrino double beta decay of Se-82, 2nubb;group=DBD/Se82;mode=SSD
25+
# decay_type : string = "DBD"
26+
# decay_isotope : string = "Se82"
27+
# decay_dbd_level : integer = 0
28+
# decay_dbd_mode : integer = 8 # 2nubb (N*)
29+
30+
31+
32+
# end of dbd_more.def
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
================================================================
2+
Geant4 simulation for SuperNEMO demonstrator
3+
================================================================
4+
5+
:Authors: François Mauger, Yves Lemière
6+
:Date: 2018-01-19
7+
8+
.. contents::
9+
:depth: 3
10+
..
11+
12+
Presentation
13+
============
14+
15+
This directory contains the files needed to run Geant4 simulation
16+
for the SuperNEMO demonstrator simulation.
17+
18+
* Version is : ``2.2``
19+
20+
This setup reuses a large part of the ``2.1`` setup depends on:
21+
22+
* the SuperNEMO demonstrator's geometry layout (``4.0``) and its variants.
23+
* the SuperNEMO vertex generation (``4.1``) and its variants.
24+
* the SuperNEMO primary event generation (``1.3``) and its variants.
25+
26+
Files
27+
=====
28+
29+
* ``README.rst`` : This file.
30+
* ``manager.conf`` : The main configuration file for the
31+
Bayeux/mctools Geant4 simulation engine.
32+
* ``variants/`` : This directory contains configuration files
33+
for variant support.
34+
35+
Check the configuration
36+
=======================
37+
38+
First make sure the Bayeux and Falaise softwares are installed and setup
39+
from a (Cadfael)brew shell:
40+
41+
.. code:: sh
42+
43+
brewsh> which bxvariant_inspector
44+
...
45+
brewsh> which bxg4_production
46+
...
47+
..
48+
49+
Browse and edit primary event generation variant parameters and options
50+
===============================================================================
51+
52+
1. From the build directory, generate documentation about variants:
53+
54+
.. code:: sh
55+
56+
brewsh> bxvariant_inspector \
57+
--datatools::resource-path="falaise@$(pwd)/BuildProducts/share/Falaise-3.0.0/resources" \
58+
--variant-config "@falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/variants/repository.conf" \
59+
--action doc > flg4ctrl.rst
60+
brewsh> flg4ctrl.rst > flg4ctrl.html
61+
brewsh> xdg-open flg4ctrl.html &
62+
brewsh> rst2pdf flg4ctrl.rst
63+
brewsh> xdg-open flg4ctrl.pdf &
64+
..
65+
or:
66+
67+
.. code:: sh
68+
69+
brewsh> pandoc -t latex flg4ctrl.rst -o flg4ctrl.pdf
70+
..
71+
72+
2. From the build directory, browse/edit the primary event generation variant and generate a variant profile::
73+
74+
.. code:: sh
75+
76+
brewsh> bxvariant_inspector \
77+
--datatools::resource-path="falaise@$(pwd)/BuildProducts/share/Falaise-3.0.0/resources" \
78+
--variant-config "@falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/variants/repository.conf" \
79+
--variant-gui \
80+
--variant-store "myprofile.conf"
81+
..
82+
83+
Run Geant4
84+
----------------------------------------------------------------------
85+
86+
Run from the Falaise build directory. Here we **don't** use the variant
87+
support but manually set vertex and particle generators associated to
88+
the default geometry:
89+
90+
.. raw:: sh
91+
92+
brewsh> LD_LIBRARY_PATH="$(pwd)/BuildProducts/lib:${LD_LIBRARY_PATH}" \
93+
bxg4_production \
94+
--datatools::logging "warning" \
95+
--datatools::resource-path "falaise@$(pwd)/BuildProducts/share/Falaise-3.0.0/resources" \
96+
--logging-priority "debug" \
97+
--load-dll Falaise \
98+
--config @falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/manager.conf \
99+
--vertex-generator-name "source_pads_bulk" \
100+
--vertex-generator-seed 0 \
101+
--event-generator-name "Tl208" \
102+
--event-generator-seed 0 \
103+
--g4-manager-seed 0 \
104+
--shpf-seed 0 \
105+
--output-prng-seeds-file mc_g4_production.seeds \
106+
--output-prng-states-file mc_g4_production.states \
107+
--batch \
108+
--using-time-statistics \
109+
--number-of-events 10 \
110+
--number-of-events-modulo 2 \
111+
--output-data-format "bank" \
112+
--output-data-bank "SD" \
113+
--output-data-file "cfg1-Tl208-source.xml"
114+
..
115+
116+
Run from the Falaise build directory. Here we **do** use the variant
117+
support to set the vertex and particle generators associated to some
118+
variant geometry layout:
119+
120+
.. raw:: sh
121+
122+
brewsh> LD_LIBRARY_PATH="$(pwd)/BuildProducts/lib:${LD_LIBRARY_PATH}" \
123+
bxg4_production \
124+
--datatools::logging "warning" \
125+
--datatools::resource-path "falaise@$(pwd)/BuildProducts/share/Falaise-3.X.X/resources" \
126+
--logging-priority "debug" \
127+
--load-dll Falaise \
128+
--variant-config "@falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/variants/repository.conf" \
129+
--variant-gui \
130+
--variant-store "cfg1.conf" \
131+
--config @falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/manager.conf \
132+
--vertex-generator-seed 0 \
133+
--event-generator-seed 0 \
134+
--g4-manager-seed 0 \
135+
--shpf-seed 0 \
136+
--output-prng-seeds-file mc_g4_production.seeds \
137+
--output-prng-states-file mc_g4_production.states \
138+
--using-time-statistics \
139+
--number-of-events 100 \
140+
--number-of-events-modulo 10 \
141+
--output-data-format "bank" \
142+
--output-data-bank "SD" \
143+
--output-data-file "cfg1-out.xml"
144+
..
145+
146+
Run in interactive mode:
147+
148+
.. raw:: sh
149+
150+
brewsh> LD_LIBRARY_PATH="$(pwd)/BuildProducts/lib:${LD_LIBRARY_PATH}" \
151+
bxg4_production \
152+
--datatools::logging "warning" \
153+
--datatools::resource-path "falaise@$(pwd)/BuildProducts/share/Falaise-3.X.X/resources" \
154+
--logging-priority "debug" \
155+
--load-dll Falaise \
156+
--variant-config "@falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/variants/repository.conf" \
157+
--variant-gui \
158+
--variant-store "cfg1.conf" \
159+
--config @falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/manager.conf \
160+
--vertex-generator-seed 0 \
161+
--event-generator-seed 0 \
162+
--g4-manager-seed 0 \
163+
--shpf-seed 0 \
164+
--output-prng-seeds-file mc_g4_production.seeds \
165+
--output-prng-states-file mc_g4_production.states \
166+
--using-time-statistics \
167+
--number-of-events 100 \
168+
--number-of-events-modulo 10 \
169+
--output-data-format "bank" \
170+
--output-data-bank "SD" \
171+
--output-data-file "cfg1-source.xml" \
172+
--interactive \
173+
--g4-visu \
174+
--g4-macro "@falaise:config/snemo/demonstrator/simulation/geant4_control/2.2/visu/visu_0.mac"
175+
..
176+
177+
178+
.. end

0 commit comments

Comments
 (0)