// // ******************************************************************** // * 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: G4QuasiElasticChannel.cc,v 1.9 2010/09/17 11:34:29 gunter Exp $ // GEANT4 tag $Name: geant4-09-03-ref-09 $ // // Author : Gunter Folger March 2007 // Modified by Mikhail Kossov. Apr2009, E/M conservation: ResidualNucleus is added (ResNuc) // Class Description // Final state production model for theoretical models of hadron inelastic // quasi elastic scattering in geant4; // Class Description - End // // Modified: #include "G4QuasiElasticChannel.hh" #include "G4Fancy3DNucleus.hh" #include "G4HadTmpUtil.hh" //lrint //#define debug_scatter G4QuasiElasticChannel::G4QuasiElasticChannel() { theQuasiElastic=G4QuasiFreeRatios::GetPointer(); } G4QuasiElasticChannel::~G4QuasiElasticChannel() {} G4double G4QuasiElasticChannel::GetFraction(G4Nucleus &theNucleus, const G4DynamicParticle & thePrimary) { #ifdef debug_scatter G4cout << "G4QuasiElasticChannel:: P=" << thePrimary.GetTotalMomentum() << ", pPDG=" << thePrimary.GetDefinition()->GetPDGEncoding() << ", Z = " << theNucleus.GetZ_asInt()) << ", N = " << theNucleus.GetN_asInt()) << ", A = " << theNucleus.GetA_asInt() << G4endl; #endif std::pair ratios; ratios=theQuasiElastic->GetRatios(thePrimary.GetTotalMomentum(), thePrimary.GetDefinition()->GetPDGEncoding(), theNucleus.GetZ_asInt(), theNucleus.GetN_asInt()); #ifdef debug_scatter G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <FindIon(Z,A,0,Z); // M.K. ResNuc } #ifdef debug_scatter G4LorentzVector EpConservation=pNucleon+thePrimary.Get4Momentum() - result.first - result.second; if ( (EpConservation.vect().mag2() > .01*MeV*MeV ) || (std::abs(EpConservation.e()) > 0.1 * MeV ) ) { G4cout << "Warning - G4QuasiElasticChannel::Scatter E-p non conservation : " << EpConservation << G4endl; } #endif G4KineticTrackVector * ktv; ktv=new G4KineticTrackVector(); G4KineticTrack * sPrim=new G4KineticTrack(thePrimary.GetDefinition(), 0.,G4ThreeVector(0), scatteredHadron4Mom); ktv->push_back(sPrim); if (result.first.e() > 0.) { G4KineticTrack * sNuc=new G4KineticTrack(pDef, 0.,G4ThreeVector(0), result.first); ktv->push_back(sNuc); } if(resZ || resA==1) // For the only neutron or for tnuclei with Z>0 M.K. ResNuc { G4KineticTrack * rNuc=new G4KineticTrack(resDef, 0.,G4ThreeVector(0), residualNucleus4Mom); // M.K. ResNuc ktv->push_back(rNuc); // M.K. ResNuc } else // The residual nucleus consists of only neutrons M.K. ResNuc { residualNucleus4Mom/=resA; // Split 4-mom of A*n system equally M.K. ResNuc for(G4int in=0; inpush_back(rNuc); // M.K. ResNuc } } #ifdef debug_scatter G4cout<<"G4QElC::Scat: Nucleon: "<