DD4hep  1.35.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
dd4hep::sim::Geant4PhysicsListActionSequence Class Reference

The implementation of the single Geant4 physics list action sequence. More...

#include <Geant4PhysicsList.h>

Inheritance diagram for dd4hep::sim::Geant4PhysicsListActionSequence:
dd4hep::sim::Geant4Action

Public Member Functions

 Geant4PhysicsListActionSequence (Geant4Context *context, const std::string &nam)
 Standard constructor. More...
 
virtual ~Geant4PhysicsListActionSequence ()
 Default destructor. More...
 
void dump ()
 Dump content to stdout. More...
 
virtual void installCommandMessenger () override
 Install command control messenger if wanted. More...
 
void setTransportation (bool value)
 Update transportation flag. More...
 
bool transportation () const
 Access the transportation flag. More...
 
template<typename Q , typename T >
void constructPhysics (Q *p, void(T::*f)(G4VModularPhysicsList *))
 Register physics construction callback. More...
 
template<typename Q , typename T >
void constructProcess (Q *p, void(T::*f)(G4VUserPhysicsList *))
 Register process construction callback. More...
 
template<typename Q , typename T >
void constructParticle (Q *p, void(T::*f)(G4VUserPhysicsList *))
 Register particle construction callback. More...
 
void adopt (Geant4PhysicsList *action)
 Add an actor responding to all callbacks. Sequence takes ownership. More...
 
virtual void constructProcesses (G4VUserPhysicsList *physics)
 Execute sequence of G4 physics constructors. More...
 
virtual void constructParticles (G4VUserPhysicsList *physics)
 Execute sequence of G4 particle constructors. More...
 
virtual void constructPhysics (G4VModularPhysicsList *physics)
 Execute sequence of G4 physics constructors. More...
 
virtual void enable (G4VUserPhysicsList *physics)
 Enable physics list: actions necessary to be propagated to Geant4. More...
 
G4VUserPhysicsList * extensionList ()
 Extend physics list from factory: More...
 
- Public Member Functions inherited from dd4hep::sim::Geant4Action
 Geant4Action (Geant4Context *context, const std::string &nam)
 Standard constructor. More...
 
long addRef ()
 Increase reference count. More...
 
long release ()
 Decrease reference count. Implicit destruction. More...
 
Geant4Contextcontext () const
 Access the context. More...
 
virtual void updateContext (Geant4Context *ctxt)
 Set or update client context. More...
 
virtual void configureFiber (Geant4Context *thread_context)
 Set or update client for the use in a new thread fiber. More...
 
const std::string & name () const
 Access name of the action. More...
 
const char * c_name () const
 Access name of the action. More...
 
void setName (const std::string &new_name)
 Set the object name. More...
 
PropertyManagerproperties ()
 Access to the properties of the object. More...
 
PrintLevel outputLevel () const
 Access the output level. More...
 
PrintLevel setOutputLevel (PrintLevel new_level)
 Set the output level; returns previous value. More...
 
Geant4UIMessengercontrol () const
 Access to the UI messenger. More...
 
virtual void enableUI ()
 Enable and install UI messenger. More...
 
template<typename T >
Geant4ActiondeclareProperty (const std::string &nam, T &val)
 Declare property. More...
 
template<typename T >
Geant4ActiondeclareProperty (const char *nam, T &val)
 Declare property. More...
 
bool hasProperty (const std::string &name) const
 Check property for existence. More...
 
Propertyproperty (const std::string &name)
 Access single property. More...
 
virtual void installMessengers ()
 Install property control messenger if wanted. More...
 
virtual void installPropertyMessenger ()
 Install property control messenger if wanted. More...
 
void print (const char *fmt,...) const
 Support for messages with variable output level using output level. More...
 
void printM1 (const char *fmt,...) const
 Support for messages with variable output level using output level-1. More...
 
void printM2 (const char *fmt,...) const
 Support for messages with variable output level using output level-2. More...
 
void printP1 (const char *fmt,...) const
 Support for messages with variable output level using output level+1. More...
 
void printP2 (const char *fmt,...) const
 Support for messages with variable output level using output level+2. More...
 
void always (const char *fmt,...) const
 Support of always printed messages. More...
 
void debug (const char *fmt,...) const
 Support of debug messages. More...
 
void info (const char *fmt,...) const
 Support of info messages. More...
 
void warning (const char *fmt,...) const
 Support of warning messages. More...
 
void error (const char *fmt,...) const
 Support of error messages. More...
 
bool return_error (bool return_value, const char *fmt,...) const
 Action to support error messages. More...
 
void fatal (const char *fmt,...) const
 Support of fatal messages. Throws exception. More...
 
void except (const char *fmt,...) const
 Support of exceptions: Print fatal message and throw runtime_error. More...
 
