Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile 77567 2013-11-26 09:40:31Z gcosmo $
|
||||
# $Id: GNUmakefile 94090 2015-11-05 15:13:10Z gcosmo $
|
||||
# ---------------------------------------------------------------------------
|
||||
# GNUmakefile for physics_lists/constructors/decay library.
|
||||
# Gunter Folger 10-Jan-2012.
|
||||
@@ -62,7 +62,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/interface/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/lend/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/lepto_nuclear/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/particle_hp/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/management/include \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 78918 2014-02-03 15:09:18Z gcosmo $
|
||||
$Id: History 94090 2015-11-05 15:13:10Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -14,6 +14,23 @@ introduced in the code and keeptrack of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
05-Nov-2015, Alberto Ribon (phys-ctor-decay-V10-01-05)
|
||||
- Migrated to particle_hp/
|
||||
|
||||
06-Oct-2015, Peter Gumplinger (phys-ctor-decay-V10-01-04)
|
||||
- add G4Gamma::GammaDefinition() to G4SpinDecayPhysics::ConstructParticle()
|
||||
|
||||
12-Aug-2015, Peter Gumplinger (phys-ctor-decay-V10-01-02/03)
|
||||
- fix Coverity errors in G4SpinDecayPhysics
|
||||
|
||||
30-Apr-2015, Peter Gumplinger (phys-ctor-decay-V10-01-01)
|
||||
- G4SpinDecayPhysics inherits from G4VPhysicsConstructor and no longer
|
||||
from G4DecayPhysics
|
||||
- fix Coverity errors with new pointer going out of scope
|
||||
|
||||
09-Apr-2015, Peter Gumplinger (phys-ctor-decay-V10-01-00)
|
||||
- add G4SpinDecayPhysics
|
||||
|
||||
29-Jan-2014, Gunter Folger (phys-ctor-decay-V10-00-00)
|
||||
- Removed from photolepton_hadron/muon_nuclear from sources.cmake
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SpinDecayPhysics.hh 71039 2015-04-09 09:23:55Z gum $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4SpinDecayPhysics
|
||||
//
|
||||
// Author: 2015 P.Gumplinger
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
#ifndef G4SpinDecayPhysics_h
|
||||
#define G4SpinDecayPhysics_h 1
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
|
||||
#include "G4DecayWithSpin.hh"
|
||||
#include "G4PionDecayMakeSpin.hh"
|
||||
|
||||
class G4SpinDecayPhysics : public G4VPhysicsConstructor
|
||||
{
|
||||
public:
|
||||
|
||||
G4SpinDecayPhysics();
|
||||
G4SpinDecayPhysics(const G4String& name);
|
||||
virtual ~G4SpinDecayPhysics();
|
||||
|
||||
public:
|
||||
|
||||
// This method will be invoked in the Construct() method.
|
||||
// each particle type will be instantiated
|
||||
|
||||
virtual void ConstructParticle();
|
||||
|
||||
// This method will be invoked in the Construct() method.
|
||||
// each physics process will be instantiated and
|
||||
// registered to the process manager of each particle type
|
||||
|
||||
virtual void ConstructProcess();
|
||||
|
||||
private:
|
||||
|
||||
G4DecayWithSpin* decayWithSpin;
|
||||
G4PionDecayMakeSpin* poldecay;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 10/01/2013
|
||||
#
|
||||
# $Id: sources.cmake 78918 2014-02-03 15:09:18Z gcosmo $
|
||||
# $Id: sources.cmake 94090 2015-11-05 15:13:10Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,7 +68,7 @@ include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/interface/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lend/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lepto_nuclear/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/neutron_hp/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/particle_hp/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/diffraction/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/hadronization/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/management/include)
|
||||
@@ -85,9 +85,11 @@ include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4phys_ctor_decay
|
||||
HEADERS
|
||||
G4DecayPhysics.hh
|
||||
G4SpinDecayPhysics.hh
|
||||
G4RadioactiveDecayPhysics.hh
|
||||
SOURCES
|
||||
G4DecayPhysics.cc
|
||||
G4SpinDecayPhysics.cc
|
||||
G4RadioactiveDecayPhysics.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4baryons
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SpinDecayPhysics.cc 71039 2015-04-09 09:23:55Z gum $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4SpinDecayPhysics
|
||||
//
|
||||
// Author: 2015 P. Gumplinger
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
#include "G4SpinDecayPhysics.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
#include "G4ProcessTable.hh"
|
||||
|
||||
#include "G4DecayTable.hh"
|
||||
#include "G4MuonDecayChannelWithSpin.hh"
|
||||
#include "G4MuonRadiativeDecayChannelWithSpin.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
G4_DECLARE_PHYSCONSTR_FACTORY(G4SpinDecayPhysics);
|
||||
|
||||
G4SpinDecayPhysics::G4SpinDecayPhysics()
|
||||
: G4VPhysicsConstructor("SpinDecay"), decayWithSpin(NULL), poldecay(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
G4SpinDecayPhysics::G4SpinDecayPhysics(const G4String& name)
|
||||
: G4VPhysicsConstructor(name), decayWithSpin(NULL), poldecay(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
G4SpinDecayPhysics::~G4SpinDecayPhysics()
|
||||
{
|
||||
if (decayWithSpin) delete decayWithSpin;
|
||||
if (poldecay) delete poldecay;
|
||||
}
|
||||
|
||||
void G4SpinDecayPhysics::ConstructParticle()
|
||||
{
|
||||
G4Gamma::GammaDefinition();
|
||||
G4Electron::ElectronDefinition();
|
||||
G4Positron::PositronDefinition();
|
||||
|
||||
G4NeutrinoE::NeutrinoEDefinition();
|
||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||
|
||||
G4MuonPlus::MuonPlusDefinition();
|
||||
G4MuonMinus::MuonMinusDefinition();
|
||||
|
||||
G4PionPlus::PionPlus();
|
||||
G4PionMinus::PionMinus();
|
||||
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
|
||||
G4DecayTable* MuonPlusDecayTable = new G4DecayTable();
|
||||
MuonPlusDecayTable -> Insert(new
|
||||
G4MuonDecayChannelWithSpin("mu+",0.986));
|
||||
MuonPlusDecayTable -> Insert(new
|
||||
G4MuonRadiativeDecayChannelWithSpin("mu+",0.014));
|
||||
G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable);
|
||||
|
||||
G4DecayTable* MuonMinusDecayTable = new G4DecayTable();
|
||||
MuonMinusDecayTable -> Insert(new
|
||||
G4MuonDecayChannelWithSpin("mu-",0.986));
|
||||
MuonMinusDecayTable -> Insert(new
|
||||
G4MuonRadiativeDecayChannelWithSpin("mu-",0.014));
|
||||
G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable);
|
||||
}
|
||||
|
||||
void G4SpinDecayPhysics::ConstructProcess()
|
||||
{
|
||||
decayWithSpin = new G4DecayWithSpin();
|
||||
|
||||
G4ProcessTable* processTable = G4ProcessTable::GetProcessTable();
|
||||
|
||||
G4VProcess* decay;
|
||||
decay = processTable->FindProcess("Decay",G4MuonPlus::MuonPlus());
|
||||
|
||||
G4ProcessManager* fManager;
|
||||
fManager = G4MuonPlus::MuonPlus()->GetProcessManager();
|
||||
|
||||
if (fManager) {
|
||||
if (decay) fManager->RemoveProcess(decay);
|
||||
fManager->AddProcess(decayWithSpin);
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
fManager ->SetProcessOrdering(decayWithSpin, idxPostStep);
|
||||
fManager ->SetProcessOrdering(decayWithSpin, idxAtRest);
|
||||
}
|
||||
|
||||
fManager = G4MuonMinus::MuonMinus()->GetProcessManager();
|
||||
|
||||
if (fManager) {
|
||||
if (decay) fManager->RemoveProcess(decay);
|
||||
fManager->AddProcess(decayWithSpin);
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
fManager ->SetProcessOrdering(decayWithSpin, idxPostStep);
|
||||
fManager ->SetProcessOrdering(decayWithSpin, idxAtRest);
|
||||
}
|
||||
|
||||
poldecay = new G4PionDecayMakeSpin();
|
||||
|
||||
decay = processTable->FindProcess("Decay",G4PionPlus::PionPlus());
|
||||
|
||||
fManager = G4PionPlus::PionPlus()->GetProcessManager();
|
||||
|
||||
if (fManager) {
|
||||
if (decay) fManager->RemoveProcess(decay);
|
||||
fManager->AddProcess(poldecay);
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
fManager ->SetProcessOrdering(poldecay, idxPostStep);
|
||||
fManager ->SetProcessOrdering(poldecay, idxAtRest);
|
||||
}
|
||||
|
||||
decay = processTable->FindProcess("Decay",G4PionMinus::PionMinus());
|
||||
|
||||
fManager = G4PionMinus::PionMinus()->GetProcessManager();
|
||||
|
||||
if (fManager) {
|
||||
if (decay) fManager->RemoveProcess(decay);
|
||||
fManager->AddProcess(poldecay);
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
fManager ->SetProcessOrdering(poldecay, idxPostStep);
|
||||
fManager ->SetProcessOrdering(poldecay, idxAtRest);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user