LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
PhysicsListMessenger Class Reference

#include "PhysicsListMessenger.hh"

Inheritance diagram for PhysicsListMessenger:

Public Member Functions

 PhysicsListMessenger (PhysicsList *)
 
 ~PhysicsListMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Attributes

PhysicsListpPhysicsList
 
G4UIdirectory * physDir
 
G4UIcmdWithADoubleAndUnit * gammaCutCmd
 
G4UIcmdWithADoubleAndUnit * electCutCmd
 
G4UIcmdWithADoubleAndUnit * protoCutCmd
 
G4UIcmdWithADoubleAndUnit * allCutCmd
 
G4UIcmdWithAString * pListCmd
 

Detailed Description

Definition at line 44 of file PhysicsListMessenger.hh.

Constructor & Destructor Documentation

PhysicsListMessenger::PhysicsListMessenger ( PhysicsList pPhys)

Definition at line 40 of file PhysicsListMessenger.cc.

References allCutCmd, electCutCmd, gammaCutCmd, physDir, pListCmd, and protoCutCmd.

41 :pPhysicsList(pPhys)
42 {
43  physDir = new G4UIdirectory("/testem/phys/");
44  physDir->SetGuidance("physics list commands");
45 
46  gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
47  gammaCutCmd->SetGuidance("Set gamma cut.");
48  gammaCutCmd->SetParameterName("Gcut",false);
49  gammaCutCmd->SetUnitCategory("Length");
50  gammaCutCmd->SetRange("Gcut>0.0");
51  gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
52 
53  electCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
54  electCutCmd->SetGuidance("Set electron cut.");
55  electCutCmd->SetParameterName("Ecut",false);
56  electCutCmd->SetUnitCategory("Length");
57  electCutCmd->SetRange("Ecut>0.0");
58  electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
59 
60  protoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
61  protoCutCmd->SetGuidance("Set positron cut.");
62  protoCutCmd->SetParameterName("Pcut",false);
63  protoCutCmd->SetUnitCategory("Length");
64  protoCutCmd->SetRange("Pcut>0.0");
65  protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
66 
67  allCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCuts",this);
68  allCutCmd->SetGuidance("Set cut for all.");
69  allCutCmd->SetParameterName("cut",false);
70  allCutCmd->SetUnitCategory("Length");
71  allCutCmd->SetRange("cut>0.0");
72  allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
73 
74  pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
75  pListCmd->SetGuidance("Add modula physics list.");
76  pListCmd->SetParameterName("PList",false);
77  pListCmd->AvailableForStates(G4State_PreInit);
78 }
G4UIcmdWithADoubleAndUnit * electCutCmd
G4UIcmdWithAString * pListCmd
G4UIcmdWithADoubleAndUnit * protoCutCmd
G4UIcmdWithADoubleAndUnit * gammaCutCmd
G4UIcmdWithADoubleAndUnit * allCutCmd
PhysicsListMessenger::~PhysicsListMessenger ( )

Definition at line 82 of file PhysicsListMessenger.cc.

References allCutCmd, electCutCmd, gammaCutCmd, physDir, pListCmd, and protoCutCmd.

83 {
84  delete gammaCutCmd;
85  delete electCutCmd;
86  delete protoCutCmd;
87  delete allCutCmd;
88  delete pListCmd;
89  delete physDir;
90 }
G4UIcmdWithADoubleAndUnit * electCutCmd
G4UIcmdWithAString * pListCmd
G4UIcmdWithADoubleAndUnit * protoCutCmd
G4UIcmdWithADoubleAndUnit * gammaCutCmd
G4UIcmdWithADoubleAndUnit * allCutCmd

Member Function Documentation

void PhysicsListMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Definition at line 94 of file PhysicsListMessenger.cc.

References PhysicsList::AddPhysicsList(), allCutCmd, electCutCmd, gammaCutCmd, pListCmd, pPhysicsList, protoCutCmd, PhysicsList::SetCutForElectron(), PhysicsList::SetCutForGamma(), and PhysicsList::SetCutForPositron().

96 {
97  if( command == gammaCutCmd )
98  { pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
99 
100  if( command == electCutCmd )
101  { pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
102 
103  if( command == protoCutCmd )
104  { pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
105 
106  if( command == allCutCmd )
107  {
108  G4double cut = allCutCmd->GetNewDoubleValue(newValue);
112  }
113 
114  if( command == pListCmd )
115  { pPhysicsList->AddPhysicsList(newValue);}
116 }
G4UIcmdWithADoubleAndUnit * electCutCmd
G4UIcmdWithAString * pListCmd
G4UIcmdWithADoubleAndUnit * protoCutCmd
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
void SetCutForGamma(G4double)
Definition: PhysicsList.cc:231
void SetCutForElectron(G4double)
Definition: PhysicsList.cc:239
void SetCutForPositron(G4double)
Definition: PhysicsList.cc:247
G4UIcmdWithADoubleAndUnit * gammaCutCmd
G4UIcmdWithADoubleAndUnit * allCutCmd

Member Data Documentation

G4UIcmdWithADoubleAndUnit* PhysicsListMessenger::allCutCmd
private
G4UIcmdWithADoubleAndUnit* PhysicsListMessenger::electCutCmd
private
G4UIcmdWithADoubleAndUnit* PhysicsListMessenger::gammaCutCmd
private
G4UIdirectory* PhysicsListMessenger::physDir
private

Definition at line 57 of file PhysicsListMessenger.hh.

Referenced by PhysicsListMessenger(), and ~PhysicsListMessenger().

G4UIcmdWithAString* PhysicsListMessenger::pListCmd
private
PhysicsList* PhysicsListMessenger::pPhysicsList
private

Definition at line 55 of file PhysicsListMessenger.hh.

Referenced by SetNewValue().

G4UIcmdWithADoubleAndUnit* PhysicsListMessenger::protoCutCmd
private

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