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

Last change on this file since 1353 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 5.4 KB
RevLine 
[1197]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//
[1315]26// $Id: G4DensityEffectData.hh,v 1.10 2010/05/15 15:37:33 vnivanch Exp $
[1337]27// GEANT4 tag $Name: geant4-09-04-beta-01 $
[1197]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"
[1315]53#include "G4Material.hh"
[1197]54#include <vector>
55
56//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57
58const G4int NDENSDATA  = 278;
59const G4int NDENSARRAY = 9;
60const G4int NDENSELEM  = 98;
61
62class G4DensityEffectData 
63{
64public:
65
66  G4DensityEffectData();
67
68  ~G4DensityEffectData();
69
70  // return index by Z, -1 if material is not in the table
[1315]71  G4int GetElementIndex(G4int Z, G4State mState);
[1197]72
73  // return index by material name, -1 if material is not in the table
74  G4int GetIndex(const G4String& matName);
75
76  // printout data for material
77  void PrintData(const G4String& matName);
78
79  // printout all data
80  void DumpData();
81
82  // Access to the data via index
[1228]83  inline G4double GetPlasmaEnergy(G4int idx); 
84  inline G4double GetAdjustmentFactor(G4int idx); 
85  inline G4double GetCdensity(G4int idx); 
86  inline G4double GetX0density(G4int idx); 
87  inline G4double GetX1density(G4int idx); 
88  inline G4double GetAdensity(G4int idx); 
89  inline G4double GetMdensity(G4int idx); 
90  inline G4double GetDelta0density(G4int idx); 
91  inline G4double GetErrorDensity(G4int idx); 
[1197]92
93private:
94
95  void Initialize();
96
[1228]97  void AddMaterial(G4double* val, const G4String& matName);
[1197]98
99  // Assignment operator and copy constructor
100  G4DensityEffectData & operator=(const G4DensityEffectData &right);
101  G4DensityEffectData(const G4DensityEffectData&);
102
[1228]103  G4double data[NDENSDATA][NDENSARRAY];
[1197]104  std::vector<G4String> names;
[1315]105
106  // indexes defined only for pure materials
[1197]107  G4int indexZ[NDENSELEM];
[1315]108  G4State state[NDENSELEM];
[1197]109
110  G4int index;
111
112};
113
[1228]114inline G4double G4DensityEffectData::GetPlasmaEnergy(G4int idx)
[1197]115{
[1228]116  G4double x = DBL_MAX;
[1197]117  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][0]; }
118  return x;
119} 
120
[1228]121inline G4double G4DensityEffectData::GetAdjustmentFactor(G4int idx)
[1197]122{
[1228]123  G4double x = DBL_MAX;
[1197]124  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][1]; }
125  return x;
126} 
127
[1228]128inline G4double G4DensityEffectData::GetCdensity(G4int idx)
[1197]129{
[1228]130  G4double x = DBL_MAX;
[1197]131  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][2]; }
132  return x;
133} 
134
[1228]135inline G4double G4DensityEffectData::GetX0density(G4int idx)
[1197]136{
[1228]137  G4double x = DBL_MAX;
[1197]138  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][3]; }
139  return x;
140} 
141
[1228]142inline G4double G4DensityEffectData::GetX1density(G4int idx)
[1197]143{
[1228]144  G4double x = DBL_MAX;
[1197]145  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][4]; }
146  return x;
147} 
148
[1228]149inline G4double G4DensityEffectData::GetAdensity(G4int idx)
[1197]150{
[1228]151  G4double x = DBL_MAX;
[1197]152  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][5]; }
153  return x;
154}
155 
[1228]156inline G4double G4DensityEffectData::GetMdensity(G4int idx)
[1197]157{
[1228]158  G4double x = DBL_MAX;
[1197]159  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][6]; }
160  return x;
161} 
162
[1228]163inline G4double G4DensityEffectData::GetDelta0density(G4int idx)
[1197]164{
[1228]165  G4double x = DBL_MAX;
[1197]166  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][7]; }
167  return x;
168} 
169
[1228]170inline G4double G4DensityEffectData::GetErrorDensity(G4int idx)
[1197]171{
[1228]172  G4double x = DBL_MAX;
[1197]173  if(idx >= 0 && idx < NDENSDATA) { x = data[idx][8]; }
174  return x;
175} 
176
177
178//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
179
180#endif
181 
Note: See TracBrowser for help on using the repository browser.