Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -32,6 +32,10 @@
|
||||
#include "G4GenericIon.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
@@ -67,6 +71,15 @@ void G4RadioactiveDecayPhysics::ConstructParticle()
|
||||
|
||||
void G4RadioactiveDecayPhysics::ConstructProcess()
|
||||
{
|
||||
G4LossTableManager* man = G4LossTableManager::Instance();
|
||||
G4VAtomDeexcitation* ad = man->AtomDeexcitation();
|
||||
if(!ad) {
|
||||
man->SetAtomDeexcitation(new G4UAtomicDeexcitation());
|
||||
}
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
param->SetFluo(true);
|
||||
param->SetAuger(true);
|
||||
|
||||
G4PhysicsListHelper::GetPhysicsListHelper()->
|
||||
RegisterProcess(new G4RadioactiveDecay(), G4GenericIon::GenericIon());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4UnknownDecayPhysics.cc 70999 2013-06-09 01:37:53Z adotti $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4UnknownDecayPhysics
|
||||
//
|
||||
// Author: 2016 - M. Asai
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "G4UnknownDecayPhysics.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4UnknownParticle.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
G4_DECLARE_PHYSCONSTR_FACTORY(G4UnknownDecayPhysics);
|
||||
|
||||
G4ThreadLocal G4UnknownDecay* G4UnknownDecayPhysics::fDecayProcess = 0;
|
||||
G4ThreadLocal G4bool G4UnknownDecayPhysics::wasActivated = false;
|
||||
|
||||
G4UnknownDecayPhysics::G4UnknownDecayPhysics(G4int ver)
|
||||
: G4VPhysicsConstructor("UnknownDecay"), verbose(ver)
|
||||
{
|
||||
}
|
||||
|
||||
G4UnknownDecayPhysics::G4UnknownDecayPhysics(const G4String& name, G4int ver)
|
||||
: G4VPhysicsConstructor(name), verbose(ver)
|
||||
{
|
||||
}
|
||||
|
||||
G4UnknownDecayPhysics::~G4UnknownDecayPhysics()
|
||||
{
|
||||
}
|
||||
|
||||
void G4UnknownDecayPhysics::ConstructParticle()
|
||||
{
|
||||
G4UnknownParticle::UnknownParticleDefinition();
|
||||
}
|
||||
|
||||
void G4UnknownDecayPhysics::ConstructProcess()
|
||||
{
|
||||
if(wasActivated) { return; }
|
||||
wasActivated = true;
|
||||
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
|
||||
// Add Decay Process
|
||||
fDecayProcess = new G4UnknownDecay();
|
||||
aParticleIterator->reset();
|
||||
G4ParticleDefinition* particle=0;
|
||||
|
||||
while( (*aParticleIterator)() )
|
||||
{
|
||||
particle = aParticleIterator->value();
|
||||
if( fDecayProcess->IsApplicable(*particle) )
|
||||
{
|
||||
if(verbose > 1) {
|
||||
G4cout << "### Decays for " << particle->GetParticleName() << G4endl;
|
||||
}
|
||||
ph->RegisterProcess(fDecayProcess, particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user