Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4EmCaptureCascade.cc 91836 2015-08-07 07:25:54Z gcosmo $
|
||||
// $Id: G4EmCaptureCascade.cc 101422 2016-11-17 10:41:23Z gcosmo $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -64,12 +64,12 @@ G4EmCaptureCascade::G4EmCaptureCascade()
|
||||
// Calculate the Energy of K Mesoatom Level for this Element using
|
||||
// the Energy of Hydrogen Atom taken into account finite size of the
|
||||
// nucleus
|
||||
const G4int nlevels = 28;
|
||||
const G4int listK[nlevels] = {
|
||||
static const G4int nlevels = 28;
|
||||
static const G4int listK[nlevels] = {
|
||||
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};
|
||||
const G4double listKEnergy[nlevels] = {
|
||||
static const G4double listKEnergy[nlevels] = {
|
||||
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,
|
||||
@@ -94,7 +94,7 @@ G4EmCaptureCascade::G4EmCaptureCascade()
|
||||
fKLevelEnergy[z2] = listKEnergy[i];
|
||||
idx = i;
|
||||
}
|
||||
for( G4int i = 0; i<14; ++i) { fLevelEnergy[i] = 0.0; }
|
||||
for(G4int i = 0; i<14; ++i) { fLevelEnergy[i] = 0.0; }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -116,18 +116,18 @@ G4EmCaptureCascade::ApplyYourself(const G4HadProjectile& projectile,
|
||||
G4int A = targetNucleus.GetA_asInt();
|
||||
G4double massA = G4NucleiProperties::GetNuclearMass(A, Z);
|
||||
G4double mass = fMuMass * massA / (fMuMass + massA) ;
|
||||
G4double e = 13.6 * eV * Z * Z * mass/ electron_mass_c2;
|
||||
G4double e = 13.6 * eV * (Z * Z) * mass/ electron_mass_c2;
|
||||
|
||||
// precise corrections of energy only for K-shell
|
||||
fLevelEnergy[0] = fKLevelEnergy[Z];
|
||||
for( G4int i = 2; i < 15; ++i) {
|
||||
fLevelEnergy[i-1] = e/G4double(i*i);
|
||||
fLevelEnergy[0] = fKLevelEnergy[std::min(Z, 92)];
|
||||
for(G4int i=1; i<14; ++i) {
|
||||
fLevelEnergy[i] = e/(G4double)((i+1)*(i+1));
|
||||
}
|
||||
|
||||
G4int nElec = G4int(Z);
|
||||
G4int nElec = Z;
|
||||
G4int nAuger = 1;
|
||||
G4int nLevel = 13;
|
||||
G4double pGamma = Z*Z*Z*Z;
|
||||
G4double pGamma = (Z*Z*Z*Z);
|
||||
|
||||
// Capture on 14-th level
|
||||
G4double edep = fLevelEnergy[13];
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4MuonMinusAtomicCapture.cc $
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
// File name: G4MuonMinusAtomicCapture
|
||||
//
|
||||
// 20160701 K.L. Genser - New process using G4MuonicAtom somewhat based on G4HadronStoppingProcess
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Stopping of mu-
|
||||
//
|
||||
// G4VParticleChange will contain gammas from G4EmCaptureCascade and
|
||||
// resulting G4MuonicAtom
|
||||
//
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#include "G4MuonMinusAtomicCapture.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4HadronicProcessType.hh"
|
||||
#include "G4MuonMinusBoundDecay.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4HadronicProcessStore.hh"
|
||||
#include "G4EmCaptureCascade.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RandomDirection.hh"
|
||||
#include "G4HadSecondary.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4MuonMinusAtomicCapture::G4MuonMinusAtomicCapture(const G4String& name)
|
||||
: G4HadronicProcess(name, fHadronAtRest),// name, process type
|
||||
fElementSelector(new G4ElementSelector()),
|
||||
fEmCascade(new G4EmCaptureCascade()) // Owned by InteractionRegistry
|
||||
{
|
||||
// Modify G4VProcess flags to emulate G4VRest instead of G4VDiscrete
|
||||
enableAtRestDoIt = true;
|
||||
enablePostStepDoIt = false;
|
||||
G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4MuonMinusAtomicCapture::~G4MuonMinusAtomicCapture()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4MuonMinusAtomicCapture::IsApplicable(const G4ParticleDefinition& p)
|
||||
{
|
||||
return (&p == G4MuonMinus::MuonMinus());
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void
|
||||
G4MuonMinusAtomicCapture::PreparePhysicsTable(const G4ParticleDefinition& p)
|
||||
{
|
||||
G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this,&p);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuonMinusAtomicCapture::BuildPhysicsTable(const G4ParticleDefinition& p)
|
||||
{
|
||||
G4HadronicProcessStore::Instance()->PrintInfo(&p);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4MuonMinusAtomicCapture::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track&, G4ForceCondition* condition)
|
||||
{
|
||||
*condition = NotForced;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4MuonMinusAtomicCapture::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track&, G4double, G4ForceCondition* condition)
|
||||
{
|
||||
*condition = NotForced;
|
||||
return DBL_MAX;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VParticleChange* G4MuonMinusAtomicCapture::AtRestDoIt(const G4Track& track,
|
||||
const G4Step&)
|
||||
{
|
||||
// if primary is not Alive then do nothing (how?)
|
||||
theTotalResult->Initialize(track);
|
||||
|
||||
G4Nucleus* nucleus = GetTargetNucleusPointer();
|
||||
// the call below actually sets the nucleus params;
|
||||
// G4Nucleus targetNucleus; is a member of G4HadronicProcess
|
||||
// G4Element* elm =
|
||||
fElementSelector->SelectZandA(track, nucleus);
|
||||
|
||||
G4HadFinalState* result = 0;
|
||||
thePro.Initialise(track); // thePro is G4HadProjectile from G4HadronicProcess
|
||||
|
||||
// save track time an dstart capture from zero time
|
||||
thePro.SetGlobalTime(0.0);
|
||||
G4double time0 = track.GetGlobalTime();
|
||||
|
||||
// Do the electromagnetic cascade in the nuclear field.
|
||||
// EM cascade should keep G4HadFinalState object,
|
||||
// because it will not be deleted at the end of this method
|
||||
//
|
||||
result = fEmCascade->ApplyYourself(thePro, *nucleus);
|
||||
G4double ebound = result->GetLocalEnergyDeposit(); // may need to carry this over; review
|
||||
G4double edep = 0.0;
|
||||
G4int nSecondaries = result->GetNumberOfSecondaries();
|
||||
thePro.SetBoundEnergy(ebound);
|
||||
|
||||
// creating the muonic atom
|
||||
++nSecondaries;
|
||||
|
||||
G4IonTable* itp = G4IonTable::GetIonTable();
|
||||
G4ParticleDefinition* muonicAtom = itp->GetMuonicAtom(nucleus->GetZ_asInt(),
|
||||
nucleus->GetA_asInt());
|
||||
|
||||
G4DynamicParticle* dp = new G4DynamicParticle(muonicAtom,G4RandomDirection(),0.);
|
||||
G4HadSecondary hadSec(dp);
|
||||
hadSec.SetTime(time0);
|
||||
result->AddSecondary(hadSec);
|
||||
|
||||
// Fill results
|
||||
//
|
||||
theTotalResult->ProposeTrackStatus(fStopAndKill);
|
||||
theTotalResult->ProposeLocalEnergyDeposit(edep);
|
||||
theTotalResult->SetNumberOfSecondaries(nSecondaries);
|
||||
G4double w = track.GetWeight();
|
||||
theTotalResult->ProposeWeight(w);
|
||||
|
||||
G4cout << __func__
|
||||
<< " nSecondaries "
|
||||
<< nSecondaries
|
||||
<< G4endl;
|
||||
|
||||
for(G4int i=0; i<nSecondaries; ++i) {
|
||||
G4HadSecondary* sec = result->GetSecondary(i);
|
||||
|
||||
// add track global time to the reaction time
|
||||
G4double time = sec->GetTime();
|
||||
if(time < 0.0) { time = 0.0; }
|
||||
time += time0;
|
||||
|
||||
G4cout << __func__
|
||||
<< " "
|
||||
<< i
|
||||
<< " Resulting secondary "
|
||||
<< sec->GetParticle()->GetPDGcode()
|
||||
<< " "
|
||||
<< sec->GetParticle()->GetDefinition()->GetParticleName()
|
||||
<< G4endl;
|
||||
|
||||
// create secondary track
|
||||
G4Track* t = new G4Track(sec->GetParticle(),
|
||||
time,
|
||||
track.GetPosition());
|
||||
t->SetWeight(w*sec->GetWeight());
|
||||
|
||||
t->SetTouchableHandle(track.GetTouchableHandle());
|
||||
theTotalResult->AddSecondary(t);
|
||||
}
|
||||
result->Clear();
|
||||
|
||||
// fixme: needs to be done at the MuonicAtom level
|
||||
// if (epReportLevel != 0) { // G4HadronicProcess::
|
||||
// CheckEnergyMomentumConservation(track, *nucleus);
|
||||
// }
|
||||
return theTotalResult;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuonMinusAtomicCapture::ProcessDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "Stopping of mu- using default element selector, EM cascade"
|
||||
<< " sampling and bound decay sampling.\n"
|
||||
<< "Bertini model is used for nuclear capture\n"
|
||||
<< "G4MuonicAtom is created\n";
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
Reference in New Issue
Block a user