Public Member Functions

def __init__ (self, kernel=None, calo='Geant4CalorimeterAction', tracker='Geant4SimpleTrackerAction')
 
def kernel (self)
 
def master (self)
 
def setupUI (self, typ='csh', vis=False, ui=True, macro=None)
 
def setupCshUI (self, typ='csh', vis=False, ui=True, macro=None)
 
def addUserInitialization (self, worker, worker_args=None, master=None, master_args=None)
 
def detectorConstruction (self)
 
def addDetectorConstruction (self, name_type, field=None, field_args=None, geometry=None, geometry_args=None, sensitives=None, sensitives_args=None, allow_threads=False)
 
def addPhaseAction (self, phase_name, factory_specification, ui=True, instance=None)
 
def addConfig (self, factory_specification)
 
def addInit (self, factory_specification)
 
def addStart (self, factory_specification)
 
def addStop (self, factory_specification)
 
def execute (self, num_events=None)
 
def printDetectors (self)
 
def setupDetector (self, name, action, collections=None)
 
def setupCalorimeter (self, name, type=None, collections=None)
 
def setupTracker (self, name, type=None, collections=None)
 
def setupTrackingFieldMT (self, name='MagFieldTrackingSetup', stepper='ClassicalRK4', equation='Mag_UsualEqRhs', prt=False)
 
def setupTrackingField (self, name='MagFieldTrackingSetup', stepper='ClassicalRK4', equation='Mag_UsualEqRhs', prt=False)
 
def setupPhysics (self, name)
 
def addPhysics (self, name)
 
def setupGun (self, name, particle, energy, isotrop=True, multiplicity=1, position=(0.0, 0.0, 0.0), register=True, **args)
 
def setupROOTOutput (self, name, output, mc_truth=True)
 
def setupLCIOOutput (self, name, output)
 
def setupEDM4hepOutput (self, name, output)
 
def buildInputStage (self, generator_input_modules, output_level=None, have_mctruth=True)
 
def run (self)
 

Public Attributes

 description
 
 sensitive_types
 

Detailed Description

Helper object to perform stuff, which occurs very often.
I am sick of typing the same over and over again.
Hence, I grouped often used python fragments to this small
class to re-usage.

\author  M.Frank
\version 1.0

Definition at line 368 of file DDG4.py.

Constructor & Destructor Documentation

◆ __init__()

def DDG4.Geant4.__init__ (   self,
  kernel = None,
  calo = 'Geant4CalorimeterAction',
  tracker = 'Geant4SimpleTrackerAction' 
)

Definition at line 379 of file DDG4.py.

Member Function Documentation

◆ addConfig()

def DDG4.Geant4.addConfig (   self,
  factory_specification 
)
Add a new phase action to the 'configure' step.
Called at the beginning of Geant4Exec::configure.
The factory specification is the typical string "<factory_name>/<instance name>".
If no instance name is specified it defaults to the factory name.

\author  M.Frank

Definition at line 505 of file DDG4.py.

◆ addDetectorConstruction()

def DDG4.Geant4.addDetectorConstruction (   self,
  name_type,
  field = None,
  field_args = None,
  geometry = None,
  geometry_args = None,
  sensitives = None,
  sensitives_args = None,
  allow_threads = False 
)
Configure Geant4 user initialization for optionasl multi-threading mode

\author  M.Frank

Definition at line 462 of file DDG4.py.

◆ addInit()

def DDG4.Geant4.addInit (   self,
  factory_specification 
)
Add a new phase action to the 'initialize' step.
Called at the beginning of Geant4Exec::initialize.
The factory specification is the typical string "<factory_name>/<instance name>".
If no instance name is specified it defaults to the factory name.

\author  M.Frank

Definition at line 516 of file DDG4.py.

◆ addPhaseAction()

def DDG4.Geant4.addPhaseAction (   self,
  phase_name,
  factory_specification,
  ui = True,
  instance = None 
)
Add a new phase action to an arbitrary step.

\author  M.Frank

Definition at line 491 of file DDG4.py.

◆ addPhysics()

def DDG4.Geant4.addPhysics (   self,
  name 
)

Definition at line 684 of file DDG4.py.

◆ addStart()

def DDG4.Geant4.addStart (   self,
  factory_specification 
)
Add a new phase action to the 'start' step.
Called at the beginning of Geant4Exec::run.
The factory specification is the typical string "<factory_name>/<instance name>".
If no instance name is specified it defaults to the factory name.

\author  M.Frank

Definition at line 527 of file DDG4.py.

◆ addStop()

def DDG4.Geant4.addStop (   self,
  factory_specification 
)
Add a new phase action to the 'stop' step.
Called at the end of Geant4Exec::run.
The factory specification is the typical string "<factory_name>/<instance name>".
If no instance name is specified it defaults to the factory name.

\author  M.Frank

