QwGeant4
QweakSimTriggerScintillatorMessenger Class Reference

Scans the input file for /Scintillator/xyz commands. More...

#include <QweakSimTriggerScintillatorMessenger.hh>

Inherits G4UImessenger.

+ Collaboration diagram for QweakSimTriggerScintillatorMessenger:

Public Member Functions

 QweakSimTriggerScintillatorMessenger (QweakSimTriggerScintillator *, G4int pkg=0)
 
 ~QweakSimTriggerScintillatorMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Attributes

QweakSimTriggerScintillatormyTriggerScintillator
 
G4UIdirectory * Dir
 
G4int fPackage
 
G4UIdirectory * DirPerPackage
 
G4UIcmdWithAString * ContainerMatCmd
 
G4UIcmdWithAString * DetectorMatCmd
 
G4UIcmdWithADoubleAndUnit * ContainerXPositionCmd
 
G4UIcmdWithADoubleAndUnit * ContainerYPositionCmd
 
G4UIcmdWithADoubleAndUnit * ContainerZPositionCmd
 
G4UIcmdWithADoubleAndUnit * ContainerXPosition_Pkg_Cmd
 
G4UIcmdWithADoubleAndUnit * ContainerYPosition_Pkg_Cmd
 
G4UIcmdWithADoubleAndUnit * ContainerZPosition_Pkg_Cmd
 
G4UIcmdWithADoubleAndUnit * ContainerThicknessCmd
 
G4UIcmdWithADoubleAndUnit * TiltingAngleCmd
 

Detailed Description

Scans the input file for /Scintillator/xyz commands.

Placeholder for a long explaination

Definition at line 61 of file QweakSimTriggerScintillatorMessenger.hh.

Constructor & Destructor Documentation

QweakSimTriggerScintillatorMessenger::QweakSimTriggerScintillatorMessenger ( QweakSimTriggerScintillator theTriggerScintillator,
G4int  pkg = 0 
)

Definition at line 45 of file QweakSimTriggerScintillatorMessenger.cc.

References ContainerMatCmd, ContainerThicknessCmd, ContainerXPosition_Pkg_Cmd, ContainerXPositionCmd, ContainerYPosition_Pkg_Cmd, ContainerYPositionCmd, ContainerZPosition_Pkg_Cmd, ContainerZPositionCmd, DetectorMatCmd, Dir, DirPerPackage, fPackage, and TiltingAngleCmd.

