Simulation¶
Configuration related to the simulation phase.
Main Simulation Configuration¶
- class Gaussino.Simulation.GaussinoSimulation(*args, **kwargs)[source]¶
Bases:
GaussinoConfigurableConfigurable for the Simulation phase in Gaussino.
Main
- Variables
PhysicsConstructors (list, required) – default:
[], list of the factories used to attach physics to the main modular listTrackTruth (bool, optional) – default:
True
G4 commands
- Variables
G4BeginRunCommand (bool, optional) – default:
["/tracking/verbose 0", "/process/eLoss/verbose 0"]G4EndRunCommand (bool, optional) – default:
[]
Cuts
- Variables
CutForElectron (float, optional) – default:
-1. * kmCutForGamma (float, optional) – default:
-1. * kmCutForPositron (float, optional) – default:
-1. * kmDumpCutsTable (bool, optional) – default:
False
- __apply_configuration__()[source]¶
Main configuration method for the simulation phase. It applies the properties of the simulation phase right after the main
Gaussinoand generationGaussinoGenerationconfigurable, but before the geometry configurableGaussinoGeometry.
- _check_options_compatibility()[source]¶
Checks the general compatibility of the provided properties.
- Raises
ValueError – if no physics contructors were provided
- _set_giga_alg()[source]¶
Sets up the main simulation algorithm:
ReDecaySimAlgwhen using ReDecay,GiGaAlgotherwise.
The algorithm is executed right after the generation algorithms, but before hit extraction and monitoring algorithms.
- _set_giga_service()[source]¶
Sets up the main simulation service
GiGaMT. It will be available throughout the whole execution time of the simulation.
- _set_truth_actions()[source]¶
Sets up the custom optimization features that decide which tracks/particles should be stored and which not.
- only_generation_phase = False¶
options set internally by Gaussino()
- redecay = False¶
options set internally by Gaussino()
Custom Simulation¶
This adds a new package CustomSimulation that allows for adding custom simulation models (interfacing Geant4 fast simulation hooks). Custom simulation models can be added in both the mass and parallel geometry. Adding custom simulation models in a separate parallel worlds is recommended. Please, take a look at the examples section to get more information.
CustomSimulation class description¶
- class CustomSimulation.Configuration.CustomSimulation(*args, **kwargs)[source]¶
Bases:
ConfigurableUserThis class provides all the necessary tools that are needed to create a custom simulation model in a specific region and attach the corrsponding custom simulation physics. Custom simulation model is chosen via the (
Model) property (don’t forget to specify theTypei.e. the factory name). The model will be then specified in a region created based on the properties inRegionproperty. Finally, each custom simulation model needs a dedicated physics factory where you specify what kind of particles will be tracked in that model.- Variables
Model (dict, required) – Properties of the custom simulation model used.
Region (dict, required) – Properties of the G4Region where the custom simulation will take place.
Physics (dict, required) – Properties of the physics factory used for all the custom simulation models in that creator.
- Example
from Gaussino.Simulation import GaussinoSimulation GaussinoSimulation().CustomSimulation = "MyCustomSimulationCreator" from Configurables import CustomSimulation custom = CustomSimulation("MyCustomSimulationCreator") customsim.Model = { 'MyCustomSimModel': { 'Type': 'ImmediateDepositModel', } } custsim.Region = { 'VacuumCubeImmediateDeposit': { 'SensitiveDetectorName': 'VacuumCubeSDet', } } custsim.Physics = { 'ParticlePIDs': [22], }
- attach_physics(modular_list, world_name='')[source]¶
Takes care of setting up the right tools and factories responsible for creating the physics factory for all the custom simulation models. All the properties should be provided in the
Physicsproperty.- Parameters
modular_list – Modular physics list tool, should be
GiGaMTModularPhysListFACworld_name – world where the physics will take action, empty means the mass world
- create(dettool)[source]¶
Takes care of setting up the right tools and factories responsible for setting up the custom simulation model and it’s region. It is based on the properties provided in
ModelandRegion. Properties correspond to the properites used by each factory.- Parameters
dettool – Tool responsible for detector construction in Geant4. In Gaussino, it is
GiGaMTDetectorConstructionFAC.