Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4GlaubAADataSetHandler.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 // * *
21 // * Parts of this code which have been developed by QinetiQ Ltd *
22 // * under contract to the European Space Agency (ESA) are the *
23 // * intellectual property of ESA. Rights to use, copy, modify and *
24 // * redistribute this software for general public use are granted *
25 // * in compliance with any licensing, distribution and development *
26 // * policy adopted by the Geant4 Collaboration. This code has been *
27 // * written by QinetiQ Ltd for the European Space Agency, under ESA *
28 // * contract 19770/06/NL/JD (Technology Research Programme). *
29 // * *
30 // * By using, copying, modifying or distributing the software (or *
31 // * any work based on the software) you agree to acknowledge its *
32 // * use in resulting scientific publications, and indicate your *
33 // * acceptance of all terms of the Geant4 Software license. *
34 // ********************************************************************
35 //
36 /// \file hadronic/Hadr02/include/G4GlaubAADataSetHandler.hh
37 /// \brief Definition of the G4GlaubAADataSetHandler class
38 //
39 // $Id: G4GlaubAADataSetHandler.hh 77519 2013-11-25 10:54:57Z gcosmo $
40 //
41 
42 #ifndef G4GlaubAADataSetHandler_h
43 #define G4GlaubAADataSetHandler_h
44 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 //
46 // MODULE: G4GlaubAADataSetHandler.hh
47 //
48 // Version: 0.A
49 // Date: 02/04/08
50 // Author: P R Truscott
51 // Organisation: QinetiQ Ltd, UK
52 // Customer: ESA/ESTEC, NOORDWIJK
53 // Contract: 19770/06/NL/JD
54 //
55 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 //
57 // Class Description
58 //
59 //
60 // Class Description - End
61 //
62 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 ///////////////////////////////////////////////////////////////////////////////
64 //
65 
66 #include "G4ParticleDefinition.hh"
67 #include "G4Isotope.hh"
68 #include "globals.hh"
69 
70 #include <map>
71 #include <vector>
72 
73 class G4GlauberDataSet;
75 
76 #include "G4GlaubAADataSet.hh"
77 #include "G4FullGlaubAADataSet.hh"
79 #include "G4DPMJET2_5Model.hh"
80 
81 typedef std::map< G4int, G4ParamType1GlaubAADataSet *, std::less< G4int > >
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85 
87 {
88 
89 protected:
91 
92 public:
93 
94  virtual ~G4GlaubAADataSetHandler ();
96 
97  G4bool IsGlauberDataSetAvailable (const G4int AP, const G4int AT) const;
98  G4bool SetCurrentGlauberDataSet (const G4int AP, const G4int AT,
99  const G4double ppn = 0.0);
102  G4double GetValueN (const G4double v, const G4double ppn1 = 0.0);
103  G4double GetValueM (const G4double v, const G4double ppn1 = 0.0);
104 
105  void SetMaxGlauberDataSets (const G4int n);
106  G4int GetMaxGlauberDataSets () const;
107 
108  inline void SetVerboseLevel (const G4int i);
109  inline G4int GetVerboseLevel () const;
110 
112 
113 private:
114 
115  G4VGlauberDataSet *LoadGlauberDataReturnPtr(const G4int AP, const G4int AT);
116 
117  G4bool CheckIfSpace () const;
118  G4int GetIndexID (const G4int AP, const G4int AT) const;
119  G4String GetStringID (const G4int AP, const G4int AT) const;
120  G4String GetProjectileStringID (const G4int AP) const;
121  G4String GetTargetStringID (const G4int AT) const;
122 
123  static G4GlaubAADataSetHandler *instance;
124 
125  G4GlaubAADataSetIndex theIndex;
126  G4String glauberDataSetDir;
127 
128  G4int maxGlauberDataSets;
129  G4int cntGlauberDataSets;
130 
131  G4GlaubAADataSet *theCurrentGlauberDataSet;
132  G4double ppnCurrent;
133  G4bool usingLocalGlauberDataSet;
134 
135  G4int maxArray;
136 
137  G4int verboseLevel;
138 };
139 
140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
141 
143 {verboseLevel = i;}
144 
145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
146 
148 {return verboseLevel;}
149 
150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
151 
152 #endif
G4bool IsGlauberDataSetAvailable(const G4int AP, const G4int AT) const
void SetMaxGlauberDataSets(const G4int n)
G4int GetMaxGlauberDataSets() const
Definition of the G4ParamType1GlaubAADataSet class.
G4GlaubAADataSet * GetCurrentGlauberDataSet() const
Definition of the G4FullGlaubAADataSet class.
virtual ~G4GlaubAADataSetHandler()
std::map< G4int, G4ParamType1GlaubAADataSet *, std::less< G4int > > G4GlaubAADataSetIndex
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
G4double GetValueN(const G4double v, const G4double ppn1=0.0)
G4double GetValueM(const G4double v, const G4double ppn1=0.0)
const G4int n
void SetVerboseLevel(const G4int i)
G4bool SetCurrentGlauberDataSet(const G4int AP, const G4int AT, const G4double ppn=0.0)
Definition of the G4GlaubAADataSet class.
static G4GlaubAADataSetHandler * getInstance()
double G4double
Definition: G4Types.hh:76
Definition of the G4DPMJET2_5Model class.