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 | // ------------------------------------------------------------------- |
---|
28 | // GEANT 4 class file --- Copyright CERN 1998 |
---|
29 | // CERN Geneva Switzerland |
---|
30 | // |
---|
31 | // |
---|
32 | // File name: G4NuclearLevelManagerTest.cc |
---|
33 | // |
---|
34 | // Author: Maria Grazia Pia (pia@genova.infn.it), |
---|
35 | // |
---|
36 | // Creation date: 27 October 1998 |
---|
37 | // |
---|
38 | // Modifications: |
---|
39 | // |
---|
40 | // ------------------------------------------------------------------- |
---|
41 | |
---|
42 | #include "globals.hh" |
---|
43 | |
---|
44 | #include "G4ios.hh" |
---|
45 | #include <fstream> |
---|
46 | #include <iomanip> |
---|
47 | #include <iostream> |
---|
48 | #include <assert.h> |
---|
49 | |
---|
50 | #include "CLHEP/Hist/TupleManager.h" |
---|
51 | #include "CLHEP/Hist/HBookFile.h" |
---|
52 | #include "CLHEP/Hist/Histogram.h" |
---|
53 | #include "CLHEP/Hist/Tuple.h" |
---|
54 | |
---|
55 | #include "G4NuclearLevelManager.hh" |
---|
56 | #include "G4NuclearLevel.hh" |
---|
57 | #include "G4DataVector.hh" |
---|
58 | |
---|
59 | int main() |
---|
60 | { |
---|
61 | |
---|
62 | G4int Z; |
---|
63 | G4int A; |
---|
64 | |
---|
65 | G4cout << "Enter Z and A" << G4endl; |
---|
66 | G4cin >> Z >> A; |
---|
67 | |
---|
68 | assert (Z > 0); |
---|
69 | assert (A > 0); |
---|
70 | assert (A > Z); |
---|
71 | |
---|
72 | G4int iter; |
---|
73 | G4cout << "Enter number of iterations " << G4endl; |
---|
74 | G4cin >> iter; |
---|
75 | |
---|
76 | G4int i; |
---|
77 | for (i=0; i<iter; i++) |
---|
78 | { |
---|
79 | |
---|
80 | // NuclearLevelManager for this (Z,A) material |
---|
81 | // G4NuclearLevelManager levelManager(Z,A); |
---|
82 | // G4NuclearLevelManager* levelManager = new G4NuclearLevelManager(Z,A); |
---|
83 | G4NuclearLevelManager* levelManager = new G4NuclearLevelManager(); |
---|
84 | levelManager->SetNucleus(Z,A); |
---|
85 | // G4cout << i <<") ---- G4NuclearLevelManager created ----" << G4endl; |
---|
86 | |
---|
87 | // Is it a valid isotope? |
---|
88 | if (! (levelManager->IsValid(Z,A))) |
---|
89 | { G4cout << "This (Z,A) has no ENSDF levels and gammas " << G4endl; } |
---|
90 | |
---|
91 | levelManager->PrintAll(); |
---|
92 | delete levelManager; |
---|
93 | } |
---|
94 | |
---|
95 | return EXIT_SUCCESS; |
---|
96 | } |
---|
97 | |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | |
---|
107 | |
---|
108 | |
---|
109 | |
---|
110 | |
---|
111 | |
---|
112 | |
---|
113 | |
---|