Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Falaise/geometry] organize strip in block GeometryModel #228

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions resources/materials/Elements_RealSource.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#@description A standard list of elements for RealSource layout
#@key_label "name"
#@meta_label "type"

#####################################################
[name="snemo::selenium-82::98percent" type="element"]
#@config The 82 Selenium enriched element (98 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.98 0.013333333333333345 0.006666666666666672


#####################################################
[name="snemo::selenium-82::96.92percent" type="element"]
#@config The 82 Selenium enriched element (96.92 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9692000000000001 0.020533333333333292 0.010266666666666646


#####################################################
[name="snemo::selenium-82::99.88percent" type="element"]
#@config The 82 Selenium enriched element (99.88 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9987999999999999 0.0008000000000000599 0.00040000000000002994


#####################################################
[name="snemo::selenium-82::99.6percent" type="element"]
#@config The 82 Selenium enriched element (99.6 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.996 0.0026666666666666687 0.0013333333333333344


#####################################################
[name="snemo::selenium-82::97.0percent" type="element"]
#@config The 82 Selenium enriched element (97.0 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.97 0.020000000000000018 0.010000000000000009


#####################################################
[name="snemo::selenium-82::96.65percent" type="element"]
#@config The 82 Selenium enriched element (96.65 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9665 0.022333333333333316 0.011166666666666658


#####################################################
[name="snemo::selenium-82::97.9percent" type="element"]
#@config The 82 Selenium enriched element (97.9 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9790000000000001 0.013999999999999938 0.006999999999999969


#####################################################
[name="snemo::selenium-82::96.9percent" type="element"]
#@config The 82 Selenium enriched element (96.9 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9690000000000001 0.02066666666666661 0.010333333333333306


#####################################################
[name="snemo::selenium-82::97.5percent" type="element"]
#@config The 82 Selenium enriched element (97.5 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.975 0.01666666666666668 0.00833333333333334


#####################################################
[name="snemo::selenium-82::96.1percent" type="element"]
#@config The 82 Selenium enriched element (96.1 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.961 0.026000000000000023 0.013000000000000012


#####################################################
[name="snemo::selenium-82::98.31percent" type="element"]
#@config The 82 Selenium enriched element (98.31 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9831 0.011266666666666683 0.005633333333333342


#####################################################
[name="snemo::selenium-82::99.92percent" type="element"]
#@config The 82 Selenium enriched element (99.92 %)
z : integer = 34
isotope.names : string[3] = "Se-82" "Se-80" "Se-78"
isotope.weights : real[3] = 0.9992 0.0005333333333333485 0.00026666666666667427

# - end
1,356 changes: 1,356 additions & 0 deletions resources/materials/Materials_RealSource.conf

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ manager.config : string as path = "@falaise:snemo/demonstrator/geometry/VertexGe
"source_external_pad.basic.model.log" \
"source_internal_pad.basic.model.log"
#@variant_endif geometry:layout/if_basic/source_layout/if_basic

#@variant_if geometry:layout/if_basic/source_layout/if_realistic_flat|false
regions.source.volumes_regexp : string[1] = \
"snemo_foil_(.*)_pad_(.*).model.log"

limits.list_of_regions : string[1] = "source"
limits.max_step.source : real as length = 10 um

#@variant_endif geometry:layout/if_basic/source_layout/if_realistic_flat

