| 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: G4IonStoppingData.hh,v 1.2 2010/10/25 08:41:39 vnivanch Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $
|
|---|
| 28 | //
|
|---|
| 29 | // ===========================================================================
|
|---|
| 30 | // GEANT4 class header file
|
|---|
| 31 | //
|
|---|
| 32 | // Class: G4IonStoppingData
|
|---|
| 33 | //
|
|---|
| 34 | // Base class: G4VIonDEDXTable
|
|---|
| 35 | //
|
|---|
| 36 | // Author: Anton Lechner (Anton.Lechner@cern.ch)
|
|---|
| 37 | //
|
|---|
| 38 | // First implementation: 03. 11. 2009
|
|---|
| 39 | //
|
|---|
| 40 | // Modifications:
|
|---|
| 41 | //
|
|---|
| 42 | //
|
|---|
| 43 | // Class description: Class which can read ion stopping power data from
|
|---|
| 44 | // $G4LEDATA/ion_stopping_data
|
|---|
| 45 | //
|
|---|
| 46 | // Comments:
|
|---|
| 47 | //
|
|---|
| 48 | // ===========================================================================
|
|---|
| 49 | //
|
|---|
| 50 |
|
|---|
| 51 | #ifndef G4IONSTOPPINGDATA_HH
|
|---|
| 52 | #define G4IONSTOPPINGDATA_HH
|
|---|
| 53 |
|
|---|
| 54 | #include "globals.hh"
|
|---|
| 55 | #include "G4VIonDEDXTable.hh"
|
|---|
| 56 | #include <utility>
|
|---|
| 57 | #include <vector>
|
|---|
| 58 | #include <map>
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | class G4IonStoppingData : public G4VIonDEDXTable {
|
|---|
| 62 |
|
|---|
| 63 | public:
|
|---|
| 64 | G4IonStoppingData(const G4String& leDirectory);
|
|---|
| 65 | virtual ~G4IonStoppingData();
|
|---|
| 66 |
|
|---|
| 67 | // Function for checking the availability of stopping power tables
|
|---|
| 68 | // for a given ion-material couple, where the material consists of
|
|---|
| 69 | // a single element only.
|
|---|
| 70 | G4bool IsApplicable(
|
|---|
| 71 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 72 | G4int atomicNumberElem // Atomic number of elemental material
|
|---|
| 73 | );
|
|---|
| 74 |
|
|---|
| 75 | // Function for checking the availability of stopping power tables
|
|---|
| 76 | // for given ion-material couples.
|
|---|
| 77 | G4bool IsApplicable(
|
|---|
| 78 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 79 | const G4String& matIdentifier // Name or chemical formula of material
|
|---|
| 80 | );
|
|---|
| 81 |
|
|---|
| 82 | // Function which invokes the read/build process of physics vectors from
|
|---|
| 83 | // files in G4LEDATA
|
|---|
| 84 | G4bool BuildPhysicsVector(G4int ionZ,
|
|---|
| 85 | const G4String& matName);
|
|---|
| 86 |
|
|---|
| 87 | // Function which invokes the read/build process of physics vectors from
|
|---|
| 88 | // files in G4LEDATA
|
|---|
| 89 | G4bool BuildPhysicsVector(G4int ionZ,
|
|---|
| 90 | G4int matZ);
|
|---|
| 91 |
|
|---|
| 92 | // Function returning the stopping power vector for given ion-material
|
|---|
| 93 | // couples, where the material consists of a single element only.
|
|---|
| 94 | G4PhysicsVector* GetPhysicsVector(
|
|---|
| 95 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 96 | G4int atomicNumberElem // Atomic number of elemental material
|
|---|
| 97 | );
|
|---|
| 98 |
|
|---|
| 99 | // Function returning the stopping power vector for given ion-material
|
|---|
| 100 | // couples.
|
|---|
| 101 | G4PhysicsVector* GetPhysicsVector(
|
|---|
| 102 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 103 | const G4String& matIdenfier // Name or chemical formula of material
|
|---|
| 104 | );
|
|---|
| 105 |
|
|---|
| 106 | // Function returning the stopping power value for given ion-material
|
|---|
| 107 | // couples, where the material consists of a single element only, and
|
|---|
| 108 | // given energy.
|
|---|
| 109 | G4double GetDEDX(
|
|---|
| 110 | G4double kinEnergyPerNucleon, // Kinetic energy per nucleon
|
|---|
| 111 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 112 | G4int atomicNumberElem // Atomic number of elemental material
|
|---|
| 113 | );
|
|---|
| 114 |
|
|---|
| 115 | // Function returning the stopping power value for given ion-material
|
|---|
| 116 | // couples and given energy.
|
|---|
| 117 | G4double GetDEDX(
|
|---|
| 118 | G4double kinEnergyPerNucleon, // Kinetic energy per nucleon
|
|---|
| 119 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 120 | const G4String& matIdentifier // Name or chemical formula of material
|
|---|
| 121 | );
|
|---|
| 122 |
|
|---|
| 123 | // Function for adding dE/dx vector for an elemental materials. The last
|
|---|
| 124 | // argument only applies to elemental materials.
|
|---|
| 125 | G4bool AddPhysicsVector(
|
|---|
| 126 | G4PhysicsVector* physicsVector, // Physics vector
|
|---|
| 127 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 128 | const G4String& matIdentifier // Name or chemical formula of material
|
|---|
| 129 | );
|
|---|
| 130 |
|
|---|
| 131 | // Function for adding dE/dx vector for an elemental materials. The last
|
|---|
| 132 | // argument only applies to elemental materials.
|
|---|
| 133 | G4bool AddPhysicsVector(
|
|---|
| 134 | G4PhysicsVector* physicsVector, // Physics vector
|
|---|
| 135 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 136 | G4int atomicNumberElem // Atomic number of elemental material
|
|---|
| 137 | );
|
|---|
| 138 |
|
|---|
| 139 | // Function for removing dE/dx vector for a compound materials
|
|---|
| 140 | G4bool RemovePhysicsVector(
|
|---|
| 141 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 142 | const G4String& matIdentifier // Name or chemical formula of material
|
|---|
| 143 | );
|
|---|
| 144 | // Function for removing dE/dx vector for a compound materials
|
|---|
| 145 | G4bool RemovePhysicsVector(
|
|---|
| 146 | G4int atomicNumberIon, // Atomic number of ion
|
|---|
| 147 | G4int atomicNumberElem // Atomic number of elemental material
|
|---|
| 148 | );
|
|---|
| 149 | // Function deleting all physics vectors and clearing the maps
|
|---|
| 150 | void ClearTable();
|
|---|
| 151 |
|
|---|
| 152 | // Function printing the ion-material pairs of available vectors to stdout
|
|---|
| 153 | void DumpMap();
|
|---|
| 154 |
|
|---|
| 155 | private:
|
|---|
| 156 | // Subdirectory of G4LEDATA
|
|---|
| 157 | G4String subDir;
|
|---|
| 158 |
|
|---|
| 159 | typedef std::pair<G4int, G4int> G4IonDEDXKeyElem;
|
|---|
| 160 | typedef std::pair<G4int, G4String> G4IonDEDXKeyMat;
|
|---|
| 161 |
|
|---|
| 162 | typedef std::map<G4IonDEDXKeyElem, G4PhysicsVector*> G4IonDEDXMapElem;
|
|---|
| 163 | typedef std::map<G4IonDEDXKeyMat, G4PhysicsVector*> G4IonDEDXMapMat;
|
|---|
| 164 |
|
|---|
| 165 | G4IonDEDXMapElem dedxMapElements;
|
|---|
| 166 | G4IonDEDXMapMat dedxMapMaterials;
|
|---|
| 167 | };
|
|---|
| 168 |
|
|---|
| 169 | #endif // G4IONSTOPPINGDATA_HH
|
|---|