source: trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4NuclearLevelManager.hh @ 1340

Last change on this file since 1340 was 1340, checked in by garnier, 14 years ago

update ti head

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