G4CascadeDeexcitation.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // Takes an arbitrary excited or unphysical nuclear state and produces
00029 // a final state with evaporated particles and (possibly) a stable nucleus.
00030 //
00031 // 20100926  M. Kelsey -- Move to new G4VCascadeDeexcitation base class.
00032 // 20110302  M. Kelsey -- Don't do "final" conservation check (not needed)
00033 
00034 #include "G4CascadeDeexcitation.hh"
00035 #include "globals.hh"
00036 #include "G4BigBanger.hh"
00037 #include "G4EquilibriumEvaporator.hh"
00038 #include "G4NonEquilibriumEvaporator.hh"
00039 #include "G4InuclNuclei.hh"
00040 #include "G4InuclParticle.hh"
00041 
00042 
00043 // Constructor and destructor
00044 
00045 G4CascadeDeexcitation::G4CascadeDeexcitation() 
00046   : G4VCascadeDeexcitation("G4CascadeDeexcitation"),
00047     theBigBanger(new G4BigBanger),
00048     theNonEquilibriumEvaporator(new G4NonEquilibriumEvaporator),
00049     theEquilibriumEvaporator(new G4EquilibriumEvaporator) {}
00050 
00051 G4CascadeDeexcitation::~G4CascadeDeexcitation() {
00052   delete theBigBanger;
00053   delete theNonEquilibriumEvaporator;
00054   delete theEquilibriumEvaporator;
00055 }
00056 
00057 
00058 // Convert generic G4Fragment into Bertini particle
00059 
00060 void G4CascadeDeexcitation::deExcite(G4Fragment* fragment,
00061                                      G4CollisionOutput& globalOutput) {
00062   if (verboseLevel > 1) {
00063     G4cout << " >>> G4CascadeDeexcitation::deExcite" << G4endl;
00064   }
00065 
00066   if (!fragment) {
00067     if (verboseLevel > 1) G4cerr << " NULL pointer fragment" << G4endl;
00068     return;
00069   }
00070 
00071   if (verboseLevel > 1) G4cout << *fragment << G4endl;
00072 
00073   G4InuclNuclei target(*fragment);
00074   collide(0, &target, globalOutput);
00075 }
00076 
00077 
00078 // Main processing
00079 
00080 void G4CascadeDeexcitation::collide(G4InuclParticle* /*bullet*/, 
00081                                     G4InuclParticle* target,
00082                                     G4CollisionOutput& globalOutput) {
00083   if (verboseLevel > 1) {
00084     G4cout << " >>> G4CascadeDeexcitation::collide" << G4endl;
00085   }
00086 
00087   // Initialize colliders verbosity
00088   theBigBanger->setVerboseLevel(verboseLevel);
00089   theNonEquilibriumEvaporator->setVerboseLevel(verboseLevel);
00090   theEquilibriumEvaporator->setVerboseLevel(verboseLevel);
00091 
00092   // Ensure that input state is sensible
00093   G4InuclNuclei* ntarget = dynamic_cast<G4InuclNuclei*>(target);
00094   if (!ntarget) {
00095     G4cerr << " G4CascadeDeexcitation ERROR:  target must be G4InuclNuclei"
00096            << G4endl;
00097     return;
00098   }
00099 
00100   // Check if fragment should be broken up
00101   if (explosion(ntarget)) {
00102     if (verboseLevel > 1) G4cout << " big bang after cascade " << G4endl;
00103 
00104     // Add result of explosion diretly to output and exit
00105     theBigBanger->collide(0, target, globalOutput);
00106     return;
00107   }
00108 
00109   // Fragment is unstable nucleus
00110   output.reset();
00111   theNonEquilibriumEvaporator->collide(0, target, output);
00112   
00113   if (verboseLevel > 1) {
00114     G4cout << " After NonEquilibriumEvaporator " << G4endl;
00115   }
00116   
00117   // Copy evaporated particles (not nuclear fragment) to output
00118   globalOutput.addOutgoingParticles(output.getOutgoingParticles());
00119     
00120   // Use nuclear fragment left from non-equilibrium for next step
00121   // NOT:  Must make a copy before reset occurs below
00122   G4InuclNuclei exciton = output.getOutgoingNuclei()[0];
00123     
00124   output.reset();
00125   theEquilibriumEvaporator->collide(0, &exciton, output);
00126     
00127   if (verboseLevel > 1) {
00128     G4cout << " After EquilibriumEvaporator " << G4endl;
00129   }
00130     
00131   globalOutput.add(output);             // Evaporated particles and nucleus
00132 }
00133   

Generated on Mon May 27 17:47:49 2013 for Geant4 by  doxygen 1.4.7