23#include <G4AnalysisUtilities.hh>
24#include <G4UIcmdWithABool.hh>
25#include <G4UIcmdWithADoubleAndUnit.hh>
26#include <G4UIcmdWithAString.hh>
27#include <G4UIcmdWithoutParameter.hh>
28#include <G4UIdirectory.hh>
57 fDirectory->SetGuidance(
"Detector construction control commands.");
61 "Get local magnetic fields from Root geometry.");
65 fIsZeroFieldCmd =
new G4UIcmdWithABool(
"/mcDet/setIsZeroMagField",
this);
67 "(In)activate propagating 'ifield = 0' flag defined in tracking media.\n";
69 "When activated: a zero local magnetic field is set to the volumes "
71 guidance +=
" with tracking medium with 'ifield = 0'.";
78 "Get local magnetic fields from Root geometry.");
82 fSeparatorCmd =
new G4UIcmdWithAString(
"/mcDet/volNameSeparator",
this);
84 "Override the default value of the volume name separator in g3tog4\n";
90 new G4UIcmdWithoutParameter(
"/mcDet/printMaterials",
this);
93 G4State_PreInit, G4State_Init, G4State_Idle);
96 new G4UIcmdWithoutParameter(
"/mcDet/printMaterialsProperties",
this);
98 "Prints all material properties for all materials.");
100 G4State_PreInit, G4State_Init, G4State_Idle);
102 fPrintMediaCmd =
new G4UIcmdWithoutParameter(
"/mcDet/printMedia",
this);
105 G4State_PreInit, G4State_Init, G4State_Idle);
107 fPrintVolumesCmd =
new G4UIcmdWithoutParameter(
"/mcDet/printVolumes",
this);
111 fPrintCutsCmd =
new G4UIcmdWithAString(
"/mcDet/printCuts",
this);
113 "Prints the cut value for given CutName for all tracking media");
119 "Prints the control value for given ControlName for all tracking media");
125 "Active user step limits defined in tracking media.");
130 new G4UIcmdWithABool(
"/mcDet/setIsMaxStepInLowDensityMaterials",
this);
132 "Active user step limits defined in tracking media.");
134 "IsMaxStepInLowDensityMaterials",
false);
138 new G4UIcmdWithADoubleAndUnit(
"/mcDet/setLimitDensity",
this);
140 "Set the material density limit for setting max allowed step");
142 "Note that setting step limits has to be activated first via:\n");
144 "/mcDet/setIsMaxStepInLowDensityMaterials true");
151 "/mcDet/setMaxStepInLowDensityMaterials",
this);
153 "Set max allowed step value in materials with density below the density "
156 "Note that setting step limits has to be activated first via:\n");
158 "/mcDet/setIsMaxStepInLowDensityMaterials true");
160 "MaxStepInLowDensityMaterials",
false);
174 new G4UIcmdWithABool(
"/mcDet/setAccountAssemblyLevels",
this);
176 "Activate accounting assemblies in the volume level hierarchy.");
178 "AccountAssemblyLevels",
false);
216 G4UIparameter* volumeName =
new G4UIparameter(
"volumeName",
's',
false);
217 volumeName->SetGuidance(
"Radiator envelope.");
219 G4UIparameter* xtrModel =
new G4UIparameter(
"xtrModel",
's',
false);
220 xtrModel->SetGuidance(
"XTR model.");
223 G4UIparameter* foilNumber =
new G4UIparameter(
"foilNumber",
'i',
false);
224 foilNumber->SetGuidance(
"Number of foils");
226 G4UIparameter* strawTubeMaterial =
227 new G4UIparameter(
"strawTubeMaterial",
's',
true);
228 strawTubeMaterial->SetGuidance(
"Straw tube material name.");
229 strawTubeMaterial->SetDefaultValue(
"");
242 G4UIparameter* volumeName =
new G4UIparameter(
"materialName",
's',
false);
243 volumeName->SetGuidance(
"Layer material name.");
245 G4UIparameter* thickness =
new G4UIparameter(
"thickness",
'd',
false);
246 thickness->SetGuidance(
"The layer thickness (cm)");
248 G4UIparameter* fluctuation =
new G4UIparameter(
"fluctuation",
'd',
true);
250 "Parameter that refers to the layer Gamma-distributed thickness.\n";
251 guidance +=
"The relative thickness fluctuation is ~ 1/sqrt(param)";
252 fluctuation->SetGuidance(guidance);
256 "Define the radiator layer (foil/gass) properties.");
266 G4UIparameter* gasMaterialName =
267 new G4UIparameter(
"gasMaterialName",
's',
false);
268 gasMaterialName->SetGuidance(
"Straw tube gas material name.");
270 G4UIparameter* wallThickness =
new G4UIparameter(
"wallThickness",
'd',
false);
271 wallThickness->SetGuidance(
"The mean straw tube wall thickness (cm)");
273 G4UIparameter* gasThickness =
new G4UIparameter(
"gasThickness",
'd',
false);
274 wallThickness->SetGuidance(
"The mean straw tube gass thickness (cm)");
277 new G4UIcommand(
"/mcDet/setRadiatorStrawTube",
this);
279 "Define the radiator straw tube properties.");
289 G4UIparameter* volumeName =
new G4UIparameter(
"volumeName",
's',
false);
290 volumeName->SetGuidance(
"Radiator envelope.");
292 G4UIparameter* xtrModel =
new G4UIparameter(
"xtrModel",
's',
false);
293 xtrModel->SetGuidance(
"XTR model.");
296 G4UIparameter* foilMaterial =
new G4UIparameter(
"foilMaterial",
's',
false);
297 foilMaterial->SetGuidance(
"Foil material name.");
299 G4UIparameter* gasMaterial =
new G4UIparameter(
"gasMaterial",
's',
false);
300 gasMaterial->SetGuidance(
"Gas material name.");
302 G4UIparameter* foilThickness =
new G4UIparameter(
"foilThickness",
'd',
false);
303 foilThickness->SetGuidance(
"Foil thickness (cm).");
305 G4UIparameter* gasThickness =
new G4UIparameter(
"gasThickness",
'd',
false);
306 gasThickness->SetGuidance(
"Gas thickness (cm).");
308 G4UIparameter* foilNumber =
new G4UIparameter(
"foilNumber",
'i',
false);
309 foilNumber->SetGuidance(
"Number of foils");
311 G4UIparameter* strawTubeMaterial =
312 new G4UIparameter(
"strawTubeMaterial",
's',
true);
313 strawTubeMaterial->SetGuidance(
"Straw tube material name.");
314 strawTubeMaterial->SetDefaultValue(
"");
352 char separator = newValues[0];
391 std::vector<G4String> parameters;
392 G4Analysis::Tokenize(newValues, parameters);
395 G4String volumeName = parameters[counter++];
396 G4String xtrModel = parameters[counter++];
397 G4int foilNumber = G4UIcommand::ConvertToInt(parameters[counter++]);
409 TString(
"/mcDetector/setNewRadiator must be called first."));
414 std::vector<G4String> parameters;
415 G4Analysis::Tokenize(newValues, parameters);
418 G4String materialName = parameters[counter++];
419 G4double thickness = G4UIcommand::ConvertToDouble(parameters[counter++]);
420 G4double fluctuation = 0.;
421 if (G4int(parameters.size()) > counter) {
422 fluctuation = G4UIcommand::ConvertToDouble(parameters[counter++]);
435 TString(
"/mcDetector/setNewRadiator must be called first."));
440 std::vector<G4String> parameters;
441 G4Analysis::Tokenize(newValues, parameters);
444 G4String gasMaterialName = parameters[counter++];
445 G4double wallThickness =
446 G4UIcommand::ConvertToDouble(parameters[counter++]);
447 G4double gasThickness = G4UIcommand::ConvertToDouble(parameters[counter++]);
454 gasMaterialName, wallThickness, gasThickness);
460 std::vector<G4String> parameters;
461 G4Analysis::Tokenize(newValues, parameters);
464 G4String volumeName = parameters[counter++];
465 G4String xtrModel = parameters[counter++];
466 G4String foilMaterial = parameters[counter++];
467 G4String gasMaterial = parameters[counter++];
468 G4double foilThickness =
469 G4UIcommand::ConvertToDouble(parameters[counter++]);
470 G4double gasThickness = G4UIcommand::ConvertToDouble(parameters[counter++]);
471 G4int foilNumber = G4UIcommand::ConvertToInt(parameters[counter++]);
472 G4String strawTubeMaterial;
473 if (G4int(parameters.size()) > counter) {
474 strawTubeMaterial = parameters[counter++];
485 radiatorDescription->
SetLayer(foilMaterial, foilThickness, 100.);
486 radiatorDescription->
SetLayer(gasMaterial, gasThickness, 100.);
487 if (strawTubeMaterial.size()) {
489 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)
G4UIcmdWithABool * fAccountAssemblyLevelsCmd
command: setAccountAssemblyLevels
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
void SetAccountAssemblyLevels(G4bool option)
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.