Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MaterialPropertiesTable.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//
27// $Id$
28//
29////////////////////////////////////////////////////////////////////////
30//
31// class G4MaterialPropertiesTable
32//
33// Class description:
34//
35// A Material properties table is a hash table, with
36// key = property name, and value either G4double or
37// G4MaterialPropertyVector
38
39// File: G4MaterialPropertiesTable.hh
40// Version: 1.0
41// Created: 1996-02-08
42// Author: Juliet Armstrong
43// Updated: 2005-05-12 add SetGROUPVEL() by P. Gumplinger
44// 2002-11-05 add named material constants by P. Gumplinger
45// 1999-11-05 Migration from G4RWTPtrHashDictionary to STL
46// by John Allison
47// 1999-10-29 add method and class descriptors
48// 1997-03-25 by Peter Gumplinger
49// > cosmetics (only)
50// mail: [email protected]
51//
52////////////////////////////////////////////////////////////////////////
53
54#ifndef G4MaterialPropertiesTable_h
55#define G4MaterialPropertiesTable_h 1
56
57/////////////
58// Includes
59/////////////
60
61#include <cmath>
62#include <map>
63#include "globals.hh"
65
66/////////////////////
67// Class Definition
68/////////////////////
69
71{
72 public: // Without description
73
76
77 public: // With description
78
79 inline void AddConstProperty(const char *key,
80 G4double PropertyValue);
81 // Add a new property to the table by giving a key-name and value
82
83 inline G4MaterialPropertyVector* AddProperty(const char *key,
84 G4double *PhotonEnergies,
85 G4double *PropertyValues,
86 G4int NumEntries);
87 // Add a new property to the table by giving a key-name and the
88 // arrays x and y of size NumEntries.
89
90 inline void AddProperty(const char *key, G4MaterialPropertyVector *opv);
91 // Add a new property to the table by giving a key-name and an
92 // already constructed G4MaterialPropertyVector.
93
94 inline void RemoveConstProperty(const char *key);
95 // Remove a constant property from the table.
96
97 inline void RemoveProperty(const char *key);
98 // Remove a property from the table.
99
100 inline G4double GetConstProperty(const char *key);
101 // Get the constant property from the table corresponding to the key-name
102
103 inline G4bool ConstPropertyExists(const char *key);
104 // Return true if a const property 'key' exists.
105
106 inline G4MaterialPropertyVector* GetProperty(const char *key);
107 // Get the property from the table corresponding to the key-name.
108
109 inline void AddEntry(const char *key, G4double aPhotonEnergy,
110 G4double aPropertyValue);
111 // Add a new entry (pair of numbers) to the table for a given key.
112
113 void DumpTable();
114
115 public: // without description
116
117 const std::map< G4String, G4MaterialPropertyVector*, std::less<G4String> >*
118 GetPropertiesMap() const { return &MPT; }
119 const std::map< G4String, G4double, std::less<G4String> >*
120 GetPropertiesCMap() const { return &MPTC; }
121 // Accessors required for persistency purposes
122
123 private:
124
125 G4MaterialPropertyVector* SetGROUPVEL();
126
127 private:
128
129 std::map<G4String, G4MaterialPropertyVector*, std::less<G4String> > MPT;
130 typedef std::map< G4String, G4MaterialPropertyVector*,
131 std::less<G4String> >::iterator MPTiterator;
132
133 std::map< G4String, G4double, std::less<G4String> > MPTC;
134 typedef std::map< G4String, G4double,
135 std::less<G4String> >::iterator MPTCiterator;
136};
137
138/////////////////////
139// Inline definitions
140/////////////////////
141
142#include "G4MaterialPropertiesTable.icc"
143
144#endif /* G4MaterialPropertiesTable_h */
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
const std::map< G4String, G4MaterialPropertyVector *, std::less< G4String > > * GetPropertiesMap() const
G4MaterialPropertyVector * GetProperty(const char *key)
void AddEntry(const char *key, G4double aPhotonEnergy, G4double aPropertyValue)
G4bool ConstPropertyExists(const char *key)
void AddConstProperty(const char *key, G4double PropertyValue)
void RemoveConstProperty(const char *key)
G4double GetConstProperty(const char *key)
const std::map< G4String, G4double, std::less< G4String > > * GetPropertiesCMap() const
void AddProperty(const char *key, G4MaterialPropertyVector *opv)
void RemoveProperty(const char *key)
G4MaterialPropertyVector * AddProperty(const char *key, G4double *PhotonEnergies, G4double *PropertyValues, G4int NumEntries)