void abortRun (const std::string &exception, const char *fmt,...) const
 Abort Geant4 Run by throwing a G4Exception with type RunMustBeAborted. More...
 
Geant4RunActionSequencerunAction () const
 Access to the main run action sequence from the kernel object. More...
 
Geant4EventActionSequenceeventAction () const
 Access to the main event action sequence from the kernel object. More...
 
Geant4SteppingActionSequencesteppingAction () const
 Access to the main stepping action sequence from the kernel object. More...
 
Geant4TrackingActionSequencetrackingAction () const
 Access to the main tracking action sequence from the kernel object. More...
 
Geant4StackingActionSequencestackingAction () const
 Access to the main stacking action sequence from the kernel object. More...
 
Geant4GeneratorActionSequencegeneratorAction () const
 Access to the main generator action sequence from the kernel object. More...
 

Public Attributes

bool m_transportation { false }
 Property: Flag if particle transportation is to be added. More...
 
bool m_decays { false }
 Property: Flag if particle decays are to be added. More...
 
int m_verbosity { 1 }
 Property: verbosity level for the physics list. More...
 
int m_physics_verbosity { -1 }
 Property: Verbosity level for G4VUserPhysicsList instance (See G4VUserPhysicsList.hh for details) More...
 
double m_rangecut
 Property: global range cut for secondary productions. More...
 
std::string m_extends
 Property: Store name of basic predefined Geant4 physics list. More...
 

Protected Member Functions

virtual void constructDecays (G4VUserPhysicsList *physics)
 Callback to construct particle decays. More...
 
- Protected Member Functions inherited from dd4hep::sim::Geant4Action
 DDG4_DEFINE_ACTION_CONSTRUCTORS (Geant4Action)
 Define standard assignments and constructors. More...
 
virtual ~Geant4Action ()
 Default destructor. More...
 

Protected Attributes

CallbackSequence m_physics { }
 Callback sequence for G4 physics constructors. More...
 
CallbackSequence m_process { }
 Callback sequence for G4 process constructors. More...
 
CallbackSequence m_particle { }
 Callback sequence for G4 particle constructors. More...
 
Actors< Geant4PhysicsListm_actors { }
 The list of action objects to be called. More...
 
- Protected Attributes inherited from dd4hep::sim::Geant4Action
Geant4Contextm_context { nullptr }
 Reference to the Geant4 context. More...
 
Geant4UIMessengerm_control { nullptr }
 Control directory of this action. More...
 
int m_outputLevel { 3 }
 Default property: Output level. More...
 
bool m_needsControl { false }
 Default property: Flag to create control instance. More...
 
std::string m_name { }
 Action name. More...
 
PropertyManager m_properties { }
 Property pool. More...
 
long m_refCount { 1 }
 Reference count. Initial value: 1. More...
 

Detailed Description

The implementation of the single Geant4 physics list action sequence.

Concrete implementation of the Geant4 physics list sequence. A list to setup the physics content in a modular form

Author
M.Frank
Version
1.0

Definition at line 227 of file Geant4PhysicsList.h.

Constructor & Destructor Documentation

◆ Geant4PhysicsListActionSequence()

Geant4PhysicsListActionSequence::Geant4PhysicsListActionSequence ( Geant4Context context,
const std::string &  nam 
)

Standard constructor.

Definition at line 345 of file Geant4PhysicsList.cpp.

◆ ~Geant4PhysicsListActionSequence()

Geant4PhysicsListActionSequence::~Geant4PhysicsListActionSequence ( )
virtual

Default destructor.

Definition at line 359 of file Geant4PhysicsList.cpp.

Member Function Documentation

◆ adopt()

void Geant4PhysicsListActionSequence::adopt ( Geant4PhysicsList action)

Add an actor responding to all callbacks. Sequence takes ownership.

Definition at line 423 of file Geant4PhysicsList.cpp.

◆ constructDecays()

void Geant4PhysicsListActionSequence::constructDecays ( G4VUserPhysicsList *  physics)
protectedvirtual

Callback to construct particle decays.

Definition at line 454 of file Geant4PhysicsList.cpp.

◆ constructParticle()

template<typename Q , typename T >
void dd4hep::sim::Geant4PhysicsListActionSequence::constructParticle ( Q *  p,
void(T::*)(G4VUserPhysicsList *)  f 
)
inline

Register particle construction callback.

Definition at line 285 of file Geant4PhysicsList.h.

◆ constructParticles()

void Geant4PhysicsListActionSequence::constructParticles ( G4VUserPhysicsList *  physics)
virtual

Execute sequence of G4 particle constructors.

Callback to construct particles.

Definition at line 433 of file Geant4PhysicsList.cpp.

◆ constructPhysics() [1/2]

