Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -1,4 +1,4 @@
$Id: History 97914 2016-06-22 15:22:24Z gcosmo $
$Id: History 101863 2016-12-02 12:48:47Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,26 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
02-Dec-2016, Vladimir Ivanchenko (phys-ctor-decay-V10-02-07)
- G4RadioactiveDecayPhysics - fixed initialisation (also for the
cases when radioactive decay is registered before EM physics or
is the only physics constructor)
01-Dec-2016, Vladimir Ivanchenko (phys-ctor-decay-V10-02-06)
- G4RadioactiveDecayPhysics - enable reading from new gamma evaporation
files, enable Auger cascade, do not apply cuts
17-October-2016 Kevin Lynch (for Lynch and Genser) (phys-ctor-decay-V10-02-05)
- Add G4MuonicAtomDecayPhysics constructor to enable decay of muonic atoms
- depends on tag decay-V10-02-02
16-October-2016 M.Maire (phys-ctor-decay-V10-02-04)
- add README
12-October-2016 G.Folger (phys-ctor-decay-V10-02-03)
- replace direct use of aParticleIterator by GetParticleIterator().
fix required by clang39 on Windows and MAC
22-Jun-2016, Vladimir Ivanchenko (phys-ctor-decay-V10-02-02)
22-Jun-2016, Vladimir Ivanchenko (phys-ctor-decay-V10-02-01)
- G4RadioactiveDecayPhysics - enable atomic de-excitation by the call
@@ -0,0 +1,15 @@
$Id: $
-------------------------------------------------------------------
G4DecayPhysics
--------------
G4RadioactiveDecayPhysics
-------------------------
G4SpinDecayPhysics
------------------
G4UnknownDecayPhysics
---------------------
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4MuonicAtomDecayPhysics_h
#define G4MuonicAtomDecayPhysics_h 1
#include "G4VPhysicsConstructor.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuonicAtomDecayPhysics : public G4VPhysicsConstructor
{
public:
G4MuonicAtomDecayPhysics(G4int verbose =1);
G4MuonicAtomDecayPhysics(const G4String& name);
virtual ~G4MuonicAtomDecayPhysics();
public:
// This method is dummy for physics
virtual void ConstructParticle() override;
// 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() override;
private:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -11,7 +11,7 @@
#
# Generated on : 10/01/2013
#
# $Id: sources.cmake 97907 2016-06-22 13:37:05Z gcosmo $
# $Id: sources.cmake 100331 2016-10-18 07:33:28Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -87,11 +87,13 @@ include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4phys_ctor_decay
HEADERS
G4DecayPhysics.hh
G4MuonicAtomDecayPhysics.hh
G4SpinDecayPhysics.hh
G4RadioactiveDecayPhysics.hh
G4UnknownDecayPhysics.hh
SOURCES
G4DecayPhysics.cc
G4MuonicAtomDecayPhysics.cc
G4SpinDecayPhysics.cc
G4RadioactiveDecayPhysics.cc
G4UnknownDecayPhysics.cc
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DecayPhysics.cc 71039 2013-06-10 09:23:55Z gcosmo $
// $Id: G4DecayPhysics.cc 99983 2016-10-13 07:34:14Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -106,12 +106,13 @@ void G4DecayPhysics::ConstructProcess()
// Add Decay Process
fDecayProcess = new G4Decay();
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
G4ParticleDefinition* particle=0;
while( (*aParticleIterator)() )
while( (*myParticleIterator)() )
{
particle = aParticleIterator->value();
particle = myParticleIterator->value();
if( fDecayProcess->IsApplicable(*particle) )
{
if(verbose > 1) {
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuonicAtomDecayPhysics.hh"
#include "G4MuonicAtomDecay.hh"
#include "G4GenericIon.hh"
#include "globals.hh"
#include "G4PhysicsListHelper.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4MuonicAtomDecayPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MuonicAtomDecayPhysics::G4MuonicAtomDecayPhysics(G4int)
: G4VPhysicsConstructor("G4MuonicAtomDecay")
{
G4cout << "G4MuonicAtomDecayPhysics()\n";
}
G4MuonicAtomDecayPhysics::G4MuonicAtomDecayPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
G4cout << "G4MuonicAtomDecayPhysics()\n";
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MuonicAtomDecayPhysics::~G4MuonicAtomDecayPhysics()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuonicAtomDecayPhysics::ConstructParticle()
{
G4cout << "G4MuonicAtomDecayPhysics::ConstructParticle()\n";
G4GenericIon::GenericIon();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuonicAtomDecayPhysics::ConstructProcess()
{
G4cout << "G4MuonicAtomDecayPhysics::ConstructProcess()\n";
G4PhysicsListHelper::GetPhysicsListHelper()->
RegisterProcess(new G4MuonicAtomDecay(), G4GenericIon::GenericIon());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -36,6 +36,8 @@
#include "G4VAtomDeexcitation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4LossTableManager.hh"
#include "G4NuclearLevelData.hh"
#include "G4DeexPrecoParameters.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -47,10 +49,19 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4RadioactiveDecayPhysics);
G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(G4int)
: G4VPhysicsConstructor("G4RadioactiveDecay")//, theRadioactiveDecay(0)
{}
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
param->AddMsc("world","G4RadioactiveDecay");
G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(const G4String& name)
: G4VPhysicsConstructor(name)//, theRadioactiveDecay(0)
G4NuclearLevelData::GetInstance()->GetParameters()->SetUseFilesNEW(true);
}
G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(const G4String&)
: G4RadioactiveDecayPhysics(0)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -74,11 +85,10 @@ void G4RadioactiveDecayPhysics::ConstructProcess()
G4LossTableManager* man = G4LossTableManager::Instance();
G4VAtomDeexcitation* ad = man->AtomDeexcitation();
if(!ad) {
man->SetAtomDeexcitation(new G4UAtomicDeexcitation());
ad = new G4UAtomicDeexcitation();
man->SetAtomDeexcitation(ad);
ad->InitialiseAtomicDeexcitation();
}
G4EmParameters* param = G4EmParameters::Instance();
param->SetFluo(true);
param->SetAuger(true);
G4PhysicsListHelper::GetPhysicsListHelper()->
RegisterProcess(new G4RadioactiveDecay(), G4GenericIon::GenericIon());
@@ -75,12 +75,13 @@ void G4UnknownDecayPhysics::ConstructProcess()
// Add Decay Process
fDecayProcess = new G4UnknownDecay();
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
G4ParticleDefinition* particle=0;
while( (*aParticleIterator)() )
while( (*myParticleIterator)() )
{
particle = aParticleIterator->value();
particle = myParticleIterator->value();
if( fDecayProcess->IsApplicable(*particle) )
{
if(verbose > 1) {
@@ -1,4 +1,4 @@
$Id: History 97606 2016-06-06 09:21:51Z gcosmo $
$Id: History 101864 2016-12-02 12:50:38Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,70 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
02-December-2016 V.Ivanchenko (phys-ctor-em-V10-02-38)
- G4EmModelActivator - added initialisation of atomic deexcitation
for radioactive decay (also for the cases when radioactive
decay is registered before EM physics or is the only process)
15-November-2016 V.Ivanchenko (phys-ctor-em-V10-02-37)
- G4EmModelActivator - fixed PAI model activation (disable for ions)
03-November-2016 V.Ivanchenko (phys-ctor-em-V10-02-36)
- G4EmModelActivator - added SS PhysList per region
20-October-2016 M.Maire (phys-ctor-em-V10-02-35)
- README : start to fill
17-October-2016 M.Maire (phys-ctor-em-V10-02-34)
- add README
11-October-2016 G.Folger (phys-ctor-em-V10-02-33)
- replace direct use of aParticleIterator by GetParticleIterator().
11-October-2016 S.Incerti (phys-ctor-em-V10-02-32)
- G4EmDNAPhysics* - retry of activation of atomic deex. conf.
05-October-2016 V.Ivanchenko (phys-ctor-em-V10-02-31)
- G4EmStandardPhysics_option4 - disable lateral displacement
beyond safety
05-October-2016 S.Incerti (phys-ctor-em-V10-02-30)
- G4EmDNAPhysics* - reconfigured activation of atomic deexcitation
03-October-2016 S.Incerti (phys-ctor-em-V10-02-29)
- G4EmDNAPhysics - added G4EmParameters::Instance()->SetDefaults();
23-September-2016 V.Ivanchenko (phys-ctor-em-V10-02-28)
- G4EmStandardPhysicsWVI - disable lateral displacement beyond safety
26-August-2016 V.Ivanchenko (phys-ctor-em-V10-02-27)
25-August-2016 V.Ivanchenko (phys-ctor-em-V10-02-26)
- G4EmModelActivator - added configuration of EM physics per G4Region
via UI commands
- G4EmLivermorePhysics, G4EmPenelopePhysics, G4EmStandardPhysicsGS,
G4EmLivermorePolarizedPhysics, G4EmStandardPhysicsWVI - use the same
style names for EM physics constructors
10-August-2016 V.Ivanchenko (phys-ctor-em-V10-02-25)
- G4EmModelActivator - simplified interface, removed not needed methods
03-August-2016 V.Ivanchenko (phys-ctor-em-V10-02-24)
- Opt3, Livermore and Penelope enable sampling of lateral displacement
for hadrons
28-July-2016 V.Ivanchenko (phys-ctor-em-V10-02-23)
- G4EmDNAPhysicsActivator - introduced new methods for DNA configuration
per particle type
25-July-2016 V.Ivanchenko (phys-ctor-em-V10-02-22)
- In all EM builders only one explicit constructor is left
- Livermore and Penelope physics defined below 1 TeV (default 100 TeV)
22-July-2016 V.Ivanchenko (phys-ctor-em-V10-02-21)
- G4EmDNAPhysicsActivator - new class for DNA models configuration
- G4EmModelActivator - take out DNA physics and move it to the new
class G4EmDNAPhysicsActivator
06-June-2016 M. Karamitros (phys-ctor-em-V10-02-20)
- G4EmModelActivator: Correct elastic process name for ions
@@ -0,0 +1,92 @@
$Id:$
-------------------------------------------------------------------
G4EmDNAChemistry
----------------
G4EmDNAPhysics
--------------
G4EmDNAPhysicsActivator
-----------------------
G4EmDNAPhysics_option1
----------------------
G4EmDNAPhysics_option2
----------------------
G4EmDNAPhysics_option3
----------------------
G4EmDNAPhysics_option4
----------------------
G4EmDNAPhysics_option5
----------------------
G4EmDNAPhysics_option7
----------------------
G4EmLEPTSPhysics
----------------
G4EmLivermorePhysics
--------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmLivermorePolarizedPhysics
-----------------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmLowEPPhysics
----------------
G4EmModelActivator
------------------
G4EmPenelopePhysics
-------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysics
-------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysicsGS
---------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysicsSS
---------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysicsWVI
----------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysics_option1
---------------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysics_option2
---------------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysics_option3
---------------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4EmStandardPhysics_option4
---------------------------
see https://geant4.web.cern.ch/geant4/collaboration/working_groups/electromagnetic/physlist.shtml
G4OpticalPhysics
----------------
G4OpticalPhysicsMessenger
-------------------------
G4OpticalProcessIndex
---------------------
@@ -37,7 +37,8 @@ class G4EmDNAChemistry : public G4VUserChemistryList,
{
public:
G4EmDNAChemistry();
explicit G4EmDNAChemistry();
virtual ~G4EmDNAChemistry();
virtual void ConstructParticle()
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmDNAPhysics.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmDNAPhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
#ifndef G4EmDNAPhysics_h
#define G4EmDNAPhysics_h 1
@@ -38,10 +38,7 @@ class G4EmDNAPhysics : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics(G4int ver = 1);
// obsolete
G4EmDNAPhysics(G4int ver, const G4String& name);
explicit G4EmDNAPhysics(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics();
@@ -0,0 +1,85 @@
//
// ********************************************************************
// * 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: G4EmDNAPhysicsActivator.hh 66704 2013-01-10 18:20:17Z gunter $
#ifndef G4EmDNAPhysicsActivator_h
#define G4EmDNAPhysicsActivator_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmParameters;
class G4ProcessManager;
class G4LowECapture;
class G4EmDNAPhysicsActivator : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysicsActivator(G4int ver = 1);
virtual ~G4EmDNAPhysicsActivator();
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
void AddElectronModels0(const G4String& region, G4LowECapture* ecap,
G4bool emsc, G4double elowest, G4double elimel);
void AddProtonModels0(const G4String& region, G4bool pmsc,
G4double elimel, G4double pminbb,
G4double pmin, G4double pmax);
void AddHeliumModels0(const G4String& region, G4bool a1msc, G4bool a2msc,
G4double elimel, G4double pminbb,
G4double pmin, G4double pmax);
void AddGenericIonModels0(const G4String& region, G4bool imsc,
G4double elimel, G4double pminbb,
G4double pmin);
G4bool HasMsc(G4ProcessManager*) const;
G4bool IsVerbose() const;
G4int verbose;
G4EmParameters* theParameters;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -38,10 +38,7 @@ class G4EmDNAPhysics_option1 : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics_option1(G4int ver = 1);
// obsolete
G4EmDNAPhysics_option1(G4int ver, const G4String& name);
explicit G4EmDNAPhysics_option1(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics_option1();
@@ -38,10 +38,7 @@ class G4EmDNAPhysics_option2 : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics_option2(G4int ver = 1);
// obsolete
G4EmDNAPhysics_option2(G4int ver, const G4String& name);
explicit G4EmDNAPhysics_option2(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics_option2();
@@ -35,10 +35,7 @@ class G4EmDNAPhysics_option3 : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics_option3(G4int ver = 1);
// obsolete
G4EmDNAPhysics_option3(G4int ver, const G4String& name);
explicit G4EmDNAPhysics_option3(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics_option3();
@@ -38,9 +38,7 @@ class G4EmDNAPhysics_option4 : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics_option4(G4int ver = 1);
G4EmDNAPhysics_option4(G4int ver, const G4String& name);
explicit G4EmDNAPhysics_option4(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics_option4();
@@ -38,9 +38,7 @@ class G4EmDNAPhysics_option5 : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics_option5(G4int ver = 1);
G4EmDNAPhysics_option5(G4int ver, const G4String& name);
explicit G4EmDNAPhysics_option5(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics_option5();
@@ -38,9 +38,7 @@ class G4EmDNAPhysics_option7 : public G4VPhysicsConstructor
{
public:
G4EmDNAPhysics_option7(G4int ver = 1);
G4EmDNAPhysics_option7(G4int ver, const G4String& name);
explicit G4EmDNAPhysics_option7(G4int ver=1, const G4String& name="");
virtual ~G4EmDNAPhysics_option7();
@@ -36,7 +36,7 @@
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ios.hh"
// Geant461: #include "g4std/iomanip"
#include "G4Decay.hh"
#include "G4UserSpecialCuts.hh"
#include "G4StepLimiter.hh"
@@ -46,15 +46,13 @@
class G4EmLEPTSPhysics : public G4VPhysicsConstructor
{
public:
G4EmLEPTSPhysics(const G4String& name="G4EmLEPTSPhysics");
explicit G4EmLEPTSPhysics(const G4String& name="G4EmLEPTSPhysics");
virtual ~G4EmLEPTSPhysics(){};
virtual void ConstructParticle();
virtual void ConstructProcess();
protected:
// Physics
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePhysics.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmLivermorePhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
#ifndef G4EmLivermorePhysics_h
#define G4EmLivermorePhysics_h 1
@@ -37,10 +37,7 @@ class G4EmLivermorePhysics : public G4VPhysicsConstructor
{
public:
G4EmLivermorePhysics(G4int ver = 1);
// obsolete
G4EmLivermorePhysics(G4int ver, const G4String& name);
explicit G4EmLivermorePhysics(G4int ver=1, const G4String& name="");
virtual ~G4EmLivermorePhysics();
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePolarizedPhysics.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmLivermorePolarizedPhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
#ifndef G4EmLivermorePolarizedPhysics_h
#define G4EmLivermorePolarizedPhysics_h 1
@@ -36,10 +36,8 @@
class G4EmLivermorePolarizedPhysics : public G4VPhysicsConstructor
{
public:
G4EmLivermorePolarizedPhysics(G4int ver = 1);
// obsolete
G4EmLivermorePolarizedPhysics(G4int ver, const G4String&);
explicit G4EmLivermorePolarizedPhysics(G4int ver=1, const G4String& name="");
virtual ~G4EmLivermorePolarizedPhysics();
@@ -36,10 +36,7 @@ class G4EmLowEPPhysics : public G4VPhysicsConstructor
{
public:
G4EmLowEPPhysics(G4int ver = 1);
// obsolete
G4EmLowEPPhysics(G4int ver, const G4String& name);
explicit G4EmLowEPPhysics(G4int ver=1, const G4String& name= "");
virtual ~G4EmLowEPPhysics();
@@ -53,34 +53,31 @@
class G4EmParameters;
class G4ProcessManager;
class G4ParticleDefinition;
class G4EmModelActivator
{
public:
G4EmModelActivator();
~G4EmModelActivator();
void ConstructParticle();
void ConstructProcess();
explicit G4EmModelActivator(const G4String& emphys="");
private:
void ConstructDNAParticles();
void ActivatePAI();
void ActivateMicroElec();
void ActivateDNA();
void ActivateEmOptions();
void FindOrAddProcess(const G4ParticleDefinition*, const G4String&);
G4bool HasMsc(G4ProcessManager*) const;
G4EmModelActivator & operator=(const G4EmModelActivator &right);
G4EmModelActivator(const G4EmModelActivator&);
G4EmModelActivator & operator=(const G4EmModelActivator &right) = delete;
G4EmModelActivator(const G4EmModelActivator&) = delete;
G4EmParameters* theParameters;
G4String baseName;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmPenelopePhysics.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmPenelopePhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
#ifndef G4EmPenelopePhysics_h
#define G4EmPenelopePhysics_h 1
@@ -37,10 +37,7 @@ class G4EmPenelopePhysics : public G4VPhysicsConstructor
{
public:
G4EmPenelopePhysics(G4int ver = 1);
// obsolete
G4EmPenelopePhysics(G4int ver, const G4String& name);
explicit G4EmPenelopePhysics(G4int ver=1, const G4String& name="");
virtual ~G4EmPenelopePhysics();
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmStandardPhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -52,10 +52,8 @@
class G4EmStandardPhysics : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysics(G4int ver = 0);
// obsolete
G4EmStandardPhysics(G4int ver, const G4String& name);
explicit G4EmStandardPhysics(G4int ver=0, const G4String& name="");
virtual ~G4EmStandardPhysics();
@@ -52,10 +52,8 @@
class G4EmStandardPhysicsGS : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysicsGS(G4int ver = 0);
// obsolete
G4EmStandardPhysicsGS(G4int ver, const G4String& name);
explicit G4EmStandardPhysicsGS(G4int ver=0, const G4String& name="");
virtual ~G4EmStandardPhysicsGS();
@@ -50,7 +50,8 @@
class G4EmStandardPhysicsSS : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysicsSS(G4int ver = 1);
explicit G4EmStandardPhysicsSS(G4int ver = 1);
virtual ~G4EmStandardPhysicsSS();
@@ -53,7 +53,8 @@
class G4EmStandardPhysicsWVI : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysicsWVI(G4int ver = 1);
explicit G4EmStandardPhysicsWVI(G4int ver = 1);
virtual ~G4EmStandardPhysicsWVI();
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option1.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmStandardPhysics_option1.hh 98736 2016-08-09 10:55:12Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -55,10 +55,7 @@ class G4EmStandardPhysics_option1 : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysics_option1(G4int ver = 1);
// obsolete
G4EmStandardPhysics_option1(G4int ver, const G4String& name);
explicit G4EmStandardPhysics_option1(G4int ver=1, const G4String& name="");
virtual ~G4EmStandardPhysics_option1();
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics_option2.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmStandardPhysics_option2.hh 98736 2016-08-09 10:55:12Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -56,10 +56,7 @@ class G4EmStandardPhysics_option2 : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysics_option2(G4int ver = 1);
// obsolete
G4EmStandardPhysics_option2(G4int ver, const G4String& name);
explicit G4EmStandardPhysics_option2(G4int ver=1, const G4String& name="");
virtual ~G4EmStandardPhysics_option2();
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics_option3.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmStandardPhysics_option3.hh 98736 2016-08-09 10:55:12Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -52,10 +52,8 @@
class G4EmStandardPhysics_option3 : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysics_option3(G4int ver = 1);
// obsolete
G4EmStandardPhysics_option3(G4int ver, const G4String& name);
explicit G4EmStandardPhysics_option3(G4int ver=1, const G4String& name="");
virtual ~G4EmStandardPhysics_option3();
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics_option4.hh 66704 2013-01-10 18:20:17Z gunter $
// $Id: G4EmStandardPhysics_option4.hh 98736 2016-08-09 10:55:12Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -53,10 +53,8 @@
class G4EmStandardPhysics_option4 : public G4VPhysicsConstructor
{
public:
G4EmStandardPhysics_option4(G4int ver = 1);
// obsolete
G4EmStandardPhysics_option4(G4int ver, const G4String& name);
explicit G4EmStandardPhysics_option4(G4int ver=1, const G4String& name="");
virtual ~G4EmStandardPhysics_option4();
@@ -11,7 +11,7 @@
#
# Generated on : 10/01/2013
#
# $Id: sources.cmake 96171 2016-03-22 09:18:21Z gcosmo $
# $Id: sources.cmake 98736 2016-08-09 10:55:12Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -76,6 +76,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_em
G4EmDNAPhysics_option4.hh
G4EmDNAPhysics_option5.hh
G4EmDNAPhysics_option7.hh
G4EmDNAPhysicsActivator.hh
G4EmLEPTSPhysics.hh
G4EmLivermorePhysics.hh
G4EmLivermorePolarizedPhysics.hh
@@ -102,6 +103,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_em
G4EmDNAPhysics_option4.cc
G4EmDNAPhysics_option5.cc
G4EmDNAPhysics_option7.cc
G4EmDNAPhysicsActivator.cc
G4EmLEPTSPhysics.cc
G4EmLivermorePhysics.cc
G4EmLivermorePolarizedPhysics.cc
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmDNAPhysics.cc 97523 2016-06-03 14:25:30Z gcosmo $
// $Id: G4EmDNAPhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
// add elastic scattering processes of proton, hydrogen, helium, alpha+, alpha++
#include "G4EmDNAPhysics.hh"
@@ -70,6 +70,8 @@
#include "G4LivermoreGammaConversionModel.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4EmParameters.hh"
// end of warning
#include "G4LossTableManager.hh"
@@ -82,22 +84,18 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics::G4EmDNAPhysics(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysics"), verbose(ver)
{
G4EmParameters::Instance();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics::G4EmDNAPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics"), verbose(ver)
{
G4EmParameters::Instance();
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -144,10 +142,11 @@ void G4EmDNAPhysics::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-") {
@@ -295,7 +294,6 @@ void G4EmDNAPhysics::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,753 @@
//
// ********************************************************************
// * 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: G4EmDNAPhysicsActivator.cc 97499 2016-06-03 12:02:26Z matkara $
// add elastic scattering processes of proton, hydrogen, helium, alpha+, alpha++
#include "G4EmDNAPhysicsActivator.hh"
#include "G4EmParameters.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4RegionStore.hh"
#include "G4Region.hh"
#include "G4VEnergyLossProcess.hh"
#include "G4LossTableManager.hh"
#include "G4EmConfigurator.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4Proton.hh"
#include "G4GenericIon.hh"
#include "G4Alpha.hh"
#include "G4ProcessManager.hh"
#include "G4DummyModel.hh"
#include "G4EmProcessSubType.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BraggModel.hh"
#include "G4BraggIonModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4UrbanMscModel.hh"
#include "G4MollerBhabhaModel.hh"
#include "G4IonFluctuations.hh"
#include "G4UniversalFluctuation.hh"
#include "G4LowECapture.hh"
#include "G4hMultipleScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4IonCoulombScatteringModel.hh"
#include "G4ionIonisation.hh"
// Processes and models for Geant4-DNA
#include "G4DNAGenericIonsManager.hh"
#include "G4DNAElastic.hh"
#include "G4DNAChampionElasticModel.hh"
//#include "G4DNAScreenedRutherfordElasticModel.hh"
#include "G4DNAUeharaScreenedRutherfordElasticModel.hh"
#include "G4DNAIonElasticModel.hh"
#include "G4DNAExcitation.hh"
#include "G4DNAAttachment.hh"
#include "G4DNAVibExcitation.hh"
#include "G4DNAIonisation.hh"
#include "G4DNAChargeDecrease.hh"
#include "G4DNAChargeIncrease.hh"
#include "G4SystemOfUnits.hh"
#include <vector>
#include "G4DNAChemistryManager.hh"
#include "G4DNAElectronSolvation.hh"
#include "G4DNAEmfietzoglouIonisationModel.hh"
#include "G4DNAEmfietzoglouExcitationModel.hh"
#include "G4Threading.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysicsActivator::G4EmDNAPhysicsActivator(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysicsActivator"), verbose(ver)
{
theParameters = G4EmParameters::Instance();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysicsActivator::~G4EmDNAPhysicsActivator()
{}
G4bool G4EmDNAPhysicsActivator::IsVerbose() const
{
return (0 < verbose && G4Threading::IsMasterThread());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::ConstructParticle()
{
// bosons
G4Gamma::Gamma();
// leptons
G4Electron::Electron();
G4Positron::Positron();
// baryons
G4Proton::Proton();
G4GenericIon::GenericIonDefinition();
G4DNAGenericIonsManager * genericIonsManager;
genericIonsManager=G4DNAGenericIonsManager::Instance();
genericIonsManager->GetIon("alpha++");
genericIonsManager->GetIon("alpha+");
genericIonsManager->GetIon("helium");
genericIonsManager->GetIon("hydrogen");
//genericIonsManager->GetIon("carbon");
//genericIonsManager->GetIon("nitrogen");
//genericIonsManager->GetIon("oxygen");
//genericIonsManager->GetIon("iron");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::ConstructProcess()
{
const std::vector<G4String>& regnamesDNA = theParameters->RegionsDNA();
G4int nreg = regnamesDNA.size();
if(0 == nreg)
{
return;
}
const std::vector<G4String>& typesDNA = theParameters->TypesDNA();
if(IsVerbose())
{
G4cout << "### G4EmDNAPhysicsActivator::ConstructProcess for " << nreg
<< " regions; DNA physics type " << typesDNA[0] << G4endl;
}
// list of particles
const G4ParticleDefinition* elec = G4Electron::Electron();
const G4ParticleDefinition* prot = G4Proton::Proton();
const G4ParticleDefinition* gion = G4GenericIon::GenericIon();
G4DNAGenericIonsManager * genericIonsManager =
G4DNAGenericIonsManager::Instance();
const G4ParticleDefinition* alpha2 = G4Alpha::Alpha();
const G4ParticleDefinition* alpha1 = genericIonsManager->GetIon("alpha+");
const G4ParticleDefinition* alpha0 = genericIonsManager->GetIon("helium");
const G4ParticleDefinition* h0 = genericIonsManager->GetIon("hydrogen");
G4ProcessManager* eman = elec->GetProcessManager();
G4ProcessManager* pman = prot->GetProcessManager();
G4ProcessManager* iman = gion->GetProcessManager();
G4ProcessManager* a2man = alpha2->GetProcessManager();
G4ProcessManager* a1man = alpha1->GetProcessManager();
G4ProcessManager* a0man = alpha0->GetProcessManager();
G4ProcessManager* h0man = h0->GetProcessManager();
G4bool emsc = HasMsc(eman);
G4bool pmsc = HasMsc(pman);
G4bool a2msc = HasMsc(a2man);
G4bool a1msc = HasMsc(a1man);
G4bool imsc = HasMsc(iman);
// alpha+ standard processes
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4ParticleDefinition* alpha11 = const_cast<G4ParticleDefinition*>(alpha1);
ph->RegisterProcess(new G4hMultipleScattering(), alpha11);
ph->RegisterProcess(new G4ionIonisation(), alpha11);
// processes are defined with dummy models for the world
// elastic scatetring
G4DNAElastic* theDNAeElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
theDNAeElasticProcess->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(theDNAeElasticProcess);
G4DNAElastic* theDNApElasticProcess = new G4DNAElastic("proton_G4DNAElastic");
theDNApElasticProcess->AddEmModel(0, new G4DummyModel());
pman->AddDiscreteProcess(theDNApElasticProcess);
G4DNAElastic* theDNAa2ElasticProcess = new G4DNAElastic("alpha_G4DNAElastic");
theDNAa2ElasticProcess->AddEmModel(0, new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2ElasticProcess);
G4DNAElastic* theDNAa1ElasticProcess =
new G4DNAElastic("alpha+_G4DNAElastic");
theDNAa1ElasticProcess->AddEmModel(0, new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ElasticProcess);
G4DNAElastic* theDNAa0ElasticProcess =
new G4DNAElastic("helium_G4DNAElastic");
theDNAa0ElasticProcess->AddEmModel(0, new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0ElasticProcess);
G4DNAElastic* theDNAh0ElasticProcess =
new G4DNAElastic("hydrogen_G4DNAElastic");
theDNAh0ElasticProcess->AddEmModel(0, new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0ElasticProcess);
// excitation
G4DNAExcitation* theDNAeExcProcess =
new G4DNAExcitation("e-_G4DNAExcitation");
theDNAeExcProcess->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(theDNAeExcProcess);
G4DNAExcitation* theDNApExcProcess =
new G4DNAExcitation("proton_G4DNAExcitation");
theDNApExcProcess->AddEmModel(0, new G4DummyModel());
pman->AddDiscreteProcess(theDNApExcProcess);
G4DNAExcitation* theDNAa2ExcProcess =
new G4DNAExcitation("alpha_G4DNAExcitation");
theDNAa2ExcProcess->AddEmModel(0, new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2ExcProcess);
G4DNAExcitation* theDNAa1ExcProcess =
new G4DNAExcitation("alpha+_G4DNAExcitation");
theDNAa1ExcProcess->AddEmModel(0, new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ExcProcess);
G4DNAExcitation* theDNAa0ExcProcess =
new G4DNAExcitation("helium_G4DNAExcitation");
theDNAa0ExcProcess->AddEmModel(0, new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0ExcProcess);
G4DNAExcitation* theDNAh0ExcProcess =
new G4DNAExcitation("hydrogen_G4DNAExcitation");
theDNAh0ExcProcess->AddEmModel(0, new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0ExcProcess);
// vibration excitation
G4DNAVibExcitation* theDNAeVibExcProcess =
new G4DNAVibExcitation("e-_G4DNAVibExcitation");
theDNAeVibExcProcess->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(theDNAeVibExcProcess);
// ionisation
G4DNAIonisation* theDNAeIoniProcess =
new G4DNAIonisation("e-_G4DNAIonisation");
theDNAeIoniProcess->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(theDNAeIoniProcess);
G4DNAIonisation* theDNApIoniProcess =
new G4DNAIonisation("proton_G4DNAIonisation");
theDNApIoniProcess->AddEmModel(0, new G4DummyModel());
pman->AddDiscreteProcess(theDNApIoniProcess);
G4DNAIonisation* theDNAa2IoniProcess =
new G4DNAIonisation("alpha_G4DNAIonisation");
theDNAa2IoniProcess->AddEmModel(0, new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2IoniProcess);
G4DNAIonisation* theDNAa1IoniProcess =
new G4DNAIonisation("alpha+_G4DNAIonisation");
theDNAa1IoniProcess->AddEmModel(0, new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1IoniProcess);
G4DNAIonisation* theDNAa0IoniProcess =
new G4DNAIonisation("helium_G4DNAIonisation");
theDNAa0IoniProcess->AddEmModel(0, new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0IoniProcess);
G4DNAIonisation* theDNAh0IoniProcess =
new G4DNAIonisation("hydrogen_G4DNAIonisation");
theDNAh0IoniProcess->AddEmModel(0, new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0IoniProcess);
G4DNAIonisation* theDNAiIoniProcess =
new G4DNAIonisation("GenericIon_G4DNAIonisation");
theDNAiIoniProcess->AddEmModel(0, new G4DummyModel());
iman->AddDiscreteProcess(theDNAiIoniProcess);
// attachment
G4DNAAttachment* theDNAAttachProcess =
new G4DNAAttachment("e-_G4DNAAttachment");
theDNAAttachProcess->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(theDNAAttachProcess);
// charge exchange
G4DNAChargeDecrease* theDNApChargeDecreaseProcess =
new G4DNAChargeDecrease("proton_G4DNAChargeDecrease");
theDNApChargeDecreaseProcess->AddEmModel(0, new G4DummyModel());
pman->AddDiscreteProcess(theDNApChargeDecreaseProcess);
G4DNAChargeDecrease* theDNAa2ChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease");
theDNAa2ChargeDecreaseProcess->AddEmModel(0, new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2ChargeDecreaseProcess);
G4DNAChargeDecrease* theDNAa1ChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease");
theDNAa1ChargeDecreaseProcess->AddEmModel(0, new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ChargeDecreaseProcess);
G4DNAChargeIncrease* theDNAa1ChargeIncreaseProcess =
new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease");
theDNAa1ChargeIncreaseProcess->AddEmModel(0, new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ChargeIncreaseProcess);
G4DNAChargeIncrease* theDNAa0ChargeIncreaseProcess =
new G4DNAChargeIncrease("helium_G4DNAChargeIncrease");
theDNAa0ChargeIncreaseProcess->AddEmModel(0, new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0ChargeIncreaseProcess);
G4DNAChargeIncrease* theDNAh0ChargeIncreaseProcess =
new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease");
theDNAh0ChargeIncreaseProcess->AddEmModel(0, new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0ChargeIncreaseProcess);
// limits for DNA model applicability
static const G4double elowest= 4. * eV;
static const G4double elimel = 1 * MeV;
static const G4double pminbb = 2 * MeV;
static const G4double pmin = 10 * keV;
static const G4double pmax = 100 * MeV;
static const G4double ionmin = 10 * keV;
// low-energy capture
G4LowECapture* ecap = nullptr;
if(G4DNAChemistryManager::IsActivated() == false)
{
// Note: G4DNAElectronSolvation could also be used instead of G4LowECapture
ecap = new G4LowECapture(elowest);
// ecap->SetVerboseLevel(1);
eman->AddDiscreteProcess(ecap);
}
else
{
// When chemistry is activated: G4DNAElectronSolvation turns the electron
// to a solvated electron, otherwise it kills the electron at the
// corresponding high energy limit of the model
G4DNAElectronSolvation* solvatation =
new G4DNAElectronSolvation("e-_G4DNAElectronSolvation");
solvatation->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(solvatation);
}
G4LowECapture* pcap = new G4LowECapture(pmin);
pman->AddDiscreteProcess(pcap);
G4LowECapture* icap = new G4LowECapture(ionmin);
iman->AddDiscreteProcess(icap);
G4LowECapture* a2cap = new G4LowECapture(ionmin);
a2man->AddDiscreteProcess(a2cap);
G4LowECapture* a1cap = new G4LowECapture(ionmin);
a1man->AddDiscreteProcess(a1cap);
G4LowECapture* a0cap = new G4LowECapture(ionmin);
a0man->AddDiscreteProcess(a0cap);
G4LowECapture* h0cap = new G4LowECapture(ionmin);
h0man->AddDiscreteProcess(h0cap);
// loop over regions
for(G4int i = 0; i < nreg; ++i)
{
G4String reg = regnamesDNA[i];
if(IsVerbose()) {
G4cout << "### DNA models type " << typesDNA[i]
<< " are activated for G4Region " << reg << G4endl;
}
// type of DNA physics
G4int itype = 0;
if(0 == itype) {
AddElectronModels0(reg, ecap, emsc, elowest, elimel);
AddProtonModels0(reg, pmsc, elimel, pminbb, pmin, pmax);
AddHeliumModels0(reg, a1msc, a2msc, elimel, pminbb, pmin, pmax);
AddGenericIonModels0(reg, imsc, elimel, pminbb, pmin);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::AddElectronModels0(const G4String& reg,
G4LowECapture* ecap, G4bool emsc,
G4double elowest, G4double elimel)
{
G4EmConfigurator* em_config =
G4LossTableManager::Instance()->EmConfigurator();
G4VEmModel* mod;
static const G4double elimin = 1 * MeV;
static const G4double elimvb = 100 * eV;
static const G4double elimat = 13 * eV;
static const G4double elim1 = 10 * keV;
G4double emax = theParameters->MaxKinEnergy();
if(IsVerbose()) {
G4cout << " Energy limits for e- elastic: "
<< elowest/eV << " eV - " << elimel/MeV << " MeV" << G4endl
<< " Energy limits for e- inelastic: "
<< elowest/eV << " eV - " << elimin/MeV << " MeV" << G4endl;
}
if(emsc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, 100*MeV);
} else {
mod = new G4eCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("e-", "CoulombScat", mod, reg, 0.0, emax);
}
// cuts and solvation
if(G4DNAChemistryManager::IsActivated()) {
// For this condition to work, the chemistry list has to be called
// before any standard EM physics list
mod = new G4DNATransformElectronModel();
mod->SetHighEnergyLimit(elowest);
em_config->SetExtraEmModel("e-", "e-_G4DNAElectronSolvation",
mod, reg, 0.,elowest+1.*eV);
mod = new G4DNAUeharaScreenedRutherfordElasticModel();
mod->SetLowEnergyLimit(0.);
mod->SetActivationLowEnergyLimit(0.);
em_config->SetExtraEmModel("e-", "e-_G4DNAElastic",
mod, reg, 0.0, 7.4*eV);
} else if(ecap) {
ecap->AddRegion(reg);
} else {
mod = new G4DNAOneStepThermalizationModel();
mod->SetHighEnergyLimit(elowest);
em_config->SetExtraEmModel("e-", "e-_G4DNAElectronSolvation",
mod, reg, 0., elowest);
}
mod = new G4DNAChampionElasticModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAElastic",
mod, reg, 7.4*eV, elimel);
// ionisation
mod = new G4MollerBhabhaModel();
mod->SetActivationLowEnergyLimit(elimin);
em_config->SetExtraEmModel("e-", "eIoni",
mod, reg, 0.0, emax,
new G4UniversalFluctuation());
mod = new G4DNAEmfietzoglouIonisationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAIonisation",
mod, reg, 0.0, elim1);
mod = new G4DNABornIonisationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAIonisation",
mod, reg, elim1, elimin);
// exc
mod = new G4DNAEmfietzoglouExcitationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAExcitation",
mod, reg, 0.0, elim1);
mod = new G4DNABornExcitationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAExcitation",
mod, reg, elim1, elimin);
mod = new G4DNASancheExcitationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAVibExcitation",
mod, reg, 0.0, elimvb);
mod = new G4DNAMeltonAttachmentModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAAttachment",
mod, reg, 0.0, elimat);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::AddProtonModels0(const G4String& reg,
G4bool pmsc, G4double elimel,
G4double pminbb, G4double pmin,
G4double pmax)
{
G4EmConfigurator* em_config =
G4LossTableManager::Instance()->EmConfigurator();
G4VEmModel* mod;
static const G4double pminch = 100 * eV;
static const G4double gmmax = 500 * keV;
static const G4double hmax = 100 * MeV;
G4double emax = theParameters->MaxKinEnergy();
if(IsVerbose()) {
G4cout << " Energy limits for protons: "
<< pmin/MeV << " MeV - " << pmax/MeV << " MeV" << G4endl;
}
// proton
if(pmsc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("proton", "msc", msc, reg, 0.0, 100*MeV);
} else {
mod = new G4eCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("proton", "CoulombScat", mod, reg, 0.0, emax);
}
mod = new G4BraggModel();
mod->SetActivationLowEnergyLimit(pminbb);
em_config->SetExtraEmModel("proton", "hIoni",
mod, reg, 0.0, pminbb,
new G4UniversalFluctuation());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(pmax);
em_config->SetExtraEmModel("proton", "hIoni",
mod, reg, pminbb, emax,
new G4UniversalFluctuation());
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAIonisation",
mod, reg, 0.0, gmmax);
mod = new G4DNABornIonisationModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAIonisation",
mod, reg, gmmax, pmax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAExcitation",
mod, reg, 0.0, gmmax);
mod = new G4DNABornExcitationModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAExcitation",
mod, reg, gmmax, pmax);
mod = new G4DNADingfelderChargeDecreaseModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAChargeDecrease",
mod, reg, pminch, pmax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAElasticModel",
mod, reg, 0.0, elimel);
// hydrogen
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAIonisation",
mod, reg, 0.0, hmax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAExcitation",
mod, reg, 0.0, gmmax);
mod = new G4DNADingfelderChargeIncreaseModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAChargeIncrease",
mod, reg, pminch, pmax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAElasticModel",
mod, reg, 0.0, elimel);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::AddGenericIonModels0(const G4String& reg,
G4bool imsc, G4double elimel,
G4double pminbb, G4double pmin)
{
G4EmConfigurator* em_config =
G4LossTableManager::Instance()->EmConfigurator();
G4VEmModel* mod;
static const G4double gionmax= 1 * GeV;
G4double emax = theParameters->MaxKinEnergy();
if(IsVerbose()) {
G4cout << " Energy limits for GenericIon: "
<< pmin/MeV << " MeV/u - " << gionmax/MeV << " MeV/u" << G4endl;
}
if(imsc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("proton", "ionmsc", msc, reg, 0.0, 100*MeV);
} else {
mod = new G4IonCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("proton", "CoulombScat", mod, reg, 0.0, emax);
}
mod = new G4BraggIonModel();
mod->SetActivationLowEnergyLimit(pminbb);
em_config->SetExtraEmModel("GenericIon", "ionIoni",
mod, reg, 0.0, pminbb,
new G4IonFluctuations());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(gionmax);
em_config->SetExtraEmModel("GenericIon", "ionIoni",
mod, reg, pminbb, emax,
new G4IonFluctuations());
mod = new G4DNARuddIonisationExtendedModel();
em_config->SetExtraEmModel("GenericIon", "GenericIon_G4DNAIonisation",
mod, reg, 0.0, gionmax);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::AddHeliumModels0(const G4String& reg, G4bool a1msc,
G4bool a2msc, G4double elimel,
G4double pminbb, G4double pmin,
G4double pmax)
{
G4EmConfigurator* em_config =
G4LossTableManager::Instance()->EmConfigurator();
G4VEmModel* mod;
static const G4double mgmin = 1 * keV;
static const G4double hemax = 400 * MeV;
G4double emax = theParameters->MaxKinEnergy();
if(IsVerbose()) {
G4cout << " Energy limits for Helium ions: "
<< pmin/MeV << " MeV - " << hemax/MeV << " MeV" << G4endl;
}
// alpha++
if(a2msc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("alpha++", "msc", msc, reg, 0.0, 100*MeV);
}
mod = new G4BraggIonModel();
mod->SetActivationLowEnergyLimit(pminbb);
em_config->SetExtraEmModel("alpha", "ionIoni",
mod, reg, 0.0, pminbb,
new G4IonFluctuations());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(pmax);
em_config->SetExtraEmModel("alpha", "ionIoni",
mod, reg, pminbb, emax,
new G4IonFluctuations());
mod = new G4DNARuddIonisationExtendedModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAIonisation",
mod, reg, 0.0, pmax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAExcitation",
mod, reg, mgmin, pmax);
mod = new G4DNADingfelderChargeDecreaseModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAChargeDecrease",
mod, reg, mgmin, hemax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAElasticModel",
mod, reg, 0.0, elimel);
// ---
// alpha+
if(a1msc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("alpha+", "msc", msc, reg, 0.0, 100*MeV);
}
mod = new G4BraggIonModel();
mod->SetActivationLowEnergyLimit(pminbb);
em_config->SetExtraEmModel("alpha+", "ionIoni",
mod, reg, 0.0, pminbb,
new G4IonFluctuations());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(pmax);
em_config->SetExtraEmModel("alpha+", "ionIoni",
mod, reg, pminbb, emax,
new G4IonFluctuations());
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAIonisation",
mod, reg, 0.0, pmax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAExcitation",
mod, reg, mgmin, pmax);
mod = new G4DNADingfelderChargeDecreaseModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAChargeDecrease",
mod, reg, mgmin, hemax);
mod = new G4DNADingfelderChargeIncreaseModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAChargeIncrease",
mod, reg, mgmin, hemax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAElasticModel",
mod, reg, 0.0, elimel);
// ---
// helium
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAIonisation",
mod, reg, 0.0, pmax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAExcitation",
mod, reg, mgmin, pmax);
mod = new G4DNADingfelderChargeIncreaseModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAChargeIncrease",
mod, reg, mgmin, hemax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAElasticModel",
mod, reg, 0.0, elimel);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4EmDNAPhysicsActivator::HasMsc(G4ProcessManager* pm) const
{
G4bool res = false;
G4ProcessVector* pv = pm->GetProcessList();
G4int nproc = pm->GetProcessListLength();
for(G4int i = 0; i < nproc; ++i)
{
if(((*pv)[i])->GetProcessSubType() == fMultipleScattering)
{
res = true;
break;
}
}
return res;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -85,22 +85,18 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option1);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option1::G4EmDNAPhysics_option1(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysics_option1"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option1::G4EmDNAPhysics_option1(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics_option1"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -147,10 +143,11 @@ void G4EmDNAPhysics_option1::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-") {
@@ -333,7 +330,6 @@ void G4EmDNAPhysics_option1::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -84,22 +84,19 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option2::G4EmDNAPhysics_option2(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysics_option2"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option2::G4EmDNAPhysics_option2(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics_option2"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -142,10 +139,11 @@ void G4EmDNAPhysics_option2::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-") {
@@ -318,7 +316,6 @@ void G4EmDNAPhysics_option2::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -83,22 +83,18 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option3);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option3::G4EmDNAPhysics_option3(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysics_option3"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option3::G4EmDNAPhysics_option3(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics_option3"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -141,10 +137,11 @@ void G4EmDNAPhysics_option3::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-") {
@@ -275,7 +272,6 @@ void G4EmDNAPhysics_option3::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -89,22 +89,18 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option4);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option4::G4EmDNAPhysics_option4(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysics_option4"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option4::G4EmDNAPhysics_option4(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics_option4"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -147,10 +143,11 @@ void G4EmDNAPhysics_option4::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-") {
@@ -283,7 +280,6 @@ void G4EmDNAPhysics_option4::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -91,19 +91,16 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option5);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option5::G4EmDNAPhysics_option5(G4int ver) :
G4VPhysicsConstructor("G4EmDNAPhysics_option5"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option5::G4EmDNAPhysics_option5(G4int ver, const G4String&) :
G4VPhysicsConstructor("G4EmDNAPhysics_option5"), verbose(ver)
{
G4EmParameters::Instance()->SetDefaults();
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -148,10 +145,11 @@ void G4EmDNAPhysics_option5::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-")
@@ -324,7 +322,6 @@ void G4EmDNAPhysics_option5::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -75,6 +75,8 @@
#include "G4LivermoreGammaConversionModel.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4EmParameters.hh"
// end of warning
#include "G4LossTableManager.hh"
@@ -89,17 +91,16 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option7);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option7::G4EmDNAPhysics_option7(G4int ver) :
G4VPhysicsConstructor("G4EmDNAPhysics_option7"), verbose(ver)
{
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_option7::G4EmDNAPhysics_option7(G4int ver, const G4String&) :
G4VPhysicsConstructor("G4EmDNAPhysics_option7"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
}
@@ -144,10 +145,11 @@ void G4EmDNAPhysics_option7::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "e-")
@@ -329,7 +331,6 @@ void G4EmDNAPhysics_option7::ConstructProcess()
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,6 +69,7 @@ G4EmLEPTSPhysics::G4EmLEPTSPhysics( const G4String& name)
: G4VPhysicsConstructor(name)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -100,10 +101,11 @@ void G4EmLEPTSPhysics::ConstructParticle()
void G4EmLEPTSPhysics::ConstructProcess()
{
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition * particle = aParticleIterator->value();
while( (*myParticleIterator)() ){
G4ParticleDefinition * particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager * manager = particle->GetProcessManager();
G4cout << " particle " << particle->GetParticleName() << " manager " << manager << G4endl; //GDEB
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePhysics.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmLivermorePhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
#include "G4EmLivermorePhysics.hh"
#include "G4ParticleDefinition.hh"
@@ -123,40 +123,21 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmLivermorePhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLivermorePhysics::G4EmLivermorePhysics(G4int ver)
: G4VPhysicsConstructor("G4EmLivermorePhysics"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLivermorePhysics::G4EmLivermorePhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmLivermorePhysics"), verbose(ver)
: G4VPhysicsConstructor("G4EmLivermore"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetMaxEnergy(1*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMscRangeFactor(0.02);
param->SetMuHadLateralDisplacement(true);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
@@ -196,10 +177,6 @@ void G4EmLivermorePhysics::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -239,11 +216,12 @@ void G4EmLivermorePhysics::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Livermore EM Processes
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*aParticleIterator)() ){
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -450,8 +428,7 @@ void G4EmLivermorePhysics::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePolarizedPhysics.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmLivermorePolarizedPhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
#include "G4EmLivermorePolarizedPhysics.hh"
#include "G4ParticleDefinition.hh"
@@ -121,36 +121,20 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmLivermorePolarizedPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLivermorePolarizedPhysics::G4EmLivermorePolarizedPhysics(G4int ver)
: G4VPhysicsConstructor("G4EmLivermorePolarizedPhysics"), verbose(ver)
G4EmLivermorePolarizedPhysics::G4EmLivermorePolarizedPhysics(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmLivermorePolarized"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLivermorePolarizedPhysics::G4EmLivermorePolarizedPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmLivermorePolarizedPhysics"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetMaxEnergy(1*TeV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMuHadLateralDisplacement(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -189,10 +173,6 @@ void G4EmLivermorePolarizedPhysics::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -232,11 +212,12 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Livermore EM Processes
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*aParticleIterator)() ){
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
//Applicability range for Livermore models
@@ -456,8 +437,7 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLowEPPhysics.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmLowEPPhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
#include "G4EmLowEPPhysics.hh"
#include "G4ParticleDefinition.hh"
@@ -123,23 +123,6 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmLowEPPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLowEPPhysics::G4EmLowEPPhysics(G4int ver)
: G4VPhysicsConstructor("G4EmLowEPPhysics"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLowEPPhysics::G4EmLowEPPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmLowEPPhysics"), verbose(ver)
{
@@ -147,7 +130,7 @@ G4EmLowEPPhysics::G4EmLowEPPhysics(G4int ver, const G4String&)
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetMaxEnergy(1*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
@@ -189,10 +172,6 @@ void G4EmLowEPPhysics::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -228,11 +207,12 @@ void G4EmLowEPPhysics::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Livermore EM Processes
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*aParticleIterator)() ){
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if(verbose > 1)
@@ -423,8 +403,7 @@ void G4EmLowEPPhysics::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
File diff suppressed because it is too large Load Diff
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmPenelopePhysics.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmPenelopePhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
#include "G4EmPenelopePhysics.hh"
#include "G4ParticleDefinition.hh"
@@ -130,27 +130,8 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmPenelopePhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmPenelopePhysics::G4EmPenelopePhysics(G4int ver)
: G4VPhysicsConstructor("G4EmPenelopePhysics"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetFluo(true);
param->SetPIXEElectronCrossSectionModel("Penelope");
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmPenelopePhysics::G4EmPenelopePhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmPenelopePhysics"), verbose(ver)
: G4VPhysicsConstructor("G4EmPenelope"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
@@ -161,6 +142,7 @@ G4EmPenelopePhysics::G4EmPenelopePhysics(G4int ver, const G4String&)
param->SetNumberOfBinsPerDecade(20);
param->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetMuHadLateralDisplacement(true);
param->SetFluo(true);
param->SetPIXEElectronCrossSectionModel("Penelope");
SetPhysicsType(bElectromagnetic);
@@ -200,10 +182,6 @@ void G4EmPenelopePhysics::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -243,11 +221,12 @@ void G4EmPenelopePhysics::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Penelope EM Processes
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*aParticleIterator)() ){
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
//Applicability range for Penelope models
@@ -487,8 +466,7 @@ void G4EmPenelopePhysics::ConstructProcess()
G4VAtomDeexcitation* deexcitation = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(deexcitation);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmStandardPhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -108,17 +108,6 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics::G4EmStandardPhysics(G4int ver)
: G4VPhysicsConstructor("G4EmStandard"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics::G4EmStandardPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmStandard"), verbose(ver)
{
@@ -162,10 +151,6 @@ void G4EmStandardPhysics::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -210,9 +195,10 @@ void G4EmStandardPhysics::ConstructProcess()
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -360,8 +346,7 @@ void G4EmStandardPhysics::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -106,24 +106,8 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysicsGS::G4EmStandardPhysicsGS(G4int ver)
: G4VPhysicsConstructor("G4EmStandard"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetLowestElectronEnergy(10*eV);
param->SetMscRangeFactor(0.1);
param->SetMscStepLimitType(fUseSafetyPlus);// corresponds to Urban fUseSafety
// param->SetMscStepLimitType(fUseSafety);// corresponds to the error-free stepping
// param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysicsGS::G4EmStandardPhysicsGS(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmStandard"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandardGS"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
@@ -170,10 +154,6 @@ void G4EmStandardPhysicsGS::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -218,9 +198,10 @@ void G4EmStandardPhysicsGS::ConstructProcess()
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -383,8 +364,7 @@ void G4EmStandardPhysicsGS::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -160,10 +160,6 @@ void G4EmStandardPhysicsSS::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -195,9 +191,10 @@ void G4EmStandardPhysicsSS::ConstructProcess()
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -317,8 +314,7 @@ void G4EmStandardPhysicsSS::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -116,8 +116,8 @@ G4EmStandardPhysicsWVI::G4EmStandardPhysicsWVI(G4int ver)
param->SetDefaults();
param->SetVerbose(verbose);
param->SetLowestElectronEnergy(10*eV);
// param->SetLatDisplacementBeyondSafety(true);
param->SetMuHadLateralDisplacement(false);
//param->SetLatDisplacementBeyondSafety(true);
//param->SetMuHadLateralDisplacement(false);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMscThetaLimit(0.15);
param->SetFluo(true);
@@ -158,10 +158,6 @@ void G4EmStandardPhysicsWVI::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -203,9 +199,10 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -336,8 +333,7 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option1.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmStandardPhysics_option1.cc 99938 2016-10-12 08:06:52Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -112,20 +112,6 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option1);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option1::G4EmStandardPhysics_option1(G4int ver)
: G4VPhysicsConstructor("G4EmStandard_opt1"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetApplyCuts(true);
param->SetMscRangeFactor(0.2);
param->SetMscStepLimitType(fMinimal);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option1::G4EmStandardPhysics_option1(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt1"), verbose(ver)
@@ -173,10 +159,6 @@ void G4EmStandardPhysics_option1::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -221,9 +203,10 @@ void G4EmStandardPhysics_option1::ConstructProcess()
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -378,8 +361,7 @@ void G4EmStandardPhysics_option1::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option2.cc 92821 2015-09-17 15:23:49Z gcosmo $
// $Id: G4EmStandardPhysics_option2.cc 99938 2016-10-12 08:06:52Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -118,20 +118,6 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option2);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option2::G4EmStandardPhysics_option2(G4int ver)
: G4VPhysicsConstructor("G4EmStandard_opt2"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetApplyCuts(false);
param->SetMscRangeFactor(0.2);
param->SetMscStepLimitType(fMinimal);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option2::G4EmStandardPhysics_option2(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt2"), verbose(ver)
@@ -179,10 +165,6 @@ void G4EmStandardPhysics_option2::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -227,9 +209,10 @@ void G4EmStandardPhysics_option2::ConstructProcess()
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -403,8 +386,7 @@ void G4EmStandardPhysics_option2::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option3.cc 96267 2016-04-01 12:38:51Z gcosmo $
// $Id: G4EmStandardPhysics_option3.cc 99938 2016-10-12 08:06:52Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -115,24 +115,6 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option3);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option3::G4EmStandardPhysics_option3(G4int ver)
: G4VPhysicsConstructor("G4EmStandard_opt3"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(10*eV);
param->SetMaxEnergy(10*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetMuHadLateralDisplacement(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option3::G4EmStandardPhysics_option3(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt3"), verbose(ver)
@@ -141,10 +123,11 @@ G4EmStandardPhysics_option3::G4EmStandardPhysics_option3(G4int ver,
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(10*eV);
param->SetMaxEnergy(10*TeV);
param->SetMaxEnergy(100*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetMuHadLateralDisplacement(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -183,10 +166,6 @@ void G4EmStandardPhysics_option3::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -224,9 +203,10 @@ void G4EmStandardPhysics_option3::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -402,8 +382,7 @@ void G4EmStandardPhysics_option3::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option4.cc 96209 2016-03-30 08:58:33Z gcosmo $
// $Id: G4EmStandardPhysics_option4.cc 99938 2016-10-12 08:06:52Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -119,26 +119,6 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver)
: G4VPhysicsConstructor("G4EmStandard_opt4"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(10*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetLatDisplacementBeyondSafety(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt4"), verbose(ver)
@@ -154,7 +134,7 @@ G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver,
param->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetMuHadLateralDisplacement(true);
//param->SetLatDisplacementBeyondSafety(true);
// param->SetLatDisplacementBeyondSafety(true);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -193,10 +173,6 @@ void G4EmStandardPhysics_option4::ConstructParticle()
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
// dna
G4EmModelActivator mact;
mact.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -247,9 +223,10 @@ void G4EmStandardPhysics_option4::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add standard EM Processes
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
@@ -480,8 +457,7 @@ void G4EmStandardPhysics_option4::ConstructProcess()
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4EmModelActivator mact;
mact.ConstructProcess();
G4EmModelActivator mact(GetPhysicsName());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -335,11 +335,12 @@ void G4OpticalPhysics::ConstructProcess()
UIhelpers::buildCommands(CerenkovProcess);
OpProcesses[kCerenkov] = CerenkovProcess;
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*aParticleIterator)() ){
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
pManager = particle->GetProcessManager();
@@ -14,6 +14,26 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
17-Oct-2016, Michel Maire (phys-ctor-fact-V10-02-04)
- add README
29-Sep-2016, Robert Hatcher (phys-ctor-fact-V10-02-03)
- Reviewed changes in current context, propose w/ minimal changes
03-Jun-2016, Robert Hatcher (phys-ctor-fact-V10-02-02)
- Require use of declaring and referencing macros to have
a trailing semicolon; for case where macro expands to a
namespace block, deal with eating up the ";"
26-May-2016, Robert Hatcher (phys-ctor-fact-V10-02-01)
- Implement G4_REFERENCE_PHYSCONSTR_FACTORY_NS in case physics
ctor lives in a namespace
10-May-2016, Robert Hatcher (phys-ctor-fact-V10-02-00)
- Reinstate use of G4_REFERENCE_PHYSCONSTR_FACTORY so that registry works
in the case of static library builds, even without forcing linker
to load whole library (which is not possible for MS Visual Studio)
05-Nov-2014, Alberto Ribon (phys-ctor-fact-V10-01-00)
- Replaced neutron_hp/ with particle_hp/
@@ -0,0 +1,10 @@
$Id:$
-------------------------------------------------------------------
G4PhysicsConstructorFactory
---------------------------
G4PhysicsConstructorRegistry
----------------------------
@@ -62,16 +62,32 @@ public:
// support for phys constructors defined within a namespace
// a bit tricky due to cpp macro expansion and the use of "::"
// use G4_DECLARE_PHYSCONSTR_FACTORY_NS( myns::MyProc, myns, MyProc ) // without trailing ";"
// use G4_DECLARE_PHYSCONSTR_FACTORY_NS( myns::MyProc, myns, MyProc );
#define G4_DECLARE_PHYSCONSTR_FACTORY_NS( physics_constructor, nsname, pcbase ) \
namespace nsname { \
const G4PhysicsConstructorFactory<physics_constructor>& pcbase##Factory = G4PhysicsConstructorFactory<physics_constructor>(#physics_constructor); \
}
} \
typedef int xyzzy__LINE__
// eat trailing semicolon using silly typedef
// REFERENCE (rather than DECLARE) when the physics constructor if it is part
// of a static library. No need to include the header (DECLARE needs this
// to build the code), we just need to make a reference in order to pull
// the compilation unit static variable from the library and cause it
// to be initialized (and thus self-register)
#define G4_REFERENCE_PHYSCONSTR_FACTORY(physics_constructor) \
class physics_constructor; \
extern const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##Factory; \
const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##FactoryRef = physics_constructor##Factory
#define G4_REFERENCE_PHYSCONSTR_FACTORY_NS( physics_constructor, nsname, pcbase ) \
namespace nsname { \
class pcbase; \
extern const G4PhysicsConstructorFactory<physics_constructor>& pcbase##Factory; \
const G4PhysicsConstructorFactory<physics_constructor>& pcbase##FactoryRef = pcbase##Factory; \
} \
typedef int xyzzy__LINE__
// eat trailing semicolon using silly typedef
#endif
@@ -162,3 +162,72 @@ void G4PhysicsConstructorRegistry::PrintAvailablePhysicsConstructors() const
}
}
}
//
// External reference to phy ctor factories for running with 'static'
// libraries to pull the references of the declared factories into the
// same compilation unit as the registry itself.
// No harm having them in the non-static case.
//
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ChargeExchangePhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4DecayPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAChemistry);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option1);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option3);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option4);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option5);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option7);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmExtraPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePolarizedPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLowEPPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmPenelopePhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsSS);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsWVI);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option1);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option2);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option3);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4GenericBiasingPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronDElasticPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsHP);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsLEND);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsXS);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronHElasticPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronInelasticQBBC);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_ATL);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_HP);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTF_BIC);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsNuBeam);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_AllHP);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_HP);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_FTFP_BERT);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGS_BIC);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ImportanceBiasing);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonBinaryCascadePhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonElasticPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonINCLXXPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronCrossSectionXS);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronTrackingCut);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4OpticalPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ParallelWorldPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4RadioactiveDecayPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4SpinDecayPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StoppingPhysics);
G4_REFERENCE_PHYSCONSTR_FACTORY(G4WeightWindowBiasing);
@@ -1,4 +1,4 @@
$Id: History 94350 2015-11-12 15:34:12Z gcosmo $
$Id: History 101023 2016-11-04 08:29:28Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,23 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
12-November-2015, V.Ivanchenko (phys-ctor-glnuclear-V10-02-04)
- G4EmExtraPhysics, G4EmMessenger - added rare high energy EM processes,
disabled by default
03-Nov-2016 A.Ribon (phys-ctor-glnuclear-V10-02-03)
- Written first draft of the README.
16-October-2016 M.Maire (phys-ctor-glnuclear-V10-02-02)
- cosmetic in README
15-October-2016 M.Maire (phys-ctor-glnuclear-V10-02-01)
- add README
12-October-2016 G.Folger (phys-ctor-glnuclear-V10-02-00)
- replace direct use of aParticleIterator by GetParticleIterator().
fix required by clang39 on Windows and MAC
12-November-2015, V.Ivanchenko (phys-ctor-glnuclear-V10-01-03)
- G4EmExtraPhysics - do not use AutoDelete
@@ -0,0 +1,49 @@
$Id:$
-------------------------------------------------------------------
G4BertiniElectroNuclearBuilder
------------------------------
It includes gamma-nuclear, electron-nuclear and positron-nuclear
processes.
For gamma-nuclear, it uses Bertini (BERT) model for gamma below 3.5 GeV,
and Quark-Gluon-String (QGS) model above 3.0 GeV.
For electron-nuclear and positron-nuclear, it uses the equivalent photon
approximation in which the incoming lepton generates a virtual photon,
and then the virtual photon is converted to a real photon. This real
photon is handled by BERT if its energy is below 10 GeV; if it is above
10 GeV, then the real photon is transformed into a (on-shell) pi0 and
then handled by Fritiof (FTF) string model.
G4EmExtraPhysics
----------------
It uses G4BertiniElectroNuclearBuilder for gamma-nuclear, electron-nuclear
and positron-nuclear.
Moreover, it includes muon-nuclear process (for mu- and mu+), and
synchrotron process (either for electron & positron, or for all
charged particles).
The muon-nuclear process is treated similarly as for electrons and
positrons (i.e. the equivalent photon approximation in which the incoming
lepton generates a virtual photon, and then the virtual photon is converted
to a real photon, which is handled by BERT below 10 GeV or by FTF as a pi0
above 10 GeV).
By default, gamma-nuclear, electron-nuclear, positron-nuclear, and
muon-nuclear are switched on, whereas synchrotron process is switched off
for all particles. It is however possible, at run time via macro commands,
to change this default (see G4EmMessenger below).
G4EmMessenger
-------------
Used by G4EmExtraPhysics to be able to switch on/off:
- synchrotron radiation for electron and positron
(note: electron and positron together, not individually)
- synchrotron radiation for all charged particles
(note: all charged particles together, not individually)
- gamma-nuclear, electron-nuclear and positron-nuclear
(note: all these three particles together, not individually)
- muon-nuclear
(note: mu- and mu+ together, not individually)
at run time, via macro commands.
@@ -49,6 +49,9 @@
class G4BertiniElectroNuclearBuilder;
class G4SynchrotronRadiation;
class G4GammaConversionToMuons;
class G4AnnihiToMuPair;
class G4eeToHadrons;
class G4EmExtraPhysics : public G4VPhysicsConstructor
{
@@ -68,6 +71,9 @@ public:
void SynchAll(G4bool val);
void GammaNuclear(G4bool val);
void MuonNuclear(G4bool val);
void GammaToMuMu(G4bool val);
void PositronToMuMu(G4bool val);
void PositronToHadrons(G4bool val);
private:
@@ -75,9 +81,15 @@ private:
static G4bool munActivated;
static G4bool synActivated;
static G4bool synActivatedForAll;
static G4bool gmumuActivated;
static G4bool pmumuActivated;
static G4bool phadActivated;
static G4ThreadLocal G4BertiniElectroNuclearBuilder* theGNPhysics;
static G4ThreadLocal G4SynchrotronRadiation* theSynchRad;
static G4ThreadLocal G4GammaConversionToMuons* theGammaToMuMu;
static G4ThreadLocal G4AnnihiToMuPair* thePosiToMuMu;
static G4ThreadLocal G4eeToHadrons* thePosiToHadrons;
G4EmMessenger* theMessenger;
G4int verbose;
@@ -61,6 +61,9 @@ private:
G4UIcmdWithABool* theSynchAll;
G4UIcmdWithABool* theGN;
G4UIcmdWithABool* theMUN;
G4UIcmdWithABool* theGMM;
G4UIcmdWithABool* thePMM;
G4UIcmdWithABool* thePH;
G4UIdirectory* aDir1;
G4UIdirectory* aDir2;
};
@@ -44,7 +44,6 @@
#include "G4EmExtraPhysics.hh"
#include "G4SystemOfUnits.hh"
#include "G4SynchrotronRadiation.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
@@ -59,6 +58,10 @@
#include "G4MuonNuclearProcess.hh"
#include "G4MuonVDNuclearModel.hh"
#include "G4GammaConversionToMuons.hh"
#include "G4AnnihiToMuPair.hh"
#include "G4eeToHadrons.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
#include "G4AutoDelete.hh"
@@ -72,9 +75,15 @@ G4bool G4EmExtraPhysics::gnActivated = true;
G4bool G4EmExtraPhysics::munActivated = true;
G4bool G4EmExtraPhysics::synActivated = false;
G4bool G4EmExtraPhysics::synActivatedForAll = false;
G4bool G4EmExtraPhysics::gmumuActivated = false;
G4bool G4EmExtraPhysics::pmumuActivated = false;
G4bool G4EmExtraPhysics::phadActivated = false;
G4ThreadLocal G4BertiniElectroNuclearBuilder* G4EmExtraPhysics::theGNPhysics=0;
G4ThreadLocal G4SynchrotronRadiation* G4EmExtraPhysics::theSynchRad=0;
G4ThreadLocal G4BertiniElectroNuclearBuilder* G4EmExtraPhysics::theGNPhysics = nullptr;
G4ThreadLocal G4SynchrotronRadiation* G4EmExtraPhysics::theSynchRad = nullptr;
G4ThreadLocal G4GammaConversionToMuons* G4EmExtraPhysics::theGammaToMuMu = nullptr;
G4ThreadLocal G4AnnihiToMuPair* G4EmExtraPhysics::thePosiToMuMu = nullptr;
G4ThreadLocal G4eeToHadrons* G4EmExtraPhysics::thePosiToHadrons = nullptr;
G4EmExtraPhysics::G4EmExtraPhysics(G4int ver):
G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
@@ -85,19 +94,14 @@ G4EmExtraPhysics::G4EmExtraPhysics(G4int ver):
if(verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
}
G4EmExtraPhysics::G4EmExtraPhysics(const G4String&):
G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
verbose(1)
{
theMessenger = new G4EmMessenger(this);
SetPhysicsType(bEmExtra);
if(verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
}
G4EmExtraPhysics::G4EmExtraPhysics(const G4String&)
: G4EmExtraPhysics(1)
{}
G4EmExtraPhysics::~G4EmExtraPhysics()
{
delete theMessenger;
theMessenger = 0;
theMessenger = nullptr;
}
void G4EmExtraPhysics::Synch(G4bool val)
@@ -121,6 +125,21 @@ void G4EmExtraPhysics::MuonNuclear(G4bool val)
munActivated = val;
}
void G4EmExtraPhysics::GammaToMuMu(G4bool val)
{
gmumuActivated = val;
}
void G4EmExtraPhysics::PositronToMuMu(G4bool val)
{
pmumuActivated = val;
}
void G4EmExtraPhysics::PositronToHadrons(G4bool val)
{
phadActivated = val;
}
void G4EmExtraPhysics::ConstructParticle()
{
G4Gamma::Gamma();
@@ -132,6 +151,7 @@ void G4EmExtraPhysics::ConstructParticle()
void G4EmExtraPhysics::ConstructProcess()
{
G4ParticleDefinition* gamma = G4Gamma::Gamma();
G4ParticleDefinition* electron = G4Electron::Electron();
G4ParticleDefinition* positron = G4Positron::Positron();
G4ParticleDefinition* muonplus = G4MuonPlus::MuonPlus();
@@ -150,17 +170,30 @@ void G4EmExtraPhysics::ConstructProcess()
ph->RegisterProcess( muNucProcess, muonplus);
ph->RegisterProcess( muNucProcess, muonminus);
}
if(gmumuActivated) {
theGammaToMuMu = new G4GammaConversionToMuons();
ph->RegisterProcess(theGammaToMuMu, gamma);
}
if(pmumuActivated) {
thePosiToMuMu = new G4AnnihiToMuPair();
ph->RegisterProcess(thePosiToMuMu, positron);
}
if(phadActivated) {
thePosiToHadrons = new G4eeToHadrons();
ph->RegisterProcess(thePosiToHadrons, positron);
}
if(synActivated) {
theSynchRad = new G4SynchrotronRadiation();
ph->RegisterProcess( theSynchRad, electron);
ph->RegisterProcess( theSynchRad, positron);
//G4AutoDelete::Register(theSynchRad);
if(synActivatedForAll) {
aParticleIterator->reset();
G4ParticleDefinition* particle=0;
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
G4ParticleDefinition* particle = nullptr;
while( (*aParticleIterator)() ) {
particle = aParticleIterator->value();
while( (*myParticleIterator)() ) {
particle = myParticleIterator->value();
if( particle->GetPDGStable() && particle->GetPDGCharge() != 0.0) {
if(verbose > 1) {
G4cout << "### G4SynchrotronRadiation for "
@@ -78,6 +78,18 @@ G4EmMessenger::G4EmMessenger(G4EmExtraPhysics* ab)
theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
theMUN->SetGuidance("Switching on muon nuclear physics.");
theMUN->AvailableForStates(G4State_PreInit);
theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
theGMM->AvailableForStates(G4State_PreInit);
thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
thePMM->SetGuidance("Switching on positron conversion to muon pair.");
thePMM->AvailableForStates(G4State_PreInit);
thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
thePH->SetGuidance("Switching on positron conversion to hadrons.");
thePH->AvailableForStates(G4State_PreInit);
}
G4EmMessenger::~G4EmMessenger()
@@ -86,6 +98,9 @@ G4EmMessenger::~G4EmMessenger()
delete theSynchAll;
delete theGN;
delete theMUN;
delete theGMM;
delete thePMM;
delete thePH;
delete aDir1;
delete aDir2;
}
@@ -96,4 +111,7 @@ void G4EmMessenger::SetNewValue(G4UIcommand* aComm, G4String aS)
if(aComm==theSynchAll) theB->SynchAll(theSynchAll->GetNewBoolValue(aS));
if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
if(aComm==thePMM) theB->PositronToMuMu(thePMM->GetNewBoolValue(aS));
if(aComm==thePH) theB->PositronToHadrons(thePH->GetNewBoolValue(aS));
}
@@ -1,4 +1,4 @@
$Id: History 97178 2016-05-27 12:45:30Z gcosmo $
$Id: History 101061 2016-11-04 13:07:09Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,16 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
04-Nov-2016, Alberto Ribon (phys-ctor-helastic-V10-02-04)
- Written first draft of the README
16-October-2016 M.Maire (phys-ctor-helastic-V10-02-03)
- add README
12-October-2016 G.Folger (phys-ctor-helastic-V10-02-02)
- replace direct use of aParticleIterator by GetParticleIterator().
fix required by clang39 on Windows and MAC
26-May-2016, A. Ribon (phys-ctor-helastic-V10-02-01)
- G4HadronElasticPhysicsPHP : made it thread-safe.
@@ -0,0 +1,105 @@
$Id: $
-------------------------------------------------------------------
G4ChargeExchangePhysics
-----------------------
Hadron nuclear coherent charge exchange, used in this constructor
only for nucleons and charged pions.
G4HadronDElasticPhysics
-----------------------
Hadron nuclear elastic process for all hadrons:
- proton and charged pions:
- cross section: Barashenkov-Glauber-Gribov
- final-state: Diffuse model where applicable, else Gheisha
- neutron:
- cross section: G4NeutronElasticXS
- final-state: Diffuse model where applicable, else Gheisha
- kaons
- cross section: Chips
- final-state: Diffuse model where applicable, else Gheisha
- hyperons, anti-hyperons, deuteron, triton, alpha
- cross section: Gheisha
- final-state: Gheisha
- anti_proton, anti_deuteron, anti_triton, anti_He3, anti_alpha
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: Galoyan-Uzhinsky model above 100 MeV/nucleon,
Gheisha below.
G4HadronElasticPhysics
----------------------
Hadron nuclear elastic process for all hadrons:
- proton
- cross section: Chips
- final-state: Chips
- neutron:
- cross section: G4NeutronElasticXS
- final-state: Chips
- charged pions:
- cross section: Barashenkov-Glauber-Gribov
- final-state: Starkov's model above 1 GeV, Gheisha below.
- kaons
- cross section: Gheisha
- final-state: Gheisha
- hyperons, anti-hyperons, deuteron, triton, alpha
- cross section: Gheisha
- final-state: Gheisha
- He3
- cross section: Glauber-Gribov
- final-state: Gheisha
- anti_proton, anti_deuteron, anti_triton, anti_He3, anti_alpha
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: Galoyan-Uzhinsky model above 100 MeV/nucleon,
Gheisha below.
G4HadronElasticPhysicsHP
------------------------
As G4HadronElasticPhysics, with the only difference that for neutrons
below 20 MeV, NeutronHP elastic is used (for both cross section and
final-state model).
G4HadronElasticPhysicsLEND
--------------------------
As G4HadronElasticPhysics, with the only difference that for neutrons
below 20 MeV, LEND elastic is used (for both cross section and
final-state model).
G4HadronElasticPhysicsXS
------------------------
As G4HadronElasticPhysics, with only difference in the proton elastic
cross section: Barashenkov-Glauber-Gribov is used (instead of Chips).
G4HadronHElasticPhysics
-----------------------
- proton
- cross section: Barashenkov-Glauber-Gribov
- final-state: Diffuse model, except for Hydrogen where Chips is used
- neutron:
- cross section: G4NeutronElasticXS
- final-state: Diffuse model, except for Hydrogen where Chips is used
- charged pions:
- cross section: Barashenkov-Glauber-Gribov
- final-state: Diffuse model, except for Hydrogen where Chips is used
- kaons, hyperons, anti-hyperons
- cross section: Chips
- final-state: Chips
- deuteron, triton, He3, alpha
- cross section: Glauber-Gribov
- final-state: Gheisha
- anti_proton, anti_neutron
- cross section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: Galoyan-Uzhinsky model above 100 MeV/nucleon,
Chips below.
- anti_deuteron, anti_triton, anti_He3, anti_alpha
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: Galoyan-Uzhinsky model above 100 MeV/nucleon,
Gheisha below.
G4IonElasticPhysics
-------------------
As G4HadronElasticPhysics, with the addition of elastic process for
generic ion:
- cross section: Glauber-Gribov
- final-state: Diffuse model
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ChargeExchangePhysics.cc 71037 2013-06-10 09:20:54Z gcosmo $
// $Id: G4ChargeExchangePhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -87,10 +87,11 @@ void G4ChargeExchangePhysics::ConstructProcess()
<< model->GetModelName() << ">" << G4endl;
}
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4String pname = particle->GetParticleName();
if(pname == "neutron" ||
pname == "pi-" ||
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronDElasticPhysics.cc 83699 2014-09-10 07:18:25Z gcosmo $
// $Id: G4HadronDElasticPhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -137,10 +137,11 @@ void G4HadronDElasticPhysics::ConstructProcess()
G4DiffuseElastic* model = 0;
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String pname = particle->GetParticleName();
if(pname == "anti_lambda" ||
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronElasticPhysics.cc 95771 2016-02-24 08:23:05Z gcosmo $
// $Id: G4HadronElasticPhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -142,10 +142,11 @@ void G4HadronElasticPhysics::ConstructProcess()
G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
he->SetMinEnergy(elimitPi);
aParticleIterator->reset();
while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String pname = particle->GetParticleName();
if(pname == "anti_lambda" ||
@@ -40,6 +40,7 @@
#include "G4HadronElastic.hh"
#include "G4ParticleHPElastic.hh"
#include "G4ParticleHPElasticData.hh"
#include "G4SystemOfUnits.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronHElasticPhysics.cc 90757 2015-06-09 07:45:14Z gcosmo $
// $Id: G4HadronHElasticPhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -159,10 +159,11 @@ void G4HadronHElasticPhysics::ConstructProcess() {
G4AutoDelete::Register(diffRatio);
}
aParticleIterator->reset();
while( (*aParticleIterator)() ) {
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ) {
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = myParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String pname = particle->GetParticleName();
@@ -1,4 +1,4 @@
$Id: History 97177 2016-05-27 12:44:22Z gcosmo $
$Id: History 101901 2016-12-07 08:38:58Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,40 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
07-Dec-2016, Alberto Ribon (phys-ctor-hinelastic-V10-02-10)
- G4HadronPhysicsFTFP_BERT_HP : changed the transition energy region
between FTFP and BERT in the physics list FTFP_BERT_HP to [3, 12] GeV,
exactly as it is now in FTFP_BERT.
01-Dec-2016, Alberto Ribon (phys-ctor-hinelastic-V10-02-09)
- G4HadronPhysicsFTFP_BERT : changed the transition energy region
between FTFP and BERT in the physics list FTFP_BERT to [3, 12] GeV
(for pions, kaons, protons and neutrons; for hyperons, left as it
has always been, i.e. [2, 6] GeV).
24-Nov-2016, Alberto Ribon (phys-ctor-hinelastic-V10-02-08)
- G4HadronPhysicsFTFP_BERT : changed the transition energy region
between FTFP and BERT in the physics list FTFP_BERT : now it is
between [2, 6] GeV.
18-Nov-2016, Alberto Ribon (phys-ctor-hinelastic-V10-02-07)
- G4HadronPhysicsFTFP_BERT : changed the transition energy region
between FTFP and BERT in the physics list FTFP_BERT : now it is
between the large interval [3, 12] GeV (instead of [4, 5] GeV).
04-Nov-2016, Alberto Ribon (phys-ctor-hinelastic-V10-02-06)
- Written first draft of the README
17-October-2016 M.Maire (phys-ctor-hinelastic-V10-02-05)
- add README
12-October-2016 G.Folger (phys-ctor-hinelastic-V10-02-04)
- replace direct use of aParticleIterator by GetParticleIterator().
fix required by clang39 on Windows and MAC
30-Aug-2016, V.Ivanchenko (phys-ctor-hinelastic-V10-02-03)
- G4HadronPhysicsQBBC : use G4 de-excitation for the Bertini cascade
26-May-2016, A. Ribon (phys-ctor-hinelastic-V10-02-02)
- G4HadronPhysicsQGSP_BIC_AllHP : treat only proton with ParticleHP in
this class, and move the others (deuteron, triton, 3He, alpha) to
@@ -0,0 +1,338 @@
$Id: $
-------------------------------------------------------------------
G4HadronInelasticQBBC
---------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: Fritiof coupled with Precompound/de-excitation (FTFP) above 3 GeV;
Bertini (BERT) between 1 and 5 GeV;
Binary coupled with Precompound/de-excitation (BIC) below 1.5 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: FTFP > 3 GeV; 1 GeV < BERT < 5 GeV; BIC < 1.5 GeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 5 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 5 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 3 GeV; BERT < 5 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha,
anti_hyperons inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
G4HadronPhysicsFTFP_BERT
------------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 12 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: FTFP > 3 GeV; BERT < 12 GeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 12 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 12 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTFP for all energies
G4HadronPhysicsFTFP_BERT_ATL
----------------------------
Similar to G4HadronPhysicsFTFP_BERT, with the difference that for proton,
neutron, pions and kaons, the FTFP is used above 9 GeV and BERT below 12 GeV
(i.e. transition between these two models is in the interval [9, 12] GeV).
G4HadronPhysicsFTFP_BERT_HP
--------------------------
Similar to G4HadronPhysicsFTFP_BERT, with the only difference of the
treatment of low-energy neutrons:
- neutron inelastic: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section;
final-state: BERT between 19.9 MeV and 12 GeV,
FTFP above 3 GeV.
- neutron capture: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section
and G4NeutronRadCapture final-state.
- neutron fission: use NeutronHP (for both cross section and final state)
below 20 MeV; above Gheisha (cross section and final state).
G4HadronPhysicsFTFP_BERT_TRV
----------------------------
Similar to G4HadronPhysicsFTFP_BERT, with the only difference that the
transition between FTFP and BERT is in the interval [2 , 4] GeV.
G4HadronPhysicsFTF_BIC
----------------------
Similar to G4HadronPhysicsFTFP_BERT, with the following differences for
proton, neutron, pions and kaons:
- BIC is used (instead of BERT) below 5 GeV;
- FTF is still used above 4 GeV, but it is coupled with BIC (instead of
Precompound/de-excitation)
G4HadronPhysicsINCLXX
---------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 15 GeV; 1 MeV < INCLXX < 20 GeV; Preco < 2 MeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: QGSP > 15 GeV; 1 MeV < INCLXX < 20 GeV; Preco < 2 MeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 15 GeV; 1 MeV < INCLXX < 20 GeV; Preco < 2 MeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: QGSP > 14 GeV; BERT < 15 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTF for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTF for all energies
Note: it is possible to specify in the constructor the use of FTFP instead
of QGSP for proton, neutron, charged pions and kaons;
moreover, NeutronHP can also be activated in the constructor, in which
case inelastic, capture and fission below 20 MeV are taken from
NeutronHP (both cross section and final-state).
G4HadronPhysicsNuBeam
---------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP with Lund string fragmentation > 100 GeV;
3 GeV < FTFP < 101 GeV; BERT < 3.5 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: FTFP > 4 GeV; BERT < 5 GeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 3.5 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: FTFP > 3 GeV; BERT < 3.5 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTFP for all energies
G4HadronPhysicsQGSP_BERT
------------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; BERT < 9.9 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; BERT < 9.9 GeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; BERT < 9.9 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; BERT < 9.9 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTFP for all energies
G4HadronPhysicsQGSP_BERT_HP
---------------------------
Similar to G4HadronPhysicsQGSP_BERT, with the only difference for neutron:
- neutron inelastic: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section;
final-state: BERT between 19.9 MeV and 9.9 GeV,
FTFP between 9.5 and 25 GeV, QGSP above 12 GeV.
- neutron capture: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section
and G4NeutronRadCapture final-state.
- neutron fission: use NeutronHP (for both cross section and final state)
below 20 MeV; above Gheisha (cross section and final state).
G4HadronPhysicsQGSP_BIC
-----------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; BIC < 9.9 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; BIC < 9.9 GeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 12 GeV; 4 GeV < FTFP < 25 GeV; BERT < 5 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: QGSP > 12 GeV; 4 GeV < FTFP < 25 GeV; BERT < 5 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTFP for all energies
G4HadronPhysicsQGSP_BIC_AllHP
-----------------------------
Similar to G4HadronPhysicsQGSP_BIC_HP (see below) with the only difference
for proton: ParticleHP is used (for both cross section and final state)
below 200 MeV; above it: Barashenkov-Glauber-Gribov inelastic cross section;
final-state: QGSP > 12 GeV; 9.5 GeV < FTFP < 25 GeV; 200 MeV < BIC < 9.9 GeV.
G4HadronPhysicsQGSP_BIC_HP
--------------------------
Similar to G4HadronPhysicsQGSP_BIC, with the only difference for neutron:
- neutron inelastic: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section;
final-state: BIC between 19.9 MeV and 9.9 GeV,
FTFP between 9.5 and 25 GeV, QGSP above 12 GeV.
- neutron capture: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section
and G4NeutronRadCapture final-state.
- neutron fission: use NeutronHP (for both cross section and final state)
below 20 MeV; above Gheisha (cross section and final state).
G4HadronPhysicsQGSP_FTFP_BERT
-----------------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 12 GeV; 6 GeV < FTFP < 25 GeV; BERT < 8 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS
- final-state: QGSP > 12 GeV; 6 GeV < FTFP < 25 GeV; BERT < 8 GeV
neutron capture:
- cross section: G4NeutronCaptureXS
- final-state: G4NeutronRadCapture
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: QGSP > 12 GeV; 6 GeV < FTFP < 25 GeV; BERT < 8 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: QGSP > 12 GeV; 6 GeV < FTFP < 25 GeV; BERT < 8 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTFP for all energies
G4HadronPhysicsQGS_BIC
----------------------
Similar to G4HadronPhysicsQGSP_BIC, with the following differences
in the final-state for some projectile hadrons:
- proton inelastic:
QGS_BIC > 12 GeV; 9.5 GeV < FTF_BIC < 25 GeV; BIC < 9.9 GeV
- neutron inelastic:
QGS_BIC > 12 GeV; 9.5 GeV < FTF_BIC < 25 GeV; BIC < 9.9 GeV
- pions inelastic:
QGS_BIC > 12 GeV; 4 GeV < FTF_BIC < 25 GeV; 1.2 GeV < BERT < 5 GeV; BIC < 1.3 GeV
- kaons inelastic:
QGS_BIC > 12 GeV; 4 GeV < FTF_BIC < 25 GeV; BERT < 5 GeV
Note: QGS_BIC and FTF_BIC indicate that QGS and FTF, respectively,
are coupled with BIC (instead of Precompound/de-excitation).
G4HadronPhysicsShielding
------------------------
Hadron nuclear inelastic processes for all hadrons:
- proton inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: FTFP > 9.5 GeV; BERT < 9.9 GeV
- neutron inelastic:
- cross section: G4NeutronInelasticXS > 20 MeV; NeutronHP or LEND < 20 MeV
- final-state: FTFP > 9.5 GeV; 19.9 MeV < BERT < 9.9 GeV; NeutronHP or LEND < 20 MeV
neutron capture:
- cross section: G4NeutronCaptureXS > 20 MeV; NeutronHP or LEND < 20 MeV
- final-state: G4NeutronRadCapture > 19.9 MeV; NeutronHP or LEND < 20 MeV
neutron fission:
- cross section: Gheisha > 20 MeV; NeutronHP or LEND < 20 MeV
- final-state: Gheisha > 19.9 MeV; NeutronHP or LEND < 20 MeV
- charged pions inelastic:
- cross section: Barashenkov-Glauber-Gribov
- final-state: FTFP > 9.5 GeV; BERT < 9.9 GeV
- kaons inelastic:
- cross section: Glauber-Gribov
- final-state: FTFP > 9.5 GeV; BERT < 9.9 GeV
- hyperons inelastic:
- cross section: Chips
- final-state: FTFP > 2 GeV; BERT < 6 GeV
- anti_proton, anti_neutron, anti_deuteron, anti_triton, anti_He3, anti_alpha inelastic:
- cross-section: Galoyan-Uzhinsky-Glauber-Gribov
- final-state: FTFP for all energies
- anti_hyperons inelastic:
- cross section: Chips
- final-state: FTFP for all energies
G4VHadronPhysics
----------------
Utility class which provides useful methods.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronInelasticQBBC.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronInelasticQBBC.hh 99005 2016-08-30 11:26:40Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -73,9 +73,7 @@ private:
static G4ThreadLocal G4ComponentAntiNuclNuclearXS* theAntiNuclXS;
static G4ThreadLocal G4ComponentGGHadronNucleusXsc* theKaonXS;
G4String htype;
G4int verbose;
static G4ThreadLocal G4bool wasActivated;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTFP_BERT.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsFTFP_BERT.hh 101741 2016-11-24 10:45:35Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -46,9 +46,13 @@
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4PionBuilder.hh"
#include "G4BertiniPionBuilder.hh"
#include "G4FTFPPionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFPKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
@@ -87,9 +91,13 @@ class G4HadronPhysicsFTFP_BERT : public G4VPhysicsConstructor
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4PiKBuilder * thePiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4PionBuilder * thePion;
G4BertiniPionBuilder * theBertiniPion;
G4FTFPPionBuilder * theFTFPPion;
G4KaonBuilder * theKaon;
G4BertiniKaonBuilder * theBertiniKaon;
G4FTFPKaonBuilder * theFTFPKaon;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
@@ -44,9 +44,13 @@
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4PionBuilder.hh"
#include "G4BertiniPionBuilder.hh"
#include "G4FTFPPionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFPKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
@@ -86,9 +90,13 @@ class G4HadronPhysicsFTFP_BERT_HP : public G4VPhysicsConstructor
G4FTFPNeutronBuilder * theFTFPNeutron;
G4NeutronPHPBuilder * theHPNeutron;
G4PiKBuilder * thePiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4PionBuilder * thePion;
G4BertiniPionBuilder * theBertiniPion;
G4FTFPPionBuilder * theFTFPPion;
G4KaonBuilder * theKaon;
G4BertiniKaonBuilder * theBertiniKaon;
G4FTFPKaonBuilder * theFTFPKaon;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsShielding.hh 93878 2015-11-03 08:18:00Z gcosmo $
// $Id: G4HadronPhysicsShielding.hh 101813 2016-11-30 18:05:43Z gunter $
//
//---------------------------------------------------------------------------
//
@@ -42,6 +42,7 @@
#include "globals.hh"
#include "G4ios.hh"
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4VPhysicsConstructor.hh"
@@ -73,7 +74,7 @@ class G4HadronPhysicsShielding : public G4VPhysicsConstructor
explicit G4HadronPhysicsShielding(G4int verbose=1);
explicit G4HadronPhysicsShielding(const G4String& name, G4bool );
explicit G4HadronPhysicsShielding(const G4String& name, G4int verbose=1,
G4double minFTFPEnergy=9.5*GeV, G4double maxBertiniEnergy=9.9*GeV);
G4double minFTFPEnergy=9.5*CLHEP::GeV, G4double maxBertiniEnergy=9.9*CLHEP::GeV);
virtual ~G4HadronPhysicsShielding();
public:
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronInelasticQBBC.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronInelasticQBBC.cc 99977 2016-10-13 07:26:42Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -79,41 +79,30 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronInelasticQBBC);
G4ThreadLocal G4ComponentAntiNuclNuclearXS* G4HadronInelasticQBBC::theAntiNuclXS = 0;
G4ThreadLocal G4ComponentGGHadronNucleusXsc* G4HadronInelasticQBBC::theKaonXS = 0;
G4ThreadLocal G4bool G4HadronInelasticQBBC::wasActivated=false;
G4ThreadLocal G4ComponentAntiNuclNuclearXS* G4HadronInelasticQBBC::theAntiNuclXS = nullptr;
G4ThreadLocal G4ComponentGGHadronNucleusXsc* G4HadronInelasticQBBC::theKaonXS = nullptr;
G4HadronInelasticQBBC::G4HadronInelasticQBBC(G4int ver)
: G4VHadronPhysics("hInelastic"),verbose(ver)
: G4VHadronPhysics("hInelasticQBBC"),verbose(ver)
{
htype = "QBBC";
theAntiNuclXS = 0;
theKaonXS = 0;
theAntiNuclXS = nullptr;
theKaonXS = nullptr;
}
G4HadronInelasticQBBC::G4HadronInelasticQBBC(const G4String& name, G4int ver,
G4bool, G4bool,G4bool, G4bool, G4bool)
: G4VHadronPhysics("hInelastic"),verbose(ver)
{
htype = name;
theAntiNuclXS = 0;
theKaonXS = 0;
}
G4HadronInelasticQBBC::G4HadronInelasticQBBC(const G4String&, G4int ver,
G4bool, G4bool,G4bool, G4bool, G4bool) : G4HadronInelasticQBBC(ver)
{}
G4HadronInelasticQBBC::~G4HadronInelasticQBBC()
{
delete theAntiNuclXS; theAntiNuclXS=0;
delete theKaonXS; theKaonXS=0;
delete theAntiNuclXS; theAntiNuclXS=nullptr;
delete theKaonXS; theKaonXS=nullptr;
}
void G4HadronInelasticQBBC::ConstructProcess()
{
if(wasActivated) return;
wasActivated = true;
if(verbose > 1) {
G4cout << "### HadronInelasticQBBC Construct Process with type <"
<< htype << ">" << G4endl;
G4cout << "### HadronInelasticQBBC Construct Process " << G4endl;
}
G4double emax = 100.*TeV;
@@ -121,7 +110,7 @@ void G4HadronInelasticQBBC::ConstructProcess()
//G4cout << "G4HadronInelasticQBBC::ConstructProcess new PRECO"<< G4endl;
// PreCompound and Evaporation models are instantiated here
G4PreCompoundModel* thePreCompound = 0;
G4PreCompoundModel* thePreCompound = nullptr;
G4HadronicInteraction* p =
G4HadronicInteractionRegistry::Instance()->FindModel("PRECO");
thePreCompound = static_cast<G4PreCompoundModel*>(p);
@@ -137,10 +126,13 @@ void G4HadronInelasticQBBC::ConstructProcess()
G4HadronicInteraction* theFTFP2 =
BuildModel(new G4FTFBuilder("FTFP",thePreCompound),0.0,emax);
G4HadronicInteraction* theBERT =
NewModel(new G4CascadeInterface(),1.0*GeV,4.0*GeV);
G4HadronicInteraction* theBERT1 =
NewModel(new G4CascadeInterface(),0.0*GeV,4.0*GeV);
G4CascadeInterface* casc = new G4CascadeInterface();
casc->usePreCompoundDeexcitation();
G4HadronicInteraction* theBERT = NewModel(casc,1.0*GeV,5.0*GeV);
casc = new G4CascadeInterface();
casc->usePreCompoundDeexcitation();
G4HadronicInteraction* theBERT1 = NewModel(casc,0.0*GeV,5.0*GeV);
//G4cout << "G4HadronInelasticQBBC::ConstructProcess new Binary"<< G4endl;
G4BinaryCascade* bic = new G4BinaryCascade(thePreCompound);
@@ -154,11 +146,11 @@ void G4HadronInelasticQBBC::ConstructProcess()
G4CrossSectionInelastic* kaonxs = new G4CrossSectionInelastic(theKaonXS);
// loop over particles
aParticleIterator->reset();
while( (*aParticleIterator)() ) {
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ) {
G4ParticleDefinition* particle = myParticleIterator->value();
G4String pname = particle->GetParticleName();
//G4ProcessManager* pmanager = particle->GetProcessManager();
if(verbose > 1) {
G4cout << "### HadronInelasticQBBC: " << pname << G4endl;
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTFP_BERT.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsFTFP_BERT.cc 101872 2016-12-02 14:02:40Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -73,9 +73,12 @@ G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(G4int)
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
@@ -93,9 +96,12 @@ G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(const G4String& name, G4bool
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
@@ -110,30 +116,56 @@ G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(const G4String& name, G4bool
void G4HadronPhysicsFTFP_BERT::CreateModels()
{
G4double minFTFP_pion = 3.0 * GeV;
G4double maxBERT_pion = 12.0 * GeV;
G4double minFTFP_kaon = 3.0 * GeV;
G4double maxBERT_kaon = 12.0 * GeV;
G4double minFTFP_proton = 3.0 * GeV;
G4double maxBERT_proton = 12.0 * GeV;
G4double minFTFP_neutron = 3.0 * GeV;
G4double maxBERT_neutron = 12.0 * GeV;
G4cout << G4endl
<< " FTFP_BERT : new threshold between BERT and FTFP is over the interval " << G4endl
<< " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
<< " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
<< " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
<< " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
<< G4endl;
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP_neutron);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(5*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT_neutron);
tpdata->thePro=new G4ProtonBuilder;
tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
tpdata->theFTFPPro->SetMinEnergy(minFTFP_proton);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(5*GeV);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT_proton);
tpdata->thePiK=new G4PiKBuilder;
tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(5*GeV);
tpdata->thePion=new G4PionBuilder;
tpdata->theFTFPPion=new G4FTFPPionBuilder(QuasiElastic);
tpdata->thePion->RegisterMe(tpdata->theFTFPPion);
tpdata->theFTFPPion->SetMinEnergy(minFTFP_pion);
tpdata->thePion->RegisterMe(tpdata->theBertiniPion=new G4BertiniPionBuilder);
tpdata->theBertiniPion->SetMaxEnergy(maxBERT_pion);
tpdata->theKaon=new G4KaonBuilder;
tpdata->theFTFPKaon=new G4FTFPKaonBuilder(QuasiElastic);
tpdata->theKaon->RegisterMe(tpdata->theFTFPKaon);
tpdata->theFTFPKaon->SetMinEnergy(minFTFP_kaon);
tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
tpdata->theBertiniKaon->SetMaxEnergy(maxBERT_kaon);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
}
G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT()
@@ -144,10 +176,14 @@ G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT()
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->thePiK;
delete tpdata->theBertiniPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePion;
delete tpdata->theBertiniPion;
delete tpdata->theFTFPPion;
delete tpdata->theKaon;
delete tpdata->theBertiniKaon;
delete tpdata->theFTFPKaon;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
delete tpdata->theFTFPPro;
@@ -181,7 +217,8 @@ void G4HadronPhysicsFTFP_BERT::ConstructProcess()
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
@@ -68,9 +68,12 @@ G4HadronPhysicsFTFP_BERT_HP::G4HadronPhysicsFTFP_BERT_HP(G4int)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, theHPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
@@ -88,9 +91,12 @@ G4HadronPhysicsFTFP_BERT_HP::G4HadronPhysicsFTFP_BERT_HP(const G4String& name, G
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, theHPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
@@ -105,25 +111,52 @@ G4HadronPhysicsFTFP_BERT_HP::G4HadronPhysicsFTFP_BERT_HP(const G4String& name, G
void G4HadronPhysicsFTFP_BERT_HP::CreateModels()
{
G4double minFTFP_pion = 3.0 * GeV;
G4double maxBERT_pion = 12.0 * GeV;
G4double minFTFP_kaon = 3.0 * GeV;
G4double maxBERT_kaon = 12.0 * GeV;
G4double minFTFP_proton = 3.0 * GeV;
G4double maxBERT_proton = 12.0 * GeV;
G4double minFTFP_neutron = 3.0 * GeV;
G4double maxBERT_neutron = 12.0 * GeV;
G4cout << G4endl
<< " FTFP_BERT_HP : new threshold between BERT and FTFP is over the interval " << G4endl
<< " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
<< " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
<< " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
<< " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
<< G4endl;
tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP_neutron);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(19.9*MeV);
tpdata->theBertiniNeutron->SetMaxEnergy(5*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT_neutron);
tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronPHPBuilder);
tpdata->thePro=new G4ProtonBuilder;
tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
tpdata->theFTFPPro->SetMinEnergy(minFTFP_proton);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(5*GeV);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT_proton);
tpdata->thePiK=new G4PiKBuilder;
tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(5*GeV);
tpdata->thePion=new G4PionBuilder;
tpdata->theFTFPPion=new G4FTFPPionBuilder(QuasiElastic);
tpdata->thePion->RegisterMe(tpdata->theFTFPPion);
tpdata->theFTFPPion->SetMinEnergy(minFTFP_pion);
tpdata->thePion->RegisterMe(tpdata->theBertiniPion=new G4BertiniPionBuilder);
tpdata->theBertiniPion->SetMaxEnergy(maxBERT_pion);
tpdata->theKaon=new G4KaonBuilder;
tpdata->theFTFPKaon=new G4FTFPKaonBuilder(QuasiElastic);
tpdata->theKaon->RegisterMe(tpdata->theFTFPKaon);
tpdata->theFTFPKaon->SetMinEnergy(minFTFP_kaon);
tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
tpdata->theBertiniKaon->SetMaxEnergy(maxBERT_kaon);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
@@ -140,9 +173,13 @@ G4HadronPhysicsFTFP_BERT_HP::~G4HadronPhysicsFTFP_BERT_HP()
delete tpdata->theFTFPNeutron;
delete tpdata->theHPNeutron;
delete tpdata->thePiK;
delete tpdata->theBertiniPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePion;
delete tpdata->theBertiniPion;
delete tpdata->theFTFPPion;
delete tpdata->theKaon;
delete tpdata->theBertiniKaon;
delete tpdata->theFTFPKaon;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
@@ -174,7 +211,8 @@ void G4HadronPhysicsFTFP_BERT_HP::ConstructProcess()
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
@@ -1,4 +1,4 @@
$Id: History 97179 2016-05-27 12:46:40Z gcosmo $
$Id: History 101029 2016-11-04 08:40:51Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,14 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
03-Nov-2016, Alberto Ribon (phys-ctor-ions-V10-02-02)
- Written first draft of the README
- G4IonINCLXXPhysics : corrected transition regions between INCLXX
and FTF, now 3 GeV/nucleon.
16-Oct-2016, Michel Maire (phys-ctor-ions-V10-02-01)
- Added README.
26-May-2016, Alberto Ribon (phys-ctor-ions-V10-02-00)
- Created G4IonPhysicsPHP.
@@ -0,0 +1,40 @@
$Id: $
-------------------------------------------------------------------
G4IonBinaryCascadePhysics
-------------------------
Inelastic ion-ion processes (for deuteron, triton, He3, alpha and
generic ion projectiles), with Glauber-Gribov cross section and
Binary Light Ion (BIC, with Precompound/de-excitation) and Fritiof (FTF)
string model (with Precompound/de-excitation) for the final state.
BIC is used for projectiles of kinetic energies below 4 GeV/nucleon, and
FTF above 2 GeV/nucleon.
G4IonINCLXXPhysics
------------------
Inelastic ion-ion processes (for deuteron, triton, He3, alpha and
generic ion projectiles), with Glauber-Gribov cross section and
INCLXX and FTFP for the final state. INCLXX is used below 3 GeV/nucleon,
and FTF above 2.9 GeV/nucleon.
G4IonPhysics
------------
Currently equivalent to G4IonBinaryCascadePhysics.
G4IonPhysicsPHP
---------------
Similar to G4IonBinaryCascadePhysics, except that ParticleHP (for both
cross sections and final states) is used below 200 MeV/n for deuteron,
triton, He3 and alpha (and BIC used above 190 MeV/n for these light ions).
G4IonQMDPhysic
--------------
Inelastic ion-ion processes (for deuteron, triton, He3, alpha and
generic ion projectiles), with Glauber-Gribov cross section and
BIC, QMD and FTFP for the final state. These three final-state models
are used in the following intervals of projectile kinetic energy:
- BIC below 110 MeV/nucleon;
- QMD between 100 and 10'000 MeV/nucleon;
- FTF above 9990 MeV/nucleon.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonINCLXXPhysics.cc 80671 2014-05-06 13:59:16Z gcosmo $
// $Id: G4IonINCLXXPhysics.cc 101029 2016-11-04 08:40:51Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -91,11 +91,11 @@ G4IonINCLXXPhysics::G4IonINCLXXPhysics(G4int ver) :
verbose(ver)
{
// INCLXX light ion maximum energy is 3.0 GeV/nucleon
emax_d = 2 * 3.0 * GeV;
emax_t = 3 * 3.0 * GeV;
emax_he3 = 3 * 3.0 * GeV;
emax_alpha = 4 * 3.0 * GeV;
emax = 18 * 3.0 * GeV;
emax_d = 3.0 * GeV;
emax_t = 3.0 * GeV;
emax_he3 = 3.0 * GeV;
emax_alpha = 3.0 * GeV;
emax = 3.0 * GeV;
emaxFTFP = 1.*TeV;
emin = 0.*MeV;
SetPhysicsType(bIons);
@@ -108,11 +108,11 @@ G4IonINCLXXPhysics::G4IonINCLXXPhysics(const G4String& name,
verbose(ver)
{
// INCLXX light ion maximum energy is 3.0 GeV/nucleon
emax_d = 2 * 3.0 * GeV;
emax_t = 3 * 3.0 * GeV;
emax_he3 = 3 * 3.0 * GeV;
emax_alpha = 4 * 3.0 * GeV;
emax = 18 * 3.0 * GeV;
emax_d = 3.0 * GeV;
emax_t = 3.0 * GeV;
emax_he3 = 3.0 * GeV;
emax_alpha = 3.0 * GeV;
emax = 3.0 * GeV;
emaxFTFP = 1.*TeV;
emin = 0.*MeV;
SetPhysicsType(bIons);
@@ -1,4 +1,4 @@
# $Id: GNUmakefile 94085 2015-11-05 15:07:50Z gcosmo $
# $Id: GNUmakefile 101161 2016-11-08 08:31:49Z gcosmo $
# ---------------------------------------------------------------------------
# GNUmakefile for physics_lists/constructors/factory library.
# Gunter Folger 10-Jan-2012.
@@ -49,6 +49,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/processes/cuts/include \
-I$(G4BASE)/processes/biasing/generic/include \
-I$(G4BASE)/processes/biasing/importance/include \
-I$(G4BASE)/processes/parameterisation/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/stopping/include \
-I$(G4BASE)/processes/hadronic/management/include \
@@ -1,4 +1,4 @@
$Id: History 95196 2016-01-29 08:26:36Z gcosmo $
$Id: History 101161 2016-11-08 08:31:49Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,43 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
07-Nov-2016, M. Verderi (phys-ctor-limiters-V10-02-08)
- restore G4FastSimulationPhysics utility.
- requires param-V10-02-01
- reintroduce granular dependence on G4parameterisation.
04-Nov-2016, M. Verderi (phys-ctor-limiters-V10-02-07)
- temporarily reverting changes related to G4FastSimulationPhysics
to complete removal of aParticleIterator.
12-October-2016 G.Folger (phys-ctor-limiters-V10-02-06)
- replace remaining direct use of aParticleIterator by GetParticleIterator().
03-Nov-2016, M. Verderi (phys-ctor-limiters-V10-02-05)
- Add G4FastSimulationPhysics to configure physics list for activating
fast simulation. It uses the G4FastSimulationHelper utility in
processes/parameterisation, introduced in param-V10-02-01.
- Granular dependence on G4parameterisation is added.
27-Oct-2016, M. Verderi (phys-ctor-limiters-V10-02-04)
- G4GenericBiasingPhysics : add methods to configure physics lists
to activate the parallel geometry functionnality introduced in
the generic biasing (proc-biasgen-V10-02-04).
- Add a README file to document the constructors (README did not look
present, despite Michel's tag, problem ?).
16-October-2016 M.Maire (phys-ctor-limiters-V10-02-03)
- add README
12-October-2016 G.Folger (phys-ctor-limiters-V10-02-02)
- replace direct use of aParticleIterator by GetParticleIterator().
fix required by clang39 on Windows and MAC
18-Jul-2016, I. Hrivnacova (phys-ctor-limiters-V10-02-01)
- G4StepLimiterPhysics:
Added an option which allows to apply the step limit to all particles
(by default the step limit is applied to charged particles only).
27-Jan-2016, M. Asai (phys-ctor-limiters-V10-02-00)
- G4ParallelWorldPhysics: change process order index of
G4ParallelWorldProcess to 9900 to make sure it is registered
@@ -0,0 +1,72 @@
contructors/limiters
--------------------
This directory contains "technical" constructors in the sense they do not
add processes with physics content but add processes or modify physics lists to
allow for step limitation in parallel geometries, biasing, etc.
G4FastSimulationPhysics:
------------------------
Constructor that modifies a given physics list to allow for fast simulation.
One, or several, G4FastSimulationManagerProcess objects are added to the
process manager of particles for which a fast simulation is requested.
The fast simulation may be associated to regions in the mass geometry, in
what case a call like fastSimPhys->ActivateFastSimulation("e-") must be
done to allow for fast simulation of electrons.
Parallel geometries can be used also in what case the geometry is specified
by its name like fastSimPhys->ActivateFastSimulation("e-","parallelGeom") to
allow for fast simulation of electrons, with fast simulation models attached
to regions in "parallelGeom".
G4GenericBiasingPhysics:
------------------------
Constructor that modifies a given physics list to allow for generic biasing.
It provides three type of functionnalities:
- wrap physics processes with G4BiasingProcessInterface processes to
make the generic biasing to control them (allowing change of
interaction law, change of final state generation).
- add G4BiasingProcessInterface processes, but without wrapping a
physics process, in what case these processes will be used for
"non-physics based biasing" : ie, spliting and killing
- add G4ParallelGeometriesLimiterProcess process (at most one per
process manager) that provides step limitation on the parallel
geometries used in generic biasing. A process can handle several
parallel geometries associated to one particle type.
Various methods are provided to activate these functionnalities per
particle, set of particles, to activate physics-based only or
non-physics-based only or both functionnalities, and to activate the
parallel geometry functionnality.
This is documented in include/G4GenericBiasingPhysics.hh .
G4ImportanceBiasing:
-------------------
G4MaxTimeCuts:
--------------
G4MinEkineCuts:
---------------
G4NeutronTrackingCut:
---------------------
G4ParallelWorldPhysics:
-----------------------
G4SpecialCuts:
--------------
G4StepLimiterPhysics:
---------------------
G4WeightWindowBiasing:
----------------------
@@ -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: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4FastSimulationPhysics_h
#define G4FastSimulationPhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
#include <vector>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4FastSimulationPhysics : public G4VPhysicsConstructor
{
public:
G4FastSimulationPhysics(const G4String& name = "FastSimP");
virtual ~G4FastSimulationPhysics();
public:
// --------------------------------------
// -- Fast simulation activation methods:
// --------------------------------------
// -- Used to select particles for which fast simulation has to be activated:
// ---- Activate fast simulation for one particle with fast simulation attached to mass geometry:
void ActivateFastSimulation(const G4String& particleName);
// ---- Activate fast simulation for one particle with fast simulation attached to a parallel geometry:
void ActivateFastSimulation(const G4String& particleName, const G4String& parallelGeometryName);
// -- Information about particles under fast simulation:
void BeVerbose() { fVerbose = true; }
public:
// This method is dummy for physics
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:
// hide assignment operator
G4FastSimulationPhysics & operator=(const G4FastSimulationPhysics &right);
G4FastSimulationPhysics(const G4FastSimulationPhysics&);
// -- Particles under fast simulation:
std::vector< G4String > fParticlesUnderFastSimulation;
// -- And their related possible parallel geometries:
std::vector< G4String > fGeometries;
// -- Report:
G4bool fVerbose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -47,6 +47,9 @@ public:
virtual ~G4GenericBiasingPhysics();
public:
// ------------------------------
// -- Biasing activation methods:
// ------------------------------
// -- Used to select particles and processes to be under biasing:
// ---- Put under biasing all physics processes of given particleName:
void PhysicsBias(const G4String& particleName);
@@ -77,6 +80,28 @@ public:
void NonPhysicsBiasAllNeutral( G4bool includeShortLived = false );
void BiasAllNeutral( G4bool includeShortLived = false );
// -------------------------------------------------------------
// -- Activation of parallel geometries used by generic biasing:
// -------------------------------------------------------------
// -- Each method can be called several times:
// -- - on a same particle type :
// -- myBiasingPhysics->AddParallelGeometry("neutron", "geometry1");
// -- myBiasingPhysics->AddParallelGeometry("neutron", "geometry2");
// -- - on a range of PDG particle:
// -- myBiasingPhysics->AddParallelGeometry(PDG1, PDG2, "geometryXX");
// -- myBiasingPhysics->AddParallelGeometry(PDG3, PDG4, vectorOfGeometries);
// -- etc.
void AddParallelGeometry( const G4String& particleName, const G4String& parallelGeometryName );
void AddParallelGeometry( const G4String& particleName, const std::vector< G4String >& parallelGeometryNames );
void AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const G4String& parallelGeometryName , G4bool includeAntiParticle = true );
void AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const std::vector< G4String >& parallelGeometryNames, G4bool includeAntiParticle = true );
void AddParallelGeometryAllCharged( const G4String& parallelGeometryName , G4bool includeShortLived = false );
void AddParallelGeometryAllCharged( const std::vector< G4String >& parallelGeometryNames, G4bool includeShortLived = false );
void AddParallelGeometryAllNeutral( const G4String& parallelGeometryName , G4bool includeShortLived = false );
void AddParallelGeometryAllNeutral( const std::vector< G4String >& parallelGeometryNames, G4bool includeShortLived = false );
// -- Information about biased particles:
void BeVerbose() { fVerbose = true; }
@@ -110,8 +135,21 @@ private:
std::vector< G4int > fNonPhysBiasByPDGRangeLow, fNonPhysBiasByPDGRangeHigh;
G4bool fPhysBiasAllCharged, fNonPhysBiasAllCharged;
G4bool fPhysBiasAllChargedISL, fNonPhysBiasAllChargedISL;
G4bool fPhysBiasAllNeutral, fNonPhysBiasAllNeutral;
G4bool fPhysBiasAllNeutral, fNonPhysBiasAllNeutral;
G4bool fPhysBiasAllNeutralISL, fNonPhysBiasAllNeutralISL;
// -- Particles associated with parallel geometries:
std::vector< G4String > fParticlesWithParallelGeometries;
std::map< G4String, std::vector< G4String > > fParallelGeometriesForParticle;
std::vector< G4int > fPDGlowParallelGeometries, fPDGhighParallelGeometries;
std::map< G4int, std::vector< G4String > > fPDGrangeParallelGeometries;
std::vector< G4String > fParallelGeometriesForCharged, fParallelGeometriesForNeutral;
std::vector< G4bool > fAllChargedParallelGeometriesISL, fAllNeutralParallelGeometriesISL;
void AssociateParallelGeometries();
// -- Report:
G4bool fVerbose;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4StepLimiterPhysics.hh 81367 2014-05-27 12:59:27Z gcosmo $
// $Id: G4StepLimiterPhysics.hh 98777 2016-08-09 14:37:59Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -57,6 +57,11 @@ public:
// registered to the process manager of each particle type
virtual void ConstructProcess();
// Option to apply the step limit to all particles
// (by default the step limit is applied to charged particles only)
void SetApplyToAll(G4bool option) { fApplyToAll= option; }
G4bool GetApplyToAll() const { return fApplyToAll; }
private:
// hide assignment operator
@@ -65,7 +70,7 @@ private:
G4StepLimiter* fStepLimiter;
G4UserSpecialCuts* fUserSpecialCuts;
G4bool fApplyToAll;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -11,7 +11,7 @@
#
# Generated on : 10/01/2013
#
# $Id: sources.cmake 94085 2015-11-05 15:07:50Z gcosmo $
# $Id: sources.cmake 101161 2016-11-08 08:31:49Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -49,6 +49,7 @@ include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/scoring/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/biasing/generic/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/biasing/importance/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/parameterisation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/stopping/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
@@ -92,6 +93,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_limiters
G4ImportanceBiasing.hh
G4WeightWindowBiasing.hh
G4GenericBiasingPhysics.hh
G4FastSimulationPhysics.hh
G4MaxTimeCuts.hh
G4MinEkineCuts.hh
G4NeutronTrackingCut.hh
@@ -102,6 +104,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_limiters
G4ImportanceBiasing.cc
G4WeightWindowBiasing.cc
G4GenericBiasingPhysics.cc
G4FastSimulationPhysics.cc
G4MaxTimeCuts.cc
G4MinEkineCuts.cc
G4NeutronTrackingCut.cc
@@ -114,6 +117,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_limiters
G4cuts
G4scoring
G4biasing
G4parameterisation
G4decay
G4digits
G4emhighenergy
@@ -0,0 +1,159 @@
//
// ********************************************************************
// * 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$
//
//---------------------------------------------------------------------------
//
// ClassName: G4FastSimulationPhysics
//
// Author: M. Verderi (Nov.03.2016)
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4FastSimulationPhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4FastSimulationHelper.hh"
#include "G4FastSimulationManagerProcess.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4FastSimulationPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4FastSimulationPhysics::G4FastSimulationPhysics(const G4String& name)
: G4VPhysicsConstructor(name),
fVerbose(false)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4FastSimulationPhysics::~G4FastSimulationPhysics()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4FastSimulationPhysics::ActivateFastSimulation(const G4String& particleName)
{
fParticlesUnderFastSimulation.push_back(particleName);
fGeometries .push_back("");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4FastSimulationPhysics::ActivateFastSimulation(const G4String& particleName, const G4String& parallelGeometryName)
{
fParticlesUnderFastSimulation.push_back(particleName);
fGeometries .push_back(parallelGeometryName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4FastSimulationPhysics::ConstructParticle()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4FastSimulationPhysics::ConstructProcess()
{
auto myParticleIterator = GetParticleIterator();
myParticleIterator->reset();
while ( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager* pmanager = particle->GetProcessManager();
// -- include fast simulation manager process interface:
auto itr = std::find( fParticlesUnderFastSimulation.begin(),
fParticlesUnderFastSimulation.end(),
particleName );
if ( itr != fParticlesUnderFastSimulation.end() )
{
size_t ipos = itr - fParticlesUnderFastSimulation.begin();
G4String geometry = fGeometries[ipos];
if ( geometry == "" ) G4FastSimulationHelper::ActivateFastSimulation(pmanager);
else G4FastSimulationHelper::ActivateFastSimulation(pmanager, geometry);
}
}
// -- tells what is done:
if ( fVerbose )
{
// -- print:
myParticleIterator->reset();
while ( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4bool isUnderFastSimulation(false);
G4String processAndGeometryNames;
G4int icount(0);
G4ProcessVector* vprocess = pmanager->GetProcessList();
for (G4int ip = 0 ; ip < vprocess->size() ; ip++)
{
G4VProcess* process = (*vprocess)[ip];
G4FastSimulationManagerProcess* pb = dynamic_cast< G4FastSimulationManagerProcess* >(process);
if ( pb != nullptr )
{
isUnderFastSimulation = true;
if ( icount < 3 )
{
processAndGeometryNames += pb->GetProcessName();
processAndGeometryNames += "[geom:";
processAndGeometryNames += pb->GetWorldVolume()->GetName();
processAndGeometryNames += "] ";
}
else
{
processAndGeometryNames += "\n ";
processAndGeometryNames += pb->GetProcessName();
processAndGeometryNames += "[geom:";
processAndGeometryNames += pb->GetWorldVolume()->GetName();
processAndGeometryNames += "] ";
icount = 0;
}
}
}
if ( isUnderFastSimulation ) G4cout << std::setw(14) << particleName << " : " << processAndGeometryNames << G4endl;
}
}
}
@@ -47,6 +47,8 @@
#include "G4BiasingHelper.hh"
#include "G4BiasingProcessInterface.hh"
#include "G4ParallelGeometriesLimiterProcess.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -183,6 +185,122 @@ void G4GenericBiasingPhysics::BiasAllNeutral( G4bool includeShortLived )
}
void G4GenericBiasingPhysics::AddParallelGeometry( const G4String& particleName, const G4String& parallelGeometryName )
{
// -- add particle, caring of possible duplication:
G4bool isKnown = false;
for ( G4String knownParticle : fParticlesWithParallelGeometries )
{
if ( knownParticle == particleName )
{
isKnown = true;
break;
}
}
// -- add the geometry, caring for possible duplication of this geometry, for this particle:
if ( !isKnown ) fParticlesWithParallelGeometries.push_back( particleName );
std::vector< G4String >& geometries = fParallelGeometriesForParticle[particleName];
isKnown = false;
for ( G4String knownGeometry : geometries )
{
if ( knownGeometry == parallelGeometryName )
{
isKnown = true;
break;
}
}
if ( !isKnown ) geometries.push_back( parallelGeometryName );
}
void G4GenericBiasingPhysics::AddParallelGeometry( const G4String& particleName, const std::vector< G4String >& parallelGeometryNames )
{
for ( G4String geometry : parallelGeometryNames ) AddParallelGeometry( particleName, geometry );
}
void G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const G4String& parallelGeometryName , G4bool includeAntiParticle )
{
if ( PDGlow > PDGhigh )
{
G4cout << "G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const G4String& parallelGeometryName , G4bool includeAntiParticle = true ), PDGlow > PDGhigh : call ignored" << G4endl;
return;
}
fPDGlowParallelGeometries .push_back( PDGlow );
fPDGhighParallelGeometries.push_back( PDGhigh );
G4int rangeIndex = fPDGlowParallelGeometries.size() - 1;
fPDGrangeParallelGeometries[rangeIndex].push_back( parallelGeometryName );
if ( includeAntiParticle )
{
fPDGlowParallelGeometries .push_back( -PDGhigh );
fPDGhighParallelGeometries.push_back( -PDGlow );
rangeIndex = fPDGlowParallelGeometries.size() - 1;
fPDGrangeParallelGeometries[rangeIndex].push_back( parallelGeometryName );
}
}
void G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const std::vector< G4String >& parallelGeometryNames, G4bool includeAntiParticle )
{
if ( PDGlow > PDGhigh )
{
G4cout << "G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const std::vector< G4String >& parallelGeometryNames, G4bool includeAntiParticle = true ), PDGlow > PDGhigh : call ignored" << G4endl;
return;
}
for ( G4String geometry : parallelGeometryNames ) AddParallelGeometry( PDGlow, PDGhigh, geometry, includeAntiParticle );
}
void G4GenericBiasingPhysics::AddParallelGeometryAllCharged( const G4String& parallelGeometryName , G4bool includeShortLived )
{
G4bool isKnown = false;
for ( G4String geometry : fParallelGeometriesForCharged )
{
if ( geometry == parallelGeometryName )
{
isKnown = true;
break;
}
}
if ( !isKnown )
{
fParallelGeometriesForCharged .push_back( parallelGeometryName );
fAllChargedParallelGeometriesISL.push_back( includeShortLived );
}
}
void G4GenericBiasingPhysics::AddParallelGeometryAllCharged( const std::vector< G4String >& parallelGeometryNames, G4bool includeShortLived )
{
for ( G4String geometry : parallelGeometryNames ) AddParallelGeometryAllCharged( geometry, includeShortLived );
}
void G4GenericBiasingPhysics::AddParallelGeometryAllNeutral( const G4String& parallelGeometryName , G4bool includeShortLived )
{
G4bool isKnown = false;
for ( G4String geometry : fParallelGeometriesForNeutral )
{
if ( geometry == parallelGeometryName )
{
isKnown = true;
break;
}
}
if ( !isKnown )
{
fParallelGeometriesForNeutral .push_back( parallelGeometryName );
fAllNeutralParallelGeometriesISL.push_back( includeShortLived );
}
}
void G4GenericBiasingPhysics::AddParallelGeometryAllNeutral( const std::vector< G4String >& parallelGeometryNames, G4bool includeShortLived )
{
for ( G4String geometry : parallelGeometryNames ) AddParallelGeometryAllNeutral( geometry, includeShortLived );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -195,11 +313,12 @@ void G4GenericBiasingPhysics::ConstructProcess()
{
// -- bias setup per individual particle name:
aParticleIterator->reset();
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*aParticleIterator)() )
while( (*particleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = particleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager* pmanager = particle->GetProcessManager();
@@ -246,11 +365,11 @@ void G4GenericBiasingPhysics::ConstructProcess()
// -- bias setup per group:
aParticleIterator->reset();
particleIterator->reset();
while( (*aParticleIterator)() )
while( (*particleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = particleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager* pmanager = particle->GetProcessManager();
@@ -325,15 +444,20 @@ void G4GenericBiasingPhysics::ConstructProcess()
}
// -- Associate parallel geometries:
AssociateParallelGeometries();
// -- tells what is done:
if ( fVerbose )
{
// -- print:
aParticleIterator->reset();
particleIterator->reset();
while( (*aParticleIterator)() )
while( (*particleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = particleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager* pmanager = particle->GetProcessManager();
@@ -375,3 +499,76 @@ void G4GenericBiasingPhysics::ConstructProcess()
}
}
void G4GenericBiasingPhysics::AssociateParallelGeometries()
{
// -- parallel geometries for individual particles:
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*particleIterator)() )
{
G4ParticleDefinition* particle = particleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4bool requested = false;
for ( G4String requestedParticles : fParticlesWithParallelGeometries )
{
if ( requestedParticles == particleName )
{
requested = true;
break;
}
}
if ( requested )
{
// -- insert biasing process for handling parallel geometries:
G4ParallelGeometriesLimiterProcess* limiter = G4BiasingHelper::AddLimiterProcess(pmanager);
// -- attach the requested worlds to this process:
std::vector< G4String >& parallelWorlds = fParallelGeometriesForParticle[ particleName ];
for ( G4String world : parallelWorlds ) limiter->AddParallelWorld( world );
}
}
// -- parallel geometries for particles in PDG ranges:
G4int i = 0; // -- index for PDG range
for ( G4int PDGlow : fPDGlowParallelGeometries )
{
G4int PDGhigh = fPDGhighParallelGeometries[i];
auto & geometries = fPDGrangeParallelGeometries[i];
particleIterator->reset();
while( (*particleIterator)() )
{
G4ParticleDefinition* particle = particleIterator->value();
G4int particlePDG = particle->GetPDGEncoding();
G4ProcessManager* pmanager = particle->GetProcessManager();
if ( ( particlePDG >= PDGlow ) && ( particlePDG <= PDGhigh ) )
{
// -- §§ exclude particles from individual list ?
// -- insert biasing process for handling parallel geometries:
G4ParallelGeometriesLimiterProcess* limiter = G4BiasingHelper::AddLimiterProcess(pmanager);
// -- attached the requested worlds to this process:
for ( auto geometry : geometries ) limiter->AddParallelWorld( geometry );
}
}
// -- increment index for next PDG range:
i++;
}
// -- parallel geometries for all charged particles:
}
@@ -82,9 +82,10 @@ void G4ParallelWorldPhysics::ConstructProcess()
theParallelWorldProcess->SetParallelWorld(namePhysics);
theParallelWorldProcess->SetLayeredMaterialFlag(fLayeredMass);
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddProcess(theParallelWorldProcess);
if(theParallelWorldProcess->IsAtRestRequired(particle))
@@ -55,7 +55,8 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4StepLimiterPhysics::G4StepLimiterPhysics(const G4String& name)
: G4VPhysicsConstructor(name),fStepLimiter(0),fUserSpecialCuts(0)
: G4VPhysicsConstructor(name),fStepLimiter(0),fUserSpecialCuts(0),
fApplyToAll(false)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -75,24 +76,25 @@ void G4StepLimiterPhysics::ConstructParticle()
void G4StepLimiterPhysics::ConstructProcess()
{
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
fStepLimiter = new G4StepLimiter();
fUserSpecialCuts = new G4UserSpecialCuts();
while ((*aParticleIterator)()) {
G4ParticleDefinition* particle = aParticleIterator->value();
while ((*myParticleIterator)()) {
G4ParticleDefinition* particle = myParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4double charge = particle->GetPDGCharge();
if(!particle->IsShortLived()) {
if (charge != 0.0) {
// All charged particles should have a step limiter
// to make sure that the steps do not get too long.
pmanager->AddDiscreteProcess(fStepLimiter);
pmanager->AddDiscreteProcess(fUserSpecialCuts);
if (charge != 0.0 || fApplyToAll) {
// All charged particles should have a step limiter
// to make sure that the steps do not get too long.
pmanager->AddDiscreteProcess(fStepLimiter);
pmanager->AddDiscreteProcess(fUserSpecialCuts);
} else {
// Energy cuts for all other neutral particles
pmanager->AddDiscreteProcess(fUserSpecialCuts);
// Energy cuts for all other neutral particles
pmanager->AddDiscreteProcess(fUserSpecialCuts);
}
}
}
@@ -1,4 +1,4 @@
$Id: History 94081 2015-11-05 15:05:33Z gcosmo $
$Id: History 101034 2016-11-04 08:47:07Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,15 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
03-Nov-2016, Alberto Ribon (phys-ctor-stopping-V10-02-02)
- Written first draft of the README
16-October-2016, Michel Maire (phys-ctor-stopping-V10-02-01)
- add README
11-Oct-2016, Gunter Folger (phys-ctor-stopping-V10-02-00)
- replace direct use of aParticleIterator by GetParticleIterator().
05-Nov-2015, Alberto Ribon (phys-ctor-stopping-V10-01-00)
- Replaced neutron_hp/ with particle_hp/
@@ -0,0 +1,14 @@
$Id: $
-------------------------------------------------------------------
G4StoppingPhysics
-----------------
It uses Bertini/Precompound (i.e. Bertini followed by the official
Precompound/deexcitation of Geant4, not the internal one of Bertini)
for nuclear capture of: pi-, K-, Sigma-, Xi- and Omega-.
It uses Fritiof/Precompound model for nuclear capture of: anti_proton,
anti_Sigma+, anti_deuteron, anti_triton, anti_He3 and anti_alpha.
For mu-, Bertini model is used for nuclear capture, together with
default element selector, EM cascade sampling and bound decay sampling.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4StoppingPhysics.cc 71041 2013-06-10 09:27:06Z gcosmo $
// $Id: G4StoppingPhysics.cc 99939 2016-10-12 08:08:23Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -127,11 +127,12 @@ void G4StoppingPhysics::ConstructProcess() {
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
aParticleIterator->reset();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while ( (*aParticleIterator)() ) {
while ( (*myParticleIterator)() ) {
particle = aParticleIterator->value();
particle = myParticleIterator->value();
pmanager = particle->GetProcessManager();
if ( particle == G4MuonMinus::MuonMinus() ) {