Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
exrdmPhysicsListMessenger Class Reference

#include <exrdmPhysicsListMessenger.hh>

Inheritance diagram for exrdmPhysicsListMessenger:
G4UImessenger

Public Member Functions

 exrdmPhysicsListMessenger (exrdmPhysicsList *)
 
virtual ~exrdmPhysicsListMessenger ()
 
virtual 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
 

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
 

Detailed Description

Definition at line 47 of file exrdmPhysicsListMessenger.hh.

Constructor & Destructor Documentation

exrdmPhysicsListMessenger::exrdmPhysicsListMessenger ( exrdmPhysicsList pPhys)

Definition at line 43 of file exrdmPhysicsListMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcommand::SetRange(), and G4UIcmdWithADoubleAndUnit::SetUnitCategory().

44 :G4UImessenger(),
45  fPPhysicsList(pPhys),
46  fPhysDir(0),
47  fGammaCutCmd(0),
48  fElectCutCmd(0),
49  fProtoCutCmd(0),
50  fAllCutCmd(0),
51  fMCutCmd(0),
52  fECutCmd(0),
53  fPListCmd(0)
54 {
55  fPhysDir = new G4UIdirectory("/exrdm/phys/");
56  fPhysDir->SetGuidance("physics control.");
57 
58  fGammaCutCmd = new G4UIcmdWithADoubleAndUnit("/exrdm/phys/setGCut",this);
59  fGammaCutCmd->SetGuidance("Set gamma cut.");
60  fGammaCutCmd->SetParameterName("Gcut",false);
61  fGammaCutCmd->SetUnitCategory("Length");
62  fGammaCutCmd->SetRange("Gcut>0.0");
64 
65  fElectCutCmd = new G4UIcmdWithADoubleAndUnit("/exrdm/phys/setECut",this);
66  fElectCutCmd->SetGuidance("Set electron cut.");
67  fElectCutCmd->SetParameterName("Ecut",false);
68  fElectCutCmd->SetUnitCategory("Length");
69  fElectCutCmd->SetRange("Ecut>0.0");
71 
72  fProtoCutCmd = new G4UIcmdWithADoubleAndUnit("/exrdm/phys/setPCut",this);
73  fProtoCutCmd->SetGuidance("Set positron cut.");
74  fProtoCutCmd->SetParameterName("Pcut",false);
75  fProtoCutCmd->SetUnitCategory("Length");
76  fProtoCutCmd->SetRange("Pcut>0.0");
78 
79  fAllCutCmd = new G4UIcmdWithADoubleAndUnit("/exrdm/phys/setCuts",this);
80  fAllCutCmd->SetGuidance("Set cut for all.");
81  fAllCutCmd->SetParameterName("cut",false);
82  fAllCutCmd->SetUnitCategory("Length");
83  fAllCutCmd->SetRange("cut>0.0");
85 
86  fECutCmd = new G4UIcmdWithADoubleAndUnit("/exrdm/phys/TargetCuts",this);
87  fECutCmd->SetGuidance("Set cuts for the target");
88  fECutCmd->SetParameterName("Ecut",false);
89  fECutCmd->SetUnitCategory("Length");
90  fECutCmd->SetRange("Ecut>0.0");
92 
93  fMCutCmd = new G4UIcmdWithADoubleAndUnit("/exrdm/phys/DetectorCuts",this);
94  fMCutCmd->SetGuidance("Set cuts for the Detector");
95  fMCutCmd->SetParameterName("Ecut",false);
96  fMCutCmd->SetUnitCategory("Length");
97  fMCutCmd->SetRange("Ecut>0.0");
99 
100  fPListCmd = new G4UIcmdWithAString("/exrdm/phys/SelectPhysics",this);
101  fPListCmd->SetGuidance("Select modula physics list.");
102  fPListCmd->SetParameterName("PList",false);
104 }
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:225
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
exrdmPhysicsListMessenger::~exrdmPhysicsListMessenger ( )
virtual

Definition at line 108 of file exrdmPhysicsListMessenger.cc.

109 {
110  delete fPhysDir;
111  delete fGammaCutCmd;
112  delete fElectCutCmd;
113  delete fProtoCutCmd;
114  delete fAllCutCmd;
115  delete fPListCmd;
116  delete fECutCmd;
117  delete fMCutCmd;
118 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 122 of file exrdmPhysicsListMessenger.cc.

References G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), exrdmPhysicsList::SelectPhysicsList(), exrdmPhysicsList::SetCutForElectron(), exrdmPhysicsList::SetCutForGamma(), exrdmPhysicsList::SetCutForPositron(), exrdmPhysicsList::SetDetectorCut(), and exrdmPhysicsList::SetTargetCut().

124 {
125  if( command == fGammaCutCmd )
126  { fPPhysicsList->SetCutForGamma(fGammaCutCmd->GetNewDoubleValue(newValue));}
127 
128  if( command == fElectCutCmd )
129  { fPPhysicsList->SetCutForElectron(fElectCutCmd->GetNewDoubleValue(newValue));}
130 
131  if( command == fProtoCutCmd )
132  { fPPhysicsList->SetCutForPositron(fProtoCutCmd->GetNewDoubleValue(newValue));}
133 
134  if( command == fAllCutCmd )
135  {
136  G4double cut = fAllCutCmd->GetNewDoubleValue(newValue);
137  fPPhysicsList->SetCutForGamma(cut);
138  fPPhysicsList->SetCutForElectron(cut);
139  fPPhysicsList->SetCutForPositron(cut);
140  }
141 
142  if( command == fECutCmd )
143  { fPPhysicsList->SetTargetCut(fECutCmd->GetNewDoubleValue(newValue));}
144 
145  if( command == fMCutCmd )
146  { fPPhysicsList->SetDetectorCut(fMCutCmd->GetNewDoubleValue(newValue));}
147 
148  if( command == fPListCmd )
149  { fPPhysicsList->SelectPhysicsList(newValue);}
150 }
static G4double GetNewDoubleValue(const char *paramString)
void SetTargetCut(G4double val)
void SetCutForElectron(G4double)
void SetDetectorCut(G4double val)
void SetCutForGamma(G4double)
void SetCutForPositron(G4double)
double G4double
Definition: G4Types.hh:76
void SelectPhysicsList(const G4String &name)

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