G4GeneralParticleSourceMessenger.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00027 //
00028 // MODULE:       G4GeneralParticleSourceMessenger.hh
00029 //
00030 // Version:      2.0
00031 // Date:         5/02/04
00032 // Author:       Fan Lei 
00033 // Organisation: QinetiQ ltd.
00034 // Customer:     ESA/ESTEC
00035 //
00037 //
00038 // CHANGE HISTORY
00039 // --------------
00040 //
00041 // Version 2.0, 05/02/2004, Fan Lei, Created.
00042 //    After changes to version 1.1 as in Geant4 v6.0
00043 //     - Mutilple particle source definition
00044 //     - Re-structured commands
00045 //     - old commonds have been retained for backward compatibility, will be
00046 //       removed in the future. 
00047 //
00049 //
00050 //
00051 // Class Description:
00052 //
00053 // The function of the G4GeneralParticleSourceMessenger is to allow the user to
00054 // enter commands either in interactive command line mode or through macros to
00055 // control the G4GeneralParticleSource. 
00056 //
00058 //
00059 // MEMBER FUNCTIONS
00060 // ----------------
00061 //
00062 // G4GeneralParticleSourceMessenger(G4GeneralParticleSource *fPtclGun)
00063 //     Constructor:  Sets up commands.
00064 //
00065 // ~G4GeneralParticleSourceMessenger()
00066 //     Destructor:  Deletes commands.
00067 //
00068 // void SetParticleGun(G4SingleParticleSource *fpg) { fParticleGun = fpg; } ;
00069 //     To selecte the particle gun to be defined/modified. 
00070 // void SetNewValue(G4UIcommand *command, G4String newValues)
00071 //     Uses the appropriate methods in the G4GeneralParticleSource to carry out
00072 //     the user commands.
00073 // G4String GetCurrentValue(G4UIcommand *command)
00074 //     Allows the user to retrieve the current values of parameters.
00075 //     Not implemented yet.
00076 //
00078 //
00079 #ifndef G4GeneralParticleSourceMessenger_h
00080 #define G4GeneralParticleSourceMessenger_h 1
00081 
00082 #include "G4UImessenger.hh"
00083 #include "globals.hh"
00084 
00085 class G4ParticleTable;
00086 class G4UIcommand;
00087 class G4UIdirectory;
00088 class G4UIcmdWithoutParameter;
00089 class G4UIcmdWithAString;
00090 class G4UIcmdWithADoubleAndUnit;
00091 class G4UIcmdWith3Vector;
00092 class G4UIcmdWith3VectorAndUnit;
00093 class G4UIcmdWithAnInteger;
00094 class G4UIcmdWithADouble;
00095 class G4UIcmdWithABool;
00096 class G4UIcmdWithoutParameter;
00097 
00098 class G4SingleParticleSource;
00099 class G4GeneralParticleSource;
00100 
00101 class G4GeneralParticleSourceMessenger: public G4UImessenger
00102 {
00103 public:
00104   G4GeneralParticleSourceMessenger(G4GeneralParticleSource*);
00105   ~G4GeneralParticleSourceMessenger();
00106 
00107   void SetParticleGun(G4SingleParticleSource *fpg) { fParticleGun = fpg; } ;
00108   //    To selecte the particle gun to be defined/modified.   
00109   void SetNewValue(G4UIcommand *command, G4String newValues);
00110   //    Identifies the command which has been invoked by the user, extracts the
00111   //    parameters associated with that command (held in newValues), and uses
00112   //    these values with the appropriate member function of G4GeneralParticleSource.
00113   G4String GetCurrentValue(G4UIcommand *command);
00114 
00115 private:
00116   void IonCommand(G4String newValues);
00117 
00118 private:
00119   G4GeneralParticleSource *fGPS;
00120   G4SingleParticleSource *fParticleGun;
00121   G4ParticleTable *particleTable;
00122   G4String histtype;
00123     
00124 private: //commands
00125   G4UIdirectory              *gpsDirectory;
00126   // multiple source control commands
00127   G4UIdirectory              *sourceDirectory;
00128   G4UIcmdWithADouble         *addsourceCmd;
00129   G4UIcmdWithoutParameter    *listsourceCmd;
00130   G4UIcmdWithoutParameter    *clearsourceCmd;
00131   G4UIcmdWithoutParameter    *getsourceCmd;
00132   G4UIcmdWithAnInteger       *setsourceCmd;  
00133   G4UIcmdWithADouble         *setintensityCmd;
00134   G4UIcmdWithAnInteger       *deletesourceCmd;
00135   G4UIcmdWithABool           *multiplevertexCmd;
00136   G4UIcmdWithABool           *flatsamplingCmd;
00137   // positional commands
00138   G4UIdirectory              *positionDirectory;
00139   G4UIcmdWithAString         *typeCmd1;
00140   G4UIcmdWithAString         *shapeCmd1;
00141   G4UIcmdWith3VectorAndUnit  *centreCmd1;
00142   G4UIcmdWith3Vector         *posrot1Cmd1;
00143   G4UIcmdWith3Vector         *posrot2Cmd1;
00144   G4UIcmdWithADoubleAndUnit  *halfxCmd1;
00145   G4UIcmdWithADoubleAndUnit  *halfyCmd1;
00146   G4UIcmdWithADoubleAndUnit  *halfzCmd1;
00147   G4UIcmdWithADoubleAndUnit  *radiusCmd1;
00148   G4UIcmdWithADoubleAndUnit  *radius0Cmd1;
00149   G4UIcmdWithADoubleAndUnit  *possigmarCmd1;
00150   G4UIcmdWithADoubleAndUnit  *possigmaxCmd1;
00151   G4UIcmdWithADoubleAndUnit  *possigmayCmd1;
00152   G4UIcmdWithADoubleAndUnit  *paralpCmd1;
00153   G4UIcmdWithADoubleAndUnit  *partheCmd1;
00154   G4UIcmdWithADoubleAndUnit  *parphiCmd1;  
00155   G4UIcmdWithAString         *confineCmd1;         
00156   //old ones, will be reomved soon
00157   G4UIcmdWithAString         *typeCmd;
00158   G4UIcmdWithAString         *shapeCmd;
00159   G4UIcmdWith3VectorAndUnit  *centreCmd;
00160   G4UIcmdWith3Vector         *posrot1Cmd;
00161   G4UIcmdWith3Vector         *posrot2Cmd;
00162   G4UIcmdWithADoubleAndUnit  *halfxCmd;
00163   G4UIcmdWithADoubleAndUnit  *halfyCmd;
00164   G4UIcmdWithADoubleAndUnit  *halfzCmd;
00165   G4UIcmdWithADoubleAndUnit  *radiusCmd;
00166   G4UIcmdWithADoubleAndUnit  *radius0Cmd;
00167   G4UIcmdWithADoubleAndUnit  *possigmarCmd;
00168   G4UIcmdWithADoubleAndUnit  *possigmaxCmd;
00169   G4UIcmdWithADoubleAndUnit  *possigmayCmd;
00170   G4UIcmdWithADoubleAndUnit  *paralpCmd;
00171   G4UIcmdWithADoubleAndUnit  *partheCmd;
00172   G4UIcmdWithADoubleAndUnit  *parphiCmd;  
00173   G4UIcmdWithAString         *confineCmd;         
00174   // angular commands
00175   G4UIdirectory              *angularDirectory;
00176   G4UIcmdWithAString         *angtypeCmd1;
00177   G4UIcmdWith3Vector         *angrot1Cmd1;
00178   G4UIcmdWith3Vector         *angrot2Cmd1;
00179   G4UIcmdWithADoubleAndUnit  *minthetaCmd1;
00180   G4UIcmdWithADoubleAndUnit  *maxthetaCmd1;
00181   G4UIcmdWithADoubleAndUnit  *minphiCmd1;
00182   G4UIcmdWithADoubleAndUnit  *maxphiCmd1;
00183   G4UIcmdWithADoubleAndUnit  *angsigmarCmd1;
00184   G4UIcmdWithADoubleAndUnit  *angsigmaxCmd1;
00185   G4UIcmdWithADoubleAndUnit  *angsigmayCmd1;
00186   G4UIcmdWith3VectorAndUnit  *angfocusCmd;
00187   G4UIcmdWithABool           *useuserangaxisCmd1;
00188   G4UIcmdWithABool           *surfnormCmd1;
00189   // old ones, will be removed soon
00190   G4UIcmdWithAString         *angtypeCmd;
00191   G4UIcmdWith3Vector         *angrot1Cmd;
00192   G4UIcmdWith3Vector         *angrot2Cmd;
00193   G4UIcmdWithADoubleAndUnit  *minthetaCmd;
00194   G4UIcmdWithADoubleAndUnit  *maxthetaCmd;
00195   G4UIcmdWithADoubleAndUnit  *minphiCmd;
00196   G4UIcmdWithADoubleAndUnit  *maxphiCmd;
00197   G4UIcmdWithADoubleAndUnit  *angsigmarCmd;
00198   G4UIcmdWithADoubleAndUnit  *angsigmaxCmd;
00199   G4UIcmdWithADoubleAndUnit  *angsigmayCmd;
00200   G4UIcmdWithABool           *useuserangaxisCmd;
00201   G4UIcmdWithABool           *surfnormCmd;
00202   // energy commands
00203   G4UIdirectory              *energyDirectory;
00204   G4UIcmdWithAString         *energytypeCmd1;
00205   G4UIcmdWithADoubleAndUnit  *eminCmd1;
00206   G4UIcmdWithADoubleAndUnit  *emaxCmd1;
00207   G4UIcmdWithADoubleAndUnit  *monoenergyCmd1;
00208   G4UIcmdWithADoubleAndUnit  *engsigmaCmd1;
00209   G4UIcmdWithADouble         *alphaCmd1;
00210   G4UIcmdWithADouble         *tempCmd1;
00211   G4UIcmdWithADouble         *ezeroCmd1;
00212   G4UIcmdWithADouble         *gradientCmd1;
00213   G4UIcmdWithADouble         *interceptCmd1;
00214   G4UIcmdWithADouble         *arbeintCmd1;
00215   G4UIcmdWithoutParameter    *calculateCmd1;
00216   G4UIcmdWithABool           *energyspecCmd1;
00217   G4UIcmdWithABool           *diffspecCmd1;
00218   // old ones, will be removed soon
00219   G4UIcmdWithAString         *energytypeCmd;
00220   G4UIcmdWithADoubleAndUnit  *eminCmd;
00221   G4UIcmdWithADoubleAndUnit  *emaxCmd;
00222   G4UIcmdWithADoubleAndUnit  *monoenergyCmd;
00223   G4UIcmdWithADoubleAndUnit  *engsigmaCmd;
00224   G4UIcmdWithADouble         *alphaCmd;
00225   G4UIcmdWithADouble         *tempCmd;
00226   G4UIcmdWithADouble         *ezeroCmd;
00227   G4UIcmdWithADouble         *gradientCmd;
00228   G4UIcmdWithADouble         *interceptCmd;
00229   G4UIcmdWithoutParameter    *calculateCmd;
00230   G4UIcmdWithABool           *energyspecCmd;
00231   G4UIcmdWithABool           *diffspecCmd;
00232   // histogram commands
00233   G4UIdirectory              *histDirectory;
00234   G4UIcmdWith3Vector         *histpointCmd;
00235   G4UIcmdWithAString         *histnameCmd;
00236   G4UIcmdWithAString         *arbintCmd;
00237   G4UIcmdWithAString         *resethistCmd;
00238   // old ones, will be removed soon
00239   G4UIcmdWith3Vector         *histpointCmd1;
00240   G4UIcmdWithAString         *histfileCmd1;
00241   G4UIcmdWithAString         *histnameCmd1;
00242   G4UIcmdWithAString         *arbintCmd1;
00243   G4UIcmdWithAString         *resethistCmd1;
00244 
00245   //
00246   G4UIcmdWithAnInteger       *verbosityCmd;
00247 
00248   // below are commands from G4ParticleGun
00249 
00250   G4UIcommand                *ionCmd;
00251   G4UIcmdWithAString         *particleCmd;
00252   G4UIcmdWithADoubleAndUnit  *timeCmd;
00253   G4UIcmdWith3Vector         *polCmd;
00254   G4UIcmdWithAnInteger       *numberCmd;
00255   G4UIcmdWith3VectorAndUnit  *positionCmd;
00256   G4UIcmdWith3Vector         *directionCmd;
00257   G4UIcmdWithADoubleAndUnit  *energyCmd;
00258   G4UIcmdWithoutParameter    *listCmd;
00259 
00260 
00261   private: // for ion shooting
00262     G4bool   fShootIon; 
00263     G4int    fAtomicNumber;
00264     G4int    fAtomicMass;
00265     G4int    fIonCharge;
00266     G4double fIonExciteEnergy;
00267 
00268 };
00269 
00270 #endif
00271 

Generated on Mon May 27 17:48:21 2013 for Geant4 by  doxygen 1.4.7