Geant4  10.02
G4NuclearLevelManager.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 // $Id: G4NuclearLevelManager.hh 87163 2014-11-26 08:46:54Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 // GEANT 4 class file
30 //
31 // CERN, Geneva, Switzerland
32 //
33 // File name: G4NuclearLevelManager
34 //
35 // Author: Maria Grazia Pia (pia@genova.infn.it)
36 //
37 // Creation date: 25 October 1998
38 //
39 // Modifications:
40 // 21 Nov. 2001, Fan Lei (flei@space.qinetiq.com)
41 // Added K->N+ internal conversion coefficiencies and their access
42 // functions
43 //
44 //
45 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
46 // Added half-life, angular momentum, parity, emissioni type
47 // reading from experimental data.
48 // 02 May 2003, Vladimir Ivanchenko remove rublic copy contructor
49 // 06 Oct 2010, M. Kelsey -- Use object storage, not pointers, drop
50 // public access to list
51 // -------------------------------------------------------------------
52 
53 #ifndef G4NUCLEARLEVELMANAGER_HH
54 #define G4NUCLEARLEVELMANAGER_HH 1
55 
56 #include <iosfwd>
57 #include <CLHEP/Units/SystemOfUnits.h>
58 
59 #include "globals.hh"
60 #include "G4PtrLevelVector.hh"
61 
62 class G4NuclearLevel;
63 
64 
66 {
67 
68 public:
69 
70  G4NuclearLevelManager(G4int Z, G4int A, const G4String& filename);
72 
74 
75  void SetNucleus(G4int Z, G4int A, const G4String& filename);
76 
77  inline G4bool IsValid() const { return _validity; }
78 
79  inline G4int NumberOfLevels() const { return (_levels ? _levels->size() : 0); }
80 
81  const G4NuclearLevel* GetLevel(G4int i) const;
82 
84  G4double eDiffMax=1.e+8) const;
85 
86  const G4NuclearLevel* LowestLevel() const;
87  const G4NuclearLevel* HighestLevel() const;
88 
89  G4double MinLevelEnergy() const;
90  G4double MaxLevelEnergy() const;
91 
92  void PrintLevels();
93 
94  void PrintAll();
95 
96 private:
98  G4bool operator==(const G4NuclearLevelManager &right) const;
99  G4bool operator!=(const G4NuclearLevelManager &right) const;
100 
101  G4bool Read(std::ifstream& aDataFile);
102  G4bool ReadDataLine(std::ifstream& dataFile);
103  G4bool ReadDataItem(std::istream& dataFile, G4double& x);
104  void ProcessDataLine();
105 
106  void MakeLevels(const G4String& filename);
107  void ClearLevels();
108 
110  void AddDataToLevel(G4NuclearLevel* level);
111  void FinishLevel(G4NuclearLevel* level);
112 
115  //G4String _fileName;
118 
119  // Buffers for reading data file
120  //char buffer[30]; // For doubles in scientific notation
127  static G4double _kCC;
128  static G4double _l1CC;
129  static G4double _l2CC;
130  static G4double _l3CC;
131  static G4double _m1CC;
132  static G4double _m2CC;
133  static G4double _m3CC;
134  static G4double _m4CC;
135  static G4double _m5CC;
138 };
139 
140 #endif
G4NuclearLevelManager(G4int Z, G4int A, const G4String &filename)
const G4NuclearLevel * HighestLevel() const
G4double MinLevelEnergy() const
G4NuclearLevel * UseLevelOrMakeNew(G4NuclearLevel *level)
G4bool Read(std::ifstream &aDataFile)
int G4int
Definition: G4Types.hh:78
G4bool ReadDataItem(std::istream &dataFile, G4double &x)
std::vector< G4NuclearLevel * > G4PtrLevelVector
double A(double temperature)
void SetNucleus(G4int Z, G4int A, const G4String &filename)
const G4NuclearLevel * LowestLevel() const
const G4NuclearLevel * GetLevel(G4int i) const
bool G4bool
Definition: G4Types.hh:79
G4bool operator==(const G4NuclearLevelManager &right) const
void MakeLevels(const G4String &filename)
G4bool ReadDataLine(std::ifstream &dataFile)
G4double energy(const ThreeVector &p, const G4double m)
const G4double x[NPOINTSGL]
void FinishLevel(G4NuclearLevel *level)
double G4double
Definition: G4Types.hh:76
void AddDataToLevel(G4NuclearLevel *level)
G4double MaxLevelEnergy() const
const G4NuclearLevel * NearestLevel(G4double energy, G4double eDiffMax=1.e+8) const
G4bool operator!=(const G4NuclearLevelManager &right) const
const G4NuclearLevelManager & operator=(const G4NuclearLevelManager &right)