Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

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 ( 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);
86  allDetectorCmd->SetUnitCategory("Length");
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)
void SetUnitCategory(const char *unitCategory)
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:240
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)

Here is the call graph for this function:

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 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 109 of file IORTPhysicsListMessenger.cc.

111 {
112  if( command == gammaCutCmd )
113  { pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
114 
115  else if( command == electCutCmd )
116  { pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
117 
118  else if( command == protoCutCmd )
119  { pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
120 
121  else if( command == allCutCmd )
122  {
123  G4double cut = allCutCmd->GetNewDoubleValue(newValue);
124  pPhysicsList->SetCutForGamma(cut);
125  pPhysicsList->SetCutForElectron(cut);
126  pPhysicsList->SetCutForPositron(cut);
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 }
void AddPhysicsList(const G4String &name)
static G4double GetNewDoubleValue(const char *paramString)
void SetCutForPositron(G4double)
void SetCutForElectron(G4double)
void SetCutForGamma(G4double)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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