Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Isotope.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: G4Isotope.hh 96794 2016-05-09 10:09:30Z gcosmo $
28 //
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
30 
31 // class description
32 //
33 // An isotope is a chemical isotope defined by its name,
34 // Z: atomic number
35 // N: number of nucleons
36 // A: mass of a mole (optional)
37 // m: isomer state (optional)
38 // If A is not defined it is taken from Geant4 database
39 //
40 // The class contains as a private static member the table of defined
41 // isotopes (an ordered vector of isotopes).
42 //
43 // Isotopes can be assembled into elements via the G4Element class.
44 //
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
47 
48 // 20.08.11: Add flag fm for isomer level (mma)
49 // 15.11.05: GetIsotope(isotopeName, G4bool warning=false)
50 // 31.03.05: A becomes optional. Taken from Nist data base by default (mma)
51 // 26.02.02: fIndexInTable renewed
52 // 14.09.01: fCountUse: nb of elements which use this isotope
53 // 13.09.01: stl migration. Suppression of the data member fIndexInTable
54 // 30.03.01: suppression of the warning message in GetIsotope
55 // 04.08.98: new method GetIsotope(isotopeName) (mma)
56 // 17.01.97: aesthetic rearrangement (mma)
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
59 
60 #ifndef G4ISOTOPE_HH
61 #define G4ISOTOPE_HH
62 
63 #include "globals.hh"
64 #include "G4ios.hh"
65 #include <vector>
66 
67 class G4Isotope;
68 typedef std::vector<G4Isotope*> G4IsotopeTable;
69 
70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
71 
72 class G4Isotope
73 {
74  public: // with description
75 
76  // Make an isotope
77  //
78  G4Isotope(const G4String& name, //its name
79  G4int z, //atomic number
80  G4int n, //number of nucleons
81  G4double a = 0., //mass of mole
82  G4int m = 0); //isomer level
83 
84  virtual ~G4Isotope();
85 
86  // Retrieval methods
87  //
88  const G4String& GetName() const {return fName;}
89 
90  // Atomic number
91  G4int GetZ() const {return fZ;}
92 
93  // Number of nucleous
94  G4int GetN() const {return fN;}
95 
96  // Atomic mass of mole in Geant4 units with electron shell
97  G4double GetA() const {return fA;}
98 
99  // Isomer level
100  G4int Getm() const {return fm;}
101 
102  static
103  G4Isotope* GetIsotope(const G4String& name, G4bool warning=false);
104 
105  static const
107 
108  static
109  size_t GetNumberOfIsotopes();
110 
111  size_t GetIndex() const {return fIndexInTable;}
112 
113  friend
114  std::ostream& operator<<(std::ostream&, const G4Isotope*);
115 
116  friend
117  std::ostream& operator<<(std::ostream&, const G4Isotope&);
118 
119  friend
120  std::ostream& operator<<(std::ostream&, G4IsotopeTable);
121 
122  public: // without description
123 
124  G4int operator==(const G4Isotope&) const;
125  G4int operator!=(const G4Isotope&) const;
126 
127  G4Isotope(__void__&);
128  // Fake default constructor for usage restricted to direct object
129  // persistency for clients requiring preallocation of memory for
130  // persistifiable objects.
131 
132  void SetName(const G4String& name) {fName=name;}
133 
134  private:
135 
137  G4Isotope& operator=(const G4Isotope&);
138 
139  private:
140 
141  G4String fName; // name of the Isotope
142  G4int fZ; // atomic number
143  G4int fN; // number of nucleons
144  G4double fA; // atomic mass of a mole
145  G4int fm; // isomer level
146 
147  static
148  G4IsotopeTable theIsotopeTable;
149 
150  size_t fIndexInTable; // index in the Isotope table
151 };
152 
153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
154 
155 
156 #endif
const XML_Char * name
Definition: expat.h:151
G4int operator==(const G4Isotope &) const
Definition: G4Isotope.cc:125
G4double GetA() const
Definition: G4Isotope.hh:97
const G4String & GetName() const
Definition: G4Isotope.hh:88
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
void SetName(const G4String &name)
Definition: G4Isotope.hh:132
virtual ~G4Isotope()
Definition: G4Isotope.cc:92
static const G4IsotopeTable * GetIsotopeTable()
Definition: G4Isotope.cc:182
int G4int
Definition: G4Types.hh:78
static G4Isotope * GetIsotope(const G4String &name, G4bool warning=false)
Definition: G4Isotope.cc:196
std::vector< G4Isotope * > G4IsotopeTable
Definition: G4Isotope.hh:67
G4int GetN() const
Definition: G4Isotope.hh:94
static constexpr double m
Definition: G4SIunits.hh:129
G4int Getm() const
Definition: G4Isotope.hh:100
bool G4bool
Definition: G4Types.hh:79
G4int operator!=(const G4Isotope &) const
Definition: G4Isotope.cc:132
friend std::ostream & operator<<(std::ostream &, const G4Isotope *)
Definition: G4Isotope.cc:139
size_t GetIndex() const
Definition: G4Isotope.hh:111
G4Isotope(const G4String &name, G4int z, G4int n, G4double a=0., G4int m=0)
Definition: G4Isotope.cc:59
const G4int n
G4int GetZ() const
Definition: G4Isotope.hh:91
static size_t GetNumberOfIsotopes()
Definition: G4Isotope.cc:189
tuple z
Definition: test.py:28
double G4double
Definition: G4Types.hh:76