#@variant_if geometry:layout/if_basic/magnetic_field/is_active|true
using_electromagnetic_field : boolean = true
Expand Down
68 changes: 40 additions & 28 deletions resources/snemo/demonstrator/geant4_control/Geant4VariantsGDM.conf
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
#@config The global dependency model of the variant configuration parameters for the 'simulation' repository
logging.priority : string = "fatal"
dependees.slots : integer[9] = 0 1 2 3 4 5 6 7 8
dependees.slot_0.variant : string = "geometry:layout/if_half_commissioning"
dependees.slot_1.variant : string = "geometry:layout/if_basic/source_calibration/is_active"
dependees.slot_2.variant : string = "geometry:layout/if_basic/shielding/is_on"
dependees.slot_3.variant : string = "geometry:layout/if_basic"
dependees.slot_4.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_ca48"
dependees.slot_5.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_se82"
dependees.slot_6.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_nd150"
dependees.slot_7.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_mo100"
dependees.slot_8.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_sn124"
dependees.slots : integer[12] = 0 1 2 3 4 5 6 7 8 9 10 11
dependees.slot_0.variant : string = "geometry:layout/if_half_commissioning"
dependees.slot_1.variant : string = "geometry:layout/if_basic/source_calibration/is_active"
dependees.slot_2.variant : string = "geometry:layout/if_basic/shielding/is_on"
dependees.slot_3.variant : string = "geometry:layout/if_basic"
dependees.slot_4.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_ca48"
dependees.slot_5.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_se82"
dependees.slot_6.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_nd150"
dependees.slot_7.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_mo100"
dependees.slot_8.variant : string = "geometry:layout/if_basic/source_layout/if_basic/material/if_sn124"
dependees.slot_9.variant : string = "geometry:layout/if_basic/source_layout/if_basic"
dependees.slot_10.variant : string = "geometry:layout/if_basic/source_layout/if_realistic_flat"
dependees.slot_11.variant : string = "vertexes:generator/if_source_of_se82_dbd"

dependencies : string[10] = \
dependencies : string[11] = \
"CalibrationVtxDep" \
"HalfCommissioningVtxDep" \
"ShieldingVtxDep" \
"SourceVtxDep" \
"Tracker1VtxDep" \
"SourceFoilBasicVtxDep" \
"SourceFoilRealisticFlatVtxDep" \
"Ca48PrimariesDep" \
"Se82PrimariesDep" \
"Mo100PrimariesDep" \
"Nd150PrimariesDep" \
"Sn124PrimariesDep"
"Sn124PrimariesDep"


# 1 - The vertex generator group of values 'Calibration' is only enabled if the calibration sources
# are set in the geometry.
Expand All @@ -41,55 +46,62 @@ dependencies.ShieldingVtxDep.depender : string = "vertexes:generator@Shieldi
dependencies.ShieldingVtxDep.slots : integer[1] = 2
dependencies.ShieldingVtxDep.logic : string = "[2]"

# 4 - The vertex generator group of values 'Source' is only enabled if the layout
# of the geometry is basic
dependencies.SourceVtxDep.depender : string = "vertexes:generator@Source"
dependencies.SourceVtxDep.slots : integer[1] = 3
dependencies.SourceVtxDep.logic : string = "[3]"

# 5 - The vertex generator group of values 'Tracker1' is only enabled if the layout
# of the geometry is basic
# 4 - The vertex generator group of values 'Tracker1' is only enabled if the layout
# of the geometry is "basic"
dependencies.Tracker1VtxDep.depender : string = "vertexes:generator@Tracker1"
dependencies.Tracker1VtxDep.slots : integer[1] = 3
dependencies.Tracker1VtxDep.logic : string = "[3]"

# 6 - The vertex generator group of values 'DBD/Ca48' is only enabled if:
# 5 - The vertex generator group of values 'SourceFoilBasic' is only enabled if the layout
# of the geometry is "basic" AND the source layout is "basic"
dependencies.SourceFoilBasicVtxDep.depender : string = "vertexes:generator@SourceFoilBasic"
dependencies.SourceFoilBasicVtxDep.slots : integer[2] = 3 9
dependencies.SourceFoilBasicVtxDep.logic : string = "AND([3],[9])"

# 6 - The vertex generator group of values 'SourceFoilRealisticFlat' is only enabled if the layout
# of the geometry is "basic" AND the source layout is "realistic_flat"
dependencies.SourceFoilRealisticFlatVtxDep.depender : string = "vertexes:generator@SourceFoilRealisticFlat"
dependencies.SourceFoilRealisticFlatVtxDep.slots : integer[2] = 3 10
dependencies.SourceFoilRealisticFlatVtxDep.logic : string = "AND([3],[10])"

# 7 - The vertex generator group of values 'DBD/Ca48' is only enabled if:
# * the layout of the geometry is basic
# * the source layout is basic
# * the source material is made of Ca48
dependencies.Ca48PrimariesDep.depender : string = "primary_events:generator@DBD/Ca48"
dependencies.Ca48PrimariesDep.slots : integer[1] = 4
dependencies.Ca48PrimariesDep.logic : string = "[4]"

