[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 | // Igor Pshenichnov 10.05.2008 |
---|
| 28 | // This main{} used to run standalone tests for multifragmentation of excited nuclei |
---|
| 29 | // ROOT installation is reqired |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | #include "G4StatMF.hh" |
---|
| 33 | #include "G4NucleiProperties.hh" |
---|
| 34 | #include "MFTestHistoManager.hh" |
---|
| 35 | #include "Randomize.hh" |
---|
| 36 | |
---|
| 37 | #ifdef G4ANALYSIS_USE_ROOT |
---|
| 38 | #include "TFile.h" |
---|
| 39 | #include "TH1D.h" |
---|
| 40 | #include "TH2D.h" |
---|
| 41 | #endif |
---|
| 42 | |
---|
| 43 | #include "MFTestHistoManager.cc" |
---|
| 44 | |
---|
| 45 | int main() |
---|
| 46 | { |
---|
| 47 | // The user will be asked for the charge and mass of the hot nuclear system to |
---|
| 48 | // simulate decay. |
---|
| 49 | |
---|
| 50 | MFTestHistoManager histoManager; |
---|
| 51 | |
---|
| 52 | // Histograms will be booked now. |
---|
| 53 | histoManager.BookHisto(); |
---|
| 54 | |
---|
| 55 | G4int A = histoManager.GetA(); |
---|
| 56 | G4int Z = histoManager.GetZ(); |
---|
| 57 | |
---|
| 58 | G4StatMF model; |
---|
| 59 | |
---|
| 60 | G4LorentzVector p4null(0.0,0.0,0.0,0.0); |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | G4double totalNumFragments = 0.; |
---|
| 64 | G4int thisEventNumFragments = 0; |
---|
| 65 | |
---|
| 66 | G4int iterations = histoManager.GetIterations(); |
---|
| 67 | |
---|
| 68 | std::cout.setf(std::ios::scientific,std::ios::floatfield); |
---|
| 69 | |
---|
| 70 | for (G4int i = 0; i < iterations; ++i) { |
---|
| 71 | |
---|
| 72 | G4double energy = (histoManager.GetUpEn() - histoManager.GetLowEn())*G4UniformRand() |
---|
| 73 | + histoManager.GetLowEn(); |
---|
| 74 | |
---|
| 75 | G4double NuclearMass = G4NucleiProperties::GetNuclearMass(A,Z) + energy; |
---|
| 76 | G4LorentzVector p4(0.0,0.0,0.0,NuclearMass); |
---|
| 77 | G4Fragment aFragment(A,Z,p4); |
---|
| 78 | |
---|
| 79 | G4LorentzVector p4cons; |
---|
| 80 | p4cons = p4null; |
---|
| 81 | |
---|
| 82 | G4FragmentVector * theResult = model.BreakItUp(aFragment); |
---|
| 83 | thisEventNumFragments = theResult->size(); |
---|
| 84 | if ( i%100 == 0 ) std::cout << "### event " << i << " at " |
---|
| 85 | << energy/A << " MeV/nucleon" |
---|
| 86 | << " with "<< thisEventNumFragments <<" fragments #####\n"; |
---|
| 87 | histoManager.fill(0,energy/A,thisEventNumFragments); |
---|
| 88 | |
---|
| 89 | totalNumFragments += thisEventNumFragments; |
---|
| 90 | |
---|
| 91 | for (G4FragmentVector::iterator i = theResult->begin(); i != theResult->end(); ++i) |
---|
| 92 | { |
---|
| 93 | p4cons += (*i)->GetMomentum(); |
---|
| 94 | |
---|
| 95 | G4double thisFragmentZ = (*i)->GetZ(); |
---|
| 96 | G4double thisFragmentA = (*i)->GetA(); |
---|
| 97 | histoManager.fill2(0,energy/A,thisFragmentZ,1.); |
---|
| 98 | histoManager.fill2(1,energy/A,thisFragmentA,1.); |
---|
| 99 | |
---|
| 100 | histoManager.fill(3,thisFragmentA,thisFragmentZ); |
---|
| 101 | histoManager.fill(4,thisFragmentA,1.); |
---|
| 102 | |
---|
| 103 | if ( (int)thisFragmentZ == 6 && (int)thisFragmentA == 10) { |
---|
| 104 | histoManager.fill(1,energy/A,1.); |
---|
| 105 | } |
---|
| 106 | if ( (int)thisFragmentZ == 6 && (int)thisFragmentA == 11) { |
---|
| 107 | histoManager.fill(2,energy/A,1.); |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | delete (*i); |
---|
| 111 | } |
---|
| 112 | delete theResult; |
---|
| 113 | } |
---|
| 114 | |
---|
| 115 | std::cout << " ------------------------------------------------------------------ " << '\n'; |
---|
| 116 | std::cout << " Average fragment multiplicty for the whole energy range: " |
---|
| 117 | << totalNumFragments/iterations << '\n'; |
---|
| 118 | |
---|
| 119 | histoManager.NormalizeHisto(); |
---|
| 120 | histoManager.CleanHisto(); |
---|
| 121 | |
---|
| 122 | return 0; |
---|
| 123 | } |
---|
| 124 | |
---|
| 125 | |
---|
| 126 | |
---|