[819] | 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 | // |
---|
[1347] | 26 | // $Id: G4NuclearLevelManager.hh,v 1.6 2010/11/17 16:50:53 vnivanch Exp $ |
---|
| 27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $ |
---|
| 28 | // |
---|
[819] | 29 | // ------------------------------------------------------------------- |
---|
| 30 | // GEANT 4 class file |
---|
| 31 | // |
---|
| 32 | // CERN, Geneva, Switzerland |
---|
| 33 | // |
---|
| 34 | // File name: G4NuclearLevelManager |
---|
| 35 | // |
---|
| 36 | // Author: Maria Grazia Pia (pia@genova.infn.it) |
---|
| 37 | // |
---|
| 38 | // Creation date: 25 October 1998 |
---|
| 39 | // |
---|
| 40 | // Modifications: |
---|
| 41 | // 21 Nov. 2001, Fan Lei (flei@space.qinetiq.com) |
---|
| 42 | // Added K->N+ internal conversion coefficiencies and their access |
---|
| 43 | // functions |
---|
| 44 | // |
---|
| 45 | // |
---|
| 46 | // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) |
---|
| 47 | // Added half-life, angular momentum, parity, emissioni type |
---|
| 48 | // reading from experimental data. |
---|
| 49 | // 02 May 2003, Vladimir Ivanchenko remove rublic copy contructor |
---|
[1340] | 50 | // 06 Oct 2010, M. Kelsey -- Use object storage, not pointers, drop |
---|
| 51 | // public access to list |
---|
[819] | 52 | // ------------------------------------------------------------------- |
---|
| 53 | |
---|
| 54 | #ifndef G4NUCLEARLEVELMANAGER_HH |
---|
[1347] | 55 | #define G4NUCLEARLEVELMANAGER_HH 1 |
---|
[819] | 56 | |
---|
| 57 | #include "globals.hh" |
---|
| 58 | #include "G4PtrLevelVector.hh" |
---|
[1340] | 59 | #include <iosfwd> |
---|
[819] | 60 | |
---|
[1340] | 61 | class G4NuclearLevel; |
---|
| 62 | |
---|
| 63 | |
---|
[819] | 64 | class G4NuclearLevelManager |
---|
| 65 | { |
---|
| 66 | |
---|
| 67 | public: |
---|
| 68 | |
---|
| 69 | G4NuclearLevelManager(); |
---|
[1347] | 70 | G4NuclearLevelManager(G4int Z, G4int A, const G4String& filename); |
---|
[819] | 71 | G4NuclearLevelManager(const G4NuclearLevelManager & right); |
---|
| 72 | |
---|
| 73 | ~G4NuclearLevelManager(); |
---|
| 74 | |
---|
[1347] | 75 | void SetNucleus(G4int Z, G4int A, const G4String& filename); |
---|
[819] | 76 | |
---|
[1347] | 77 | inline G4bool IsValid() const { return _validity; } |
---|
[819] | 78 | |
---|
[1347] | 79 | inline G4int NumberOfLevels() const { return (_levels ? _levels->size() : 0); } |
---|
[819] | 80 | |
---|
[1340] | 81 | const G4NuclearLevel* GetLevel(G4int i) const; |
---|
[819] | 82 | |
---|
[1347] | 83 | const G4NuclearLevel* NearestLevel(G4double energy, |
---|
| 84 | G4double eDiffMax=9999.*GeV) const; |
---|
[819] | 85 | |
---|
| 86 | const G4NuclearLevel* LowestLevel() const; |
---|
| 87 | const G4NuclearLevel* HighestLevel() const; |
---|
| 88 | |
---|
| 89 | G4double MinLevelEnergy() const; |
---|
| 90 | G4double MaxLevelEnergy() const; |
---|
| 91 | |
---|
| 92 | void PrintAll(); |
---|
| 93 | |
---|
| 94 | private: |
---|
| 95 | const G4NuclearLevelManager& operator=(const G4NuclearLevelManager &right); |
---|
| 96 | G4bool operator==(const G4NuclearLevelManager &right) const; |
---|
| 97 | G4bool operator!=(const G4NuclearLevelManager &right) const; |
---|
| 98 | |
---|
| 99 | G4bool Read(std::ifstream& aDataFile); |
---|
[1340] | 100 | G4bool ReadDataLine(std::ifstream& dataFile); |
---|
| 101 | G4bool ReadDataItem(std::istream& dataFile, G4double& x); |
---|
| 102 | void ProcessDataLine(); |
---|
| 103 | |
---|
[819] | 104 | void MakeLevels(); |
---|
[1340] | 105 | void ClearLevels(); |
---|
[819] | 106 | |
---|
[1340] | 107 | G4NuclearLevel* UseLevelOrMakeNew(G4NuclearLevel* level); |
---|
| 108 | void AddDataToLevel(G4NuclearLevel* level); |
---|
| 109 | void FinishLevel(G4NuclearLevel* level); |
---|
| 110 | |
---|
[819] | 111 | G4int _nucleusA; |
---|
| 112 | G4int _nucleusZ; |
---|
| 113 | G4String _fileName; |
---|
| 114 | G4bool _validity; |
---|
| 115 | G4PtrLevelVector* _levels; |
---|
[1340] | 116 | |
---|
| 117 | // Buffers for reading data file |
---|
| 118 | char buffer[30]; // For doubles in scientific notation |
---|
[819] | 119 | G4double _levelEnergy; |
---|
| 120 | G4double _gammaEnergy; |
---|
| 121 | G4double _probability; |
---|
| 122 | G4double _polarity; |
---|
| 123 | G4double _halfLife; |
---|
| 124 | G4double _angularMomentum; |
---|
| 125 | G4double _kCC; |
---|
| 126 | G4double _l1CC; |
---|
| 127 | G4double _l2CC; |
---|
| 128 | G4double _l3CC; |
---|
| 129 | G4double _m1CC; |
---|
| 130 | G4double _m2CC; |
---|
| 131 | G4double _m3CC; |
---|
| 132 | G4double _m4CC; |
---|
| 133 | G4double _m5CC; |
---|
| 134 | G4double _nPlusCC; |
---|
| 135 | G4double _totalCC; |
---|
| 136 | }; |
---|
| 137 | |
---|
| 138 | #endif |
---|