46 :myTriggerScintillator(theTriggerScintillator), fPackage(pkg)
47 {
48 
49  Dir = new G4UIdirectory("/TriggerScintillator/");
50  Dir -> SetGuidance("Trigger Scintillator Detector control.");
51 
52  ContainerThicknessCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetThickness",this);
53  ContainerThicknessCmd->SetGuidance("Set the thickness (length in Z) of the TriggerScintillator container");
54  ContainerThicknessCmd->SetParameterName("Size",true);
55  ContainerThicknessCmd->SetUnitCategory("Length");
56  ContainerThicknessCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
57 
58  ContainerZPositionCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetCenterPositionInZ",this);
59  ContainerZPositionCmd->SetGuidance("Set the Z position of the TriggerScintillator container center");
60  ContainerZPositionCmd->SetParameterName("Size",true);
61  ContainerZPositionCmd->SetUnitCategory("Length");
62  ContainerZPositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
63 
64  ContainerYPositionCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetCenterPositionInY",this);
65  ContainerYPositionCmd->SetGuidance("Set the Y position of the TriggerScintillator container center");
66  ContainerYPositionCmd->SetParameterName("Size",true);
67  ContainerYPositionCmd->SetUnitCategory("Length");
68  ContainerYPositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
69 
70  ContainerXPositionCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetCenterPositionInX",this);
71  ContainerXPositionCmd->SetGuidance("Set the X position of the TriggerScintillator container center");
72  ContainerXPositionCmd->SetParameterName("Size",true);
73  ContainerXPositionCmd->SetUnitCategory("Length");
74  ContainerXPositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
75 
76  TiltingAngleCmd = new G4UIcmdWithADoubleAndUnit("/TriggerScintillator/SetTiltingAngle",this);
77  TiltingAngleCmd->SetGuidance("Set the tilting angle of the TriggerScintillator Detector");
78  TiltingAngleCmd->SetParameterName("Angle",true);
79  TiltingAngleCmd->SetDefaultUnit("degree");
80  TiltingAngleCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
81 
82  ContainerMatCmd = new G4UIcmdWithAString("/TriggerScintillator/SetContainerMaterial",this);
83  ContainerMatCmd->SetGuidance("Select Material of the TriggerScintillator Container.");
84  ContainerMatCmd->SetParameterName("choice",false);
85  ContainerMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
86 
87  DetectorMatCmd = new G4UIcmdWithAString("/TriggerScintillator/SetScintillatorMaterial",this);
88  DetectorMatCmd->SetGuidance("Select Material of the TriggerScintillator Detector.");
89  DetectorMatCmd->SetParameterName("choice",false);
90  DetectorMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
91 
92  //-------------------------Individual TS Control-----------------------------------------
93  G4String DirPerPackage_name = "/TriggerScintillator/TriggerScintillator" + G4UIcommand::ConvertToString(fPackage+1);
94  DirPerPackage = new G4UIdirectory(G4String(DirPerPackage_name + "/"));
95  DirPerPackage -> SetGuidance("Individual TriggerScintillator detector control.");
96 
97 
98  ContainerZPosition_Pkg_Cmd = new G4UIcmdWithADoubleAndUnit(G4String(DirPerPackage_name + "/SetCenterPositionInZ"),this);
99  ContainerZPosition_Pkg_Cmd->SetGuidance("Set the Z position of the TriggerScintillator container center");
100  ContainerZPosition_Pkg_Cmd->SetParameterName("Size",true);
101  ContainerZPosition_Pkg_Cmd->SetUnitCategory("Length");
102  ContainerZPosition_Pkg_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
103 
104  ContainerYPosition_Pkg_Cmd = new G4UIcmdWithADoubleAndUnit(G4String(DirPerPackage_name + "/SetCenterPositionInY"),this);
105  ContainerYPosition_Pkg_Cmd->SetGuidance("Set the Y position of the TriggerScintillator container center");
106  ContainerYPosition_Pkg_Cmd->SetParameterName("Size",true);
107  ContainerYPosition_Pkg_Cmd->SetUnitCategory("Length");
108  ContainerYPosition_Pkg_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
109 
110  ContainerXPosition_Pkg_Cmd = new G4UIcmdWithADoubleAndUnit(G4String(DirPerPackage_name + "/SetCenterPositionInX"),this);
111  ContainerXPosition_Pkg_Cmd->SetGuidance("Set the X position of the TriggerScintillator container center");
112  ContainerXPosition_Pkg_Cmd->SetParameterName("Size",true);
113  ContainerXPosition_Pkg_Cmd->SetUnitCategory("Length");
114  ContainerXPosition_Pkg_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
115 }
QweakSimTriggerScintillatorMessenger::~QweakSimTriggerScintillatorMessenger ( )

Definition at line 119 of file QweakSimTriggerScintillatorMessenger.cc.

References ContainerMatCmd, ContainerThicknessCmd, ContainerXPosition_Pkg_Cmd, ContainerXPositionCmd, ContainerYPosition_Pkg_Cmd, ContainerYPositionCmd, ContainerZPosition_Pkg_Cmd, ContainerZPositionCmd, DetectorMatCmd, Dir, DirPerPackage, and TiltingAngleCmd.

120 {
124 
128 
130  if (DetectorMatCmd) delete DetectorMatCmd;
131  if (ContainerMatCmd) delete ContainerMatCmd;
132  if (TiltingAngleCmd) delete TiltingAngleCmd;
133  if (Dir) delete Dir;
134  if(DirPerPackage) delete DirPerPackage;
135 }

Member Function Documentation

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

Definition at line 139 of file QweakSimTriggerScintillatorMessenger.cc.

References ContainerMatCmd, ContainerThicknessCmd, ContainerXPosition_Pkg_Cmd, ContainerXPositionCmd, ContainerYPosition_Pkg_Cmd, ContainerYPositionCmd, ContainerZPosition_Pkg_Cmd, ContainerZPositionCmd, DetectorMatCmd, fPackage, myTriggerScintillator, QweakSimTriggerScintillator::SetTriggerScintillatorCenterPositionInX(), QweakSimTriggerScintillator::SetTriggerScintillatorCenterPositionInY(), QweakSimTriggerScintillator::SetTriggerScintillatorCenterPositionInZ(), QweakSimTriggerScintillator::SetTriggerScintillatorMaterial(), QweakSimTriggerScintillator::SetTriggerScintillatorThickness(), QweakSimTriggerScintillator::SetTriggerScintillatorTiltAngle(), and TiltingAngleCmd.

