source: trunk/source/materials/include/G4DensityEffectData.hh @ 1202

Last change on this file since 1202 was 1197, checked in by garnier, 15 years ago

nvx fichiers dans CVS

File size: 5.3 KB
Line 
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: G4DensityEffectData.hh,v 1.6 2009/11/05 10:42:14 bagoulia Exp $
27// GEANT4 tag $Name: materials-V09-02-18 $
28
29//---------------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33// Description: Data on density effect
34//
35// Authors:   A.Bagulya, A.Ivanchenko 28.10.2009
36//
37// Modifications:
38//
39//
40//
41//----------------------------------------------------------------------------
42//
43//  Data are taken from: 
44//  R.M. Sternheimer et al. Density Effect for the Ionization Loss of Charged
45//  Particles in Various Substances. Atom. Data Nucl. Data Tabl. 30 (1984) 261-271.
46
47#ifndef DensityEffectData_h
48#define DensityEffectData_h 1
49
50//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51
52#include "globals.hh"
53#include <vector>
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56
57const G4int NDENSDATA  = 278;
58const G4int NDENSARRAY = 9;
59const G4int NDENSELEM  = 98;
60
61class G4DensityEffectData 
62{
63public:
64
65  G4DensityEffectData();
66
67  ~G4DensityEffectData();
68
69  // return index by Z, -1 if material is not in the table
70  G4int GetIndex(const G4int Z);
71
72  // return index by material name, -1 if material is not in the table
73  G4int GetIndex(const G4String& matName);
74
75  // printout data for material
76  void PrintData(const G4String& matName);
77
78  // printout all data
79  void DumpData();
80
81  // Access to the data via index
82  inline G4float GetPlasmaEnergy(G4int idx); 
83  inline G4float GetAdjustmentFactor(G4int idx); 
84  inline G4float GetCdensity(G4int idx); 
85  inline G4float GetX0density(G4int idx); 
86  inline G4float GetX1density(G4int idx); 
87  inline G4float GetAdensity(G4int idx); 
88  inline G4float GetMdensity(G4int idx); 
89  inline G4float GetDelta0density(G4int idx); 
90  inline G4float GetErrorDensity(G4int idx); 
91
92private:
93
94  void Initialize();
95
96  void AddMaterial(G4float* val, const G4String& matName);
97
98  // Assignment operator and copy constructor
99  G4DensityEffectData & operator=(const G4DensityEffectData &right);
100  G4DensityEffectData(const G4DensityEffectData&);
101
102  G4float data[NDENSDATA][NDENSARRAY];
103  std::vector<G4String> names;
104  G4int indexZ[NDENSELEM];
105
106  G4int index;
107
108};
109
110inline G4float G4DensityEffectData::GetPlasmaEnergy(G4int idx)
111{
112  G4float x = DBL_MAX;
113  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][0]; }
114  return x;
115} 
116
117inline G4float G4DensityEffectData::GetAdjustmentFactor(G4int idx)
118{
119  G4float x = DBL_MAX;
120  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][1]; }
121  return x;
122} 
123
124inline G4float G4DensityEffectData::GetCdensity(G4int idx)
125{
126  G4float x = DBL_MAX;
127  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][2]; }
128  return x;
129} 
130
131inline G4float G4DensityEffectData::GetX0density(G4int idx)
132{
133  G4float x = DBL_MAX;
134  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][3]; }
135  return x;
136} 
137
138inline G4float G4DensityEffectData::GetX1density(G4int idx)
139{
140  G4float x = DBL_MAX;
141  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][4]; }
142  return x;
143} 
144
145inline G4float G4DensityEffectData::GetAdensity(G4int idx)
146{
147  G4float x = DBL_MAX;
148  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][5]; }
149  return x;
150}
151 
152inline G4float G4DensityEffectData::GetMdensity(G4int idx)
153{
154  G4float x = DBL_MAX;
155  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][6]; }
156  return x;
157} 
158
159inline G4float G4DensityEffectData::GetDelta0density(G4int idx)
160{
161  G4float x = DBL_MAX;
162  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][7]; }
163  return x;
164} 
165
166inline G4float G4DensityEffectData::GetErrorDensity(G4int idx)
167{
168  G4float x = DBL_MAX;
169  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][8]; }
170  return x;
171} 
172
173
174//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
175
176#endif
177 
Note: See TracBrowser for help on using the repository browser.