# 7 - The vertex generator group of values 'DBD/Se82' is only enabled if:
# 8 - The vertex generator group of values 'DBD/Se82' is only enabled if:
# * the layout of the geometry is basic
# * the source layout is basic
# * the source material is made of Se82
dependencies.Se82PrimariesDep.depender : string = "primary_events:generator@DBD/Se82"
dependencies.Se82PrimariesDep.slots : integer[1] = 5
dependencies.Se82PrimariesDep.logic : string = "[5]"
dependencies.Se82PrimariesDep.slots : integer[2] = 5 11
dependencies.Se82PrimariesDep.logic : string = "OR([5],[11])"

# 8 - The vertex generator group of values 'DBD/Nd150' is only enabled if:
# 9 - The vertex generator group of values 'DBD/Nd150' is only enabled if:
# * the layout of the geometry is basic
# * the source layout is basic
# * the source material is made of Nd150
dependencies.Nd150PrimariesDep.depender : string = "primary_events:generator@DBD/Nd150"
dependencies.Nd150PrimariesDep.slots : integer[1] = 6
dependencies.Nd150PrimariesDep.logic : string = "[6]"

# 9 - The vertex generator group of values 'DBD/Mo100' is only enabled if:
# 10 - The vertex generator group of values 'DBD/Mo100' is only enabled if:
# * the layout of the geometry is basic
# * the source layout is basic
# * the source material is made of Mo100
dependencies.Mo100PrimariesDep.depender : string = "primary_events:generator@DBD/Mo100"
dependencies.Mo100PrimariesDep.slots : integer[1] = 7
dependencies.Mo100PrimariesDep.logic : string = "[7]"

# 10 - The vertex generator group of values 'DBD/Sn124' is only enabled if:
# 11 - The vertex generator group of values 'DBD/Sn124' is only enabled if:
# * the layout of the geometry is basic
# * the source layout is basic
# * the source material is made of Sn124
dependencies.Sn124PrimariesDep.depender : string = "primary_events:generator@DBD/Sn124"
dependencies.Sn124PrimariesDep.slots : integer[1] = 8
dependencies.Sn124PrimariesDep.logic : string = "[8]"


53 changes: 53 additions & 0 deletions resources/snemo/demonstrator/geant4_control/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
====================================================================
SuperNEMO Demonstrator Simulation Configuration
====================================================================

Configuration files
===================

Description of configuration files and their dependencies:

* ``Geant4Manager.conf`` : Main configuration of the Bayeux/Geant4 based simulation manager
* ``Geant4VariantRepository.conf`` : Definition of a variant
repository with all embedded components of the simulation: *geometry*, *vertex generation*, *primary event generation* and
*simulation engine*. This mechanism describes
the various options (*variants*) selectable while setting up the
demonstrator geometry and allows to describe use choice through
specific *variant profile* files.
* ``Geant4Variants.conf`` : Configuration of the simulation variant
registry
* ``Geant4VariantsGDM.conf`` : Description of the global dependency model for
variants related to simulation engine, primary event generation, vertex generation and geometry options.
* ``Geant4Services.conf`` : Main configuration of the Bayeux/Geant4 based simulation service


Running the simulation configuration with Bayeux tools
======================================================

.. code:: bash

$ _falaise_prefix="`dirname $(which fltags)`/.."
$ _falaise_resources="$(pwd)"
$ bxg4_production \
--logging-priority "trace" \
--datatools::logging "trace" \
--datatools::resource-path "falaise@${_falaise_resources}" \
--load-dll "Falaise@${_falaise_prefix}/lib" \
--variant-config "@falaise:snemo/demonstrator/geant4_control/Geant4VariantRepository.conf" \
--variant-gui \
--variant-store "/tmp/_falaise_simulation.profile" \
--batch \
--config @falaise:snemo/demonstrator/geant4_control/Geant4Manager.conf \
--vertex-generator-seed 0 \
--event-generator-seed 0 \
--g4-manager-seed 0 \
--shpf-seed 0 \
--output-prng-seeds-file "/tmp/mc_g4_production.seeds" \
--output-prng-states-file "/tmp/mc_g4_production.states" \
--number-of-events 10 \
--number-of-events-modulo 1 \
--output-data-file "/tmp/_falaise_simulation.xml.gz" \
--output-data-format "bank" \
--output-data-bank name "SD"
..

Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,28 @@
logging.priority : string = "error"
sensitive.category : string = "__source_SD"
hit.category : string = "__visu.tracks"

