Simulation
Configuration related to the simulation phase.
Main Simulation Configuration
- class Gaussino.Simulation.GaussinoSimulation(*args, **kwargs)[source]
Bases:
GaussinoConfigurable
Configurable 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. * km
CutForGamma (float, optional) – default:
-1. * km
CutForPositron (float, optional) – default:
-1. * km
DumpCutsTable (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
Gaussino
and generationGaussinoGeneration
configurable, 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:
ReDecaySimAlg
when using ReDecay,GiGaAlg
otherwise.
The algorithm is executed right after the generation algorithms, but before hit extraction and monitoring algorithms.
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:
ConfigurableUser
This 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 theType
i.e. the factory name). The model will be then specified in a region created based on the properties inRegion
property. 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
Physics
property.- Parameters:
modular_list – Modular physics list tool, should be
GiGaMTModularPhysListFAC
world_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
Model
andRegion
. Properties correspond to the properites used by each factory.- Parameters:
dettool – Tool responsible for detector construction in Geant4. In Gaussino, it is
GiGaMTDetectorConstructionFAC
.