[1199] | 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 | #include "G4StatMF.hh" |
---|
| 28 | |
---|
| 29 | #include "G4NucleiProperties.hh" |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | int main() |
---|
| 35 | { |
---|
| 36 | G4int A, Z; |
---|
| 37 | |
---|
| 38 | std::cout << "Please enter Z : "; |
---|
| 39 | std::cin >> Z; |
---|
| 40 | std::cout << "Please enter A : "; |
---|
| 41 | std::cin >> A; |
---|
| 42 | |
---|
| 43 | G4double energy; |
---|
| 44 | |
---|
| 45 | std::cout << "Please enter excitation energy per nucleon (MeV) : "; |
---|
| 46 | std::cin >> energy; |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | energy *= static_cast<G4double>(A)*MeV; |
---|
| 50 | |
---|
| 51 | G4int iterations; |
---|
| 52 | std::cout << "Please enter number of interations : "; |
---|
| 53 | std::cin >> iterations; |
---|
| 54 | |
---|
| 55 | G4double NuclearMass = G4NucleiProperties::GetNuclearMass(A,Z) + energy; |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | G4LorentzVector p4(0.0,0.0,0.0,NuclearMass); |
---|
| 59 | G4Fragment aFragment(A,Z,p4); |
---|
| 60 | |
---|
| 61 | G4StatMF model; |
---|
| 62 | |
---|
| 63 | std::cout << "Excited Nucleus\n"; |
---|
| 64 | std::cout << aFragment << "\n\n"; |
---|
| 65 | |
---|
| 66 | G4LorentzVector p4null(0.0,0.0,0.0,0.0); |
---|
| 67 | G4double multiplicity = 0.0; |
---|
| 68 | |
---|
| 69 | for (G4int i = 0; i < iterations; ++i) |
---|
| 70 | { |
---|
| 71 | G4LorentzVector p4cons; |
---|
| 72 | p4cons = p4null; |
---|
| 73 | std::cout << "############ event " << i+1 << "###########################\n"; |
---|
| 74 | G4FragmentVector * theResult = model.BreakItUp(aFragment); |
---|
| 75 | std::cout << "Number of fragments: " << theResult->size() << '\n'; |
---|
| 76 | std::cout << "-------------------------------------------\n"; |
---|
| 77 | multiplicity += static_cast<G4double>(theResult->size()); |
---|
| 78 | for (G4FragmentVector::iterator i = theResult->begin(); i != theResult->end(); ++i) |
---|
| 79 | { |
---|
| 80 | std::cout << (*i); |
---|
| 81 | std::cout << "\n-------------------------------------------\n"; |
---|
| 82 | p4cons += (*i)->GetMomentum(); |
---|
| 83 | delete (*i); |
---|
| 84 | } |
---|
| 85 | delete theResult; |
---|
| 86 | std::cout << " Initial momentum : " << p4 << '\n'; |
---|
| 87 | std::cout << "Fragments total momentum : " << p4cons << '\n'; |
---|
| 88 | std::cout << " Conservation : " << p4-p4cons << '\n'; |
---|
| 89 | } |
---|
| 90 | std::cout << "\n###########################################\n"; |
---|
| 91 | std::cout << " Mean multiplicity : " << multiplicity/static_cast<G4double>(iterations) << '\n'; |
---|
| 92 | return 0; |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | |
---|