#@variant_if geometry:layout/if_basic/source_layout/if_basic|true
geometry.volumes.with_materials : string[1] = "bb_source_material.basic"
geometry.volumes : string[4] = \
geometry.volumes.names : string[6] = \
"source_external_film.basic.model.log" \
"source_internal_film.basic.model.log" \
"source_external_multipad.basic.model.log" \
"source_internal_multipad.basic.model.log"
"source_internal_multipad.basic.model.log" \
"source_internal_strip.basic.model.log" \
"source_external_strip.basic.model.log"
#@variant_endif geometry:layout/if_basic/source_layout/if_basic

#@variant_if geometry:layout/if_basic/source_layout/if_realistic_flat|false
geometry.volumes.names : string[2] = \
"short_film.realistic.model.log" \
"source_film.realistic.model.log"
geometry.volumes.regex : string[3] = \
"snemo_foil_(.*)_pad_(.*).model.log" \
"snemo_source_(.*).model.log" \
"snemo_strip_(.*).model.log"
#@variant_endif geometry:layout/if_basic/source_layout/if_realistic_flat

sensitive.record_momentum : boolean = 1
sensitive.record_track_id : boolean = 1
sensitive.record_sensitive_category : boolean = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/source_calibration.geom
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/basic/source_pads.geom
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/basic/source_strips.geom
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/flat/source_foils.geom
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/source_blocks.geom
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/source_frame_horizontal_beams.geom
@falaise:snemo/demonstrator/geometry/GeometryModels/source_module/source_frame_vertical_beams.geom
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Description of source pads geometry for 'basic' source layout
[name="source_external_pad.basic.model" type="geomtools::simple_shaped_model"]
#@variant_section_only geometry:layout/if_basic/source_layout/if_basic|true
shape_type : string = "box"
x : real as length = @variant(geometry:layout/if_basic/source_layout/if_basic/thickness|250 um)
y : real as length = 125.0 mm
Expand All @@ -9,6 +10,7 @@


[name="source_internal_pad.basic.model" type="geomtools::simple_shaped_model"]
#@variant_section_only geometry:layout/if_basic/source_layout/if_basic|true
shape_type : string = "box"
x : real as length = @variant(geometry:layout/if_basic/source_layout/if_basic/thickness|250 um)
y : real as length = 135.5 mm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
# :
#
[name="source_external_multipad.basic.model" type="geomtools::replicated_model"]
#@variant_section_only geometry:layout/if_basic/source_layout/if_basic|true
replicated.axis : string = "z"
replicated.number_of_items : integer = 8
replicated.model : string = "source_external_pad.basic.model"
Expand Down Expand Up @@ -89,6 +90,7 @@
# :
#
[name="source_internal_multipad.basic.model" type="geomtools::replicated_model"]
#@variant_section_only geometry:layout/if_basic/source_layout/if_basic|true
replicated.axis : string = "z"
replicated.number_of_items : integer = 8
replicated.model : string = "source_internal_pad.basic.model"
Expand Down Expand Up @@ -126,6 +128,7 @@
# :
#
[name="source_internal_strip.basic.model" type="geomtools::stacked_model"]
#@variant_section_only geometry:layout/if_basic/source_layout/if_basic|true
stacked.axis : string = "x"
stacked.number_of_items : integer = 3
stacked.model_0 : string = "source_internal_film.basic.model"
Expand Down Expand Up @@ -163,6 +166,7 @@
# :
#
[name="source_external_strip.basic.model" type="geomtools::stacked_model"]
#@variant_section_only geometry:layout/if_basic/source_layout/if_basic|true
stacked.axis : string = "x"
stacked.number_of_items : integer = 3
stacked.model_0 : string = "source_external_film.basic.model"
Expand Down
Loading