Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:14

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file SAXSDetectorConstructionMessenger.cc
0027 /// \brief Implementation of the SAXSDetectorConstructionMessenger class
0028 //
0029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0030 
0031 #include "SAXSDetectorConstructionMessenger.hh"
0032 
0033 #include "SAXSDetectorConstruction.hh"
0034 
0035 #include "G4RunManager.hh"
0036 #include "G4UIcmdWith3VectorAndUnit.hh"
0037 #include "G4UIcmdWithABool.hh"
0038 #include "G4UIcmdWithADouble.hh"
0039 #include "G4UIcmdWithADoubleAndUnit.hh"
0040 #include "G4UIcmdWithAString.hh"
0041 #include "G4UIcmdWithAnInteger.hh"
0042 #include "G4UIdirectory.hh"
0043 #include "G4ios.hh"
0044 
0045 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0046 
0047 SAXSDetectorConstructionMessenger::SAXSDetectorConstructionMessenger(
0048   SAXSDetectorConstruction* detconstr)
0049   : G4UImessenger(), fDetector(detconstr)
0050 {
0051   fCmdDir = new G4UIdirectory("/det/");
0052   fCmdDir->SetGuidance("Detector Control");
0053 
0054   fSetCustomMatFFfilename = new G4UIcmdWithAString("/det/SetCustomMatFF", this);
0055   fSetCustomMatFFfilename->SetGuidance("Set CustomMat FF filename");
0056   fSetCustomMatFFfilename->SetParameterName("mmff", false);
0057   fSetCustomMatFFfilename->AvailableForStates(G4State_PreInit);
0058 
0059   fSetCustomMatDensityCmd = new G4UIcmdWithADouble("/det/setCustomMatDensity", this);
0060   fSetCustomMatDensityCmd->SetGuidance("Set density for custom material");
0061   fSetCustomMatDensityCmd->SetParameterName("cmden", false);
0062   fSetCustomMatDensityCmd->SetRange("cmden>0.");
0063   fSetCustomMatDensityCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0064 
0065   fSetCustomMatHmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatHmassfract", this);
0066   fSetCustomMatHmassfractCmd->SetGuidance("Set H mass fraction for custom material");
0067   fSetCustomMatHmassfractCmd->SetParameterName("cmHmf", false);
0068   fSetCustomMatHmassfractCmd->SetRange("cmHmf>=0.");
0069   fSetCustomMatHmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0070 
0071   fSetCustomMatCmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatCmassfract", this);
0072   fSetCustomMatCmassfractCmd->SetGuidance("Set C mass fraction for custom material");
0073   fSetCustomMatCmassfractCmd->SetParameterName("cmCmf", false);
0074   fSetCustomMatCmassfractCmd->SetRange("cmCmf>=0.");
0075   fSetCustomMatCmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0076 
0077   fSetCustomMatNmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatNmassfract", this);
0078   fSetCustomMatNmassfractCmd->SetGuidance("Set N mass fraction for custom material");
0079   fSetCustomMatNmassfractCmd->SetParameterName("cmNmf", false);
0080   fSetCustomMatNmassfractCmd->SetRange("cmNmf>=0.");
0081   fSetCustomMatNmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0082 
0083   fSetCustomMatOmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatOmassfract", this);
0084   fSetCustomMatOmassfractCmd->SetGuidance("Set O mass fraction for custom material");
0085   fSetCustomMatOmassfractCmd->SetParameterName("cmOmf", false);
0086   fSetCustomMatOmassfractCmd->SetRange("cmOmf>=0.");
0087   fSetCustomMatOmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0088 
0089   fSetCustomMatNamassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatNamassfract", this);
0090   fSetCustomMatNamassfractCmd->SetGuidance("Set Na mass fraction for custom material");
0091   fSetCustomMatNamassfractCmd->SetParameterName("cmNamf", false);
0092   fSetCustomMatNamassfractCmd->SetRange("cmNamf>=0.");
0093   fSetCustomMatNamassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0094 
0095   fSetCustomMatPmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatPmassfract", this);
0096   fSetCustomMatPmassfractCmd->SetGuidance("Set P mass fraction for custom material");
0097   fSetCustomMatPmassfractCmd->SetParameterName("cmPmf", false);
0098   fSetCustomMatPmassfractCmd->SetRange("cmPmf>=0.");
0099   fSetCustomMatPmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0100 
0101   fSetCustomMatSmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatSmassfract", this);
0102   fSetCustomMatSmassfractCmd->SetGuidance("Set S mass fraction for custom material");
0103   fSetCustomMatSmassfractCmd->SetParameterName("cmSmf", false);
0104   fSetCustomMatSmassfractCmd->SetRange("cmSmf>=0.");
0105   fSetCustomMatSmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0106 
0107   fSetCustomMatClmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatClmassfract", this);
0108   fSetCustomMatClmassfractCmd->SetGuidance("Set Cl mass fraction for custom material");
0109   fSetCustomMatClmassfractCmd->SetParameterName("cmClmf", false);
0110   fSetCustomMatClmassfractCmd->SetRange("cmClmf>=0.");
0111   fSetCustomMatClmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0112 
0113   fSetCustomMatKmassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatKmassfract", this);
0114   fSetCustomMatKmassfractCmd->SetGuidance("Set K mass fraction for custom material");
0115   fSetCustomMatKmassfractCmd->SetParameterName("cmKmf", false);
0116   fSetCustomMatKmassfractCmd->SetRange("cmKmf>=0.");
0117   fSetCustomMatKmassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0118 
0119   fSetCustomMatCamassfractCmd = new G4UIcmdWithADouble("/det/setCustomMatCamassfract", this);
0120   fSetCustomMatCamassfractCmd->SetGuidance("Set Ca mass fraction for custom material");
0121   fSetCustomMatCamassfractCmd->SetParameterName("cmCamf", false);
0122   fSetCustomMatCamassfractCmd->SetRange("cmCamf>=0.");
0123   fSetCustomMatCamassfractCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0124 
0125   fPhantomMaterialCmd = new G4UIcmdWithAnInteger("/det/setPhantomMaterial", this);
0126   fPhantomMaterialCmd->SetGuidance("Set Phantom material");
0127   fPhantomMaterialCmd->SetParameterName("PhantomMat", false);
0128   fPhantomMaterialCmd->SetRange("PhantomMat>=1 && PhantomMat<=30");
0129   fPhantomMaterialCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0130 
0131   fPhantomDiameterCmd = new G4UIcmdWithADoubleAndUnit("/det/setPhantomDiameter", this);
0132   fPhantomDiameterCmd->SetGuidance("Set Phantom Diameter");
0133   fPhantomDiameterCmd->SetParameterName("PhantomDiameter", false);
0134   fPhantomDiameterCmd->SetUnitCategory("Length");
0135   fPhantomDiameterCmd->SetRange("PhantomDiameter>0.");
0136   fPhantomDiameterCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0137 
0138   fPhantomHeightCmd = new G4UIcmdWithADoubleAndUnit("/det/setPhantomHeight", this);
0139   fPhantomHeightCmd->SetGuidance("Set Phantom Thickness");
0140   fPhantomHeightCmd->SetParameterName("PhantomHeight", false);
0141   fPhantomHeightCmd->SetUnitCategory("Length");
0142   fPhantomHeightCmd->SetRange("PhantomHeight>0.");
0143   fPhantomHeightCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0144 
0145   fPhantomZCmd = new G4UIcmdWithADoubleAndUnit("/det/setPhantomZ", this);
0146   fPhantomZCmd->SetGuidance("Set Phantom Z");
0147   fPhantomZCmd->SetParameterName("PhantomZ", false);
0148   fPhantomZCmd->SetUnitCategory("Length");
0149   fPhantomZCmd->SetRange("PhantomZ>=0.");
0150   fPhantomZCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0151 
0152   fSetComp0Cmd = new G4UIcmdWithADouble("/det/setComp0", this);
0153   fSetComp0Cmd->SetGuidance("Set Comp0 for medical material");
0154   fSetComp0Cmd->SetParameterName("c0", false);
0155   fSetComp0Cmd->SetRange("c0>=0.");
0156   fSetComp0Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0157 
0158   fSetComp1Cmd = new G4UIcmdWithADouble("/det/setComp1", this);
0159   fSetComp1Cmd->SetGuidance("Set Comp1 for medical material");
0160   fSetComp1Cmd->SetParameterName("c1", false);
0161   fSetComp1Cmd->SetRange("c1>=0.");
0162   fSetComp1Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0163 
0164   fSetComp2Cmd = new G4UIcmdWithADouble("/det/setComp2", this);
0165   fSetComp2Cmd->SetGuidance("Set Comp2 for medical material");
0166   fSetComp2Cmd->SetParameterName("c2", false);
0167   fSetComp2Cmd->SetRange("c2>=0.");
0168   fSetComp2Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0169 
0170   fSetComp3Cmd = new G4UIcmdWithADouble("/det/setComp3", this);
0171   fSetComp3Cmd->SetGuidance("Set Comp3 for medical material");
0172   fSetComp3Cmd->SetParameterName("c3", false);
0173   fSetComp3Cmd->SetRange("c3>=0.");
0174   fSetComp3Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0175 
0176   fThetaSetupCmd = new G4UIcmdWithADouble("/det/setThetaSetup", this);
0177   fThetaSetupCmd->SetGuidance("Set theta setup (rad)");
0178   fThetaSetupCmd->SetParameterName("theta", false);
0179   fThetaSetupCmd->SetRange("theta>=0.");
0180   fThetaSetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0181 
0182   fSetSlitsCmd = new G4UIcmdWithABool("/det/setSlits", this);
0183   fSetSlitsCmd->SetGuidance("set Slits");
0184   fSetSlitsCmd->SetParameterName("fIWantSlits", true);
0185   fSetSlitsCmd->SetDefaultValue(false);
0186 
0187   fSlit1ThicknessCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit1Thickness", this);
0188   fSlit1ThicknessCmd->SetGuidance("Set Slit1 Thickness");
0189   fSlit1ThicknessCmd->SetParameterName("Slit1Thickness", false);
0190   fSlit1ThicknessCmd->SetUnitCategory("Length");
0191   fSlit1ThicknessCmd->SetRange("Slit1Thickness>0.");
0192   fSlit1ThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0193 
0194   fSlit2ThicknessCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit2Thickness", this);
0195   fSlit2ThicknessCmd->SetGuidance("Set Slit2 Thickness");
0196   fSlit2ThicknessCmd->SetParameterName("Slit2Thickness", false);
0197   fSlit2ThicknessCmd->SetUnitCategory("Length");
0198   fSlit2ThicknessCmd->SetRange("Slit2Thickness>0.");
0199   fSlit2ThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0200 
0201   fSlit3ThicknessCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit3Thickness", this);
0202   fSlit3ThicknessCmd->SetGuidance("Set Slit3 Thickness");
0203   fSlit3ThicknessCmd->SetParameterName("Slit3Thickness", false);
0204   fSlit3ThicknessCmd->SetUnitCategory("Length");
0205   fSlit3ThicknessCmd->SetRange("Slit3Thickness>0.");
0206   fSlit3ThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0207 
0208   fSlit4ThicknessCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit4Thickness", this);
0209   fSlit4ThicknessCmd->SetGuidance("Set Slit4 Thickness");
0210   fSlit4ThicknessCmd->SetParameterName("Slit4Thickness", false);
0211   fSlit4ThicknessCmd->SetUnitCategory("Length");
0212   fSlit4ThicknessCmd->SetRange("Slit4Thickness>0.");
0213   fSlit4ThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0214 
0215   fSlit1DistanceCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit1SampleDistance", this);
0216   fSlit1DistanceCmd->SetGuidance("Set Slit1-to-Sample Distance");
0217   fSlit1DistanceCmd->SetParameterName("Slit1dist", false);
0218   fSlit1DistanceCmd->SetUnitCategory("Length");
0219   fSlit1DistanceCmd->SetRange("Slit1dist>0.");
0220   fSlit1DistanceCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0221 
0222   fSlit2DistanceCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit2SampleDistance", this);
0223   fSlit2DistanceCmd->SetGuidance("Set Slit2-to-Sample Distance");
0224   fSlit2DistanceCmd->SetParameterName("Slit2dist", false);
0225   fSlit2DistanceCmd->SetUnitCategory("Length");
0226   fSlit2DistanceCmd->SetRange("Slit2dist>0.");
0227   fSlit2DistanceCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0228 
0229   fSlit3DistanceCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit3SampleDistance", this);
0230   fSlit3DistanceCmd->SetGuidance("Set Slit3-to-Sample Distance");
0231   fSlit3DistanceCmd->SetParameterName("Slit3dist", false);
0232   fSlit3DistanceCmd->SetUnitCategory("Length");
0233   fSlit3DistanceCmd->SetRange("Slit3dist>0.");
0234   fSlit3DistanceCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0235 
0236   fSlit4DistanceCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit4SampleDistance", this);
0237   fSlit4DistanceCmd->SetGuidance("Set Slit4-to-Sample Distance");
0238   fSlit4DistanceCmd->SetParameterName("Slit4dist", false);
0239   fSlit4DistanceCmd->SetUnitCategory("Length");
0240   fSlit4DistanceCmd->SetRange("Slit4dist>0.");
0241   fSlit4DistanceCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0242 
0243   fSlit1xApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit1xAperture", this);
0244   fSlit1xApertureCmd->SetGuidance("Set Slit1 x Aperture");
0245   fSlit1xApertureCmd->SetParameterName("Slit1xAp", false);
0246   fSlit1xApertureCmd->SetUnitCategory("Length");
0247   fSlit1xApertureCmd->SetRange("Slit1xAp>0.");
0248   fSlit1xApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0249 
0250   fSlit2xApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit2xAperture", this);
0251   fSlit2xApertureCmd->SetGuidance("Set Slit2 x Aperture");
0252   fSlit2xApertureCmd->SetParameterName("Slit2xAp", false);
0253   fSlit2xApertureCmd->SetUnitCategory("Length");
0254   fSlit2xApertureCmd->SetRange("Slit2xAp>0.");
0255   fSlit2xApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0256 
0257   fSlit3xApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit3xAperture", this);
0258   fSlit3xApertureCmd->SetGuidance("Set Slit3 x Aperture");
0259   fSlit3xApertureCmd->SetParameterName("Slit3xAp", false);
0260   fSlit3xApertureCmd->SetUnitCategory("Length");
0261   fSlit3xApertureCmd->SetRange("Slit3xAp>0.");
0262   fSlit3xApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0263 
0264   fSlit4xApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit4xAperture", this);
0265   fSlit4xApertureCmd->SetGuidance("Set Slit4 x Aperture");
0266   fSlit4xApertureCmd->SetParameterName("Slit4xAp", false);
0267   fSlit4xApertureCmd->SetUnitCategory("Length");
0268   fSlit4xApertureCmd->SetRange("Slit4xAp>0.");
0269   fSlit4xApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0270 
0271   fSlit1yApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit1yAperture", this);
0272   fSlit1yApertureCmd->SetGuidance("Set Slit1 y Aperture");
0273   fSlit1yApertureCmd->SetParameterName("Slit1yAp", false);
0274   fSlit1yApertureCmd->SetUnitCategory("Length");
0275   fSlit1yApertureCmd->SetRange("Slit1yAp>0.");
0276   fSlit1yApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0277 
0278   fSlit2yApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit2yAperture", this);
0279   fSlit2yApertureCmd->SetGuidance("Set Slit2 y Aperture");
0280   fSlit2yApertureCmd->SetParameterName("Slit2yAp", false);
0281   fSlit2yApertureCmd->SetUnitCategory("Length");
0282   fSlit2yApertureCmd->SetRange("Slit2yAp>0.");
0283   fSlit2yApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0284 
0285   fSlit3yApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit3yAperture", this);
0286   fSlit3yApertureCmd->SetGuidance("Set Slit3 y Aperture");
0287   fSlit3yApertureCmd->SetParameterName("Slit3yAp", false);
0288   fSlit3yApertureCmd->SetUnitCategory("Length");
0289   fSlit3yApertureCmd->SetRange("Slit3yAp>0.");
0290   fSlit3yApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0291 
0292   fSlit4yApertureCmd = new G4UIcmdWithADoubleAndUnit("/det/setSlit4yAperture", this);
0293   fSlit4yApertureCmd->SetGuidance("Set Slit4 y Aperture");
0294   fSlit4yApertureCmd->SetParameterName("Slit4yAp", false);
0295   fSlit4yApertureCmd->SetUnitCategory("Length");
0296   fSlit4yApertureCmd->SetRange("Slit4yAp>0.");
0297   fSlit4yApertureCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0298 
0299   fDetectorThicknessCmd = new G4UIcmdWithADoubleAndUnit("/det/setDetectorThickness", this);
0300   fDetectorThicknessCmd->SetGuidance("Set Detector Thickness");
0301   fDetectorThicknessCmd->SetParameterName("DetectorThickness", false);
0302   fDetectorThicknessCmd->SetUnitCategory("Length");
0303   fDetectorThicknessCmd->SetRange("DetectorThickness>0.");
0304   fDetectorThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0305 
0306   fDetectorSizeCmd = new G4UIcmdWithADoubleAndUnit("/det/setDetectorSize", this);
0307   fDetectorSizeCmd->SetGuidance("Set DetectorSize");
0308   fDetectorSizeCmd->SetParameterName("scrnsize", false);
0309   fDetectorSizeCmd->SetUnitCategory("Length");
0310   fDetectorSizeCmd->SetRange("scrnsize>0.");
0311   fDetectorSizeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0312 
0313   fDetectorDistanceCmd = new G4UIcmdWithADoubleAndUnit("/det/setDetectorSampleDistance", this);
0314   fDetectorDistanceCmd->SetGuidance("Set Detector Distance");
0315   fDetectorDistanceCmd->SetParameterName("detDist", false);
0316   fDetectorDistanceCmd->SetUnitCategory("Length");
0317   fDetectorDistanceCmd->SetRange("detDist>0.");
0318   fDetectorDistanceCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
0319 }
0320 
0321 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0322 
0323 SAXSDetectorConstructionMessenger::~SAXSDetectorConstructionMessenger()
0324 {
0325   delete fCmdDir;
0326 
0327   delete fSetCustomMatFFfilename;
0328   delete fSetCustomMatDensityCmd;
0329   delete fSetCustomMatHmassfractCmd;
0330   delete fSetCustomMatCmassfractCmd;
0331   delete fSetCustomMatNmassfractCmd;
0332   delete fSetCustomMatOmassfractCmd;
0333   delete fSetCustomMatNamassfractCmd;
0334   delete fSetCustomMatPmassfractCmd;
0335   delete fSetCustomMatSmassfractCmd;
0336   delete fSetCustomMatClmassfractCmd;
0337   delete fSetCustomMatKmassfractCmd;
0338   delete fSetCustomMatCamassfractCmd;
0339 
0340   delete fPhantomMaterialCmd;
0341   delete fPhantomDiameterCmd;
0342   delete fPhantomHeightCmd;
0343   delete fPhantomZCmd;
0344 
0345   delete fSetComp0Cmd;
0346   delete fSetComp1Cmd;
0347   delete fSetComp2Cmd;
0348   delete fSetComp3Cmd;
0349 
0350   delete fThetaSetupCmd;
0351 
0352   delete fSetSlitsCmd;
0353   delete fSlit1ThicknessCmd;
0354   delete fSlit2ThicknessCmd;
0355   delete fSlit3ThicknessCmd;
0356   delete fSlit4ThicknessCmd;
0357   delete fSlit1DistanceCmd;
0358   delete fSlit2DistanceCmd;
0359   delete fSlit3DistanceCmd;
0360   delete fSlit4DistanceCmd;
0361   delete fSlit1xApertureCmd;
0362   delete fSlit2xApertureCmd;
0363   delete fSlit3xApertureCmd;
0364   delete fSlit4xApertureCmd;
0365   delete fSlit1yApertureCmd;
0366   delete fSlit2yApertureCmd;
0367   delete fSlit3yApertureCmd;
0368   delete fSlit4yApertureCmd;
0369 
0370   delete fDetectorThicknessCmd;
0371   delete fDetectorSizeCmd;
0372   delete fDetectorDistanceCmd;
0373 }
0374 
0375 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0376 
0377 void SAXSDetectorConstructionMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
0378 {
0379   if (command == fSetCustomMatFFfilename) fDetector->SetCustomMatFF(newValue);
0380 
0381   if (command == fSetCustomMatDensityCmd)
0382     fDetector->SetCustomMatDensity(fSetCustomMatDensityCmd->GetNewDoubleValue(newValue));
0383 
0384   if (command == fSetCustomMatHmassfractCmd)
0385     fDetector->SetCustomMatHmassfract(fSetCustomMatHmassfractCmd->GetNewDoubleValue(newValue));
0386 
0387   if (command == fSetCustomMatCmassfractCmd)
0388     fDetector->SetCustomMatCmassfract(fSetCustomMatCmassfractCmd->GetNewDoubleValue(newValue));
0389   if (command == fSetCustomMatNmassfractCmd)
0390     fDetector->SetCustomMatNmassfract(fSetCustomMatNmassfractCmd->GetNewDoubleValue(newValue));
0391   if (command == fSetCustomMatOmassfractCmd)
0392     fDetector->SetCustomMatOmassfract(fSetCustomMatOmassfractCmd->GetNewDoubleValue(newValue));
0393   if (command == fSetCustomMatNamassfractCmd)
0394     fDetector->SetCustomMatNamassfract(fSetCustomMatNamassfractCmd->GetNewDoubleValue(newValue));
0395   if (command == fSetCustomMatPmassfractCmd)
0396     fDetector->SetCustomMatPmassfract(fSetCustomMatPmassfractCmd->GetNewDoubleValue(newValue));
0397   if (command == fSetCustomMatSmassfractCmd)
0398     fDetector->SetCustomMatSmassfract(fSetCustomMatSmassfractCmd->GetNewDoubleValue(newValue));
0399   if (command == fSetCustomMatClmassfractCmd)
0400     fDetector->SetCustomMatClmassfract(fSetCustomMatClmassfractCmd->GetNewDoubleValue(newValue));
0401   if (command == fSetCustomMatKmassfractCmd)
0402     fDetector->SetCustomMatKmassfract(fSetCustomMatKmassfractCmd->GetNewDoubleValue(newValue));
0403   if (command == fSetCustomMatCamassfractCmd)
0404     fDetector->SetCustomMatCamassfract(fSetCustomMatCamassfractCmd->GetNewDoubleValue(newValue));
0405 
0406   if (command == fPhantomMaterialCmd) {
0407     fDetector->SetPhantomMaterial(fPhantomMaterialCmd->GetNewIntValue(newValue));
0408   }
0409   if (command == fPhantomDiameterCmd) {
0410     fDetector->SetPhantomDiameter(fPhantomDiameterCmd->GetNewDoubleValue(newValue));
0411   }
0412   if (command == fPhantomHeightCmd) {
0413     fDetector->SetPhantomHeight(fPhantomHeightCmd->GetNewDoubleValue(newValue));
0414   }
0415   if (command == fPhantomZCmd) {
0416     fDetector->SetPhantomZ(fPhantomZCmd->GetNewDoubleValue(newValue));
0417   }
0418 
0419   if (command == fSetComp0Cmd) fDetector->SetComp0(fSetComp0Cmd->GetNewDoubleValue(newValue));
0420   if (command == fSetComp1Cmd) fDetector->SetComp1(fSetComp1Cmd->GetNewDoubleValue(newValue));
0421   if (command == fSetComp2Cmd) fDetector->SetComp2(fSetComp2Cmd->GetNewDoubleValue(newValue));
0422   if (command == fSetComp3Cmd) fDetector->SetComp3(fSetComp3Cmd->GetNewDoubleValue(newValue));
0423 
0424   if (command == fThetaSetupCmd)
0425     fDetector->SetThetaSetup(fThetaSetupCmd->GetNewDoubleValue(newValue));
0426   if (command == fSetSlitsCmd) fDetector->SetSlits(fSetSlitsCmd->GetNewBoolValue(newValue));
0427   if (command == fSlit1ThicknessCmd)
0428     fDetector->SetSlit1Thickness(fSlit1ThicknessCmd->GetNewDoubleValue(newValue));
0429   if (command == fSlit2ThicknessCmd)
0430     fDetector->SetSlit2Thickness(fSlit2ThicknessCmd->GetNewDoubleValue(newValue));
0431   if (command == fSlit3ThicknessCmd)
0432     fDetector->SetSlit3Thickness(fSlit3ThicknessCmd->GetNewDoubleValue(newValue));
0433   if (command == fSlit4ThicknessCmd)
0434     fDetector->SetSlit4Thickness(fSlit4ThicknessCmd->GetNewDoubleValue(newValue));
0435   if (command == fSlit1DistanceCmd)
0436     fDetector->SetSlit1SampleDistance(fSlit1DistanceCmd->GetNewDoubleValue(newValue));
0437   if (command == fSlit2DistanceCmd)
0438     fDetector->SetSlit2SampleDistance(fSlit2DistanceCmd->GetNewDoubleValue(newValue));
0439   if (command == fSlit3DistanceCmd)
0440     fDetector->SetSlit3SampleDistance(fSlit3DistanceCmd->GetNewDoubleValue(newValue));
0441   if (command == fSlit4DistanceCmd)
0442     fDetector->SetSlit4SampleDistance(fSlit4DistanceCmd->GetNewDoubleValue(newValue));
0443   if (command == fSlit1xApertureCmd)
0444     fDetector->SetSlit1xAperture(fSlit1xApertureCmd->GetNewDoubleValue(newValue));
0445   if (command == fSlit2xApertureCmd)
0446     fDetector->SetSlit2xAperture(fSlit2xApertureCmd->GetNewDoubleValue(newValue));
0447   if (command == fSlit3xApertureCmd)
0448     fDetector->SetSlit3xAperture(fSlit3xApertureCmd->GetNewDoubleValue(newValue));
0449   if (command == fSlit4xApertureCmd)
0450     fDetector->SetSlit4xAperture(fSlit4xApertureCmd->GetNewDoubleValue(newValue));
0451   if (command == fSlit1yApertureCmd)
0452     fDetector->SetSlit1yAperture(fSlit1yApertureCmd->GetNewDoubleValue(newValue));
0453   if (command == fSlit2yApertureCmd)
0454     fDetector->SetSlit2yAperture(fSlit2yApertureCmd->GetNewDoubleValue(newValue));
0455   if (command == fSlit3yApertureCmd)
0456     fDetector->SetSlit3yAperture(fSlit3yApertureCmd->GetNewDoubleValue(newValue));
0457   if (command == fSlit4yApertureCmd)
0458     fDetector->SetSlit4yAperture(fSlit4yApertureCmd->GetNewDoubleValue(newValue));
0459   if (command == fDetectorThicknessCmd)
0460     fDetector->SetDetectorThickness(fDetectorThicknessCmd->GetNewDoubleValue(newValue));
0461   if (command == fDetectorSizeCmd)
0462     fDetector->SetDetectorSize(fDetectorSizeCmd->GetNewDoubleValue(newValue));
0463   if (command == fDetectorDistanceCmd)
0464     fDetector->SetDetectorSampleDistance(fDetectorDistanceCmd->GetNewDoubleValue(newValue));
0465 }
0466 
0467 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....