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 // 00026 // G4CascadeParameters.hh 00027 // Encapsulate all user-configurable parameters with associated envvars 00028 // 00029 // 20120912 M. Kelsey -- Add interface to support UI commands 00030 00031 #ifndef G4CascadeParameters_hh 00032 #define G4CascadeParameters_hh 1 00033 00034 #include "globals.hh" 00035 #include <iosfwd> 00036 00037 class G4CascadeParamMessenger; 00038 00039 00040 class G4CascadeParameters { 00041 public: 00042 static const G4CascadeParameters* Instance(); // Singleton 00043 ~G4CascadeParameters(); 00044 00045 // Top-level configuration flags 00046 static G4int verbose() { return Instance()->VERBOSE_LEVEL; } 00047 static G4bool usePreCompound() { return Instance()->USE_PRECOMPOUND; } 00048 static G4bool doCoalescence() { return Instance()->DO_COALESCENCE; } 00049 static const G4String& randomFile() { return Instance()->RANDOM_FILE; } 00050 00051 // Nuclear structure parameters 00052 static G4bool useTwoParam() { return Instance()->TWOPARAM_RADIUS; } 00053 static G4double radiusScale() { return Instance()->RADIUS_SCALE; } 00054 static G4double radiusSmall() { return Instance()->RADIUS_SMALL; } 00055 static G4double radiusAlpha() { return Instance()->RADIUS_ALPHA; } 00056 static G4double radiusTrailing() { return Instance()->RADIUS_TRAILING; } 00057 static G4double fermiScale() { return Instance()->FERMI_SCALE; } 00058 static G4double xsecScale() { return Instance()->XSEC_SCALE; } 00059 static G4double gammaQDScale() { return Instance()->GAMMAQD_SCALE; } 00060 00061 // Final-state clustering cuts 00062 static G4double dpMaxDoublet() { return Instance()->DPMAX_DOUBLET; } 00063 static G4double dpMaxTriplet() { return Instance()->DPMAX_TRIPLET; } 00064 static G4double dpMaxAlpha() { return Instance()->DPMAX_ALPHA; } 00065 00066 static void DumpConfiguration(std::ostream& os) { Instance()->DumpConfig(os); } 00067 00068 private: // Environment variable values, null pointers mean not set 00069 const char* G4CASCADE_VERBOSE; 00070 const char* G4CASCADE_USE_PRECOMPOUND; 00071 const char* G4CASCADE_DO_COALESCENCE; 00072 const char* G4CASCADE_RANDOM_FILE; 00073 const char* G4NUCMODEL_USE_BEST; 00074 const char* G4NUCMODEL_RAD_2PAR; 00075 const char* G4NUCMODEL_RAD_SCALE; 00076 const char* G4NUCMODEL_RAD_SMALL; 00077 const char* G4NUCMODEL_RAD_ALPHA; 00078 const char* G4NUCMODEL_RAD_TRAILING; 00079 const char* G4NUCMODEL_FERMI_SCALE; 00080 const char* G4NUCMODEL_XSEC_SCALE; 00081 const char* G4NUCMODEL_GAMMAQD; 00082 const char* DPMAX_2CLUSTER; 00083 const char* DPMAX_3CLUSTER; 00084 const char* DPMAX_4CLUSTER; 00085 00086 void Initialize(); // Fill parameter values from envvar strings 00087 00088 G4int VERBOSE_LEVEL; // Top-level configuration flags 00089 G4bool USE_PRECOMPOUND; 00090 G4bool DO_COALESCENCE; 00091 G4String RANDOM_FILE; 00092 00093 G4bool BEST_PAR; // Nuclear structure parameters 00094 G4bool TWOPARAM_RADIUS; 00095 G4double RADIUS_SCALE; 00096 G4double RADIUS_SMALL; 00097 G4double RADIUS_ALPHA; 00098 G4double RADIUS_TRAILING; 00099 G4double FERMI_SCALE; 00100 G4double XSEC_SCALE; 00101 G4double GAMMAQD_SCALE; 00102 00103 G4double DPMAX_DOUBLET; // Final-state clustering cuts 00104 G4double DPMAX_TRIPLET; 00105 G4double DPMAX_ALPHA; 00106 00107 private: // Singleton -- no public constructor 00108 G4CascadeParameters(); 00109 void DumpConfig(std::ostream& os) const; 00110 00111 G4CascadeParamMessenger* messenger; // For access via UI commands 00112 friend class G4CascadeParamMessenger; 00113 }; 00114 00115 #endif /* G4CascadeParameters_hh */