23#include <G4AnalysisUtilities.hh>
24#include <G4UIcmdWithABool.hh>
25#include <G4UIcmdWithADoubleAndUnit.hh>
26#include <G4UIcmdWithAString.hh>
27#include <G4UIcmdWithoutParameter.hh>
28#include <G4UIdirectory.hh>
56 fDirectory->SetGuidance(
"Detector construction control commands.");
60 "Get local magnetic fields from Root geometry.");
64 fIsZeroFieldCmd =
new G4UIcmdWithABool(
"/mcDet/setIsZeroMagField",
this);
66 "(In)activate propagating 'ifield = 0' flag defined in tracking media.\n";
68 "When activated: a zero local magnetic field is set to the volumes "
70 guidance +=
" with tracking medium with 'ifield = 0'.";
77 "Get local magnetic fields from Root geometry.");
81 fSeparatorCmd =
new G4UIcmdWithAString(
"/mcDet/volNameSeparator",
this);
83 "Override the default value of the volume name separator in g3tog4\n";
89 new G4UIcmdWithoutParameter(
"/mcDet/printMaterials",
this);
92 G4State_PreInit, G4State_Init, G4State_Idle);
95 new G4UIcmdWithoutParameter(
"/mcDet/printMaterialsProperties",
this);
97 "Prints all material properties for all materials.");
99 G4State_PreInit, G4State_Init, G4State_Idle);
101 fPrintMediaCmd =
new G4UIcmdWithoutParameter(
"/mcDet/printMedia",
this);
104 G4State_PreInit, G4State_Init, G4State_Idle);
106 fPrintVolumesCmd =
new G4UIcmdWithoutParameter(
"/mcDet/printVolumes",
this);
110 fPrintCutsCmd =
new G4UIcmdWithAString(
"/mcDet/printCuts",
this);
112 "Prints the cut value for given CutName for all tracking media");
118 "Prints the control value for given ControlName for all tracking media");
124 "Active user step limits defined in tracking media.");
129 new G4UIcmdWithABool(
"/mcDet/setIsMaxStepInLowDensityMaterials",
this);
131 "Active user step limits defined in tracking media.");
133 "IsMaxStepInLowDensityMaterials",
false);
137 new G4UIcmdWithADoubleAndUnit(
"/mcDet/setLimitDensity",
this);
139 "Set the material density limit for setting max allowed step");
141 "Note that setting step limits has to be activated first via:\n");
143 "/mcDet/setIsMaxStepInLowDensityMaterials true");
150 "/mcDet/setMaxStepInLowDensityMaterials",
this);
152 "Set max allowed step value in materials with density below the density "
155 "Note that setting step limits has to be activated first via:\n");
157 "/mcDet/setIsMaxStepInLowDensityMaterials true");
159 "MaxStepInLowDensityMaterials",
false);
206 G4UIparameter* volumeName =
new G4UIparameter(
"volumeName",
's',
false);
207 volumeName->SetGuidance(
"Radiator envelope.");
209 G4UIparameter* xtrModel =
new G4UIparameter(
"xtrModel",
's',
false);
210 xtrModel->SetGuidance(
"XTR model.");
213 G4UIparameter* foilNumber =
new G4UIparameter(
"foilNumber",
'i',
false);
214 foilNumber->SetGuidance(
"Number of foils");
216 G4UIparameter* strawTubeMaterial =
217 new G4UIparameter(
"strawTubeMaterial",
's',
true);
218 strawTubeMaterial->SetGuidance(
"Straw tube material name.");
219 strawTubeMaterial->SetDefaultValue(
"");
232 G4UIparameter* volumeName =
new G4UIparameter(
"materialName",
's',
false);
233 volumeName->SetGuidance(
"Layer material name.");
235 G4UIparameter* thickness =
new G4UIparameter(
"thickness",
'd',
false);
236 thickness->SetGuidance(
"The layer thickness (cm)");
238 G4UIparameter* fluctuation =
new G4UIparameter(
"fluctuation",
'd',
true);
240 "Parameter that refers to the layer Gamma-distributed thickness.\n";
241 guidance +=
"The relative thickness fluctuation is ~ 1/sqrt(param)";
242 fluctuation->SetGuidance(guidance);
246 "Define the radiator layer (foil/gass) properties.");
256 G4UIparameter* gasMaterialName =
257 new G4UIparameter(
"gasMaterialName",
's',
false);
258 gasMaterialName->SetGuidance(
"Straw tube gas material name.");
260 G4UIparameter* wallThickness =
new G4UIparameter(
"wallThickness",
'd',
false);
261 wallThickness->SetGuidance(
"The mean straw tube wall thickness (cm)");
263 G4UIparameter* gasThickness =
new G4UIparameter(
"gasThickness",
'd',
false);
264 wallThickness->SetGuidance(
"The mean straw tube gass thickness (cm)");
267 new G4UIcommand(
"/mcDet/setRadiatorStrawTube",
this);
269 "Define the radiator straw tube properties.");
279 G4UIparameter* volumeName =
new G4UIparameter(
"volumeName",
's',
false);
280 volumeName->SetGuidance(
"Radiator envelope.");
282 G4UIparameter* xtrModel =
new G4UIparameter(
"xtrModel",
's',
false);
283 xtrModel->SetGuidance(
"XTR model.");
286 G4UIparameter* foilMaterial =
new G4UIparameter(
"foilMaterial",
's',
false);
287 foilMaterial->SetGuidance(
"Foil material name.");
289 G4UIparameter* gasMaterial =
new G4UIparameter(
"gasMaterial",
's',
false);
290 gasMaterial->SetGuidance(
"Gas material name.");
292 G4UIparameter* foilThickness =
new G4UIparameter(
"foilThickness",
'd',
false);
293 foilThickness->SetGuidance(
"Foil thickness (cm).");
295 G4UIparameter* gasThickness =
new G4UIparameter(
"gasThickness",
'd',
false);
296 gasThickness->SetGuidance(
"Gas thickness (cm).");
298 G4UIparameter* foilNumber =
new G4UIparameter(
"foilNumber",
'i',
false);
299 foilNumber->SetGuidance(
"Number of foils");
301 G4UIparameter* strawTubeMaterial =
302 new G4UIparameter(
"strawTubeMaterial",
's',
true);
303 strawTubeMaterial->SetGuidance(
"Straw tube material name.");
304 strawTubeMaterial->SetDefaultValue(
"");
342 char separator = newValues[0];
381 std::vector<G4String> parameters;
382 G4Analysis::Tokenize(newValues, parameters);
385 G4String volumeName = parameters[counter++];
386 G4String xtrModel = parameters[counter++];
387 G4int foilNumber = G4UIcommand::ConvertToInt(parameters[counter++]);
399 TString(
"/mcDetector/setNewRadiator must be called first."));
404 std::vector<G4String> parameters;
405 G4Analysis::Tokenize(newValues, parameters);
408 G4String materialName = parameters[counter++];
409 G4double thickness = G4UIcommand::ConvertToDouble(parameters[counter++]);
410 G4double fluctuation = 0.;
411 if (G4int(parameters.size()) > counter) {
412 fluctuation = G4UIcommand::ConvertToDouble(parameters[counter++]);
425 TString(
"/mcDetector/setNewRadiator must be called first."));
430 std::vector<G4String> parameters;
431 G4Analysis::Tokenize(newValues, parameters);
434 G4String gasMaterialName = parameters[counter++];
435 G4double wallThickness =
436 G4UIcommand::ConvertToDouble(parameters[counter++]);
437 G4double gasThickness = G4UIcommand::ConvertToDouble(parameters[counter++]);
444 gasMaterialName, wallThickness, gasThickness);
450 std::vector<G4String> parameters;
451 G4Analysis::Tokenize(newValues, parameters);
454 G4String volumeName = parameters[counter++];
455 G4String xtrModel = parameters[counter++];
456 G4String foilMaterial = parameters[counter++];
457 G4String gasMaterial = parameters[counter++];
458 G4double foilThickness =
459 G4UIcommand::ConvertToDouble(parameters[counter++]);
460 G4double gasThickness = G4UIcommand::ConvertToDouble(parameters[counter++]);
461 G4int foilNumber = G4UIcommand::ConvertToInt(parameters[counter++]);
462 G4String strawTubeMaterial;
463 if (G4int(parameters.size()) > counter) {
464 strawTubeMaterial = parameters[counter++];
475 radiatorDescription->
SetLayer(foilMaterial, foilThickness, 100.);
476 radiatorDescription->
SetLayer(gasMaterial, gasThickness, 100.);
477 if (strawTubeMaterial.size()) {
479 strawTubeMaterial, 0.53 * CLHEP::mm, 3.14159 * CLHEP::mm);
Definition of the TG4DetConstructionMessenger class.
Definition of the TG4DetConstruction class.
Definition of the TG4G3Units class.
Definition of the TG4GeometryManager class.
Definition of the TG4GeometryServices class.
Definition of the TG4Globals class and basic container types.
Definition of the TG4RadiatorDescription class.
G4UIcmdWithAString * fPrintCutsCmd
command: printCuts
G4UIcmdWithABool * fIsUserMaxStepCmd
command: setIsUserMaxStep
G4UIcmdWithABool * fIsLocalFieldCmd
command: setIsLocalMagField
G4UIcommand * fSetRadiatorStrawTubeCmd
command: setRadiatorStrawTube
TG4DetConstructionMessenger()
Not implemented.
G4UIcmdWithoutParameter * fPrintMediaCmd
command: printMedia
G4UIdirectory * fDirectory
command directory
G4UIcmdWithABool * fIsMonopoleFieldCmd
command: setIsMonopole
TG4GeometryManager * fGeometryManager
associated class
G4UIcommand * fSetNewRadiatorCmd
command: setNewRadiator
G4UIcmdWithAString * fPrintControlsCmd
command: printControls
G4UIcommand * fSetRadiatorCmd
G4UIcmdWithABool * fIsMaxStepInLowDensityMaterialsCmd
command: setIsMaxStepInLowDensityMaterials
G4UIcmdWithABool * fIsZeroFieldCmd
command: setIsZeroMagField
void CreateSetNewRadiatorCmd()
virtual ~TG4DetConstructionMessenger()
G4UIcmdWithADoubleAndUnit * fSetMaxStepInLowDensityMaterialsCmd
command: setMaxStepInLowDensityMaterials
G4UIcmdWithADoubleAndUnit * fSetLimitDensityCmd
command: setLimitDensity
G4UIcmdWithoutParameter * fPrintMaterialsCmd
command: printMatrials
G4UIcmdWithAString * fSeparatorCmd
command: volumeNameSeparator
void CreateSetRadiatorCmd()
The following command is deprecated, will be removed in the next version.
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
TG4RadiatorDescription * fRadiatorDescription
current radiator description
G4UIcmdWithoutParameter * fPrintMaterialsPropertiesCmd
command: printMaterialsProperties
void CreateSetRadiatorStrawTubeCmd()
G4UIcmdWithoutParameter * fPrintVolumesCmd
command: printVolumes
G4UIcommand * fSetRadiatorLayerCmd
command: setRadiatorLayer
void CreateSetRadiatorLayerCmd()
The manager class for building Geant4 geometry depending on a selected user input.
void SetIsLocalField(G4bool isLocalField)
void SetIsMaxStepInLowDensityMaterials(G4bool isMaxStep)
void SetIsZeroField(G4bool isZeroField)
TG4RadiatorDescription * CreateRadiator(const G4String &volName)
void SetMaxStepInLowDensityMaterials(G4double maxStep)
static TG4GeometryManager * Instance()
void SetIsUserMaxStep(G4bool isUserMaxStep)
void SetLimitDensity(G4double density)
void SetIsMonopoleField(G4bool isMonopoleField)
void PrintControls(const G4String &controlName) const
void PrintLogicalVolumeStore() const
static TG4GeometryServices * Instance()
void PrintMaterials() const
void PrintMaterialsProperties() const
void SetG3toG4Separator(char separator)
void PrintCuts(const G4String &cutName) const
static void Warning(const TString &className, const TString &methodName, const TString &text)
The radiator description.
void SetStrawTube(const G4String &materialName, G4double wallThickness, G4double gasThickness)
void SetLayer(const G4String &materialName, G4double thickness, G4double fluctuation)
void SetXtrModel(const G4String &name)
Set the transition radiation process model.
void SetFoilNumber(G4int foilNumber)
Set the number of foils.