Geant4_10
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 77025 2013-11-20 16:11:51Z 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>
58 
59 #include "globals.hh"
60 #include "G4PtrLevelVector.hh"
61 
62 class G4NuclearLevel;
63 
64 
66 {
67 
68 public:
69 
70  //G4NuclearLevelManager();
71  G4NuclearLevelManager(G4int Z, G4int A, const G4String& filename);
73 
75 
76  void SetNucleus(G4int Z, G4int A, const G4String& filename);
77 
78  inline G4bool IsValid() const { return _validity; }
79 
80  inline G4int NumberOfLevels() const { return (_levels ? _levels->size() : 0); }
81 
82  const G4NuclearLevel* GetLevel(G4int i) const;
83 
85  G4double eDiffMax=9999.*CLHEP::GeV) const;
86 
87  const G4NuclearLevel* LowestLevel() const;
88  const G4NuclearLevel* HighestLevel() const;
89 
90  G4double MinLevelEnergy() const;
91  G4double MaxLevelEnergy() const;
92 
93  void PrintAll();
94 
95 private:
96  const G4NuclearLevelManager& operator=(const G4NuclearLevelManager &right);
97  G4bool operator==(const G4NuclearLevelManager &right) const;
98  G4bool operator!=(const G4NuclearLevelManager &right) const;
99 
100  G4bool Read(std::ifstream& aDataFile);
101  G4bool ReadDataLine(std::ifstream& dataFile);
102  G4bool ReadDataItem(std::istream& dataFile, G4double& x);
103  void ProcessDataLine();
104 
105  void MakeLevels();
106  void ClearLevels();
107 
108  G4NuclearLevel* UseLevelOrMakeNew(G4NuclearLevel* level);
109  void AddDataToLevel(G4NuclearLevel* level);
110  void FinishLevel(G4NuclearLevel* level);
111 
112  G4int _nucleusA;
113  G4int _nucleusZ;
114  G4String _fileName;
115  G4bool _validity;
116  G4PtrLevelVector* _levels;
117 
118  // Buffers for reading data file
119  char buffer[30]; // For doubles in scientific notation
120  G4double _levelEnergy;
121  G4double _gammaEnergy;
122  G4double _probability;
123  G4double _polarity;
124  G4double _halfLife;
125  G4double _angularMomentum;
126  G4double _kCC;
127  G4double _l1CC;
128  G4double _l2CC;
129  G4double _l3CC;
130  G4double _m1CC;
131  G4double _m2CC;
132  G4double _m3CC;
133  G4double _m4CC;
134  G4double _m5CC;
135  G4double _nPlusCC;
136  G4double _totalCC;
137 };
138 
139 #endif
G4NuclearLevelManager(G4int Z, G4int A, const G4String &filename)
const G4NuclearLevel * HighestLevel() const
G4double MinLevelEnergy() const
tuple x
Definition: test.py:50
int G4int
Definition: G4Types.hh:78
std::vector< G4NuclearLevel * > G4PtrLevelVector
double energy
Definition: plottest35.C:25
void SetNucleus(G4int Z, G4int A, const G4String &filename)
Float_t Z
Definition: plot.C:39
const G4NuclearLevel * LowestLevel() const
const G4NuclearLevel * GetLevel(G4int i) const
bool G4bool
Definition: G4Types.hh:79
double G4double
Definition: G4Types.hh:76
const G4NuclearLevel * NearestLevel(G4double energy, G4double eDiffMax=9999.*CLHEP::GeV) const
G4double MaxLevelEnergy() const