source: trunk/source/materials/include/G4IronStoppingICRU73.hh @ 1041

Last change on this file since 1041 was 986, checked in by garnier, 15 years ago

fichiers manquants

File size: 6.1 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: G4IronStoppingICRU73.hh,v 1.3 2008/11/02 12:22:19 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-02-ref-02 $
28
29#ifndef G4IronStoppingICRU73_h
30#define G4IronStoppingICRU73_h 1
31
32//---------------------------------------------------------------------------
33//
34// ClassName:   G4IronStoppingICRU73
35//
36// Description: Data on stopping powers for light ions in compounds
37//
38// Author:      A.Ivantchenko 8.08.2008
39//
40// Modifications:
41//
42//----------------------------------------------------------------------------
43//
44// Class Description:
45//
46// Data on Stopping Powers from the ICRU73 report
47//
48
49//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50
51
52#include "globals.hh"
53#include "G4LPhysicsFreeVector.hh"
54#include <vector>
55
56class G4IronStoppingICRU73
57{
58public:
59
60  G4IronStoppingICRU73(G4bool splineFlag = true);
61
62  ~G4IronStoppingICRU73();
63
64  G4double GetDEDX(G4int idxMaterial, G4double kinEnergy);
65
66  inline G4double GetDEDX(const G4String& NameMaterial, G4double kinEnergy);
67
68  inline G4int GetMaterialIndex(const G4String& NameMaterial);
69
70  // Function returns an unique index (>=0) for each ion-material couple (the
71  // return value is -1 if the couple is not found):
72  inline G4int GetIonMaterialCoupleIndex(
73                        G4int atomicNumber,            // Atomic number of ion
74                        const G4String& materialName); // Material name
75
76  inline G4double GetDensity(G4int idx);
77
78  inline G4String GetMaterialName(G4int idx);
79
80  inline G4PhysicsVector* GetPhysicsVector(G4int idx);
81
82  inline G4PhysicsVector* GetPhysicsVector(const G4String& NameMaterial);
83
84  inline G4double GetLowerEnergyBoundary();
85
86  inline G4double GetUpperEnergyBoundary();
87
88private:
89
90  void AddData(G4double* energy, G4double* stoppower, G4double factor);
91
92  void Initialise();
93
94  // hide assignment operator
95  G4IronStoppingICRU73 & operator=(const  G4IronStoppingICRU73 &right);
96  G4IronStoppingICRU73(const  G4IronStoppingICRU73&);
97
98  G4bool spline;
99  G4String MatName[16];
100  G4double Density[16];
101
102  // Lower and upper energy boundaries for dE/dx vectors:
103  G4double lowerEnergyBoundary;
104  G4double upperEnergyBoundary;
105
106  std::vector<G4LPhysicsFreeVector*>  dedx;
107};
108
109//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110
111inline G4double G4IronStoppingICRU73::GetDEDX(const G4String& NameMaterial, 
112                                              G4double kinEnergy)
113{
114  return GetDEDX(GetMaterialIndex(NameMaterial), kinEnergy);
115}
116
117//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119inline G4int
120G4IronStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)
121{
122  G4int idx = -1;
123  for (G4int idxMaterial=0; idxMaterial<16; idxMaterial++){
124    if(MatName[idxMaterial] == NameMaterial) {
125      idx = idxMaterial;
126      break;
127    }
128  }
129  return idx;
130}
131
132//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133
134inline G4int
135G4IronStoppingICRU73::GetIonMaterialCoupleIndex(G4int atomicNumber,
136                                                const G4String& materialName) 
137{
138  G4int idx = -1;
139  if(atomicNumber == 26) idx = GetMaterialIndex(materialName);
140  return idx;
141}
142
143//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
144
145inline G4double G4IronStoppingICRU73::GetDensity(G4int idxMaterial)
146{
147  G4double d = 0.0;
148  if( idxMaterial >= 0 && idxMaterial <= 15) d = Density[idxMaterial];
149  return d;
150}
151
152//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
153
154inline G4String G4IronStoppingICRU73::GetMaterialName(G4int idxMaterial)
155{
156  G4String s = "";
157  if( idxMaterial >= 0 && idxMaterial <= 15) s = MatName[idxMaterial];
158  return s;
159}
160
161//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
162
163inline 
164G4PhysicsVector* G4IronStoppingICRU73::GetPhysicsVector(G4int idxMaterial)
165{
166  G4PhysicsVector* v = 0;
167  if(idxMaterial >= 0 && idxMaterial <= 15) v = dedx[idxMaterial];
168  return v;
169}
170
171//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
172
173inline G4PhysicsVector* 
174G4IronStoppingICRU73::GetPhysicsVector(const G4String& NameMaterial)
175{
176  return GetPhysicsVector(GetMaterialIndex(NameMaterial));
177}
178
179//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
180
181inline G4double
182G4IronStoppingICRU73::GetLowerEnergyBoundary() {
183
184  return lowerEnergyBoundary;
185}
186
187//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
188
189inline G4double
190G4IronStoppingICRU73::GetUpperEnergyBoundary() {
191
192  return upperEnergyBoundary;
193}
194
195
196#endif
197 
Note: See TracBrowser for help on using the repository browser.