Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysListFactoryMessenger Class Reference

#include <G4PhysListFactoryMessenger.hh>

+ Inheritance diagram for G4PhysListFactoryMessenger:

Public Member Functions

 G4PhysListFactoryMessenger (G4VModularPhysicsList *pl)
 
 ~G4PhysListFactoryMessenger () override
 
void SetNewValue (G4UIcommand *aComm, G4String aS) override
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()=default
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String LtoS (G4long l)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (const G4String &s)
 
G4long StoL (const G4String &s)
 
G4double StoD (const G4String &s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Detailed Description

Definition at line 46 of file G4PhysListFactoryMessenger.hh.

Constructor & Destructor Documentation

◆ G4PhysListFactoryMessenger()

G4PhysListFactoryMessenger::G4PhysListFactoryMessenger ( G4VModularPhysicsList * pl)

Definition at line 44 of file G4PhysListFactoryMessenger.cc.

45{
46 //G4cout << "### G4PhysListFactoryMessenger constructed" << G4endl;
47 thePhysList = pl;
48
49 theDir = new G4UIdirectory("/physics_lists/factory/");
50 theDir->SetGuidance("commands for configuration of physics lists.");
51
52 theRadDecay = new G4UIcommand("/physics_lists/factory/addRadioactiveDecay",this);
53 theRadDecay->SetGuidance("Enable radioactive decay.");
55
56 theOptical = new G4UIcommand("/physics_lists/factory/addOptical",this);
57 theOptical->SetGuidance("Enable optical physics.");
59
60 theThermal = new G4UIcommand("/physics_lists/factory/addThermal",this);
61 theThermal->SetGuidance("Enable special elastic scattering of thermal neutrons (Ekin < 4 eV).");
62 theThermal->SetGuidance("Important note: to be used only with HP-based physics lists!");
64
65 theNeutrino = new G4UIcommand("/physics_lists/factory/addNeutrino",this);
66 theNeutrino->SetGuidance("Enable physics processes for neutrino.");
68
69 theChargeEx = new G4UIcommand("/physics_lists/factory/addChargeExchange",this);
70 theChargeEx->SetGuidance("Enable charge exchange hadronic processes.");
72}
@ G4State_PreInit
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)

◆ ~G4PhysListFactoryMessenger()

G4PhysListFactoryMessenger::~G4PhysListFactoryMessenger ( )
override

Definition at line 74 of file G4PhysListFactoryMessenger.cc.

75{
76 delete theThermal;
77 delete theOptical;
78 delete theRadDecay;
79 delete theNeutrino;
80 delete theChargeEx;
81 delete theDir;
82}

Member Function Documentation

◆ SetNewValue()

void G4PhysListFactoryMessenger::SetNewValue ( G4UIcommand * aComm,
G4String aS )
overridevirtual

Reimplemented from G4UImessenger.

Definition at line 84 of file G4PhysListFactoryMessenger.cc.

85{
86 G4int ver = thePhysList->GetVerboseLevel();
87 if (aComm == theRadDecay) {
88 thePhysList->RegisterPhysics(new G4RadioactiveDecayPhysics(ver));
89 } else if (aComm == theOptical) {
90 thePhysList->RegisterPhysics(new G4OpticalPhysics(ver));
91 } else if (aComm == theThermal) {
92 thePhysList->RegisterPhysics(new G4ThermalNeutrons(ver));
93 } else if (aComm == theNeutrino) {
94 thePhysList->RegisterPhysics(new G4NeutrinoPhysics(ver));
95 } else if(aComm == theChargeEx) {
96 thePhysList->RegisterPhysics(new G4ChargeExchangePhysics(ver));
97 }
98}
int G4int
Definition G4Types.hh:85
void RegisterPhysics(G4VPhysicsConstructor *)

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