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 // 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly 00029 // 20100309 M. Kelsey -- Eliminate some unnecessary std::pow() 00030 // 20100413 M. Kelsey -- Pass G4CollisionOutput by ref to ::collide() 00031 // 20100517 M. Kelsey -- Inherit from common base class, make other colliders 00032 // simple data members. Eliminate unnecessary G4InuclNuclei ctor. 00033 // 20100714 M. Kelsey -- Switch to new G4CascadeColliderBase class 00034 // 20110728 M. Kelsey -- Fix Coverity #23843, delete evaporator in dtor. 00035 // 20110922 M. Kelsey -- Follow G4InuclParticle::print(ostream&) migration 00036 00037 #include "G4EvaporationInuclCollider.hh" 00038 #include "G4CollisionOutput.hh" 00039 #include "G4EquilibriumEvaporator.hh" 00040 #include "G4InuclNuclei.hh" 00041 00042 00043 typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator; 00044 typedef std::vector<G4InuclNuclei>::iterator nucleiIterator; 00045 00046 00047 G4EvaporationInuclCollider::G4EvaporationInuclCollider() 00048 : G4CascadeColliderBase("G4EvaporationInuclCollider"), 00049 theEquilibriumEvaporator(new G4EquilibriumEvaporator) {} 00050 00051 G4EvaporationInuclCollider::~G4EvaporationInuclCollider() { 00052 delete theEquilibriumEvaporator; 00053 } 00054 00055 00056 void 00057 G4EvaporationInuclCollider::collide(G4InuclParticle* /*bullet*/, 00058 G4InuclParticle* target, 00059 G4CollisionOutput& globalOutput) { 00060 if (verboseLevel) { 00061 G4cout << " >>> G4EvaporationInuclCollider::evaporate" << G4endl; 00062 } 00063 00064 if (!dynamic_cast<G4InuclNuclei*>(target)) return; // Only nuclei evaporate 00065 00066 if (verboseLevel>3) G4cout << *target << G4endl; 00067 00068 theEquilibriumEvaporator->collide(0, target, globalOutput); 00069 00070 if (verboseLevel > 2) { 00071 G4cout << " After EquilibriumEvaporator " << G4endl; 00072 globalOutput.printCollisionOutput(); 00073 G4cout << "G4EvaporationInuclCollider::collide end" << G4endl; 00074 } 00075 }