Import Geant4 8.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:55:03 +02:00
parent 216a75eeb1
commit fe73f43734
6714 changed files with 118229 additions and 68144 deletions
@@ -23,6 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuMinusCaptureCascade.cc,v 1.13 2006/11/15 12:17:15 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -34,17 +36,25 @@
//
// E-mail: Vladimir.Ivantchenko@cern.ch
//
// Created: 02.04.00 V.Ivanchenko
// Created: 02.04.00 V.Ivanchenko
//
// Modified: 06.04.01 V.Ivanchenko Bug in theta distribution fixed
// Modified:
// 06.04.01 V.Ivanchenko Bug in theta distribution fixed
//
//-----------------------------------------------------------------------------
#include "G4MuMinusCaptureCascade.hh"
#include "G4LorentzVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4MuonMinus.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "G4NeutrinoMu.hh"
#include "G4AntiNeutrinoE.hh"
#include "G4GHEKinematicsVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// constructor
G4MuMinusCaptureCascade::G4MuMinusCaptureCascade()
{
theElectron = G4Electron::Electron();
@@ -55,25 +65,23 @@ G4MuMinusCaptureCascade::G4MuMinusCaptureCascade()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// destructor
G4MuMinusCaptureCascade::~G4MuMinusCaptureCascade()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuMinusCaptureCascade::GetKShellEnergy(G4double Z)
{
{
// Calculate the Energy of K Mesoatom Level for this Element using
// the Energy of Hydrogen Atom taken into account finite size of the
// nucleus (V.Ivanchenko)
const size_t ListK = 27;
static G4double ListZK[ListK] = {
2., 4., 6., 8., 11., 14., 17., 18., 21., 24.,
const G4int ListK = 28;
static G4double ListZK[ListK] = {
1., 2., 4., 6., 8., 11., 14., 17., 18., 21., 24.,
26., 29., 32., 38., 40., 41., 44., 49., 53., 55.,
60., 65., 70., 75., 81., 85., 92.};
static G4double ListKEnergy[ListK] = {
0.011, 0.043, 0.098, 0.173, 0.326,
static G4double ListKEnergy[ListK] = {
0.00275, 0.011, 0.043, 0.098, 0.173, 0.326,
0.524, 0.765, 0.853, 1.146, 1.472,
1.708, 2.081, 2.475, 3.323, 3.627,
3.779, 4.237, 5.016, 5.647, 5.966,
@@ -81,83 +89,33 @@ G4double G4MuMinusCaptureCascade::GetKShellEnergy(G4double Z)
10.923,11.984};
// Energy with finit size corrections
G4double KEnergy = GetLinApprox(ListK,ListZK,ListKEnergy,Z);
G4double KEnergy = GetLinApprox(ListK,ListZK,ListKEnergy,Z);
return KEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuMinusCaptureCascade::GetLinApprox(const size_t N,
const G4double X[],
const G4double Y[],
G4double Xuser)
{
G4double Yuser = 0.0;
size_t i;
if(N < 1) return Yuser;
else if(Xuser < X[0]) Yuser = Y[0];
else if(Xuser > X[N-1]) Yuser = Y[N-1];
else {
for (i = 1; i < N - 1; i++){
if(Xuser < X[i]) {break;}
}
Yuser = X[i] - X[i-1];
if(Yuser != 0.0){
Yuser = Y[i-1] + (Y[i] - Y[i-1]) * (Xuser - X[i-1]) / Yuser;
}
}
return Yuser;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector G4MuMinusCaptureCascade::GetRandomVec()
{
//
// generate uniform vector
//
G4double cosTheta = 2.0 * G4UniformRand() - 1.0;
G4double sinTheta = std::sqrt(1.0 - cosTheta*cosTheta);
G4double Phi = twopi * G4UniformRand();
G4double dirx = sinTheta * std::cos(Phi);
G4double diry = sinTheta * std::sin(Phi);
G4double dirz = cosTheta;
return G4ThreeVector(dirx, diry, dirz);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuMinusCaptureCascade::AddNewParticle(G4ParticleDefinition* aParticle,
G4ThreeVector Momentum,
G4ThreeVector& Momentum,
G4double mass,
G4int* nParticle,
G4GHEKinematicsVector* Cascade)
{
// Store particle in the HEK vector and increment counter
Cascade[*nParticle].SetZero();
Cascade[*nParticle].SetMass( mass );
Cascade[*nParticle].SetMomentumAndUpdate(Momentum.x(), Momentum.y(), Momentum.z());
Cascade[*nParticle].SetParticleDef( aParticle );
(*nParticle)++;
Cascade[*nParticle].SetZero();
Cascade[*nParticle].SetMass( mass );
Cascade[*nParticle].SetMomentumAndUpdate(Momentum.x(), Momentum.y(), Momentum.z());
Cascade[*nParticle].SetParticleDef( aParticle );
(*nParticle)++;
return;
return;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4int G4MuMinusCaptureCascade::DoCascade(const G4double Z, const G4double massA,
G4GHEKinematicsVector* Cascade)
G4GHEKinematicsVector* Cascade)
{
// Inicialization - cascade start from 14th level
// N.C.Mukhopadhyay Phy. Rep. 30 (1977) 1.
@@ -206,14 +164,14 @@ G4int G4MuMinusCaptureCascade::DoCascade(const G4double Z, const G4double massA,
// Case of photon cascade, probabilities from
// C.S.Wu and L.Wilets, Ann. Rev. Nuclear Sci. 19 (1969) 527.
G4double var = (10.0 + G4double(nLevel - 1) ) * G4UniformRand();
G4int iLevel = nLevel - 1 ;
if(var > 10.0) iLevel -= G4int(var-10.0) + 1;
if( iLevel < 0 ) iLevel = 0;
DeltaE = EnergyLevel[iLevel] - EnergyLevel[nLevel];
nLevel = iLevel;
moment = DeltaE * GetRandomVec();
AddNewParticle(theGamma, moment, 0.0, &nPart, Cascade);
G4double var = (10.0 + G4double(nLevel - 1) ) * G4UniformRand();
G4int iLevel = nLevel - 1 ;
if(var > 10.0) iLevel -= G4int(var-10.0) + 1;
if( iLevel < 0 ) iLevel = 0;
DeltaE = EnergyLevel[iLevel] - EnergyLevel[nLevel];
nLevel = iLevel;
moment = DeltaE * GetRandomVec();
AddNewParticle(theGamma, moment, 0.0, &nPart, Cascade);
}
} while( nLevel > 0 );
@@ -223,57 +181,62 @@ G4int G4MuMinusCaptureCascade::DoCascade(const G4double Z, const G4double massA,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuMinusCaptureCascade::DoBoundMuonMinusDecay(G4double Z, G4double /* massA*/,
void G4MuMinusCaptureCascade::DoBoundMuonMinusDecay(G4double Z,
G4int* nCascade,
G4GHEKinematicsVector* Cascade)
{
// Simulation on Decay of mu- on a K-shell of the muonic atom
G4double Energy, x;
G4double xmax = ( 1.0 + Emass*Emass/ (MuMass*MuMass) );
G4double KEnergy = GetKShellEnergy(Z);
/*
G4cout << "G4MuMinusCaptureCascade::DoBoundMuonMinusDecay"
<< " XMAX= " << xmax
<< " Ebound= " << KEnergy
<< G4endl;
*/
G4double pmu = std::sqrt(KEnergy*(KEnergy + 2.0*MuMass));
G4double emu = KEnergy + MuMass;
G4ThreeVector moment = GetRandomVec();
G4LorentzVector MU(pmu*moment,emu);
G4ThreeVector bst = MU.boostVector();
G4double Eelect, Pelect, x, ecm;
G4LorentzVector EL, NN;
// Calculate electron energy
do {
do {
x = xmax*G4UniformRand();
} while (G4UniformRand() < (3.0 - 2.0*x)*x*x );
Energy = x*MuMass*0.5 - Emass - KEnergy;
} while (Energy < 0.0);
//
// generate uniform vector
//
G4double ptot = std::sqrt(Energy * (Energy + 2.0*Emass));
G4ThreeVector moment = ptot * GetRandomVec();
} while (G4UniformRand() > (3.0 - 2.0*x)*x*x );
Eelect = x*MuMass*0.5;
Pelect = std::sqrt( Eelect*Eelect - Emass*Emass );
EL = G4LorentzVector(Pelect*moment,Eelect);
EL.boost(bst);
Eelect = EL.e() - Emass - KEnergy;
//
// Calculate rest frame parameters of 2 neutrinos
//
NN = MU - EL;
ecm = NN.mag2();
} while (Eelect < 0.0 || ecm < 0.0);
//
// Create electron
//
moment = std::sqrt(Eelect * (Eelect + 2.0*Emass))*EL.vect().unit();
AddNewParticle(theElectron, moment, Emass, nCascade, Cascade);
// Calculate rest frame parameters of 2 neutrinos
G4double E = MuMass*( 1.0 - x*0.5 );
G4double P = std::sqrt( MuMass*MuMass*x*x*0.25 - Emass*Emass );
if(P >= E) {P = E;}
G4double ecm = 0.5 * std::sqrt( E*E - P*P );
//
// generate uniform vector
//
moment *= -P / (ptot * E);
G4ThreeVector p1 = ecm * GetRandomVec();
//
// Create Neutrinos
//
ecm = 0.5*std::sqrt(ecm);
bst = NN.boostVector();
G4ThreeVector p1 = ecm * GetRandomVec();
G4LorentzVector N1 = G4LorentzVector(p1,ecm);
N1.boost(moment);
AddNewParticle(G4AntiNeutrinoE::AntiNeutrinoE(),G4ThreeVector(N1.vect()),0.0,nCascade,Cascade);
G4LorentzVector N2 = G4LorentzVector(-p1,ecm);
N2.boost(moment);
AddNewParticle(G4NeutrinoMu::NeutrinoMu(),G4ThreeVector(N2.vect()),0.0,nCascade,Cascade);
N1.boost(bst);
G4ThreeVector p1lab = N1.vect();
AddNewParticle(G4AntiNeutrinoE::AntiNeutrinoE(),p1lab,0.0,nCascade,Cascade);
NN -= N1;
G4ThreeVector p2lab = NN.vect();
AddNewParticle(G4NeutrinoMu::NeutrinoMu(),p2lab,0.0,nCascade,Cascade);
return;
}
@@ -23,6 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuonMinusCaptureAtRest.cc,v 1.39 2006/12/01 14:18:26 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// ------------------------------------------------------------
// GEANT 4 class file
@@ -37,19 +39,15 @@
//
// Modifications:
// 18/08/2000 V.Ivanchenko Update description
// 12/12/2003 H.P.Wellisch Completly rewrite mu-nuclear part
// 17/05/2006 V.Ivanchenko Cleanup
// 15/11/2006 V.Ivanchenko Review and rewrite all kinematics
//
//-----------------------------------------------------------------------------
#include "G4MuonMinusCaptureAtRest.hh"
#include "G4DynamicParticle.hh"
//#include "G4ParticleTypes.hh"
#include "Randomize.hh"
//#include <string.h>
#include <cmath>
//#include <stdio.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include "G4He3.hh"
#include "G4NeutrinoMu.hh"
#include "G4Fragment.hh"
@@ -57,16 +55,21 @@
#include "G4Proton.hh"
#include "G4PionPlus.hh"
#include "G4MuonMinus.hh"
#include "G4GHEKinematicsVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MuonMinusCaptureAtRest::G4MuonMinusCaptureAtRest(const G4String& processName,
G4ProcessType aType ) :
G4VRestProcess (processName, aType), nCascade(0), targetZ(0),targetA(0)
{
Cascade = new G4GHEKinematicsVector [17];
pSelector = new G4StopElementSelector();
Cascade = new G4GHEKinematicsVector [17];
pSelector = new G4StopElementSelector();
pEMCascade = new G4MuMinusCaptureCascade();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MuonMinusCaptureAtRest::~G4MuonMinusCaptureAtRest()
{
delete [] Cascade;
@@ -74,34 +77,37 @@ G4MuonMinusCaptureAtRest::~G4MuonMinusCaptureAtRest()
delete pEMCascade;
}
G4bool G4MuonMinusCaptureAtRest::
IsApplicable(const G4ParticleDefinition& particle)
{
return ( &particle == G4MuonMinus::MuonMinus() );
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4MuonMinusCaptureAtRest::IsApplicable(const G4ParticleDefinition& p)
{
return ( &p == G4MuonMinus::MuonMinus() );
}
//
// Handles MuonMinuss at rest; a MuonMinus can either create secondaries or
// do nothing (in which case it should be sent back to decay-handling
// section
//
G4VParticleChange* G4MuonMinusCaptureAtRest::
AtRestDoIt(const G4Track& track,const G4Step&)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VParticleChange* G4MuonMinusCaptureAtRest::AtRestDoIt(const G4Track& track,
const G4Step&)
{
//
// Handles MuonMinuss at rest; a MuonMinus can either create secondaries or
// do nothing (in which case it should be sent back to decay-handling
// section
//
aParticleChange.Initialize(track);
// select element and get Z,A.
G4Element* aEle = pSelector->GetElement(track.GetMaterial());
targetZ = aEle->GetZ();
targetA = aEle->GetN();
targetZ = G4lrint(aEle->GetZ())+perCent; // protect against effective numbers, esp. A.
targetA = G4lrint(aEle->GetN())+perCent; // perCent protects for G4int getting targetA-1.
G4IsotopeVector* isv = aEle->GetIsotopeVector();
G4int ni = 0;
if(isv) ni = isv->size();
if(ni == 1) {
targetA = G4double(aEle->GetIsotope(0)->GetN());
} else if(ni > 0) {
} else if(ni > 1) {
G4double* ab = aEle->GetRelativeAbundanceVector();
G4double y = G4UniformRand();
G4int j = -1;
@@ -114,7 +120,7 @@ AtRestDoIt(const G4Track& track,const G4Step&)
}
// Do the electromagnetic cascade of the muon in the nuclear field.
nCascade = 0;
nCascade = 0;
targetMass = G4NucleiProperties::GetNuclearMass(targetA, targetZ);
nCascade = pEMCascade->DoCascade(targetZ, targetMass, Cascade);
@@ -130,28 +136,28 @@ AtRestDoIt(const G4Track& track,const G4Step&)
G4ReactionProductVector * captureResult = 0;
G4int nEmSecondaries = nCascade;
G4int nSecondaries = nCascade;
/*
G4cout << "lambda= " << lambda << " lambdac= " << lambdac
<< " nem= " << nEmSecondaries << G4endl;
*/
if( G4UniformRand()*lambda > lambdac)
{
pEMCascade->DoBoundMuonMinusDecay(targetZ, targetMass, &nEmSecondaries, Cascade);
}
pEMCascade->DoBoundMuonMinusDecay(targetZ, &nEmSecondaries, Cascade);
else
{
captureResult = DoMuCapture();
}
// fill the final state
if(captureResult) nSecondaries += captureResult->size();
else nSecondaries = nEmSecondaries;
//G4cout << " nsec= " << nSecondaries << " nem= " << nEmSecondaries << G4endl;
aParticleChange.SetNumberOfSecondaries( nSecondaries );
G4double globalTime = track.GetGlobalTime();
G4ThreeVector position = track.GetPosition();
// Store nuclear cascade
if(captureResult)
{
for ( size_t isec = 0; isec < captureResult->size(); isec++ )
{
if(captureResult) {
G4int n = captureResult->size();
for ( G4int isec = 0; isec < n; isec++ ) {
G4ReactionProduct* aParticle = captureResult->operator[](isec);
G4DynamicParticle * aNewParticle = new G4DynamicParticle();
aNewParticle->SetDefinition( aParticle->GetDefinition() );
@@ -159,11 +165,11 @@ AtRestDoIt(const G4Track& track,const G4Step&)
aNewParticle->SetMomentum(itV.vect());
G4double localtime = globalTime + tDelay + aParticle->GetTOF();
G4Track* aNewTrack = new G4Track( aNewParticle, localtime, position);
aNewTrack->SetTouchableHandle(track.GetTouchableHandle());
aNewTrack->SetTouchableHandle(track.GetTouchableHandle());
aParticleChange.AddSecondary( aNewTrack );
}
}
// Store electromagnetic cascade
if(nEmSecondaries > 0) {
@@ -178,7 +184,7 @@ AtRestDoIt(const G4Track& track,const G4Step&)
aNewParticle->SetMomentum( Cascade[isec].GetMomentum() );
G4Track* aNewTrack = new G4Track( aNewParticle, localtime, position );
aNewTrack->SetTouchableHandle(track.GetTouchableHandle());
aNewTrack->SetTouchableHandle(track.GetTouchableHandle());
aParticleChange.AddSecondary( aNewTrack );
}
}
@@ -190,82 +196,88 @@ AtRestDoIt(const G4Track& track,const G4Step&)
return &aParticleChange;
}
G4ReactionProductVector * G4MuonMinusCaptureAtRest::DoMuCapture()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ReactionProductVector* G4MuonMinusCaptureAtRest::DoMuCapture()
{
static G4double zeff[100] = {
1.,1.98,2.95,3.89,4.8,5.72,6.61,7.49,8.32,9.12,9.95,10.69,11.48,12.22,
12.91,13.64,14.24,14.89,15.53,16.15,16.75,17.38,18.04,18.49,
19.06,19.59,20.1,20.66,21.12,21.61,22.02,22.43,22.84,23.24,
23.65,24.06,24.47,24.85,25.23,25.61,25.99,26.37,26.69,27.,
27.32,27.63,27.95,28.2,28.42,28.64,28.79,29.03,29.27,29.51,
29.75,29.99,30.2,30.36,30.53,30.69,30.85,31.01,31.18,31.34,
31.48,31.62,31.76,31.9,32.05,32.19,32.33,32.47,32.61,32.76,
32.94,33.11,33.29,33.46,33.64,33.81,34.21,34.18,34.,34.1,
34.21,34.31,34.42,34.52,34.63,34.73,34.84,34.94,35.04,35.15,
35.25,35.36,35.46,35.57,35.67,35.78 };
// Get the muon 4-vector
// G4cout << "G4MuonMinusCaptureAtRest::DoMuCapture called " << G4endl;
G4int idxx = G4lrint(targetZ)-1;
if(idxx>99) idxx=99;
G4double q = zeff[idxx];
G4double zeff2 = q*q;
G4double mumass = G4MuonMinus::MuonMinus()->GetPDGMass();
G4double muonBindingEnergy = 0.5*zeff2*mumass*fine_structure_const*fine_structure_const;
G4double muBindingEnergy = pEMCascade->GetKShellEnergy(targetZ);
/*
G4cout << "G4MuonMinusCaptureAtRest::DoMuCapture called Emu= "
<< muBindingEnergy << G4endl;
*/
// Energy on K-shell
G4double muEnergy = mumass + muonBindingEnergy;
G4double availableEnergy = targetMass + mumass - muonBindingEnergy;
G4double cost = 2.*G4UniformRand() - 1.0;
G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
G4double phi = twopi*G4UniformRand();
G4ThreeVector aMu3Mom(sint*std::cos(phi),sint*std::sin(phi),cost);
G4double pmu = std::sqrt(muEnergy*muEnergy + mumass*mumass);
G4LorentzVector aMuMom(muEnergy,aMu3Mom*pmu);
G4double residualMass = G4NucleiProperties::GetNuclearMass(targetA, targetZ - 1.0);
G4double muEnergy = mumass + muBindingEnergy;
G4double muMom = std::sqrt(muBindingEnergy*(muBindingEnergy + 2.0*mumass));
G4double availableEnergy = targetMass + mumass - muBindingEnergy;
G4LorentzVector momInitial(0.0,0.0,0.0,availableEnergy);
G4LorentzVector momResidual;
G4ReactionProductVector * aPreResult;
G4ThreeVector vmu = muMom*pEMCascade->GetRandomVec();
G4LorentzVector aMuMom(vmu, muEnergy);
G4double residualMass =
G4NucleiProperties::GetNuclearMass(targetA, targetZ - 1.0);
G4ReactionProductVector* aPreResult = 0;
G4ReactionProduct* aNu = new G4ReactionProduct();
aNu->SetDefinition( G4NeutrinoMu::NeutrinoMu() );
// proton as a target
if(targetA < 1.5) {
if(targetZ < 2.5) {
G4double Ecms = mumass + proton_mass_c2 - muonBindingEnergy;
G4double Enu = 0.5*(Ecms - neutron_mass_c2*neutron_mass_c2/Ecms);
if(targetA > 1.5) {
if(targetZ == 1.0 && targetA == 2.0) {
availableEnergy -= neutron_mass_c2;
} else if(targetZ == 1.0 && targetA == 3.0) {
availableEnergy -= 2.0*neutron_mass_c2;
} else if(targetZ == 2.0) {
G4ParticleDefinition* pd = 0;
if(targetA == 3.0) pd = G4Deuteron::Deuteron();
if(targetA == 4.0) pd = G4Triton::Triton();
else
pd = G4ParticleTable::GetParticleTable()->FindIon(1,G4int(targetA)-1,0,1);
// G4cout << "Extra " << pd->GetParticleName() << G4endl;
availableEnergy -= pd->GetPDGMass();
}
}
//
// Computation in assumption of CM collision of mu and nucleaon
//
G4double Enu = 0.5*(availableEnergy -
neutron_mass_c2*neutron_mass_c2/availableEnergy);
// make the nu, and transform to lab;
G4double cost = 2.*G4UniformRand() - 1.0;
G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
G4double phi = twopi*G4UniformRand();
G4ThreeVector nu3Mom(sint*std::cos(phi),sint*std::sin(phi),cost);
nu3Mom *= Enu;
aPreResult = new G4ReactionProductVector();
G4ThreeVector nu3Mom = Enu*pEMCascade->GetRandomVec();
G4ReactionProduct* aN = new G4ReactionProduct();
aN->SetDefinition( G4Neutron::Neutron() );
aN->SetTotalEnergy( Ecms - Enu );
aN->SetTotalEnergy( availableEnergy - Enu );
aN->SetMomentum( -nu3Mom );
aNu->SetTotalEnergy( Enu );
aNu->SetMomentum( nu3Mom );
aPreResult = new G4ReactionProductVector();
aPreResult->push_back(aN );
aPreResult->push_back(aNu);
aPreResult->push_back(aNu);
if(verboseLevel > 1)
G4cout << "G4MuonMinusCaptureAtRest::DoMuCapture on H "
<<" EkinN(MeV)= " << (Ecms - Enu - neutron_mass_c2)/GeV
<<" Enu(MeV)= "<<aNu->GetTotalEnergy()/MeV<<G4endl;
G4cout << "DoMuCapture on H or He"
<<" EkinN(MeV)= " << (availableEnergy - Enu - neutron_mass_c2)/MeV
<<" Enu(MeV)= "<<aNu->GetTotalEnergy()/MeV
<<" n= " << aPreResult->size()
<<G4endl;
return aPreResult;
}
// pick random proton inside nucleus
G4double eEx=0;
G4double eEx;
do {
theN.Init(targetA, targetZ);
G4ThreeVector fermiMom;
G4LorentzVector thePMom;
G4Nucleon * aNucleon = 0;
G4int theProtonCounter = G4lrint( 0.5 + targetZ * G4UniformRand() );
G4int counter = 0;
@@ -276,44 +288,52 @@ G4ReactionProductVector * G4MuonMinusCaptureAtRest::DoMuCapture()
if( aNucleon->GetDefinition() == G4Proton::Proton() ) {
counter++;
if(counter == theProtonCounter) {
fermiMom = aNucleon->GetMomentum().vect();
thePMom = aNucleon->GetMomentum();
break;
}
}
}
// Get the nu momentum in the CMS
G4LorentzVector thePMom(std::sqrt(proton_mass_c2*proton_mass_c2 + fermiMom.mag2()),
fermiMom);
G4LorentzVector theCMS = thePMom + aMuMom;
G4LorentzVector theCMS = thePMom + aMuMom;
G4ThreeVector bst = theCMS.boostVector();
momResidual = G4LorentzVector(0.0,0.0,0.0,availableEnergy);
G4double Ecms = theCMS.mag();
G4double Enu = 0.5*(Ecms - neutron_mass_c2*neutron_mass_c2/Ecms);
eEx = 0.0;
// make the nu, and transform to lab;
cost = 2.*G4UniformRand() - 1.0;
sint = std::sqrt((1.0 - cost)*(1.0 + cost));
phi = twopi*G4UniformRand();
G4ThreeVector nu3Mom(sint*std::cos(phi),sint*std::sin(phi),cost);
G4LorentzVector nuMom(Enu,aMu3Mom*Enu);
if(Enu > 0.0) {
// make the nu, and transform to lab;
G4ThreeVector nu3Mom = Enu*pEMCascade->GetRandomVec();
G4LorentzVector nuMom(nu3Mom, Enu);
// nu in lab.
nuMom.boost(bst);
aNu->SetTotalEnergy( nuMom.e() );
aNu->SetMomentum( nuMom.vect() );
// make the neutrino an mu-neutrino with the above momentum and get the residual properties
nuMom.boost(bst);
momResidual -= nuMom;
// make residual
momResidual = momInitial - nuMom;
// nu in lab.
aNu->SetTotalEnergy( nuMom.t() );
aNu->SetMomentum( nuMom.vect() );
// Call pre-compound on the rest.
eEx = momResidual.mag();
if(verboseLevel > 1)
G4cout << "G4MuonMinusCaptureAtRest::DoMuCapture: "
<< " Eex(MeV)= " << (eEx-residualMass)/MeV
<< " Enu(MeV)= "<<aNu->GetTotalEnergy()/MeV
<<G4endl;
}
} while(eEx <= residualMass);
// Call pre-compound on the rest.
eEx = momResidual.mag() - residualMass;
} while(eEx <= 0.0);
// G4cout << "muonCapture : " << eEx << " " << residualMass
// << " A,Z= " << targetA << ", "<< targetZ
// << " " << G4int(targetA) << ", " << G4int(targetZ) << G4endl;
//
// Start Deexcitation
//
G4ThreeVector fromBreit = momResidual.boostVector();
G4LorentzVector fscm(0.0,0.0,0.0, momResidual.mag());
G4LorentzVector fscm(0.0,0.0,0.0, eEx);
G4Fragment anInitialState;
anInitialState.SetA(G4lrint(targetA));
anInitialState.SetZ(G4lrint(targetZ) - 1);
@@ -324,24 +344,25 @@ G4ReactionProductVector * G4MuonMinusCaptureAtRest::DoMuCapture()
aPreResult = theHandler.BreakItUp(anInitialState);
G4ReactionProductVector::iterator ires;
G4double eBal = availableEnergy;
for(ires=aPreResult->begin(); ires!=aPreResult->end(); ires++)
{
G4double eBal = availableEnergy - aNu->GetTotalEnergy();
for(ires=aPreResult->begin(); ires!=aPreResult->end(); ires++) {
G4LorentzVector itV((*ires)->GetTotalEnergy(), (*ires)->GetMomentum());
itV.boost(fromBreit);
(*ires)->SetTotalEnergy(itV.t());
(*ires)->SetMomentum(itV.vect());
eBal -= itV.t();
}
//
// fill neutrino into result
//
aPreResult->push_back(aNu);
eBal -= aNu->GetTotalEnergy();
if(verboseLevel > 1)
G4cout << "G4MuonMinusCaptureAtRest::DoMuCapture: Nsec= "
G4cout << "DoMuCapture: Nsec= "
<< aPreResult->size() << " Ebalance(MeV)= " << eBal/MeV
<< " Eex(MeV)= " << eEx/MeV
<<" E0(GeV)= " <<availableEnergy/GeV
<<" Enu(MeV)= "<<aNu->GetTotalEnergy()/MeV<<G4endl;
<<" E0(MeV)= " <<availableEnergy/MeV
<<" Mres(GeV)= " <<residualMass/GeV
<<G4endl;
return aPreResult;
}
@@ -23,7 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4StopElementSelector.cc,v 1.14 2006/11/15 12:17:15 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// --------------------------------------------------------------
// GEANT4 class file
@@ -50,12 +51,7 @@
#include "G4StopElementSelector.hh"
#include "Randomize.hh"
//#include "G4ParticleDefinition.hh"
//#include <iomanip>
#include "G4Material.hh"
//#include "G4MaterialTable.hh"
//#include "G4MuonMinus.hh"
//#include <vector>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -138,7 +134,7 @@ G4double G4StopElementSelector::GetMuonCaptureRate(G4double Z, G4double A)
// Initialized data
// static std::vector<G4double> zeff(100);
static G4double zeff[100] = {
static G4double zeff[100] = {
1.,1.98,2.95,3.89,4.8,5.72,6.61,7.49,8.32,9.12,9.95,10.69,11.48,12.22,
12.91,13.64,14.24,14.89,15.53,16.15,16.75,17.38,18.04,18.49,
19.06,19.59,20.1,20.66,21.12,21.61,22.02,22.43,22.84,23.24,
@@ -154,7 +150,6 @@ G4double G4StopElementSelector::GetMuonCaptureRate(G4double Z, G4double A)
// Atomizdat, 1978. (Experimental capture velocities)
const size_t ListZE = 65;
// static std::vector<G4int> ListZExp[ListZE] = {
static G4int ListZExp[ListZE] = {
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 22, 23,
@@ -163,7 +158,7 @@ G4double G4StopElementSelector::GetMuonCaptureRate(G4double Z, G4double A)
50, 51, 52, 53, 55, 56, 57, 58, 59, 60,
62, 64, 65, 67, 72, 73, 74, 80, 81, 82,
83, 90, 92, 93};
// static std::vector<G4double> ListCaptureVel[ListZE] = {
static G4double ListCaptureVel[ListZE] = {
0.0057, 0.010, 0.0258, 0.0371, 0.0644,
0.0974, 0.144, 0.250, 0.386, 0.479,