Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/field/field04/src/F04DetectorMessenger.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/field/field04/src/F04DetectorMessenger.cc (Version 11.3.0) and /examples/extended/field/field04/src/F04DetectorMessenger.cc (Version 9.1.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 /// \file field/field04/src/F04DetectorMesseng << 
 28 /// \brief Implementation of the F04DetectorMe << 
 29 //                                                 27 //
 30                                                    28 
 31 #include "F04DetectorMessenger.hh"                 29 #include "F04DetectorMessenger.hh"
 32                                                    30 
 33 #include "G4UIcmdWithADoubleAndUnit.hh"        <<  31 #include "G4UIdirectory.hh"
 34 #include "G4UIcmdWithAString.hh"                   32 #include "G4UIcmdWithAString.hh"
 35 #include "G4UIcmdWithAnInteger.hh"                 33 #include "G4UIcmdWithAnInteger.hh"
                                                   >>  34 #include "G4UIcmdWithADoubleAndUnit.hh"
 36 #include "G4UIcmdWithoutParameter.hh"              35 #include "G4UIcmdWithoutParameter.hh"
 37 #include "G4UIdirectory.hh"                    << 
 38                                                    36 
 39 //....oooOO0OOooo........oooOO0OOooo........oo <<  37 F04DetectorMessenger::F04DetectorMessenger(F04DetectorConstruction * Det)
                                                   >>  38  : Detector(Det)
                                                   >>  39 { 
                                                   >>  40   detDir = new G4UIdirectory("/field04/");
                                                   >>  41   detDir->SetGuidance(" field04 Simulation ");
                                                   >>  42 
                                                   >>  43   WorldMaterCmd = new G4UIcmdWithAString("/field04/SetWorldMat",this);
                                                   >>  44   WorldMaterCmd->SetGuidance("Select Material of the World");
                                                   >>  45   WorldMaterCmd->SetParameterName("wchoice",true);
                                                   >>  46   WorldMaterCmd->SetDefaultValue("Air");
                                                   >>  47   WorldMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  48 
                                                   >>  49   WorldRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetWorldR",this);
                                                   >>  50   WorldRCmd->SetGuidance("Set Radius of the World");
                                                   >>  51   WorldRCmd->SetParameterName("WSizeR",false,false);
                                                   >>  52   WorldRCmd->SetDefaultUnit("cm");
                                                   >>  53   WorldRCmd->SetRange("WSizeR>0.");
                                                   >>  54   WorldRCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  55 
                                                   >>  56   WorldZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetWorldZ",this);
                                                   >>  57   WorldZCmd->SetGuidance("Set Length of the World");
                                                   >>  58   WorldZCmd->SetParameterName("WSizeZ",false,false);
                                                   >>  59   WorldZCmd->SetDefaultUnit("cm");
                                                   >>  60   WorldZCmd->SetRange("WSizeZ>0.");
                                                   >>  61   WorldZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  62 
                                                   >>  63   CaptureRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureR",this);
                                                   >>  64   CaptureRCmd->SetGuidance("Set Radius of the Capture Magnet");
                                                   >>  65   CaptureRCmd->SetParameterName("CSizeR",false,false);
                                                   >>  66   CaptureRCmd->SetDefaultUnit("cm");
                                                   >>  67   CaptureRCmd->SetRange("CSizeR>0.");
                                                   >>  68   CaptureRCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  69 
                                                   >>  70   CaptureZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureZ",this);
                                                   >>  71   CaptureZCmd->SetGuidance("Set Length of the Capture Magnet");
                                                   >>  72   CaptureZCmd->SetParameterName("CSizeZ",false,false);
                                                   >>  73   CaptureZCmd->SetDefaultUnit("cm");
                                                   >>  74   CaptureZCmd->SetRange("CSizeZ>0.");
                                                   >>  75   CaptureZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  76 
                                                   >>  77   CaptureB1Cmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureB1",this);
                                                   >>  78   CaptureB1Cmd->SetGuidance("Set B1 of the Capture Magnet");
                                                   >>  79   CaptureB1Cmd->SetParameterName("CSizeB1",false,false);
                                                   >>  80   CaptureB1Cmd->SetDefaultUnit("tesla");
                                                   >>  81   CaptureB1Cmd->SetRange("CSizeB1>0.");
                                                   >>  82   CaptureB1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  83 
                                                   >>  84   CaptureB2Cmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureB2",this);
                                                   >>  85   CaptureB2Cmd->SetGuidance("Set B2 of the Capture Magnet");
                                                   >>  86   CaptureB2Cmd->SetParameterName("CSizeB2",false,false);
                                                   >>  87   CaptureB2Cmd->SetDefaultUnit("tesla");
                                                   >>  88   CaptureB2Cmd->SetRange("CSizeB2>0.");
                                                   >>  89   CaptureB2Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  90 
                                                   >>  91   TransferRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferR",this);
                                                   >>  92   TransferRCmd->SetGuidance("Set Radius of the Transfer Magnet");
                                                   >>  93   TransferRCmd->SetParameterName("TSizeR",false,false);
                                                   >>  94   TransferRCmd->SetDefaultUnit("cm");
                                                   >>  95   TransferRCmd->SetRange("TSizeR>0.");
                                                   >>  96   TransferRCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >>  97 
                                                   >>  98   TransferZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferZ",this);
                                                   >>  99   TransferZCmd->SetGuidance("Set Length of the Transfer Magnet");
                                                   >> 100   TransferZCmd->SetParameterName("TSizeZ",false,false);
                                                   >> 101   TransferZCmd->SetDefaultUnit("cm");
                                                   >> 102   TransferZCmd->SetRange("TSizeZ>0.");
                                                   >> 103   TransferZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 104 
                                                   >> 105   TransferBCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferB",this);
                                                   >> 106   TransferBCmd->SetGuidance("Set B of the Transfer Magnet");
                                                   >> 107   TransferBCmd->SetParameterName("TSizeB",false,false);
                                                   >> 108   TransferBCmd->SetDefaultUnit("tesla");
                                                   >> 109   TransferBCmd->SetRange("TSizeB>0.");
                                                   >> 110   TransferBCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 111 
                                                   >> 112   TransferPCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferP",this);
                                                   >> 113   TransferPCmd->SetGuidance("Set Z pos of the T-Mgnt from end of C-Mgnt");
                                                   >> 114   TransferPCmd->SetParameterName("TSizeP",false,false);
                                                   >> 115   TransferPCmd->SetDefaultUnit("cm");
                                                   >> 116   TransferPCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 117 
                                                   >> 118   TgtMaterCmd = new G4UIcmdWithAString("/field04/SetTgtMat",this);
                                                   >> 119   TgtMaterCmd->SetGuidance("Select Material of the Target");
                                                   >> 120   TgtMaterCmd->SetParameterName("tchoice",true);
                                                   >> 121   TgtMaterCmd->SetDefaultValue("Tungsten");
                                                   >> 122   TgtMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 123 
                                                   >> 124   TgtRadCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtRad",this);
                                                   >> 125   TgtRadCmd->SetGuidance("Set Radius of the Target");
                                                   >> 126   TgtRadCmd->SetParameterName("TgtSizeR",false,false);
                                                   >> 127   TgtRadCmd->SetDefaultUnit("cm");
                                                   >> 128   TgtRadCmd->SetRange("TgtSizeR>0.");
                                                   >> 129   TgtRadCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 130 
                                                   >> 131   TgtThickCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtThick",this);
                                                   >> 132   TgtThickCmd->SetGuidance("Set Thickness of the Target");
                                                   >> 133   TgtThickCmd->SetParameterName("TgtSizeZ",false,false);
                                                   >> 134   TgtThickCmd->SetDefaultUnit("cm");
                                                   >> 135   TgtThickCmd->SetRange("TgtSizeZ>0.");
                                                   >> 136   TgtThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 137 
                                                   >> 138   TgtPosCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtPos",this);
                                                   >> 139   TgtPosCmd->SetGuidance("Set Z pos of the tgt relative to C-Mgnt centre");
                                                   >> 140   TgtPosCmd->SetParameterName("TgtSizeP",false,false);
                                                   >> 141   TgtPosCmd->SetDefaultUnit("cm");
                                                   >> 142   TgtPosCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 143 
                                                   >> 144   TgtAngCmd = new G4UIcmdWithAnInteger("/field04/SetTgtAng",this);
                                                   >> 145   TgtAngCmd->SetGuidance("Set the angle [in deg] of the Tgt relative to C-Mgnt centre");
                                                   >> 146   TgtAngCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 147 
                                                   >> 148   DgrMaterCmd = new G4UIcmdWithAString("/field04/SetDgrMat",this);
                                                   >> 149   DgrMaterCmd->SetGuidance("Select Material of the Degrader");
                                                   >> 150   DgrMaterCmd->SetParameterName("dchoice",true);
                                                   >> 151   DgrMaterCmd->SetDefaultValue("Lead");
                                                   >> 152   DgrMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 153 
                                                   >> 154   DgrRadCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrRad",this);
                                                   >> 155   DgrRadCmd->SetGuidance("Set Radius of the Degrader");
                                                   >> 156   DgrRadCmd->SetParameterName("DrgSizeR",false,false);
                                                   >> 157   DgrRadCmd->SetDefaultUnit("cm");
                                                   >> 158   DgrRadCmd->SetRange("DrgSizeR>0.");
                                                   >> 159   DgrRadCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 160 
                                                   >> 161   DgrThickCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrThick",this);
                                                   >> 162   DgrThickCmd->SetGuidance("Set Thickness of the Degrader");
                                                   >> 163   DgrThickCmd->SetParameterName("DgrSizeZ",false,false);
                                                   >> 164   DgrThickCmd->SetDefaultUnit("cm");
                                                   >> 165   DgrThickCmd->SetRange("DgrSizeZ>0.");
                                                   >> 166   DgrThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 167   
                                                   >> 168   DgrPosCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrPos",this);
                                                   >> 169   DgrPosCmd->SetGuidance("Set Z pos of the Dgr relative to T-Mgnt centre");
                                                   >> 170   DgrPosCmd->SetParameterName("DgrSizeP",false,false);
                                                   >> 171   DgrPosCmd->SetDefaultUnit("cm");
                                                   >> 172   DgrPosCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
                                                   >> 173   
                                                   >> 174   UpdateCmd = new G4UIcmdWithoutParameter("/field04/Update",this);
                                                   >> 175   UpdateCmd->SetGuidance("Update field04 geometry");
                                                   >> 176   UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
                                                   >> 177   UpdateCmd->SetGuidance("if you changed geometrical value(s).");
                                                   >> 178   UpdateCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
 40                                                   179 
 41 F04DetectorMessenger::F04DetectorMessenger(F04 << 
 42 {                                              << 
 43   fDetDir = new G4UIdirectory("/field04/");    << 
 44   fDetDir->SetGuidance(" field04 Simulation ") << 
 45                                                << 
 46   fWorldMaterCmd = new G4UIcmdWithAString("/fi << 
 47   fWorldMaterCmd->SetGuidance("Select Material << 
 48   fWorldMaterCmd->SetParameterName("wchoice",  << 
 49   fWorldMaterCmd->SetDefaultValue("Air");      << 
 50   fWorldMaterCmd->AvailableForStates(G4State_P << 
 51   fWorldMaterCmd->SetToBeBroadcasted(false);   << 
 52                                                << 
 53   fWorldRCmd = new G4UIcmdWithADoubleAndUnit(" << 
 54   fWorldRCmd->SetGuidance("Set Radius of the W << 
 55   fWorldRCmd->SetParameterName("WSizeR", false << 
 56   fWorldRCmd->SetDefaultUnit("cm");            << 
 57   fWorldRCmd->SetRange("WSizeR>0.");           << 
 58   fWorldRCmd->AvailableForStates(G4State_PreIn << 
 59   fWorldRCmd->SetToBeBroadcasted(false);       << 
 60                                                << 
 61   fWorldZCmd = new G4UIcmdWithADoubleAndUnit(" << 
 62   fWorldZCmd->SetGuidance("Set Length of the W << 
 63   fWorldZCmd->SetParameterName("WSizeZ", false << 
 64   fWorldZCmd->SetDefaultUnit("cm");            << 
 65   fWorldZCmd->SetRange("WSizeZ>0.");           << 
 66   fWorldZCmd->AvailableForStates(G4State_PreIn << 
 67   fWorldZCmd->SetToBeBroadcasted(false);       << 
 68                                                << 
 69   fCaptureRCmd = new G4UIcmdWithADoubleAndUnit << 
 70   fCaptureRCmd->SetGuidance("Set Radius of the << 
 71   fCaptureRCmd->SetParameterName("CSizeR", fal << 
 72   fCaptureRCmd->SetDefaultUnit("cm");          << 
 73   fCaptureRCmd->SetRange("CSizeR>0.");         << 
 74   fCaptureRCmd->AvailableForStates(G4State_Pre << 
 75   fCaptureRCmd->SetToBeBroadcasted(false);     << 
 76                                                << 
 77   fCaptureZCmd = new G4UIcmdWithADoubleAndUnit << 
 78   fCaptureZCmd->SetGuidance("Set Length of the << 
 79   fCaptureZCmd->SetParameterName("CSizeZ", fal << 
 80   fCaptureZCmd->SetDefaultUnit("cm");          << 
 81   fCaptureZCmd->SetRange("CSizeZ>0.");         << 
 82   fCaptureZCmd->AvailableForStates(G4State_Pre << 
 83   fCaptureZCmd->SetToBeBroadcasted(false);     << 
 84                                                << 
 85   fTransferRCmd = new G4UIcmdWithADoubleAndUni << 
 86   fTransferRCmd->SetGuidance("Set Radius of th << 
 87   fTransferRCmd->SetParameterName("TSizeR", fa << 
 88   fTransferRCmd->SetDefaultUnit("cm");         << 
 89   fTransferRCmd->SetRange("TSizeR>0.");        << 
 90   fTransferRCmd->AvailableForStates(G4State_Pr << 
 91   fTransferRCmd->SetToBeBroadcasted(false);    << 
 92                                                << 
 93   fTransferZCmd = new G4UIcmdWithADoubleAndUni << 
 94   fTransferZCmd->SetGuidance("Set Length of th << 
 95   fTransferZCmd->SetParameterName("TSizeZ", fa << 
 96   fTransferZCmd->SetDefaultUnit("cm");         << 
 97   fTransferZCmd->SetRange("TSizeZ>0.");        << 
 98   fTransferZCmd->AvailableForStates(G4State_Pr << 
 99   fTransferZCmd->SetToBeBroadcasted(false);    << 
100                                                << 
101   fTransferPCmd = new G4UIcmdWithADoubleAndUni << 
102   fTransferPCmd->SetGuidance("Set Z pos of the << 
103   fTransferPCmd->SetParameterName("TSizeP", fa << 
104   fTransferPCmd->SetDefaultUnit("cm");         << 
105   fTransferPCmd->AvailableForStates(G4State_Pr << 
106   fTransferPCmd->SetToBeBroadcasted(false);    << 
107                                                << 
108   fTgtMaterCmd = new G4UIcmdWithAString("/fiel << 
109   fTgtMaterCmd->SetGuidance("Select Material o << 
110   fTgtMaterCmd->SetParameterName("tchoice", tr << 
111   fTgtMaterCmd->SetDefaultValue("Tungsten");   << 
112   fTgtMaterCmd->AvailableForStates(G4State_Pre << 
113   fTgtMaterCmd->SetToBeBroadcasted(false);     << 
114                                                << 
115   fTgtRadCmd = new G4UIcmdWithADoubleAndUnit(" << 
116   fTgtRadCmd->SetGuidance("Set Radius of the T << 
117   fTgtRadCmd->SetParameterName("TgtSizeR", fal << 
118   fTgtRadCmd->SetDefaultUnit("cm");            << 
119   fTgtRadCmd->SetRange("TgtSizeR>0.");         << 
120   fTgtRadCmd->AvailableForStates(G4State_PreIn << 
121   fTgtRadCmd->SetToBeBroadcasted(false);       << 
122                                                << 
123   fTgtThickCmd = new G4UIcmdWithADoubleAndUnit << 
124   fTgtThickCmd->SetGuidance("Set Thickness of  << 
125   fTgtThickCmd->SetParameterName("TgtSizeZ", f << 
126   fTgtThickCmd->SetDefaultUnit("cm");          << 
127   fTgtThickCmd->SetRange("TgtSizeZ>0.");       << 
128   fTgtThickCmd->AvailableForStates(G4State_Pre << 
129   fTgtThickCmd->SetToBeBroadcasted(false);     << 
130                                                << 
131   fTgtPosCmd = new G4UIcmdWithADoubleAndUnit(" << 
132   fTgtPosCmd->SetGuidance("Set Z pos of the tg << 
133   fTgtPosCmd->SetParameterName("TgtSizeP", fal << 
134   fTgtPosCmd->SetDefaultUnit("cm");            << 
135   fTgtPosCmd->AvailableForStates(G4State_PreIn << 
136   fTgtPosCmd->SetToBeBroadcasted(false);       << 
137                                                << 
138   fTgtAngCmd = new G4UIcmdWithAnInteger("/fiel << 
139   fTgtAngCmd->SetGuidance("Set the angle [in d << 
140   fTgtAngCmd->AvailableForStates(G4State_PreIn << 
141   fTgtAngCmd->SetToBeBroadcasted(false);       << 
142                                                << 
143   fDgrMaterCmd = new G4UIcmdWithAString("/fiel << 
144   fDgrMaterCmd->SetGuidance("Select Material o << 
145   fDgrMaterCmd->SetParameterName("dchoice", tr << 
146   fDgrMaterCmd->SetDefaultValue("Lead");       << 
147   fDgrMaterCmd->AvailableForStates(G4State_Pre << 
148   fDgrMaterCmd->SetToBeBroadcasted(false);     << 
149                                                << 
150   fDgrRadCmd = new G4UIcmdWithADoubleAndUnit(" << 
151   fDgrRadCmd->SetGuidance("Set Radius of the D << 
152   fDgrRadCmd->SetParameterName("DrgSizeR", fal << 
153   fDgrRadCmd->SetDefaultUnit("cm");            << 
154   fDgrRadCmd->SetRange("DrgSizeR>0.");         << 
155   fDgrRadCmd->AvailableForStates(G4State_PreIn << 
156   fDgrRadCmd->SetToBeBroadcasted(false);       << 
157                                                << 
158   fDgrThickCmd = new G4UIcmdWithADoubleAndUnit << 
159   fDgrThickCmd->SetGuidance("Set Thickness of  << 
160   fDgrThickCmd->SetParameterName("DgrSizeZ", f << 
161   fDgrThickCmd->SetDefaultUnit("cm");          << 
162   fDgrThickCmd->SetRange("DgrSizeZ>0.");       << 
163   fDgrThickCmd->AvailableForStates(G4State_Pre << 
164   fDgrThickCmd->SetToBeBroadcasted(false);     << 
165                                                << 
166   fDgrPosCmd = new G4UIcmdWithADoubleAndUnit(" << 
167   fDgrPosCmd->SetGuidance("Set Z pos of the Dg << 
168   fDgrPosCmd->SetParameterName("DgrSizeP", fal << 
169   fDgrPosCmd->SetDefaultUnit("cm");            << 
170   fDgrPosCmd->AvailableForStates(G4State_PreIn << 
171   fDgrPosCmd->SetToBeBroadcasted(false);       << 
172 }                                                 180 }
173                                                   181 
174 //....oooOO0OOooo........oooOO0OOooo........oo << 
175                                                << 
176 F04DetectorMessenger::~F04DetectorMessenger()     182 F04DetectorMessenger::~F04DetectorMessenger()
177 {                                                 183 {
178   delete fDetDir;                              << 184   delete detDir;
179                                                   185 
180   delete fWorldMaterCmd;                       << 186   delete WorldMaterCmd;
181   delete fWorldRCmd;                           << 187   delete WorldRCmd;
182   delete fWorldZCmd;                           << 188   delete WorldZCmd;
183                                                << 189 
184   delete fCaptureRCmd;                         << 190   delete CaptureRCmd;
185   delete fCaptureZCmd;                         << 191   delete CaptureZCmd;
186                                                << 192   delete CaptureB1Cmd;
187   delete fTransferRCmd;                        << 193   delete CaptureB2Cmd;
188   delete fTransferZCmd;                        << 194 
189   delete fTransferPCmd;                        << 195   delete TransferRCmd;
190                                                << 196   delete TransferZCmd;
191   delete fTgtMaterCmd;                         << 197   delete TransferBCmd;
192   delete fTgtRadCmd;                           << 198   delete TransferPCmd;
193   delete fTgtThickCmd;                         << 199 
194   delete fTgtPosCmd;                           << 200   delete TgtMaterCmd;
195   delete fTgtAngCmd;                           << 201   delete TgtRadCmd;
196                                                << 202   delete TgtThickCmd;
197   delete fDgrMaterCmd;                         << 203   delete TgtPosCmd;
198   delete fDgrRadCmd;                           << 204   delete TgtAngCmd;
199   delete fDgrThickCmd;                         << 205 
200   delete fDgrPosCmd;                           << 206   delete DgrMaterCmd;
201 }                                              << 207   delete DgrRadCmd; 
                                                   >> 208   delete DgrThickCmd;
                                                   >> 209   delete DgrPosCmd;
202                                                   210 
203 //....oooOO0OOooo........oooOO0OOooo........oo << 211   delete UpdateCmd;
                                                   >> 212 }
204                                                   213 
205 void F04DetectorMessenger::SetNewValue(G4UIcom << 214 void F04DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
206 {                                                 215 {
207   if (command == fWorldMaterCmd) {             << 216   if( command == WorldMaterCmd )
208     fDetector->SetWorldMaterial(newValue);     << 217    { Detector->SetWorldMaterial(newValue);}
209   }                                            << 
210                                                << 
211   if (command == fTgtMaterCmd) {               << 
212     fDetector->SetTargetMaterial(newValue);    << 
213   }                                            << 
214                                                << 
215   if (command == fDgrMaterCmd) {               << 
216     fDetector->SetDegraderMaterial(newValue);  << 
217   }                                            << 
218                                                << 
219   if (command == fWorldRCmd) {                 << 
220     fDetector->SetWorldSizeR(fWorldRCmd->GetNe << 
221   }                                            << 
222                                                << 
223   if (command == fWorldZCmd) {                 << 
224     fDetector->SetWorldSizeZ(fWorldZCmd->GetNe << 
225   }                                            << 
226                                                << 
227   if (command == fCaptureRCmd)                 << 
228     fDetector->SetCaptureMgntRadius(fCaptureRC << 
229                                                << 
230   if (command == fCaptureZCmd)                 << 
231     fDetector->SetCaptureMgntLength(fCaptureZC << 
232                                                << 
233   if (command == fTransferRCmd)                << 
234     fDetector->SetTransferMgntRadius(fTransfer << 
235                                                << 
236   if (command == fTransferZCmd)                << 
237     fDetector->SetTransferMgntLength(fTransfer << 
238                                                << 
239   if (command == fTransferPCmd)                << 
240     fDetector->SetTransferMgntPos(fTransferPCm << 
241                                                << 
242   if (command == fTgtRadCmd) fDetector->SetTar << 
243                                                << 
244   if (command == fTgtThickCmd)                 << 
245     fDetector->SetTargetThickness(fTgtThickCmd << 
246                                                << 
247   if (command == fTgtPosCmd) fDetector->SetTar << 
248                                                << 
249   if (command == fTgtAngCmd) fDetector->SetTar << 
250                                                << 
251   if (command == fDgrRadCmd) fDetector->SetDeg << 
252                                                << 
253   if (command == fDgrThickCmd)                 << 
254     fDetector->SetDegraderThickness(fDgrThickC << 
255                                                << 
256   if (command == fDgrPosCmd) fDetector->SetDeg << 
257                                                   218 
258   if (command == fWorldZCmd) fDetector->SetWor << 219   if( command == TgtMaterCmd )
                                                   >> 220    { Detector->SetTargetMaterial(newValue);}
                                                   >> 221  
                                                   >> 222   if( command == DgrMaterCmd )
                                                   >> 223    { Detector->SetDegraderMaterial(newValue);}
                                                   >> 224 
                                                   >> 225   if( command == WorldRCmd )
                                                   >> 226    { Detector->SetWorldSizeR(WorldRCmd->GetNewDoubleValue(newValue));}
                                                   >> 227 
                                                   >> 228   if( command == WorldZCmd )
                                                   >> 229    { Detector->SetWorldSizeZ(WorldZCmd->GetNewDoubleValue(newValue));}
                                                   >> 230 
                                                   >> 231   if( command == CaptureRCmd )
                                                   >> 232    { Detector->SetCaptureMgntRadius(CaptureRCmd->GetNewDoubleValue(newValue));}
                                                   >> 233 
                                                   >> 234   if( command == CaptureZCmd )
                                                   >> 235    { Detector->SetCaptureMgntLength(CaptureZCmd->GetNewDoubleValue(newValue));}
                                                   >> 236 
                                                   >> 237   if( command == CaptureB1Cmd )
                                                   >> 238    { Detector->SetCaptureMgntB1(CaptureB1Cmd->GetNewDoubleValue(newValue));}
                                                   >> 239 
                                                   >> 240   if( command == CaptureB2Cmd )
                                                   >> 241    { Detector->SetCaptureMgntB2(CaptureB2Cmd->GetNewDoubleValue(newValue));}
                                                   >> 242 
                                                   >> 243   if( command == TransferRCmd )
                                                   >> 244   { Detector->SetTransferMgntRadius(TransferRCmd->GetNewDoubleValue(newValue));}
                                                   >> 245 
                                                   >> 246   if( command == TransferZCmd )
                                                   >> 247   { Detector->SetTransferMgntLength(TransferZCmd->GetNewDoubleValue(newValue));}
                                                   >> 248 
                                                   >> 249   if( command == TransferBCmd )
                                                   >> 250    { Detector->SetTransferMgntB(TransferBCmd->GetNewDoubleValue(newValue));}
                                                   >> 251 
                                                   >> 252   if( command == TransferPCmd )
                                                   >> 253   { Detector->SetTransferMgntPos(TransferPCmd->GetNewDoubleValue(newValue));}
                                                   >> 254 
                                                   >> 255   if( command == TgtRadCmd )
                                                   >> 256    { Detector->SetTargetRadius(TgtRadCmd->GetNewDoubleValue(newValue));}
                                                   >> 257 
                                                   >> 258   if( command == TgtThickCmd )
                                                   >> 259    { Detector->SetTargetThickness(TgtThickCmd->GetNewDoubleValue(newValue));}
                                                   >> 260 
                                                   >> 261   if( command == TgtPosCmd )
                                                   >> 262    { Detector->SetTargetPos(TgtPosCmd->GetNewDoubleValue(newValue));}
                                                   >> 263 
                                                   >> 264   if( command == TgtAngCmd )
                                                   >> 265    { Detector->SetTargetAngle(TgtAngCmd->GetNewIntValue(newValue));}
                                                   >> 266 
                                                   >> 267   if( command == DgrRadCmd )
                                                   >> 268    { Detector->SetDegraderRadius(DgrRadCmd->GetNewDoubleValue(newValue));}
                                                   >> 269  
                                                   >> 270   if( command == DgrThickCmd )
                                                   >> 271    { Detector->SetDegraderThickness(DgrThickCmd->GetNewDoubleValue(newValue));}
                                                   >> 272    
                                                   >> 273   if( command == DgrPosCmd )
                                                   >> 274    { Detector->SetDegraderPos(DgrPosCmd->GetNewDoubleValue(newValue));}
                                                   >> 275    
                                                   >> 276   if( command == WorldZCmd )
                                                   >> 277    { Detector->SetWorldSizeZ(WorldZCmd->GetNewDoubleValue(newValue));}
                                                   >> 278    
                                                   >> 279   if( command == WorldRCmd )
                                                   >> 280    { Detector->SetWorldSizeR(WorldRCmd->GetNewDoubleValue(newValue));}
                                                   >> 281    
                                                   >> 282   if( command == UpdateCmd )
                                                   >> 283    { Detector->UpdateGeometry(); }
259                                                   284 
260   if (command == fWorldRCmd) fDetector->SetWor << 
261 }                                                 285 }
262                                                   286