G4Kernel package
Submodules
G4Kernel.CaloPhiRange module
G4Kernel.ComponentAccumulator module
- class G4Kernel.ComponentAccumulator.ComponentAccumulator(name, detector, OutputFile='output.root', Seed=512, NumberOfThreads=1, Timeout=7200, UseGUI=False)[source]
Bases:
CppComponent Accumulator for Geant4 simulations. Uses the G4Kernel RunManager as a backend.
- Parameters:
OutputFile (str)
Seed (int)
NumberOfThreads (int)
Timeout (int)
UseGUI (bool)
- run(evt=-1)[source]
Runs the events in the simulation.
- Parameters:
evt (int, optional) – Number of events to run if None, runs all, by default None
- setGenerator(gen)[source]
Sets the generator reader for the simulation. The reader is used to read EVT files and return the seeds for G4
- Parameters:
gen (EventReader) – Generator reader object
G4Kernel.EventReader module
- class G4Kernel.EventReader.EventReader(name, InputFileName='', OutputEventKey='EventInfo', OutputTruthKey='Particles', OutputSeedKey='Seeds', BunchDuration=25, OutputLevel=3)[source]
Bases:
Cpp- Parameters:
InputFileName (str)
OutputEventKey (str)
OutputTruthKey (str)
OutputSeedKey (str)
BunchDuration (int)
OutputLevel (int)
Module contents
- class G4Kernel.ComponentAccumulator(name, detector, OutputFile='output.root', Seed=512, NumberOfThreads=1, Timeout=7200, UseGUI=False)[source]
Bases:
CppComponent Accumulator for Geant4 simulations. Uses the G4Kernel RunManager as a backend.
- Parameters:
OutputFile (str)
Seed (int)
NumberOfThreads (int)
Timeout (int)
UseGUI (bool)
- run(evt=-1)[source]
Runs the events in the simulation.
- Parameters:
evt (int, optional) – Number of events to run if None, runs all, by default None
- setGenerator(gen)[source]
Sets the generator reader for the simulation. The reader is used to read EVT files and return the seeds for G4
- Parameters:
gen (EventReader) – Generator reader object
- class G4Kernel.EventReader(name, InputFileName='', OutputEventKey='EventInfo', OutputTruthKey='Particles', OutputSeedKey='Seeds', BunchDuration=25, OutputLevel=3)[source]
Bases:
Cpp- Parameters:
InputFileName (str)
OutputEventKey (str)
OutputTruthKey (str)
OutputSeedKey (str)
BunchDuration (int)
OutputLevel (int)