140 {
141  G4cout << "#### Calling QweakSimTriggerScintillatorMessenger::SetNewValue() " << newValue << G4endl;
142 
143  if( command == ContainerThicknessCmd )
144  {
145  G4cout << "#### Messenger: Setting TriggerScintillator Container Thickness to " << newValue << G4endl;
146 
148  }
149 
150  if( command == ContainerXPositionCmd )
151  {
152  G4cout << "#### Messenger: Setting TriggerScintillator Container X position to " << newValue << G4endl;
153 
155  }
156 
157  if( command == ContainerYPositionCmd )
158  {
159  G4cout << "#### Messenger: Setting TriggerScintillator Container Y position to " << newValue << G4endl;
160 
162  }
163 
164  if( command == ContainerZPositionCmd )
165  {
166  G4cout << "#### Messenger: Setting TriggerScintillator Container Z position to " << newValue << G4endl;
167 
169  }
170  //--------------------------Individual Coordinate Control--------------------------------------------------
171  if( command == ContainerXPosition_Pkg_Cmd )
172  {
173  G4cout << "#### Messenger: Setting TriggerScintillator Container X position to " << newValue << G4endl;
174 
176  }
177 
178  if( command == ContainerYPosition_Pkg_Cmd )
179  {
180  G4cout << "#### Messenger: Setting TriggerScintillator Container Y position to " << newValue << G4endl;
181 
183  }
184 
185  if( command == ContainerZPosition_Pkg_Cmd )
186  {
187  G4cout << "#### Messenger: Setting TriggerScintillator Container Z position to " << newValue << G4endl;
188 
190  }
191  //------------------------------------End of Individual Control---------------------------------------
192 
193 
194  if( command == ContainerMatCmd )
195  {
196  G4cout << "#### Messenger: Setting TriggerScintillator Container Material to " << newValue << G4endl;
197 
198  //myTriggerScintillator->SetContainerMaterial(newValue);
199  }
200 
201  if( command == DetectorMatCmd )
202  {
203  G4cout << "#### Messenger: Setting Scintillator Detector Material to " << newValue << G4endl;
204 
206  }
207 
208  if( command == TiltingAngleCmd )
209  {
210  G4cout << "#### Messenger: Setting Scintillator Detector Tilting Angle to " << newValue << G4endl;
211 
213  }
214 
215  G4cout << "#### Leaving QweakSimTriggerScintillator Messenger::SetNewValue() " << newValue << G4endl;
216 }
void SetTriggerScintillatorCenterPositionInY(G4double yPos, G4int pkg=0)
void SetTriggerScintillatorTiltAngle(G4double tiltangle)
void SetTriggerScintillatorMaterial(G4String materialName)
void SetTriggerScintillatorCenterPositionInZ(G4double zPos, G4int pkg=0)
void SetTriggerScintillatorThickness(G4double thickness)
void SetTriggerScintillatorCenterPositionInX(G4double xPos, G4int pkg=0)

+ Here is the call graph for this function:

Field Documentation

G4UIcmdWithAString* QweakSimTriggerScintillatorMessenger::ContainerMatCmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerThicknessCmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerXPosition_Pkg_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerXPositionCmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerYPosition_Pkg_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerYPositionCmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerZPosition_Pkg_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::ContainerZPositionCmd
private
G4UIcmdWithAString* QweakSimTriggerScintillatorMessenger::DetectorMatCmd
private
G4UIdirectory* QweakSimTriggerScintillatorMessenger::Dir
private
G4UIdirectory* QweakSimTriggerScintillatorMessenger::DirPerPackage
private
G4int QweakSimTriggerScintillatorMessenger::fPackage
private
QweakSimTriggerScintillator* QweakSimTriggerScintillatorMessenger::myTriggerScintillator
private

Definition at line 70 of file QweakSimTriggerScintillatorMessenger.hh.

Referenced by SetNewValue().

G4UIcmdWithADoubleAndUnit* QweakSimTriggerScintillatorMessenger::TiltingAngleCmd
private

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