Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4DNAMolecularMaterial.hh
이 파일의 문서화 페이지로 가기
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: G4DNAMolecularMaterial.hh 103042 2017-03-10 11:50:07Z gcosmo $
27 //
28 // Author: Mathieu Karamitros
29 //
30 // We would be very happy hearing from you, send us your feedback! :)
31 //
32 // In order for Geant4-DNA to be maintained and still open-source,
33 // article citations are crucial.
34 // If you use Geant4-DNA chemistry and you publish papers about your software,
35 // in addition to the general paper on Geant4-DNA:
36 //
37 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
38 //
39 // we would be very happy if you could please also cite the following
40 // reference papers on chemistry:
41 //
42 // J. Comput. Phys. 274 (2014) 841-882
43 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
44 
45 #ifndef G4DNAMolecularMaterial_HH
46 #define G4DNAMolecularMaterial_HH
47 
48 #include "globals.hh"
49 #include "G4ios.hh"
50 #include <map>
51 #include <vector>
52 #include "G4VStateDependent.hh"
53 
54 class G4Material;
56 
65 {
66  bool operator()(const G4Material* mat1, const G4Material* mat2) const;
67 };
68 
69 typedef std::map<const G4Material*, double, CompareMaterial> ComponentMap;
70 
97 {
98 public:
100  static void DeleteInstance();
101  void Initialize();
102  void Clear();
103 
104  virtual G4bool Notify(G4ApplicationState requestedState);
105 
106  //----------------------------------------------------------------------------
107 
124  const std::vector<double>* GetDensityTableFor(const G4Material*) const;
125 
141  const std::vector<double>* GetNumMolPerVolTableFor(const G4Material*) const;
142 
143  inline const std::vector<ComponentMap>* GetMassFractionTable() const{
144  return fpCompFractionTable;
145  }
146  inline const std::vector<ComponentMap>* GetDensityTable() const{
147  return fpCompDensityTable;
148  }
149 
150  //----------------------------------------------------------------------------
151 
153 
168 
182  const G4String&);
183 
196  void SetMolecularConfiguration(const G4String& materialName,
197  const G4String& molUserIF);
198 
199  //----------------------------------------------------------------------------
200 
210 
220  const G4Material *component,
221  G4double massFraction);
222 
223 protected:
228  virtual ~G4DNAMolecularMaterial();
229  void Create();
230  void InitializeNumMolPerVol();
231  void InitializeDensity();
232  void RecordMolecularMaterial(G4Material* parentMaterial,
233  G4Material* molecularMaterial,
234  G4double fraction);
235  void SearchMolecularMaterial(G4Material* parentMaterial,
236  G4Material* material,
237  double currentFraction);
238 
239  void AddMaterial(const G4Material*, double fraction);
240 
241  void PrintNotAMolecularMaterial(const char* methodName,
242  const G4Material* lookForMaterial) const;
243 
244  // Tables built for all molecular materials at initialization
245  std::vector<ComponentMap>* fpCompFractionTable;
246  std::vector<ComponentMap>* fpCompDensityTable;
247  std::vector<ComponentMap>* fpCompNumMolPerVolTable;
248 
249  mutable std::map<const G4Material*, std::vector<double>*, CompareMaterial>
251  mutable std::map<const G4Material*, std::vector<double>*, CompareMaterial>
253  mutable std::map<const G4Material*, bool, CompareMaterial> fWarningPrinted;
254 
255  std::map<int /*Material ID*/,
257 
259  size_t fNMaterials;
260 };
261 
262 #endif // G4DNAMolecularMaterial_HH
std::vector< ComponentMap > * fpCompDensityTable
void SearchMolecularMaterial(G4Material *parentMaterial, G4Material *material, double currentFraction)
void SetMolecularConfiguration(const G4Material *, G4MolecularConfiguration *)
Associate a molecular configuration to a G4material.
G4DNAMolecularMaterial builds tables of molecular densities for chosen molecular materials. The class handles homogeneous, composite and derived materials. A material of interest is labeled as molecular if built using the number of atoms rather than the mass fractions.
Materials can be described as a derivation of existing &quot;parent&quot; materials in order to alter few of th...
std::map< int, G4MolecularConfiguration * > fMaterialToMolecularConf
static G4DNAMolecularMaterial * fInstance
G4double GetNumMoleculePerVolumeUnitForMaterial(const G4Material *mat)
Deprecated.
std::map< const G4Material *, std::vector< double > *, CompareMaterial > fAskedDensityTable
std::vector< ComponentMap > * fpCompFractionTable
const std::vector< double > * GetNumMolPerVolTableFor(const G4Material *) const
Retrieve a table of molecular densities (number of molecules per unit volume) in the G4 unit system f...
std::map< const G4Material *, double, CompareMaterial > ComponentMap
bool operator()(const G4Material *mat1, const G4Material *mat2) const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
const std::vector< ComponentMap > * GetDensityTable() const
void RecordMolecularMaterial(G4Material *parentMaterial, G4Material *molecularMaterial, G4double fraction)
const std::vector< double > * GetDensityTableFor(const G4Material *) const
Retrieve a table of volumetric mass densities (mass per unit volume) in the G4 unit system for chosen...
void AddMaterial(const G4Material *, double fraction)
static G4DNAMolecularMaterial * Instance()
Float_t mat
G4DNAMolecularMaterial & operator=(const G4DNAMolecularMaterial &)
std::vector< ComponentMap > * fpCompNumMolPerVolTable
std::map< const G4Material *, bool, CompareMaterial > fWarningPrinted
G4double GetNumMolPerVolForComponentInComposite(const G4Material *composite, const G4Material *component, G4double massFraction)
Deprecated.
const std::vector< ComponentMap > * GetMassFractionTable() const
void PrintNotAMolecularMaterial(const char *methodName, const G4Material *lookForMaterial) const
G4ApplicationState
G4MolecularConfiguration * GetMolecularConfiguration(const G4Material *) const
std::map< const G4Material *, std::vector< double > *, CompareMaterial > fAskedNumPerVolTable
virtual G4bool Notify(G4ApplicationState requestedState)