Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 27 // 28 // MODULE: G4RadioactivityTable.c 29 // 30 // Version: 0.a 31 // Date: 29/10/2010 32 // Author: F Lei 33 // Organisation: QinetiQ UK 34 // Customer: ESA/ESTEC, NOORDWIJK 35 // Contract: 12115/96/JG/NL Work Or 36 // 37 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 // 39 // CHANGE HISTORY 40 // -------------- 41 // 42 // 29 October 2010, F. Lei QinetiQ UK 43 // first release. 44 // 45 ////////////////////////////////////////////// 46 47 48 #include "G4RadioactivityTable.hh" 49 50 #include <map> 51 52 G4RadioactivityTable::G4RadioactivityTable() 53 { 54 } 55 ////////////////////////////////////////////// 56 // 57 G4RadioactivityTable::~G4RadioactivityTable() 58 { 59 fRadioactivity.clear(); 60 } 61 ////////////////////////////////////////////// 62 // 63 64 G4int G4RadioactivityTable::Entries() const 65 { 66 return (G4int) fRadioactivity.size(); 67 } 68 ////////////////////////////////////////////// 69 // 70 void G4RadioactivityTable::AddIsotope(G4int Z, 71 { 72 G4double drate = rate*weight; 73 G4double derror = drate*rate; 74 G4TwoVector entry = G4TwoVector(drate,derror 75 std::map<G4ThreeVector,G4TwoVector>::iterato 76 it = fRadioactivity.find(G4ThreeVector(Z,A,E 77 if (it == fRadioactivity.end()) { 78 fRadioactivity[G4ThreeVector(Z,A,E)] = ent 79 } else { 80 fRadioactivity[G4ThreeVector(Z,A,E)] += en 81 } 82 } 83 ////////////////////////////////////////////// 84 // 85 G4TwoVector G4RadioactivityTable::GetRate(G4in 86 { 87 if (fRadioactivity.end() == fRadioactivity.f 88 G4cout << G4ThreeVector(Z,A,E) << " is not 89 G4TwoVector rate = G4TwoVector(0.,0.); 90 return rate ; 91 } 92 else 93 return fRadioactivity[G4ThreeVector(Z,A,E) 94 } 95 ////////////////////////////////////////////// 96 // 97 map<G4ThreeVector,G4TwoVector>* G4Radioactivi 98 { 99 return &fRadioactivity; 100 } 101 ////////////////////////////////////////////// 102 // 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117