void Geant4PhysicsListActionSequence::constructPhysics ( G4VModularPhysicsList *  physics)
virtual

Execute sequence of G4 physics constructors.

Callback to execute physics constructors.

Definition at line 439 of file Geant4PhysicsList.cpp.

◆ constructPhysics() [2/2]

template<typename Q , typename T >
void dd4hep::sim::Geant4PhysicsListActionSequence::constructPhysics ( Q *  p,
void(T::*)(G4VModularPhysicsList *)  f 
)
inline

Register physics construction callback.

Definition at line 275 of file Geant4PhysicsList.h.

◆ constructProcess()

template<typename Q , typename T >
void dd4hep::sim::Geant4PhysicsListActionSequence::constructProcess ( Q *  p,
void(T::*)(G4VUserPhysicsList *)  f 
)
inline

Register process construction callback.

Definition at line 280 of file Geant4PhysicsList.h.

◆ constructProcesses()

void Geant4PhysicsListActionSequence::constructProcesses ( G4VUserPhysicsList *  physics)
virtual

Execute sequence of G4 physics constructors.

constructProcess callback

Definition at line 445 of file Geant4PhysicsList.cpp.

◆ dump()

void Geant4PhysicsListActionSequence::dump ( )

Dump content to stdout.

Definition at line 412 of file Geant4PhysicsList.cpp.

◆ enable()

void Geant4PhysicsListActionSequence::enable ( G4VUserPhysicsList *  physics)
virtual

Enable physics list: actions necessary to be propagated to Geant4.

Definition at line 474 of file Geant4PhysicsList.cpp.

◆ extensionList()

G4VUserPhysicsList * Geant4PhysicsListActionSequence::extensionList ( )

Extend physics list from factory:

Definition at line 369 of file Geant4PhysicsList.cpp.

◆ installCommandMessenger()

void Geant4PhysicsListActionSequence::installCommandMessenger ( )
overridevirtual

Install command control messenger if wanted.

Reimplemented from dd4hep::sim::Geant4Action.

Definition at line 407 of file Geant4PhysicsList.cpp.

◆ setTransportation()

void dd4hep::sim::Geant4PhysicsListActionSequence::setTransportation ( bool  value)
inline

Update transportation flag.

Definition at line 266 of file Geant4PhysicsList.h.

◆ transportation()

bool dd4hep::sim::Geant4PhysicsListActionSequence::transportation ( ) const
inline

Access the transportation flag.

Definition at line 270 of file Geant4PhysicsList.h.

Member Data Documentation

◆ m_actors

Actors<Geant4PhysicsList> dd4hep::sim::Geant4PhysicsListActionSequence::m_actors { }
protected

The list of action objects to be called.

Definition at line 238 of file Geant4PhysicsList.h.

◆ m_decays

bool dd4hep::sim::Geant4PhysicsListActionSequence::m_decays { false }

Property: Flag if particle decays are to be added.

Definition at line 246 of file Geant4PhysicsList.h.

◆ m_extends

std::string dd4hep::sim::Geant4PhysicsListActionSequence::m_extends

Property: Store name of basic predefined Geant4 physics list.

Definition at line 254 of file Geant4PhysicsList.h.

◆ m_particle

CallbackSequence dd4hep::sim::Geant4PhysicsListActionSequence::m_particle { }
protected

Callback sequence for G4 particle constructors.

Definition at line 236 of file Geant4PhysicsList.h.

◆ m_physics

CallbackSequence dd4hep::sim::Geant4PhysicsListActionSequence::m_physics { }
protected

Callback sequence for G4 physics constructors.

Definition at line 232 of file Geant4PhysicsList.h.

◆ m_physics_verbosity

int dd4hep::sim::Geant4PhysicsListActionSequence::m_physics_verbosity { -1 }

Property: Verbosity level for G4VUserPhysicsList instance (See G4VUserPhysicsList.hh for details)

Definition at line 250 of file Geant4PhysicsList.h.

◆ m_process

CallbackSequence dd4hep::sim::Geant4PhysicsListActionSequence::m_process { }
protected

Callback sequence for G4 process constructors.

Definition at line 234 of file Geant4PhysicsList.h.

◆ m_rangecut

double dd4hep::sim::Geant4PhysicsListActionSequence::m_rangecut

Property: global range cut for secondary productions.

Definition at line 252 of file Geant4PhysicsList.h.

◆ m_transportation

bool dd4hep::sim::Geant4PhysicsListActionSequence::m_transportation { false }

Property: Flag if particle transportation is to be added.

Definition at line 244 of file Geant4PhysicsList.h.

◆ m_verbosity

int dd4hep::sim::Geant4PhysicsListActionSequence::m_verbosity { 1 }

Property: verbosity level for the physics list.

Definition at line 248 of file Geant4PhysicsList.h.


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