1 #ifndef EDepSim_ComponentBuilder_hh_seen 2 #define EDepSim_ComponentBuilder_hh_seen 6 #include <G4ThreeVector.hh> 13 class G4VSensitiveDetector;
17 namespace EDepSim {
class ComponentBuilder;}
129 fWidthCMD =
new G4UIcmdWithADoubleAndUnit(CommandName(
"width"),
this);
130 fWidthCMD->SetGuidance(
"Set the width of the component.");
131 fWidthCMD->SetParameterName(
"Width",
false);
132 fWidthCMD->SetUnitCategory(
"Length");
134 fHeightCMD =
new G4UIcmdWithADoubleAndUnit(CommandName(
"height"),
this);
135 fHeightCMD->SetGuidance(
"Set the height of the component.");
136 fHeightCMD->SetParameterName(
"Height",
false);
137 fHeightCMD->SetUnitCategory(
"Length");
140 =
new G4UIcmdWithADoubleAndUnit(CommandName(
"maxWidth"),
this);
141 fMaxWidthCMD->SetGuidance(
"Set the maximum width of the component.");
142 fMaxWidthCMD->SetParameterName(
"Width",
false);
143 fMaxWidthCMD->SetUnitCategory(
"Length");
146 =
new G4UIcmdWithADoubleAndUnit(CommandName(
"maxHeight"),
this);
147 fMaxHeightCMD->SetGuidance(
"Set the maximum height of the component.");
148 fMaxHeightCMD->SetParameterName(
"Height",
false);
149 fMaxHeightCMD->SetUnitCategory(
"Length");
157 delete fMaxHeightCMD;
161 if (cmd==fWidthCMD) {
162 fBuilder->
SetWidth(fWidthCMD->GetNewDoubleValue(val));
164 else if (cmd==fHeightCMD) {
165 fBuilder->
SetHeight(fHeightCMD->GetNewDoubleValue(val));
167 else if (cmd==fMaxWidthCMD) {
171 else if (cmd==fMaxHeightCMD) {
void SetNewValue(G4UIcommand *cmd, G4String val)
EDepSim::ComponentBuilder * fBuilder
virtual double GetWidth(void)
virtual ~ComponentBuilder()
G4UIcmdWithADoubleAndUnit * fHeightCMD
virtual void SetHeight(double w)
G4UIcmdWithADoubleAndUnit * fWidthCMD
virtual ~ComponentBuilderMessenger()
Construct a module from components.
ComponentBuilder(G4String n, EDepSim::Builder *p)
virtual void SetLength(double t)
Set the length of the component.
virtual double GetPhysicalWidth()
virtual void SetMaximumHeight(double h)
G4UIcmdWithADoubleAndUnit * fMaxHeightCMD
double fWidth
The available width of the component in the X direction.
double fLength
The length of the component along the Z axis.
virtual double GetPhysicalHeight()
virtual double GetHeight(void)
void SetNewValue(G4UIcommand *cmd, G4String val)
ComponentBuilderMessenger(EDepSim::ComponentBuilder *c, const char *guide)
ComponentBuilder(G4String n, EDepSim::UserDetectorConstruction *c)
virtual void AddLength(double t)
virtual void SetMaximumWidth(double w)
virtual void SetWidth(double w)
virtual double GetLength(void)
Get the length of the component.
double fHeight
The available height of the component in the Y direction.
G4UIcmdWithADoubleAndUnit * fMaxWidthCMD