Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4CascadeParameters.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4CascadeParameters.hh 72016 2013-07-03 16:24:15Z mkelsey $
27 // Encapsulate all user-configurable parameters with associated envvars
28 //
29 // 20120912 M. Kelsey -- Add interface to support UI commands
30 // 20130304 M. Kelsey -- Add flag to collect and display cascade structure
31 // 20130308 M. Kelsey -- Add flag to use separate 3-body momentum generators
32 // 20130421 M. Kelsey -- Add flag for CHECK_ECONS, replacing #ifdef's
33 // 20130702 M. Kelsey -- Add flag to use N-body phase-space generator
34 
35 #ifndef G4CascadeParameters_hh
36 #define G4CascadeParameters_hh 1
37 
38 #include "globals.hh"
39 #include <iosfwd>
40 
42 
43 
45 public:
46  static const G4CascadeParameters* Instance(); // Singleton
48 
49  // Top-level configuration flags
50  static G4int verbose() { return Instance()->VERBOSE_LEVEL; }
51  static G4bool checkConservation() { return Instance()->CHECK_ECONS; }
52  static G4bool usePreCompound() { return Instance()->USE_PRECOMPOUND; }
53  static G4bool doCoalescence() { return Instance()->DO_COALESCENCE; }
54  static G4bool showHistory() { return Instance()->SHOW_HISTORY; }
55  static G4bool use3BodyMom() { return Instance()->USE_3BODYMOM; }
56  static G4bool usePhaseSpace() { return Instance()->USE_PHASESPACE; }
57  static const G4String& randomFile() { return Instance()->RANDOM_FILE; }
58 
59  // Nuclear structure parameters
60  static G4bool useTwoParam() { return Instance()->TWOPARAM_RADIUS; }
61  static G4double radiusScale() { return Instance()->RADIUS_SCALE; }
62  static G4double radiusSmall() { return Instance()->RADIUS_SMALL; }
63  static G4double radiusAlpha() { return Instance()->RADIUS_ALPHA; }
64  static G4double radiusTrailing() { return Instance()->RADIUS_TRAILING; }
65  static G4double fermiScale() { return Instance()->FERMI_SCALE; }
66  static G4double xsecScale() { return Instance()->XSEC_SCALE; }
67  static G4double gammaQDScale() { return Instance()->GAMMAQD_SCALE; }
68 
69  // Final-state clustering cuts
70  static G4double dpMaxDoublet() { return Instance()->DPMAX_DOUBLET; }
71  static G4double dpMaxTriplet() { return Instance()->DPMAX_TRIPLET; }
72  static G4double dpMaxAlpha() { return Instance()->DPMAX_ALPHA; }
73 
74  static void DumpConfiguration(std::ostream& os) { Instance()->DumpConfig(os); }
75 
76 private: // Environment variable values, null pointers mean not set
77  const char* G4CASCADE_VERBOSE;
78  const char* G4CASCADE_CHECK_ECONS;
79  const char* G4CASCADE_USE_PRECOMPOUND;
80  const char* G4CASCADE_DO_COALESCENCE;
81  const char* G4CASCADE_SHOW_HISTORY;
82  const char* G4CASCADE_USE_3BODYMOM;
83  const char* G4CASCADE_USE_PHASESPACE;
84  const char* G4CASCADE_RANDOM_FILE;
85  const char* G4NUCMODEL_USE_BEST;
86  const char* G4NUCMODEL_RAD_2PAR;
87  const char* G4NUCMODEL_RAD_SCALE;
88  const char* G4NUCMODEL_RAD_SMALL;
89  const char* G4NUCMODEL_RAD_ALPHA;
90  const char* G4NUCMODEL_RAD_TRAILING;
91  const char* G4NUCMODEL_FERMI_SCALE;
92  const char* G4NUCMODEL_XSEC_SCALE;
93  const char* G4NUCMODEL_GAMMAQD;
94  const char* DPMAX_2CLUSTER;
95  const char* DPMAX_3CLUSTER;
96  const char* DPMAX_4CLUSTER;
97 
98  void Initialize(); // Fill parameter values from envvar strings
99 
100  G4int VERBOSE_LEVEL; // Top-level configuration flags
101  G4bool CHECK_ECONS;
102  G4bool USE_PRECOMPOUND;
103  G4bool DO_COALESCENCE;
104  G4bool SHOW_HISTORY;
105  G4bool USE_3BODYMOM;
106  G4bool USE_PHASESPACE;
107  G4String RANDOM_FILE;
108 
109  G4bool BEST_PAR; // Nuclear structure parameters
110  G4bool TWOPARAM_RADIUS;
111  G4double RADIUS_SCALE;
112  G4double RADIUS_SMALL;
113  G4double RADIUS_ALPHA;
114  G4double RADIUS_TRAILING;
115  G4double FERMI_SCALE;
116  G4double XSEC_SCALE;
117  G4double GAMMAQD_SCALE;
118 
119  G4double DPMAX_DOUBLET; // Final-state clustering cuts
120  G4double DPMAX_TRIPLET;
121  G4double DPMAX_ALPHA;
122 
123 private: // Singleton -- no public constructor
125  void DumpConfig(std::ostream& os) const;
126 
127  G4CascadeParamMessenger* messenger; // For access via UI commands
129 };
130 
131 #endif /* G4CascadeParameters_hh */
static G4double xsecScale()
static G4bool showHistory()
static G4double dpMaxAlpha()
static G4double radiusTrailing()
static G4double radiusScale()
static G4bool doCoalescence()
static G4bool checkConservation()
int G4int
Definition: G4Types.hh:78
static const G4String & randomFile()
bool G4bool
Definition: G4Types.hh:79
static G4bool usePhaseSpace()
static G4double fermiScale()
static G4double radiusAlpha()
static const G4CascadeParameters * Instance()
static G4double dpMaxTriplet()
static G4double dpMaxDoublet()
static G4bool useTwoParam()
static G4bool use3BodyMom()
double G4double
Definition: G4Types.hh:76
static G4double radiusSmall()
static void DumpConfiguration(std::ostream &os)
static G4double gammaQDScale()
static G4bool usePreCompound()