QwGeant4
QweakSimPionWallMessenger.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // File QweakSimPionWallMessenger.cc
4 // Revision 1.0
5 // Date 07/23/2012
6 // Author James Dowd
7 //
8 //=============================================================================
9 
10 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
11 
13 
14 // user includes
15 #include "QweakSimPionWall.hh"
17 
18 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
19 
21 :myPionWall(thePionWall)
22 {
23  PionWallDir = new G4UIdirectory("/PionWall/");
24  PionWallDir -> SetGuidance("Pion Wall control.");
25 
26  //--------------------------------------------------
27 
28  PionWall_SetThicknessInX_Cmd = new G4UIcmdWithADoubleAndUnit("/PionWall/SetThicknessInX",this);
29  PionWall_SetThicknessInX_Cmd->SetGuidance("Set the thickness of the Pion Wall in the X direction");
30  PionWall_SetThicknessInX_Cmd->SetParameterName("Size",true);
31  PionWall_SetThicknessInX_Cmd->SetUnitCategory("Length");
32  PionWall_SetThicknessInX_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
33 
34  //--------------------------------------------------
35 
36  PionWall_SetThicknessInY_Cmd = new G4UIcmdWithADoubleAndUnit("/PionWall/SetThicknessInY",this);
37  PionWall_SetThicknessInY_Cmd->SetGuidance("Set the thickness of the Pion Wall in the Y direction");
38  PionWall_SetThicknessInY_Cmd->SetParameterName("Size",true);
39  PionWall_SetThicknessInY_Cmd->SetUnitCategory("Length");
40  PionWall_SetThicknessInY_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
41 
42  //--------------------------------------------------
43 
44  PionWall_SetThicknessInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/PionWall/SetThicknessInZ",this);
45  PionWall_SetThicknessInZ_Cmd->SetGuidance("Set the thickness of the Pion Wall in the Z direction");
46  PionWall_SetThicknessInZ_Cmd->SetParameterName("Size",true);
47  PionWall_SetThicknessInZ_Cmd->SetUnitCategory("Length");
48  PionWall_SetThicknessInZ_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
49 
50  //-------------------------------------------------
51 
52  PionWall_SetOffsetX_Cmd = new G4UIcmdWithADoubleAndUnit("/PionWall/SetPositionOffsetX",this);
53  PionWall_SetOffsetX_Cmd->SetGuidance("Set the position offset of the Pion Wall in the X direction");
54  PionWall_SetOffsetX_Cmd->SetParameterName("Size",true);
55  PionWall_SetOffsetX_Cmd->SetUnitCategory("Length");
56  PionWall_SetOffsetX_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
57 
58  //-------------------------------------------------
59 
60  PionWall_SetOffsetY_Cmd = new G4UIcmdWithADoubleAndUnit("/PionWall/SetPositionOffsetY",this);
61  PionWall_SetOffsetY_Cmd->SetGuidance("Set the position offset of the Pion Wall in the Y direction");
62  PionWall_SetOffsetY_Cmd->SetParameterName("Size",true);
63  PionWall_SetOffsetY_Cmd->SetUnitCategory("Length");
64  PionWall_SetOffsetY_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
65 
66  //-------------------------------------------------
67 
68  PionWall_SetOffsetZ_Cmd = new G4UIcmdWithADoubleAndUnit("/PionWall/SetPositionOffsetZ",this);
69  PionWall_SetOffsetZ_Cmd->SetGuidance("Set the position offset of the Pion Wall in the Z direction");
70  PionWall_SetOffsetZ_Cmd->SetParameterName("Size",true);
71  PionWall_SetOffsetZ_Cmd->SetUnitCategory("Length");
72  PionWall_SetOffsetZ_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
73 
74  //-------------------------------------------------
75 
76  PionWall_SetEnabled_Cmd = new G4UIcmdWithoutParameter("/PionWall/Enable",this);
77  PionWall_SetEnabled_Cmd->SetGuidance("Enables the Pion Wall");
78  PionWall_SetEnabled_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
79 
80  //-------------------------------------------------
81 
82  PionWall_SetDisabled_Cmd = new G4UIcmdWithoutParameter("/PionWall/Disable",this);
83  PionWall_SetDisabled_Cmd->SetGuidance("Disables the Pion Wall");
84  PionWall_SetDisabled_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
85 
86 
87 }
88 
90 {
91 
100 
101  if (PionWallDir) delete PionWallDir;
102 }
103 
104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
105 
106 void QweakSimPionWallMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
107 {
108  G4cout << "#### Messenger: QweakSimPionWallMessenger::SetNewValue() " << newValue << G4endl;
109 
110  if ( command == PionWall_SetThicknessInX_Cmd )
111  {
112  G4cout << "#### Messenger: Setting Pion Wall X thickness to " << newValue << G4endl;
113 
114  myPionWall->SetPionWall_LengthInX(PionWall_SetThicknessInX_Cmd->GetNewDoubleValue(newValue));
115  }
116 
117  //---------------------------------------------------------------
118 
119  if ( command == PionWall_SetThicknessInY_Cmd )
120  {
121  G4cout << "#### Messenger: Setting Pion Wall Y thickness to " << newValue << G4endl;
122 
123  myPionWall->SetPionWall_LengthInY(PionWall_SetThicknessInY_Cmd->GetNewDoubleValue(newValue));
124  }
125 
126  //---------------------------------------------------------------
127 
128  if ( command == PionWall_SetThicknessInZ_Cmd )
129  {
130  G4cout << "#### Messenger: Setting Pion Wall Z thickness to " << newValue << G4endl;
131 
132  myPionWall->SetPionWall_LengthInZ(PionWall_SetThicknessInZ_Cmd->GetNewDoubleValue(newValue));
133  }
134 
135  //---------------------------------------------------------------
136 
137  if ( command == PionWall_SetOffsetX_Cmd )
138  {
139  G4cout << "#### Messenger: Setting Pion Wall X Position Offset to " << newValue << G4endl;
140 
142  }
143 
144  //---------------------------------------------------------------
145 
146  if ( command == PionWall_SetOffsetY_Cmd )
147  {
148  G4cout << "#### Messenger: Setting Pion Wall Y Position Offset to " << newValue << G4endl;
149 
151  }
152 
153  //---------------------------------------------------------------
154 
155  if ( command == PionWall_SetOffsetZ_Cmd )
156  {
157  G4cout << "#### Messenger: Setting Pion Wall Z Position Offset to " << newValue << G4endl;
158 
160  }
161 
162  //---------------------------------------------------------------
163 
164  if ( command == PionWall_SetEnabled_Cmd )
165  {
166  G4cout << "#### Messenger: Pion Wall ENABLED" << G4endl;
167 
169  }
170 
171  if ( command == PionWall_SetDisabled_Cmd )
172  {
173  G4cout << "#### Messenger: Pion Wall DISABLED" << G4endl;
174 
176  }
177 
178  //---------------------------------------------------------------
179 }
180 
void SetNewValue(G4UIcommand *, G4String)
G4UIcmdWithADoubleAndUnit * PionWall_SetThicknessInY_Cmd
G4UIcmdWithoutParameter * PionWall_SetEnabled_Cmd
void SetPionWall_LengthInX(G4double dim)
G4UIcmdWithADoubleAndUnit * PionWall_SetThicknessInZ_Cmd
void SetPionWall_LengthInZ(G4double dim)
void SetPionWall_Position_Offset_X(G4double xOff)
void SetPionWall_Position_Offset_Y(G4double yOff)
void SetPionWall_Position_Offset_Z(G4double zOff)
G4UIcmdWithADoubleAndUnit * PionWall_SetOffsetY_Cmd
QweakSimPionWallMessenger(QweakSimPionWall *)
G4UIcmdWithADoubleAndUnit * PionWall_SetOffsetZ_Cmd
G4UIcmdWithoutParameter * PionWall_SetDisabled_Cmd
G4UIcmdWithADoubleAndUnit * PionWall_SetOffsetX_Cmd
void SetPionWall_LengthInY(G4double dim)
G4UIcmdWithADoubleAndUnit * PionWall_SetThicknessInX_Cmd