Geant4  10.02.p03
IORTPhysicsListMessenger Class Reference

#include <IORTPhysicsListMessenger.hh>

Inheritance diagram for IORTPhysicsListMessenger:
Collaboration diagram for IORTPhysicsListMessenger:

Public Member Functions

 IORTPhysicsListMessenger (IORTPhysicsList *)
 
 ~IORTPhysicsListMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

IORTPhysicsListpPhysicsList
 
G4UIdirectoryphysDir
 
G4UIcmdWithADoubleAndUnitgammaCutCmd
 
G4UIcmdWithADoubleAndUnitelectCutCmd
 
G4UIcmdWithADoubleAndUnitprotoCutCmd
 
G4UIcmdWithADoubleAndUnitallCutCmd
 
G4UIcmdWithADoubleAndUnitallDetectorCmd
 
G4UIcmdWithAStringpListCmd
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (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
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 53 of file IORTPhysicsListMessenger.hh.

Constructor & Destructor Documentation

◆ IORTPhysicsListMessenger()

IORTPhysicsListMessenger::IORTPhysicsListMessenger ( IORTPhysicsList pPhys)

Definition at line 49 of file IORTPhysicsListMessenger.cc.

50 :pPhysicsList(pPhys)
51 {
52  physDir = new G4UIdirectory("/Physics/");
53  physDir->SetGuidance("Commands to activate physics models and set cuts");
54 
55  gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setGCut",this);
56  gammaCutCmd->SetGuidance("Set gamma cut.");
57  gammaCutCmd->SetParameterName("Gcut",false);
58  gammaCutCmd->SetUnitCategory("Length");
59  gammaCutCmd->SetRange("Gcut>0.0");
61 
62  electCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setECut",this);
63  electCutCmd->SetGuidance("Set electron cut.");
64  electCutCmd->SetParameterName("Ecut",false);
65  electCutCmd->SetUnitCategory("Length");
66  electCutCmd->SetRange("Ecut>0.0");
68 
69  protoCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setPCut",this);
70  protoCutCmd->SetGuidance("Set positron cut.");
71  protoCutCmd->SetParameterName("Pcut",false);
72  protoCutCmd->SetUnitCategory("Length");
73  protoCutCmd->SetRange("Pcut>0.0");
75 
76  allCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setCuts",this);
77  allCutCmd->SetGuidance("Set cut for all.");
78  allCutCmd->SetParameterName("cut",false);
79  allCutCmd->SetUnitCategory("Length");
80  allCutCmd->SetRange("cut>0.0");
82 
83  allDetectorCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setDetectorCuts",this);
84  allDetectorCmd->SetGuidance("Set cut for all. into Detector");
85  allDetectorCmd->SetParameterName("cut",false);
87  allDetectorCmd->SetRange("cut>0.0");
89 
90  pListCmd = new G4UIcmdWithAString("/Physics/addPhysics",this);
91  pListCmd->SetGuidance("Add physics list.");
92  pListCmd->SetParameterName("PList",false);
94 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * allCutCmd
G4UIcmdWithADoubleAndUnit * electCutCmd
void SetUnitCategory(const char *unitCategory)
G4UIcmdWithADoubleAndUnit * protoCutCmd
G4UIcmdWithADoubleAndUnit * allDetectorCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithADoubleAndUnit * gammaCutCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~IORTPhysicsListMessenger()

IORTPhysicsListMessenger::~IORTPhysicsListMessenger ( )

Definition at line 97 of file IORTPhysicsListMessenger.cc.

98 {
99  delete gammaCutCmd;
100  delete electCutCmd;
101  delete protoCutCmd;
102  delete allCutCmd;
103  delete allDetectorCmd;
104  delete pListCmd;
105  delete physDir;
106 }
G4UIcmdWithADoubleAndUnit * allCutCmd
G4UIcmdWithADoubleAndUnit * electCutCmd
G4UIcmdWithADoubleAndUnit * protoCutCmd
G4UIcmdWithADoubleAndUnit * allDetectorCmd
G4UIcmdWithADoubleAndUnit * gammaCutCmd

Member Function Documentation

◆ SetNewValue()

void IORTPhysicsListMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 109 of file IORTPhysicsListMessenger.cc.

111 {
112  if( command == gammaCutCmd )
114 
115  else if( command == electCutCmd )
117 
118  else if( command == protoCutCmd )
120 
121  else if( command == allCutCmd )
122  {
123  G4double cut = allCutCmd->GetNewDoubleValue(newValue);
127  }
128  else if( command == allDetectorCmd)
129  {
130  G4double cut = allDetectorCmd -> GetNewDoubleValue(newValue);
131  pPhysicsList -> SetDetectorCut(cut);
132  }
133  else if( command == pListCmd )
134  { pPhysicsList->AddPhysicsList(newValue);}
135 }
G4UIcmdWithADoubleAndUnit * allCutCmd
void AddPhysicsList(const G4String &name)
G4UIcmdWithADoubleAndUnit * electCutCmd
static G4double GetNewDoubleValue(const char *paramString)
void SetCutForPositron(G4double)
G4UIcmdWithADoubleAndUnit * protoCutCmd
G4UIcmdWithADoubleAndUnit * allDetectorCmd
void SetCutForElectron(G4double)
void SetCutForGamma(G4double)
double G4double
Definition: G4Types.hh:76
G4UIcmdWithADoubleAndUnit * gammaCutCmd
Here is the call graph for this function:

Member Data Documentation

◆ allCutCmd

G4UIcmdWithADoubleAndUnit* IORTPhysicsListMessenger::allCutCmd
private

Definition at line 70 of file IORTPhysicsListMessenger.hh.

◆ allDetectorCmd

G4UIcmdWithADoubleAndUnit* IORTPhysicsListMessenger::allDetectorCmd
private

Definition at line 71 of file IORTPhysicsListMessenger.hh.

◆ electCutCmd

G4UIcmdWithADoubleAndUnit* IORTPhysicsListMessenger::electCutCmd
private

Definition at line 68 of file IORTPhysicsListMessenger.hh.

◆ gammaCutCmd

G4UIcmdWithADoubleAndUnit* IORTPhysicsListMessenger::gammaCutCmd
private

Definition at line 67 of file IORTPhysicsListMessenger.hh.

◆ physDir

G4UIdirectory* IORTPhysicsListMessenger::physDir
private

Definition at line 66 of file IORTPhysicsListMessenger.hh.

◆ pListCmd

G4UIcmdWithAString* IORTPhysicsListMessenger::pListCmd
private

Definition at line 72 of file IORTPhysicsListMessenger.hh.

◆ pPhysicsList

IORTPhysicsList* IORTPhysicsListMessenger::pPhysicsList
private

Definition at line 64 of file IORTPhysicsListMessenger.hh.

◆ protoCutCmd

G4UIcmdWithADoubleAndUnit* IORTPhysicsListMessenger::protoCutCmd
private

Definition at line 69 of file IORTPhysicsListMessenger.hh.


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