G4Kernel package

Submodules

G4Kernel.CaloPhiRange module

class G4Kernel.CaloPhiRange.CaloPhiRange[source]

Bases: Logger

core()[source]
diff(phi1, phi2)[source]

G4Kernel.ComponentAccumulator module

class G4Kernel.ComponentAccumulator.ComponentAccumulator(name, detector, OutputFile='output.root', Seed=512, NumberOfThreads=1, Timeout=7200, UseGUI=False)[source]

Bases: Cpp

Component Accumulator for Geant4 simulations. Uses the G4Kernel RunManager as a backend.

Parameters:
  • OutputFile (str)

  • Seed (int)

  • NumberOfThreads (int)

  • Timeout (int)

  • UseGUI (bool)

detector()[source]

Returns the detector construction object.

merge()[source]
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)

GetEntries()[source]
merge(acc)[source]

Module contents

class G4Kernel.CaloPhiRange[source]

Bases: Logger

core()[source]
diff(phi1, phi2)[source]
class G4Kernel.ComponentAccumulator(name, detector, OutputFile='output.root', Seed=512, NumberOfThreads=1, Timeout=7200, UseGUI=False)[source]

Bases: Cpp

Component Accumulator for Geant4 simulations. Uses the G4Kernel RunManager as a backend.

Parameters:
  • OutputFile (str)

  • Seed (int)

  • NumberOfThreads (int)

  • Timeout (int)

  • UseGUI (bool)

detector()[source]

Returns the detector construction object.

merge()[source]
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)

GetEntries()[source]
merge(acc)[source]