Geant4  10.02.p03
ML2PhysicsListMessenger Class Reference

#include <ML2PhysicsListMessenger.hh>

Inheritance diagram for ML2PhysicsListMessenger:
Collaboration diagram for ML2PhysicsListMessenger:

Public Member Functions

 ML2PhysicsListMessenger (ML2PhysicsList *)
 
 ~ML2PhysicsListMessenger ()
 
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

ML2PhysicsListpPhysicsList
 
G4UIdirectoryphysDir
 
G4UIcmdWithADoubleAndUnitgammaCutCmd
 
G4UIcmdWithADoubleAndUnitelectCutCmd
 
G4UIcmdWithADoubleAndUnitprotoCutCmd
 
G4UIcmdWithADoubleAndUnitallCutCmd
 
G4UIcmdWithAStringpListCmd
 
G4UIcmdWithAStringpackageListCmd
 

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 56 of file ML2PhysicsListMessenger.hh.

Constructor & Destructor Documentation

◆ ML2PhysicsListMessenger()

ML2PhysicsListMessenger::ML2PhysicsListMessenger ( ML2PhysicsList pPhys)

Definition at line 51 of file ML2PhysicsListMessenger.cc.

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

◆ ~ML2PhysicsListMessenger()

ML2PhysicsListMessenger::~ML2PhysicsListMessenger ( )

Definition at line 97 of file ML2PhysicsListMessenger.cc.

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

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 110 of file ML2PhysicsListMessenger.cc.

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

Member Data Documentation

◆ allCutCmd

G4UIcmdWithADoubleAndUnit* ML2PhysicsListMessenger::allCutCmd
private

Definition at line 73 of file ML2PhysicsListMessenger.hh.

◆ electCutCmd

G4UIcmdWithADoubleAndUnit* ML2PhysicsListMessenger::electCutCmd
private

Definition at line 71 of file ML2PhysicsListMessenger.hh.

◆ gammaCutCmd

G4UIcmdWithADoubleAndUnit* ML2PhysicsListMessenger::gammaCutCmd
private

Definition at line 70 of file ML2PhysicsListMessenger.hh.

◆ packageListCmd

G4UIcmdWithAString* ML2PhysicsListMessenger::packageListCmd
private

Definition at line 75 of file ML2PhysicsListMessenger.hh.

◆ physDir

G4UIdirectory* ML2PhysicsListMessenger::physDir
private

Definition at line 69 of file ML2PhysicsListMessenger.hh.

◆ pListCmd

G4UIcmdWithAString* ML2PhysicsListMessenger::pListCmd
private

Definition at line 74 of file ML2PhysicsListMessenger.hh.

◆ pPhysicsList

ML2PhysicsList* ML2PhysicsListMessenger::pPhysicsList
private

Definition at line 67 of file ML2PhysicsListMessenger.hh.

◆ protoCutCmd

G4UIcmdWithADoubleAndUnit* ML2PhysicsListMessenger::protoCutCmd
private

Definition at line 72 of file ML2PhysicsListMessenger.hh.


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