Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaKnifePhysicsListMessenger Class Reference

#include <GammaKnifePhysicsListMessenger.hh>

Inheritance diagram for GammaKnifePhysicsListMessenger:
Collaboration diagram for GammaKnifePhysicsListMessenger:

Public Member Functions

 GammaKnifePhysicsListMessenger (GammaKnifePhysicsList *physList)
 
 ~GammaKnifePhysicsListMessenger ()
 
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 42 of file GammaKnifePhysicsListMessenger.hh.

Constructor & Destructor Documentation

GammaKnifePhysicsListMessenger::GammaKnifePhysicsListMessenger ( GammaKnifePhysicsList physList)

Definition at line 37 of file GammaKnifePhysicsListMessenger.cc.

38 :physicsList(physList)
39 {
40  listDir = new G4UIdirectory("/Physics/");
41  // Building modular PhysicsList
42 
43  physicsListCmd = new G4UIcmdWithAString("/Physics/addPhysics",this);
44  physicsListCmd->SetGuidance("Add chunks of PhysicsList.");
45  physicsListCmd->SetParameterName("physList",false);
47 
48  gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setGCut",this);
49  gammaCutCmd->SetGuidance("Set gamma cut.");
50  gammaCutCmd->SetParameterName("Gcut",false);
51  gammaCutCmd->SetUnitCategory("Length");
52  gammaCutCmd->SetRange("Gcut>0.0");
54 
55  electCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setECut",this);
56  electCutCmd->SetGuidance("Set electron cut.");
57  electCutCmd->SetParameterName("Ecut",false);
58  electCutCmd->SetUnitCategory("Length");
59  electCutCmd->SetRange("Ecut>0.0");
61 
62  protoCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setPCut",this);
63  protoCutCmd->SetGuidance("Set positron cut.");
64  protoCutCmd->SetParameterName("Pcut",false);
65  protoCutCmd->SetUnitCategory("Length");
66  protoCutCmd->SetRange("Pcut>0.0");
68 
69  allCutCmd = new G4UIcmdWithADoubleAndUnit("/Physics/setCuts",this);
70  allCutCmd->SetGuidance("Set cut for all.");
71  allCutCmd->SetParameterName("cut",false);
72  allCutCmd->SetUnitCategory("Length");
73  allCutCmd->SetRange("cut>0.0");
75 
76 
77 }
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:

GammaKnifePhysicsListMessenger::~GammaKnifePhysicsListMessenger ( )

Definition at line 79 of file GammaKnifePhysicsListMessenger.cc.

80 {
81  delete physicsListCmd;
82  delete gammaCutCmd;
83  delete electCutCmd;
84  delete protoCutCmd;
85  delete allCutCmd;
86  delete listDir;
87 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 89 of file GammaKnifePhysicsListMessenger.cc.

90 {
91  if (command == physicsListCmd)
92  {
93  physicsList->AddPhysicsList(newValue);
94  }
95 
96  else if( command == gammaCutCmd )
97  { physicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
98 
99  else if( command == electCutCmd )
100  { physicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
101 
102  else if( command == protoCutCmd )
103  { physicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
104 
105  else if( command == allCutCmd )
106  {
107  G4double cut = allCutCmd->GetNewDoubleValue(newValue);
108  physicsList->SetCutForGamma(cut);
109  physicsList->SetCutForElectron(cut);
110  physicsList->SetCutForPositron(cut);
111  }
112 
113 }
static G4double GetNewDoubleValue(const char *paramString)
void AddPhysicsList(const G4String &name)
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: