// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: G4PreCompoundModel.cc,v 1.17 2008/12/09 14:09:59 ahoward Exp $ // GEANT4 tag $Name: geant4-09-02-ref-02 $ // // by V. Lara // //J. M. Quesada (Apr.08). Several changes. Soft cut-off switched off. //(May. 08). Protection against non-physical preeq. transitional regime has // been set // // Modif (03 September 2008) by J. M. Quesada for external choice of inverse // cross section option // JMQ (06 September 2008) Also external choices have been added for: // - superimposed Coulomb barrier (useSICB=true) // - "never go back" hipothesis (useNGB=true) // - soft cutoff from preeq. to equlibrium (useSCO=true) // - CEM transition probabilities (useCEMtr=true) #include "G4PreCompoundModel.hh" #include "G4PreCompoundEmission.hh" #include "G4PreCompoundTransitions.hh" #include "G4GNASHTransitions.hh" #include "G4ParticleDefinition.hh" #ifdef PRECOMPOUND_TEST G4Fragment G4PreCompoundModel::theInitialFragmentForTest; std::vector G4PreCompoundModel::theCreatorModels; #endif const G4PreCompoundModel & G4PreCompoundModel::operator=(const G4PreCompoundModel &) { throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundModel::operator= meant to not be accessable"); return *this; } G4bool G4PreCompoundModel::operator==(const G4PreCompoundModel &) const { return false; } G4bool G4PreCompoundModel::operator!=(const G4PreCompoundModel &) const { return true; } // Additional Declarations G4HadFinalState * G4PreCompoundModel::ApplyYourself(const G4HadProjectile & thePrimary, G4Nucleus & theNucleus) { // prepare fragment G4Fragment anInitialState; // This si for GNASH transitions anInitialState.SetParticleDefinition(const_cast(thePrimary.GetDefinition())); G4int anA=static_cast(theNucleus.GetN()); anA += thePrimary.GetDefinition()->GetBaryonNumber(); anInitialState.SetA(anA); G4int aZ=static_cast(theNucleus.GetZ()); aZ += static_cast(thePrimary.GetDefinition()->GetPDGCharge()); anInitialState.SetZ(aZ); // Assume the projectile is a nucleon // Number of Excited Particles anInitialState.SetNumberOfParticles(1+thePrimary.GetDefinition()->GetBaryonNumber()); // Number of Charged Excited Particles // JMQ/AH modify number of charged particles with probability of the Z/A ratio of the nucleus: // if(G4UniformRand() <= aZ/anA) BUG! - integer arithmetic if(G4UniformRand() <= (static_cast(aZ))/(static_cast(anA))) anInitialState.SetNumberOfCharged(static_cast(thePrimary.GetDefinition()->GetPDGCharge()+.01) + 1); else anInitialState.SetNumberOfCharged(static_cast(thePrimary.GetDefinition()->GetPDGCharge()+.01)); //AH anInitialState.SetNumberOfCharged(static_cast(thePrimary.GetDefinition()->GetPDGCharge()+.01) + //AH static_cast(0.5+G4UniformRand())); // Number of Holes anInitialState.SetNumberOfHoles(1); // pre-compound nucleus energy. G4double anEnergy = 0; G4double nucleusMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(static_cast(theNucleus.GetZ()), static_cast(theNucleus.GetN())); anEnergy = nucleusMass + thePrimary.GetTotalEnergy(); // Momentum G4ThreeVector p = thePrimary.Get4Momentum().vect(); // 4-momentum G4LorentzVector momentum(p, anEnergy); anInitialState.SetMomentum(momentum); #ifdef PRECOMPOUND_TEST G4PreCompoundModel::theInitialFragmentForTest = anInitialState; #endif // call excitation handler const G4Fragment aFragment(anInitialState); G4ReactionProductVector * result = DeExcite(aFragment); #ifdef PRECOMPOUND_TEST for (std::vector::iterator icm = theCreatorModels.begin(); icm != theCreatorModels.end(); ++icm ) { delete (*icm); } theCreatorModels.clear(); #endif // fill particle change theResult.Clear(); theResult.SetStatusChange(stopAndKill); for(G4ReactionProductVector::iterator i= result->begin(); i != result->end(); ++i) { G4DynamicParticle * aNew = new G4DynamicParticle((*i)->GetDefinition(), (*i)->GetTotalEnergy(), (*i)->GetMomentum()); #ifdef PRECOMPOUND_TEST theCreatorModels.push_back(new G4String((*i)->GetCreatorModel())); #endif delete (*i); theResult.AddSecondary(aNew); } delete result; //return the filled particle change return &theResult; } ///////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////// G4ReactionProductVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInitialState) const { G4ReactionProductVector * Result = new G4ReactionProductVector; // Copy of the initial state G4Fragment aFragment(theInitialState); if (aFragment.GetExcitationEnergy() < 10*eV) { // Perform Equilibrium Emission PerformEquilibriumEmission(aFragment,Result); return Result; } if (aFragment.GetA() < 5) { G4ReactionProduct * theRP = new G4ReactionProduct(G4ParticleTable::GetParticleTable()-> GetIon(static_cast(aFragment.GetZ()), static_cast(aFragment.GetA()), aFragment.GetExcitationEnergy())); theRP->SetMomentum(aFragment.GetMomentum().vect()); theRP->SetTotalEnergy(aFragment.GetMomentum().e()); Result->push_back(theRP); return Result; } G4PreCompoundEmission aEmission; if (useHETCEmission) aEmission.SetHETCModel(); aEmission.SetUp(theInitialState); //for cross section options if (OPTxs!= 0 && OPTxs!=1 && OPTxs !=2 && OPTxs !=3 && OPTxs !=4 ) { std::ostringstream errOs; errOs << "BAD CROSS SECTION OPTION in G4PreCompoundModel.cc !!" <UseNGB(useNGB); if (useCEMtr) aTransition->UseCEMtr(useCEMtr); } // Main loop. It is performed until equilibrium deexcitation. //G4int fragment=0; for (;;) { //fragment++; //G4cout<<"-------------------------------------------------------------------"<GetLevelDensity(); G4int EquilibriumExcitonNumber = static_cast(std::sqrt(2.0*g*aFragment.GetExcitationEnergy())+ 0.5); // // G4cout<<"Neq="<(0.2*std::sqrt(g*aFragment.GetExcitationEnergy())+ 0.5); // Loop for transitions, it is performed while there are preequilibrium transitions. G4bool ThereIsTransition = false; // G4cout<<"----------------------------------------"<(aFragment.GetNumberOfHoles()); G4double test = static_cast(aFragment.GetNumberOfExcitons()); if (test < EquilibriumExcitonNumber) go_ahead=true; //J. M. Quesada (Apr. 08): soft-cutoff switched off by default if (useSCO) { if (test < EquilibriumExcitonNumber) // if (test < EquilibriumHoleNumber) { test /= static_cast(EquilibriumExcitonNumber); // test /= static_cast(EquilibriumHoleNumber); test -= 1.0; test = test*test; test /= 0.32; test = 1.0 - std::exp(-test); go_ahead = (G4UniformRand() < test); } } //JMQ: WARNING: CalculateProbability MUST be called prior to Get methods !! (O values would be returned otherwise) G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment); G4double P1=aTransition->GetTransitionProb1(); G4double P2=aTransition->GetTransitionProb2(); G4double P3=aTransition->GetTransitionProb3(); // G4cout<<"P1="< " << theInitialState.GetA() - ProductsA << '\n'; } if (ProductsZ != theInitialState.GetZ()) { G4cout << "!!!!!!!!!! Charge Conservation Violation !!!!!!!!!!\n" << "G4PreCompoundModel.cc: Charge Conservation test for just preequilibrium fragments\n" << "Initial Z = " << theInitialState.GetZ() << " Fragments Z = " << ProductsZ << " Diference --> " << theInitialState.GetZ() - ProductsZ << '\n'; } if (std::abs(ProductsEnergy-theInitialState.GetMomentum().e()) > 1.0*keV) { G4cout << "!!!!!!!!!! Energy Conservation Violation !!!!!!!!!!\n" << "G4PreCompoundModel.cc: Energy Conservation test for just preequilibrium fragments\n" << "Initial E = " << theInitialState.GetMomentum().e()/MeV << " MeV" << " Fragments E = " << ProductsEnergy/MeV << " MeV Diference --> " << (theInitialState.GetMomentum().e() - ProductsEnergy)/MeV << " MeV\n"; } if (std::abs(ProductsMomentum.x()-theInitialState.GetMomentum().x()) > 1.0*keV || std::abs(ProductsMomentum.y()-theInitialState.GetMomentum().y()) > 1.0*keV || std::abs(ProductsMomentum.z()-theInitialState.GetMomentum().z()) > 1.0*keV) { G4cout << "!!!!!!!!!! Momentum Conservation Violation !!!!!!!!!!\n" << "G4PreCompoundModel.cc: Momentum Conservation test for just preequilibrium fragments\n" << "Initial P = " << theInitialState.GetMomentum().vect() << " MeV" << " Fragments P = " << ProductsMomentum << " MeV Diference --> " << theInitialState.GetMomentum().vect() - ProductsMomentum << " MeV\n"; } return; } #endif