Definition at line 538 of file DDG4.py.

◆ addUserInitialization()

def DDG4.Geant4.addUserInitialization (   self,
  worker,
  worker_args = None,
  master = None,
  master_args = None 
)
Configure Geant4 user initialization for optionasl multi-threading mode

\author  M.Frank

Definition at line 438 of file DDG4.py.

◆ buildInputStage()

def DDG4.Geant4.buildInputStage (   self,
  generator_input_modules,
  output_level = None,
  have_mctruth = True 
)
Generic build of the input stage with multiple input modules.

Actions executed are:
1) Register Generation initialization action
2) Append all modules to build the complete input record
These modules are readers/particle sources, boosters and/or smearing actions.
3) Merge all existing interaction records
4) Add the MC truth handler

\author  M.Frank

Definition at line 744 of file DDG4.py.

◆ detectorConstruction()

def DDG4.Geant4.detectorConstruction (   self)

Definition at line 458 of file DDG4.py.

◆ execute()

def DDG4.Geant4.execute (   self,
  num_events = None 
)
Execute the Geant 4 program with all steps.

\author  M.Frank

Definition at line 549 of file DDG4.py.

◆ kernel()

def DDG4.Geant4.kernel (   self)
Access the worker kernel object.

\author  M.Frank

Definition at line 393 of file DDG4.py.

◆ master()

def DDG4.Geant4.master (   self)
Access the master kernel object.

\author  M.Frank

Definition at line 401 of file DDG4.py.

◆ printDetectors()

def DDG4.Geant4.printDetectors (   self)

Definition at line 563 of file DDG4.py.

◆ run()

def DDG4.Geant4.run (   self)
Execute the main Geant4 action
\author  M.Frank

Definition at line 790 of file DDG4.py.

◆ setupCalorimeter()

def DDG4.Geant4.setupCalorimeter (   self,
  name,
  type = None,
  collections = None 
)

Definition at line 627 of file DDG4.py.

◆ setupCshUI()

def DDG4.Geant4.setupCshUI (   self,
  typ = 'csh',
  vis = False,
  ui = True,
  macro = None 
)
Configure the Geant4 command executive with a csh like command prompt

\author  M.Frank

Definition at line 430 of file DDG4.py.

◆ setupDetector()

def DDG4.Geant4.setupDetector (   self,
  name,
  action,
  collections = None 
)

Definition at line 575 of file DDG4.py.

◆ setupEDM4hepOutput()

def DDG4.Geant4.setupEDM4hepOutput (   self,
  name,
  output 
)
Configure EDM4hep root output for the simulated events.

Definition at line 735 of file DDG4.py.

◆ setupGun()

def DDG4.Geant4.setupGun (   self,
  name,
  particle,
  energy,
  isotrop = True,
  multiplicity = 1,
  position = (0.0, 0.0, 0.0),
  register = True,
**  args 
)

Definition at line 691 of file DDG4.py.

◆ setupLCIOOutput()

def DDG4.Geant4.setupLCIOOutput (   self,
  name,
  output 
)
Configure LCIO output for the simulated events

\author  M.Frank

Definition at line 722 of file DDG4.py.

◆ setupPhysics()

def DDG4.Geant4.setupPhysics (   self,
  name 
)

Definition at line 676 of file DDG4.py.

◆ setupROOTOutput()

def DDG4.Geant4.setupROOTOutput (   self,
  name,
  output,
  mc_truth = True 
)
Configure ROOT output for the simulated events

\author  M.Frank

Definition at line 706 of file DDG4.py.

◆ setupTracker()

def DDG4.Geant4.setupTracker (   self,
  name,
  type = None,
  collections = None 
)

Definition at line 634 of file DDG4.py.

◆ setupTrackingField()

def DDG4.Geant4.setupTrackingField (   self,
  name = 'MagFieldTrackingSetup',
  stepper = 'ClassicalRK4',
  equation = 'Mag_UsualEqRhs',
  prt = False 
)

Definition at line 670 of file DDG4.py.

◆ setupTrackingFieldMT()

def DDG4.Geant4.setupTrackingFieldMT (   self,
  name = 'MagFieldTrackingSetup',
  stepper = 'ClassicalRK4',
  equation = 'Mag_UsualEqRhs',
  prt = False 
)

Definition at line 664 of file DDG4.py.

◆ setupUI()

def DDG4.Geant4.setupUI (   self,
  typ = 'csh',
  vis = False,
  ui = True,
  macro = None 
)
Configure the Geant4 command executive

\author  M.Frank

Definition at line 409 of file DDG4.py.

Member Data Documentation

◆ description

DDG4.Geant4.description

Definition at line 385 of file DDG4.py.

◆ sensitive_types

DDG4.Geant4.sensitive_types

Definition at line 386 of file DDG4.py.


The documentation for this class was generated from the following file: