Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -1,4 +1,4 @@
$Id: History 104632 2017-06-08 13:51:09Z gcosmo $
$Id: History 107333 2017-11-08 16:44:56Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,25 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
07-Nov-2017, Vladimir Ivanchenko (phys-ctor-decay-V10-03-08)
- G4RadioactiveDecayPhysics - enable AugerCascade
23-Oct-2017 K.L. Genser (phys-ctor-decay-V10-03-07)
- G4MuonicAtomDecayPhysics fixed verbosity
19-Oct-2017, Vladimir Ivanchenko (phys-ctor-decay-V10-03-06)
- G4RadioactiveDecayPhysics - defined new set of default parameters:
disable correlated gamma, enable only X-ray emission for atomic
de-excitation, internal conversion sampling in nuclear de-excitation
is left fully enabled
12-September-2017 K.L. Genser (phys-ctor-decay-V10-03-05)
- G4MuonicAtomDecayPhysics use new G4MuonicAtomDecay
05-Jul-2017, Vladimir Ivanchenko (phys-ctor-decay-V10-03-04)
29-May-2017, Vladimir Ivanchenko (phys-ctor-decay-V10-03-03)
- G4RadioactiveDecayPhysics - enable correlated gamma simulation by default
27-Feb-2017, Vladimir Ivanchenko (phys-ctor-decay-V10-03-02)
- G4RadioactiveDecayPhysics - set time limit for the de-excitation module
the same as in G4NuclideTable, so only states from this table will
@@ -36,8 +36,8 @@
class G4MuonicAtomDecayPhysics : public G4VPhysicsConstructor
{
public:
G4MuonicAtomDecayPhysics(G4int verbose =1);
G4MuonicAtomDecayPhysics(const G4String& name);
explicit G4MuonicAtomDecayPhysics(G4int verbose = 0);
explicit G4MuonicAtomDecayPhysics(const G4String& name);
virtual ~G4MuonicAtomDecayPhysics();
public:
@@ -23,13 +23,19 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation
// June 2017 K.L. Genser, K. Lynch
//
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuonicAtomDecayPhysics.hh"
#include "G4GenericMuonicAtom.hh"
#include "G4MuonicAtomDecay.hh"
#include "G4GenericIon.hh"
#include "globals.hh"
#include "G4PhysicsListHelper.hh"
@@ -41,16 +47,27 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4MuonicAtomDecayPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MuonicAtomDecayPhysics::G4MuonicAtomDecayPhysics(G4int)
: G4VPhysicsConstructor("G4MuonicAtomDecay")
G4MuonicAtomDecayPhysics::G4MuonicAtomDecayPhysics(G4int vL)
: G4VPhysicsConstructor("G4MuonicAtomDecay")
{
G4cout << "G4MuonicAtomDecayPhysics()\n";
SetVerboseLevel(vL);
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cout << "G4MuonicAtomDecayPhysics() with verboseLevel "
<< verboseLevel << G4endl;
}
#endif
}
G4MuonicAtomDecayPhysics::G4MuonicAtomDecayPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
G4cout << "G4MuonicAtomDecayPhysics()\n";
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cout << "G4MuonicAtomDecayPhysics() with verboseLevel "
<< verboseLevel << " and name " << name << G4endl;
}
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -63,17 +80,35 @@ G4MuonicAtomDecayPhysics::~G4MuonicAtomDecayPhysics()
void G4MuonicAtomDecayPhysics::ConstructParticle()
{
G4cout << "G4MuonicAtomDecayPhysics::ConstructParticle()\n";
G4GenericIon::GenericIon();
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cout << "G4MuonicAtomDecayPhysics::ConstructParticle()" << G4endl;
}
#endif
G4GenericMuonicAtom::GenericMuonicAtom();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuonicAtomDecayPhysics::ConstructProcess()
{
G4cout << "G4MuonicAtomDecayPhysics::ConstructProcess()\n";
G4PhysicsListHelper::GetPhysicsListHelper()->
RegisterProcess(new G4MuonicAtomDecay(), G4GenericIon::GenericIon());
G4PhysicsListHelper* plh = G4PhysicsListHelper::GetPhysicsListHelper();
G4int plhvl = plh->GetVerboseLevel();
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cout << "G4MuonicAtomDecayPhysics::ConstructProcess() verboseLevel "
<< GetVerboseLevel() << " to be set to " << plhvl << G4endl;
}
#endif
G4bool rc1 = plh->
RegisterProcess(new G4MuonicAtomDecay(nullptr), // default G4HadronicInteraction* will be set
G4GenericMuonicAtom::GenericMuonicAtom());
plh->SetVerboseLevel(plhvl);
if (!(rc1)) {
G4cout << " G4MuonicAtomDecayPhysics::ConstructProcess() : "
<< " RegisterProcess failed for G4GenericMuonicAtom "
<< G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,19 +45,14 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4RadioactiveDecayPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(G4int)
: G4VPhysicsConstructor("G4RadioactiveDecay")//, theRadioactiveDecay(0)
: G4VPhysicsConstructor("G4RadioactiveDecay")
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetAugerCascade(true);
param->AddPhysics("world","G4RadioactiveDecay");
G4EmParameters::Instance()->SetAugerCascade(true);
G4DeexPrecoParameters* deex = G4NuclearLevelData::GetInstance()->GetParameters();
deex->SetUseFilesNEW(true);
deex->SetStoreAllLevels(true);
deex->SetStoreICLevelData(true);
deex->SetMaxLifeTime(G4NuclideTable::GetInstance()->GetThresholdOfHalfLife()
/std::log(2.));
}
@@ -69,9 +64,7 @@ G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(const G4String&)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4RadioactiveDecayPhysics::~G4RadioactiveDecayPhysics()
{
//delete theRadioactiveDecay;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -87,6 +80,7 @@ void G4RadioactiveDecayPhysics::ConstructProcess()
G4LossTableManager* man = G4LossTableManager::Instance();
G4VAtomDeexcitation* ad = man->AtomDeexcitation();
if(!ad) {
G4EmParameters::Instance()->SetAugerCascade(true);
ad = new G4UAtomicDeexcitation();
man->SetAtomDeexcitation(ad);
ad->InitialiseAtomicDeexcitation();
@@ -1,4 +1,4 @@
$Id: History 104571 2017-06-06 13:45:47Z gcosmo $
$Id: History 107332 2017-11-08 16:44:06Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,78 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
07-November-2017 V.Ivanchenko (phys-ctor-em-V10-03-37)
- G4EmStandardPhysics_option4 - enable Auger cascade
03-November-2017 V.Ivanchenko (phys-ctor-em-V10-03-36)
- G4EmStandardPhysics, G4EmStandardPhysics_option1,
G4EmStandardPhysics_option2 - use defalt (one of 9.6) Urban msc
lateral displacemet algorithm for e+-
- G4EmStandardPhysics_option3, G4EmLowEPPhysics, G4EmPenelopePhysics,
G4EmLivermorePhysics, G4EmLivermorePolarizedPhysics - use new
Urban lateral displacement algorithm
30-October-2017 M.Novak (phys-ctor-em-V10-03-35)
- G4EmStandardPhysicsGS, G4EmStandardPhysics_option4
- default HEP settings of the GS physics constructor
- follow-up modification in opt4 according to recent (emstand-V10-03-45)
changes in the GS msc model
28-October-2017 V.Ivanchenko (phys-ctor-em-V10-03-34)
- G4EmDNAModelActivator - fixed for hydrogen
25-October-2017 V.Ivanchenko (phys-ctor-em-V10-03-33)
- G4EmDNAModelActivator - fixed for generic ions
- G4EmStandardPhysics_option4 - use different G4NuclearStopping
instance for G4GenericIon and other baryons
12-October-2017 V.Ivanchenko (phys-ctor-em-V10-03-32)
- G4EmDNAModelActivator - fixed for helium ions
11-October-2017 V.Ivanchenko (phys-ctor-em-V10-03-31)
- G4EmDNAModelActivator - fixed configuration of helium and Generic ions
- G4EmStandardPhysics, G4EmStandardPhysics_option1,
G4EmStandardPhysics_option2 - use new parameter SetLateralDisplacementAlg96
22-September-2017 M.Novak (phys-ctor-em-V10-03-30)
- G4EmStandardPhysics_option4 - change msc model for e-/e+ below
100 MeV from Urban + UseDistanceToBoundary stepping to
GS + Mott-correction + error-free stepping.
16-September-2017 V.Ivanchenko (phys-ctor-em-V10-03-29)
- G4EmStandard_option3 - use default Urban model of fluctuations
24-August-2017 M.Novak (phys-ctor-em-V10-03-27)
- G4EmStandardPhysicsGS - use the most accurate settings for the GS
MSC model (error-free stepping and Mott-correction) for testing.
24-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-26)
- G4EmModelActivator - allow to use both "PAIphoton" and "pai_photon"
names when activating PAIphoton model
- G4EmLivermorePolarizedPhysics - use upper limit 100 TeV, do not apply
high energy limit 1 GeV to gamma processes
- G4EmLivermorePhysics, G4EmPenelopePhysics - cleanup
10-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-25)
05-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-23)
- all DNA physics constructors use gamma configuration as in
Livermore, fixed usage of SetEmModel() and AddEmModel()
04-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-22)
04-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-21)
- all EM physics constructors now does not share multiple and single
scattering processes between proton and anti_proton
03-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-20)
03-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-17)
- all EM physics constructors now use G4EmParticleList
- G4EmDNAPhysicsActivator - coherently initialise models
02-August-2017 V.Ivanchenko (phys-ctor-em-V10-03-16)
29-July-2017 V.Ivanchenko (phys-ctor-em-V10-03-13)
- G4EmDNAPhysicsActivator - apply solatation model below 7.4 eV
(was 4 eV) in order to absorb low-energy e-; general cleanup
06-June-2017 V.Ivanchenko (phys-ctor-em-V10-03-12)
- G4EmStandardPhysics_option3 - use G4UniversalFluctuation2017
for energy loss fluctuation of e+-, protons, anti_protons
@@ -55,16 +55,14 @@ private:
G4bool emsc, G4double elowest, G4double elimel);
void AddProtonModels0(const G4String& region, G4bool pmsc,
G4double elimel, G4double pminbb,
G4double pmin, G4double pmax);
G4double elimel, G4double pminbb, G4double pmax);
void AddHeliumModels0(const G4String& region, G4bool a1msc, G4bool a2msc,
G4double elimel, G4double pminbb,
G4double pmin, G4double pmax);
G4double elimel, G4double pminbb, G4double pmax);
void AddGenericIonModels0(const G4String& region, G4bool imsc,
G4double elimel, G4double pminbb,
G4double pmin);
void AddGenericIonModels0(const G4String& region, G4double pminbb);
void DeactivateNuclearStopping(G4ProcessManager*, G4double elimel);
G4bool HasMsc(G4ProcessManager*) const;
@@ -23,12 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmLivermorePhysics.hh 105735 2017-08-16 12:59:43Z gcosmo $
#ifndef G4EmLivermorePhysics_h
#define G4EmLivermorePhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,6 +47,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,12 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePolarizedPhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmLivermorePolarizedPhysics.hh 105735 2017-08-16 12:59:43Z gcosmo $
#ifndef G4EmLivermorePolarizedPhysics_h
#define G4EmLivermorePolarizedPhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,6 +47,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -28,6 +28,7 @@
#define G4EmLowEPPhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,6 +46,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,12 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmPenelopePhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmPenelopePhysics.hh 105735 2017-08-16 12:59:43Z gcosmo $
#ifndef G4EmPenelopePhysics_h
#define G4EmPenelopePhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,6 +47,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmStandardPhysics.hh 105735 2017-08-16 12:59:43Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -45,6 +45,7 @@
#define G4EmStandardPhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -62,6 +63,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,6 +45,7 @@
#define G4EmStandardPhysicsGS_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -62,6 +63,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,6 +43,7 @@
#define G4EmStandardPhysicsSS_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -60,6 +61,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,6 +46,7 @@
#define G4EmStandardPhysicsWVI_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -63,6 +64,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option1.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmStandardPhysics_option1.hh 105735 2017-08-16 12:59:43Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -47,6 +47,7 @@
#define G4EmStandardPhysics_option1_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -64,6 +65,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics_option2.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmStandardPhysics_option2.hh 105735 2017-08-16 12:59:43Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -48,6 +48,7 @@
#define G4EmStandardPhysics_option2_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -65,6 +66,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics_option3.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmStandardPhysics_option3.hh 105735 2017-08-16 12:59:43Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -45,6 +45,7 @@
#define G4EmStandardPhysics_option3_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -62,6 +63,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EmStandardPhysics_option4.hh 98736 2016-08-09 10:55:12Z gcosmo $
// $Id: G4EmStandardPhysics_option4.hh 105735 2017-08-16 12:59:43Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -46,6 +46,7 @@
#define G4EmStandardPhysics_option4_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4EmParticleList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -63,6 +64,7 @@ public:
private:
G4int verbose;
G4EmParticleList partList;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmDNAPhysics.cc 102173 2017-01-09 13:19:42Z gcosmo $
// $Id: G4EmDNAPhysics.cc 105735 2017-08-16 12:59:43Z gcosmo $
// add elastic scattering processes of proton, hydrogen, helium, alpha+, alpha++
#include "G4EmDNAPhysics.hh"
@@ -238,8 +238,6 @@ void G4EmDNAPhysics::ConstructProcess()
// e+
else if (particleName == "e+") {
// Identical to G4EmStandardPhysics_option3
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetStepLimitType(fUseDistanceToBoundary);
@@ -253,38 +251,26 @@ void G4EmDNAPhysics::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
// Warning : end of particles and processes are needed by EM Physics builders
}
// Warning : end of particles and processes are needed by EM Physics builders
}
// Deexcitation
@@ -55,6 +55,7 @@
#include "G4BraggIonModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4UrbanMscModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4MollerBhabhaModel.hh"
#include "G4IonFluctuations.hh"
#include "G4UniversalFluctuation.hh"
@@ -62,7 +63,8 @@
#include "G4hMultipleScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4IonCoulombScatteringModel.hh"
#include "G4ionIonisation.hh"
#include "G4hIonisation.hh"
#include "G4ICRU49NuclearStoppingModel.hh"
// Processes and models for Geant4-DNA
#include "G4DNAGenericIonsManager.hh"
@@ -123,10 +125,10 @@ void G4EmDNAPhysicsActivator::ConstructParticle()
G4Proton::Proton();
G4GenericIon::GenericIonDefinition();
G4Alpha::Alpha();
G4DNAGenericIonsManager * genericIonsManager;
genericIonsManager=G4DNAGenericIonsManager::Instance();
genericIonsManager->GetIon("alpha++");
genericIonsManager->GetIon("alpha+");
genericIonsManager->GetIon("helium");
genericIonsManager->GetIon("hydrogen");
@@ -149,8 +151,7 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
}
const std::vector<G4String>& typesDNA = theParameters->TypesDNA();
if(IsVerbose())
{
if(IsVerbose()) {
G4cout << "### G4EmDNAPhysicsActivator::ConstructProcess for " << nreg
<< " regions; DNA physics type " << typesDNA[0] << G4endl;
}
@@ -175,164 +176,167 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
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);
ph->RegisterProcess(new G4hIonisation(), alpha11);
G4bool emsc = HasMsc(eman);
G4bool pmsc = HasMsc(pman);
G4bool a2msc = HasMsc(a2man);
G4bool a1msc = HasMsc(a1man);
// G4bool imsc = HasMsc(iman);
// processes are defined with dummy models for the world
// elastic scatetring
G4DNAElastic* theDNAeElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
theDNAeElasticProcess->AddEmModel(0, new G4DummyModel());
theDNAeElasticProcess->SetEmModel(new G4DummyModel());
eman->AddDiscreteProcess(theDNAeElasticProcess);
G4DNAElastic* theDNApElasticProcess = new G4DNAElastic("proton_G4DNAElastic");
theDNApElasticProcess->AddEmModel(0, new G4DummyModel());
G4DNAElastic* theDNApElasticProcess =
new G4DNAElastic("proton_G4DNAElastic");
theDNApElasticProcess->SetEmModel(new G4DummyModel());
pman->AddDiscreteProcess(theDNApElasticProcess);
G4DNAElastic* theDNAa2ElasticProcess = new G4DNAElastic("alpha_G4DNAElastic");
theDNAa2ElasticProcess->AddEmModel(0, new G4DummyModel());
G4DNAElastic* theDNAa2ElasticProcess =
new G4DNAElastic("alpha_G4DNAElastic");
theDNAa2ElasticProcess->SetEmModel(new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2ElasticProcess);
G4DNAElastic* theDNAa1ElasticProcess =
new G4DNAElastic("alpha+_G4DNAElastic");
theDNAa1ElasticProcess->AddEmModel(0, new G4DummyModel());
theDNAa1ElasticProcess->SetEmModel(new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ElasticProcess);
G4DNAElastic* theDNAa0ElasticProcess =
new G4DNAElastic("helium_G4DNAElastic");
theDNAa0ElasticProcess->AddEmModel(0, new G4DummyModel());
theDNAa0ElasticProcess->SetEmModel(new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0ElasticProcess);
G4DNAElastic* theDNAh0ElasticProcess =
new G4DNAElastic("hydrogen_G4DNAElastic");
theDNAh0ElasticProcess->AddEmModel(0, new G4DummyModel());
theDNAh0ElasticProcess->SetEmModel(new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0ElasticProcess);
// excitation
G4DNAExcitation* theDNAeExcProcess =
new G4DNAExcitation("e-_G4DNAExcitation");
theDNAeExcProcess->AddEmModel(0, new G4DummyModel());
theDNAeExcProcess->SetEmModel(new G4DummyModel());
eman->AddDiscreteProcess(theDNAeExcProcess);
G4DNAExcitation* theDNApExcProcess =
new G4DNAExcitation("proton_G4DNAExcitation");
theDNApExcProcess->AddEmModel(0, new G4DummyModel());
theDNApExcProcess->SetEmModel(new G4DummyModel());
pman->AddDiscreteProcess(theDNApExcProcess);
G4DNAExcitation* theDNAa2ExcProcess =
new G4DNAExcitation("alpha_G4DNAExcitation");
theDNAa2ExcProcess->AddEmModel(0, new G4DummyModel());
theDNAa2ExcProcess->SetEmModel(new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2ExcProcess);
G4DNAExcitation* theDNAa1ExcProcess =
new G4DNAExcitation("alpha+_G4DNAExcitation");
theDNAa1ExcProcess->AddEmModel(0, new G4DummyModel());
theDNAa1ExcProcess->SetEmModel(new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ExcProcess);
G4DNAExcitation* theDNAa0ExcProcess =
new G4DNAExcitation("helium_G4DNAExcitation");
theDNAa0ExcProcess->AddEmModel(0, new G4DummyModel());
theDNAa0ExcProcess->SetEmModel(new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0ExcProcess);
G4DNAExcitation* theDNAh0ExcProcess =
new G4DNAExcitation("hydrogen_G4DNAExcitation");
theDNAh0ExcProcess->AddEmModel(0, new G4DummyModel());
theDNAh0ExcProcess->SetEmModel(new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0ExcProcess);
// vibration excitation
G4DNAVibExcitation* theDNAeVibExcProcess =
new G4DNAVibExcitation("e-_G4DNAVibExcitation");
theDNAeVibExcProcess->AddEmModel(0, new G4DummyModel());
theDNAeVibExcProcess->SetEmModel(new G4DummyModel());
eman->AddDiscreteProcess(theDNAeVibExcProcess);
// ionisation
G4DNAIonisation* theDNAeIoniProcess =
new G4DNAIonisation("e-_G4DNAIonisation");
theDNAeIoniProcess->AddEmModel(0, new G4DummyModel());
theDNAeIoniProcess->SetEmModel(new G4DummyModel());
eman->AddDiscreteProcess(theDNAeIoniProcess);
G4DNAIonisation* theDNApIoniProcess =
new G4DNAIonisation("proton_G4DNAIonisation");
theDNApIoniProcess->AddEmModel(0, new G4DummyModel());
theDNApIoniProcess->SetEmModel(new G4DummyModel());
pman->AddDiscreteProcess(theDNApIoniProcess);
G4DNAIonisation* theDNAa2IoniProcess =
new G4DNAIonisation("alpha_G4DNAIonisation");
theDNAa2IoniProcess->AddEmModel(0, new G4DummyModel());
theDNAa2IoniProcess->SetEmModel(new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2IoniProcess);
G4DNAIonisation* theDNAa1IoniProcess =
new G4DNAIonisation("alpha+_G4DNAIonisation");
theDNAa1IoniProcess->AddEmModel(0, new G4DummyModel());
theDNAa1IoniProcess->SetEmModel(new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1IoniProcess);
G4DNAIonisation* theDNAa0IoniProcess =
new G4DNAIonisation("helium_G4DNAIonisation");
theDNAa0IoniProcess->AddEmModel(0, new G4DummyModel());
theDNAa0IoniProcess->SetEmModel(new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0IoniProcess);
G4DNAIonisation* theDNAh0IoniProcess =
new G4DNAIonisation("hydrogen_G4DNAIonisation");
theDNAh0IoniProcess->AddEmModel(0, new G4DummyModel());
theDNAh0IoniProcess->SetEmModel(new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0IoniProcess);
G4DNAIonisation* theDNAiIoniProcess =
new G4DNAIonisation("GenericIon_G4DNAIonisation");
theDNAiIoniProcess->AddEmModel(0, new G4DummyModel());
theDNAiIoniProcess->SetEmModel(new G4DummyModel());
iman->AddDiscreteProcess(theDNAiIoniProcess);
// attachment
G4DNAAttachment* theDNAAttachProcess =
new G4DNAAttachment("e-_G4DNAAttachment");
theDNAAttachProcess->AddEmModel(0, new G4DummyModel());
theDNAAttachProcess->SetEmModel(new G4DummyModel());
eman->AddDiscreteProcess(theDNAAttachProcess);
// charge exchange
G4DNAChargeDecrease* theDNApChargeDecreaseProcess =
new G4DNAChargeDecrease("proton_G4DNAChargeDecrease");
theDNApChargeDecreaseProcess->AddEmModel(0, new G4DummyModel());
theDNApChargeDecreaseProcess->SetEmModel(new G4DummyModel());
pman->AddDiscreteProcess(theDNApChargeDecreaseProcess);
G4DNAChargeDecrease* theDNAa2ChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease");
theDNAa2ChargeDecreaseProcess->AddEmModel(0, new G4DummyModel());
theDNAa2ChargeDecreaseProcess->SetEmModel(new G4DummyModel());
a2man->AddDiscreteProcess(theDNAa2ChargeDecreaseProcess);
G4DNAChargeDecrease* theDNAa1ChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease");
theDNAa1ChargeDecreaseProcess->AddEmModel(0, new G4DummyModel());
theDNAa1ChargeDecreaseProcess->SetEmModel(new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ChargeDecreaseProcess);
G4DNAChargeIncrease* theDNAa1ChargeIncreaseProcess =
new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease");
theDNAa1ChargeIncreaseProcess->AddEmModel(0, new G4DummyModel());
theDNAa1ChargeIncreaseProcess->SetEmModel(new G4DummyModel());
a1man->AddDiscreteProcess(theDNAa1ChargeIncreaseProcess);
G4DNAChargeIncrease* theDNAa0ChargeIncreaseProcess =
new G4DNAChargeIncrease("helium_G4DNAChargeIncrease");
theDNAa0ChargeIncreaseProcess->AddEmModel(0, new G4DummyModel());
theDNAa0ChargeIncreaseProcess->SetEmModel(new G4DummyModel());
a0man->AddDiscreteProcess(theDNAa0ChargeIncreaseProcess);
G4DNAChargeIncrease* theDNAh0ChargeIncreaseProcess =
new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease");
theDNAh0ChargeIncreaseProcess->AddEmModel(0, new G4DummyModel());
theDNAh0ChargeIncreaseProcess->SetEmModel(new G4DummyModel());
h0man->AddDiscreteProcess(theDNAh0ChargeIncreaseProcess);
// limits for DNA model applicability
static const G4double elowest= 4. * eV;
static const G4double elowest= 7.4 * eV;
static const G4double elimel = 1 * MeV;
static const G4double pminbb = 2 * MeV;
static const G4double pmin = 10 * keV;
static const G4double pmin = 0.1 * keV;
static const G4double pmax = 100 * MeV;
static const G4double ionmin = 10 * keV;
static const G4double hemin = 1 * keV;
static const G4double ionmin = 0.5 * MeV;
// low-energy capture
G4LowECapture* ecap = nullptr;
@@ -348,7 +352,7 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
// 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 =
G4DNAElectronSolvation* solvatation =
new G4DNAElectronSolvation("e-_G4DNAElectronSolvation");
solvatation->AddEmModel(0, new G4DummyModel());
eman->AddDiscreteProcess(solvatation);
@@ -358,11 +362,11 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
pman->AddDiscreteProcess(pcap);
G4LowECapture* icap = new G4LowECapture(ionmin);
iman->AddDiscreteProcess(icap);
G4LowECapture* a2cap = new G4LowECapture(ionmin);
G4LowECapture* a2cap = new G4LowECapture(hemin);
a2man->AddDiscreteProcess(a2cap);
G4LowECapture* a1cap = new G4LowECapture(ionmin);
G4LowECapture* a1cap = new G4LowECapture(hemin);
a1man->AddDiscreteProcess(a1cap);
G4LowECapture* a0cap = new G4LowECapture(ionmin);
G4LowECapture* a0cap = new G4LowECapture(hemin);
a0man->AddDiscreteProcess(a0cap);
G4LowECapture* h0cap = new G4LowECapture(ionmin);
h0man->AddDiscreteProcess(h0cap);
@@ -371,7 +375,8 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
for(G4int i = 0; i < nreg; ++i)
{
G4String reg = regnamesDNA[i];
if(IsVerbose()) {
if(IsVerbose())
{
G4cout << "### DNA models type " << typesDNA[i]
<< " are activated for G4Region " << reg << G4endl;
}
@@ -381,11 +386,15 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
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);
AddProtonModels0(reg, pmsc, elimel, pminbb, pmax);
AddHeliumModels0(reg, a1msc, a2msc, elimel, pminbb, pmax);
AddGenericIonModels0(reg, pminbb);
DeactivateNuclearStopping(pman, elimel);
DeactivateNuclearStopping(a1man, elimel);
DeactivateNuclearStopping(a2man, elimel);
}
}
G4LossTableManager::Instance()->EmConfigurator()->AddModels();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -403,19 +412,14 @@ void G4EmDNAPhysicsActivator::AddElectronModels0(const G4String& reg,
static const G4double elimat = 13 * eV;
static const G4double elim1 = 10 * keV;
// for e- 100 MeV is a limit between different msc models
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);
G4double emaxmsc = std::min(100*MeV, emax);
em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, emaxmsc);
} else {
mod = new G4eCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
@@ -423,33 +427,20 @@ void G4EmDNAPhysicsActivator::AddElectronModels0(const G4String& reg,
}
// cuts and solvation
if(G4DNAChemistryManager::IsActivated()) {
if(ecap) {
ecap->AddRegion(reg);
} else {
// 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);
}
// elastic
mod = new G4DNAChampionElasticModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAElastic",
mod, reg, 7.4*eV, elimel);
mod, reg, 0.0, elimel);
// ionisation
mod = new G4MollerBhabhaModel();
mod->SetActivationLowEnergyLimit(elimin);
@@ -457,14 +448,14 @@ void G4EmDNAPhysicsActivator::AddElectronModels0(const G4String& reg,
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);
mod = new G4DNAEmfietzoglouIonisationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAIonisation",
mod, reg, 0.0, elim1);
// exc
mod = new G4DNAEmfietzoglouExcitationModel();
em_config->SetExtraEmModel("e-", "e-_G4DNAExcitation",
@@ -488,37 +479,31 @@ void G4EmDNAPhysicsActivator::AddElectronModels0(const G4String& reg,
void G4EmDNAPhysicsActivator::AddProtonModels0(const G4String& reg,
G4bool pmsc, G4double elimel,
G4double pminbb, G4double pmin,
G4double pmax)
G4double pminbb, 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 SS physics list msc process does not exist
if(pmsc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
G4WentzelVIModel* msc = new G4WentzelVIModel();
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);
}
em_config->SetExtraEmModel("proton", "msc", msc, reg, 0.0, emax);
}
// single scattering always applied
mod = new G4eCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("proton", "CoulombScat", mod, reg, 0.0, emax);
mod = new G4BraggModel();
mod->SetActivationLowEnergyLimit(pminbb);
mod->SetActivationLowEnergyLimit(std::min(pminbb, pmax));
em_config->SetExtraEmModel("proton", "hIoni",
mod, reg, 0.0, pminbb,
new G4UniversalFluctuation());
@@ -547,16 +532,16 @@ void G4EmDNAPhysicsActivator::AddProtonModels0(const G4String& reg,
mod = new G4DNADingfelderChargeDecreaseModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAChargeDecrease",
mod, reg, pminch, pmax);
mod, reg, 0.0, pmax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("proton", "proton_G4DNAElasticModel",
em_config->SetExtraEmModel("proton", "proton_G4DNAElastic",
mod, reg, 0.0, elimel);
// hydrogen
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAIonisation",
mod, reg, 0.0, hmax);
mod, reg, 0.0, pmax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAExcitation",
@@ -564,10 +549,10 @@ void G4EmDNAPhysicsActivator::AddProtonModels0(const G4String& reg,
mod = new G4DNADingfelderChargeIncreaseModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAChargeIncrease",
mod, reg, pminch, pmax);
mod, reg, 0.0, pmax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAElasticModel",
em_config->SetExtraEmModel("hydrogen", "hydrogen_G4DNAElastic",
mod, reg, 0.0, elimel);
}
@@ -575,170 +560,187 @@ void G4EmDNAPhysicsActivator::AddProtonModels0(const G4String& reg,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::AddGenericIonModels0(const G4String& reg,
G4bool imsc, G4double elimel,
G4double pminbb, G4double pmin)
G4double pminbb)
{
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);
}
G4double iemax = std::min(10*MeV, emax);
//G4double iemin = 100*eV;
mod = new G4BraggIonModel();
mod->SetActivationLowEnergyLimit(pminbb);
mod->SetActivationLowEnergyLimit(iemax);
em_config->SetExtraEmModel("GenericIon", "ionIoni",
mod, reg, 0.0, pminbb,
new G4IonFluctuations());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(gionmax);
mod->SetActivationLowEnergyLimit(iemax);
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);
mod, reg, 0.0, iemax);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysicsActivator::AddHeliumModels0(const G4String& reg, G4bool a1msc,
void G4EmDNAPhysicsActivator::AddHeliumModels0(const G4String& reg,
G4bool a1msc,
G4bool a2msc, G4double elimel,
G4double pminbb, G4double pmin,
G4double pmax)
G4double pminbb, G4double)
{
G4EmConfigurator* em_config =
G4LossTableManager::Instance()->EmConfigurator();
G4VEmModel* mod;
static const G4double mgmin = 1 * keV;
static const G4double hemax = 400 * MeV;
static const G4double massRatio = G4Alpha::Alpha()->GetPDGMass()/CLHEP::proton_mass_c2;
G4double emax = theParameters->MaxKinEnergy();
G4double pminbba = massRatio*pminbb;
if(IsVerbose()) {
G4cout << " Energy limits for Helium ions: "
<< pmin/MeV << " MeV - " << hemax/MeV << " MeV" << G4endl;
G4cout << "AddHeliumModels0 for <" << reg << "> a1msc: " << a1msc <<" a2msc: " << a2msc
<< " elimel= " << elimel << " pminbba= " << pminbba << G4endl;
}
// alpha++
if(elimel < emax) {
if(a2msc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("alpha", "msc", msc, reg, 0.0, emax);
} else {
mod = new G4IonCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("alpha", "CoulombScat", mod, reg, 0.0, emax);
}
}
// 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);
mod->SetActivationLowEnergyLimit(hemax/massRatio);
em_config->SetExtraEmModel("alpha", "ionIoni",
mod, reg, 0.0, pminbb,
mod, reg, 0.0, pminbba,
new G4IonFluctuations());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(pmax);
mod->SetActivationLowEnergyLimit(hemax/massRatio);
em_config->SetExtraEmModel("alpha", "ionIoni",
mod, reg, pminbb, emax,
mod, reg, pminbba, emax,
new G4IonFluctuations());
mod = new G4DNARuddIonisationExtendedModel();
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAIonisation",
mod, reg, 0.0, pmax);
mod, reg, 0.0, hemax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAExcitation",
mod, reg, mgmin, pmax);
mod, reg, 0.0, hemax);
mod = new G4DNADingfelderChargeDecreaseModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAChargeDecrease",
mod, reg, mgmin, hemax);
mod, reg, 0.0, hemax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("alpha", "alpha_G4DNAElasticModel",
em_config->SetExtraEmModel("alpha", "alpha_G4DNAElastic",
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);
if(elimel < emax) {
if(a1msc) {
G4UrbanMscModel* msc = new G4UrbanMscModel();
msc->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("alpha+", "msc", msc, reg, 0.0, emax);
} else {
mod = new G4IonCoulombScatteringModel();
mod->SetActivationLowEnergyLimit(elimel);
em_config->SetExtraEmModel("alpha+", "CoulombScat", mod, reg, 0.0, emax);
}
}
mod = new G4BraggIonModel();
mod->SetActivationLowEnergyLimit(pminbb);
em_config->SetExtraEmModel("alpha+", "ionIoni",
mod, reg, 0.0, pminbb,
mod->SetActivationLowEnergyLimit(hemax/massRatio);
em_config->SetExtraEmModel("alpha+", "hIoni",
mod, reg, 0.0, pminbba,
new G4IonFluctuations());
mod = new G4BetheBlochModel();
mod->SetActivationLowEnergyLimit(pmax);
em_config->SetExtraEmModel("alpha+", "ionIoni",
mod, reg, pminbb, emax,
mod->SetActivationLowEnergyLimit(hemax/massRatio);
em_config->SetExtraEmModel("alpha+", "hIoni",
mod, reg, pminbba, emax,
new G4IonFluctuations());
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAIonisation",
mod, reg, 0.0, pmax);
mod, reg, 0.0, hemax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAExcitation",
mod, reg, mgmin, pmax);
mod, reg, 0.0, hemax);
mod = new G4DNADingfelderChargeDecreaseModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAChargeDecrease",
mod, reg, mgmin, hemax);
mod, reg, 0.0, hemax);
mod = new G4DNADingfelderChargeIncreaseModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAChargeIncrease",
mod, reg, mgmin, hemax);
mod, reg, 0.0, hemax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAElasticModel",
em_config->SetExtraEmModel("alpha+", "alpha+_G4DNAElastic",
mod, reg, 0.0, elimel);
// ---
// helium
mod = new G4DNARuddIonisationModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAIonisation",
mod, reg, 0.0, pmax);
mod, reg, 0.0, hemax);
mod = new G4DNAMillerGreenExcitationModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAExcitation",
mod, reg, mgmin, pmax);
mod, reg, 0.0, hemax);
mod = new G4DNADingfelderChargeIncreaseModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAChargeIncrease",
mod, reg, mgmin, hemax);
mod, reg, 0.0, hemax);
mod = new G4DNAIonElasticModel();
em_config->SetExtraEmModel("helium", "helium_G4DNAElasticModel",
em_config->SetExtraEmModel("helium", "helium_G4DNAElastic",
mod, reg, 0.0, elimel);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4EmDNAPhysicsActivator::HasMsc(G4ProcessManager* pm) const
void G4EmDNAPhysicsActivator::DeactivateNuclearStopping(G4ProcessManager* pman,
G4double elimel)
{
G4ProcessVector* pv = pman->GetProcessList();
G4int nproc = pman->GetProcessListLength();
for(G4int i = 0; i < nproc; ++i) {
if(((*pv)[i])->GetProcessSubType() == fNuclearStopping) {
G4VEmProcess* proc = static_cast<G4VEmProcess*>((*pv)[i]);
if(proc) {
G4VEmModel* mod = new G4ICRU49NuclearStoppingModel();
mod->SetActivationLowEnergyLimit(elimel);
proc->SetEmModel(mod);
}
break;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4EmDNAPhysicsActivator::HasMsc(G4ProcessManager* pman) const
{
G4bool res = false;
G4ProcessVector* pv = pm->GetProcessList();
G4int nproc = pm->GetProcessListLength();
G4ProcessVector* pv = pman->GetProcessList();
G4int nproc = pman->GetProcessListLength();
for(G4int i = 0; i < nproc; ++i)
{
if(((*pv)[i])->GetProcessSubType() == fMultipleScattering)
@@ -166,7 +166,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
//ph->RegisterProcess(theDNAElasticProcess, particle);
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
@@ -185,7 +185,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "proton" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAExcitation("proton_G4DNAExcitation"), particle);
@@ -200,7 +200,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "alpha" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAExcitation("alpha_G4DNAExcitation"), particle);
@@ -210,7 +210,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "alpha+" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"), particle);
@@ -292,33 +292,23 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -170,10 +170,10 @@ void G4EmDNAPhysics_option2::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("e-_G4DNAExcitation"), particle);
// *** Ionisation ***
//ph->RegisterProcess(new G4DNAIonisation("e-_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("e-_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel());
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel()))->SelectFasterComputation(true);
G4DNABornIonisationModel* mod = new G4DNABornIonisationModel();
mod->SelectFasterComputation(true);
theDNAIonisationProcess->SetEmModel(mod);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Vibrational excitation ***
@@ -190,19 +190,17 @@ void G4EmDNAPhysics_option2::ConstructProcess()
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("proton_G4DNAIonisation");
G4VEmModel* mod1;
mod1 = new G4DNARuddIonisationExtendedModel();
G4VEmModel* mod1 = new G4DNARuddIonisationExtendedModel();
mod1->SetLowEnergyLimit(0*eV);
mod1->SetHighEnergyLimit(500*keV);
G4VEmModel* mod2;
mod2= new G4DNABornIonisationModel();
G4DNABornIonisationModel* mod2 = new G4DNABornIonisationModel();
mod2->SetLowEnergyLimit(500*keV);
mod2->SetHighEnergyLimit(100*MeV);
mod2->SelectFasterComputation(true);
theDNAIonisationProcess->SetEmModel(mod1,1);
theDNAIonisationProcess->SetEmModel(mod2,2);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(2)))->SelectFasterComputation(true);
theDNAIonisationProcess->SetEmModel(mod1);
theDNAIonisationProcess->SetEmModel(mod2);
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -227,7 +225,6 @@ void G4EmDNAPhysics_option2::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("alpha_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("alpha_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("alpha_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -240,7 +237,6 @@ void G4EmDNAPhysics_option2::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("alpha+_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -254,7 +250,6 @@ void G4EmDNAPhysics_option2::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("helium_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("helium_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("helium_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -263,7 +258,6 @@ void G4EmDNAPhysics_option2::ConstructProcess()
} else if ( particleName == "GenericIon" ) {
ph->RegisterProcess(new G4DNAIonisation("GenericIon_G4DNAIonisation"), particle);
}
// Warning : the following particles and processes are needed by EM Physics builders
@@ -273,8 +267,6 @@ void G4EmDNAPhysics_option2::ConstructProcess()
// e+
else if (particleName == "e+") {
// Identical to G4EmStandardPhysics_option3
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetStepLimitType(fUseDistanceToBoundary);
@@ -287,34 +279,24 @@ void G4EmDNAPhysics_option2::ConstructProcess()
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -234,33 +234,23 @@ void G4EmDNAPhysics_option3::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -247,33 +247,23 @@ void G4EmDNAPhysics_option4::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -166,8 +166,9 @@ void G4EmDNAPhysics_option5::ConstructProcess()
// *** Elastic scattering ***
G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
theDNAElasticProcess->SetEmModel(new G4DNAUeharaScreenedRutherfordElasticModel());
((G4DNAUeharaScreenedRutherfordElasticModel*)(theDNAElasticProcess->EmModel()))->SelectFasterComputation(true);
G4DNAUeharaScreenedRutherfordElasticModel* mod = new G4DNAUeharaScreenedRutherfordElasticModel();
mod->SelectFasterComputation(true);
theDNAElasticProcess->SetEmModel(mod);
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Excitation ***
@@ -177,8 +178,9 @@ void G4EmDNAPhysics_option5::ConstructProcess()
// *** Ionisation ***
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("e-_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNAEmfietzoglouIonisationModel());
((G4DNAEmfietzoglouIonisationModel*)(theDNAIonisationProcess->EmModel()))->SelectFasterComputation(true);
G4DNAEmfietzoglouIonisationModel* modE = new G4DNAEmfietzoglouIonisationModel();
theDNAIonisationProcess->SetEmModel(modE);
modE->SelectFasterComputation(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Vibrational excitation ***
@@ -195,19 +197,17 @@ void G4EmDNAPhysics_option5::ConstructProcess()
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("proton_G4DNAIonisation");
G4VEmModel* mod1;
mod1 = new G4DNARuddIonisationExtendedModel();
G4VEmModel* mod1 = new G4DNARuddIonisationExtendedModel();
mod1->SetLowEnergyLimit(0*eV);
mod1->SetHighEnergyLimit(500*keV);
G4VEmModel* mod2;
mod2= new G4DNABornIonisationModel();
G4DNABornIonisationModel* mod2 = new G4DNABornIonisationModel();
mod2->SetLowEnergyLimit(500*keV);
mod2->SetHighEnergyLimit(100*MeV);
mod2->SelectFasterComputation(true);
theDNAIonisationProcess->SetEmModel(mod1,1);
theDNAIonisationProcess->SetEmModel(mod2,2);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(2)))->SelectFasterComputation(true);
theDNAIonisationProcess->SetEmModel(mod1);
theDNAIonisationProcess->SetEmModel(mod2);
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -219,7 +219,6 @@ void G4EmDNAPhysics_option5::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("hydrogen_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("hydrogen_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -232,7 +231,6 @@ void G4EmDNAPhysics_option5::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("alpha_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("alpha_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("alpha_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -245,7 +243,6 @@ void G4EmDNAPhysics_option5::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("alpha+_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -259,14 +256,13 @@ void G4EmDNAPhysics_option5::ConstructProcess()
ph->RegisterProcess(new G4DNAExcitation("helium_G4DNAExcitation"), particle);
//ph->RegisterProcess(new G4DNAIonisation("helium_G4DNAIonisation"), particle);
G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("helium_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
ph->RegisterProcess(theDNAIonisationProcess, particle);
ph->RegisterProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"), particle);
// Extension to HZE proposed by Z. Francis
// Extension to HZE proposed by Z. Francis
} else if ( particleName == "GenericIon" ) {
ph->RegisterProcess(new G4DNAIonisation("GenericIon_G4DNAIonisation"), particle);
@@ -279,8 +275,6 @@ void G4EmDNAPhysics_option5::ConstructProcess()
// e+
else if (particleName == "e+") {
// Identical to G4EmStandardPhysics_option3
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetStepLimitType(fUseDistanceToBoundary);
@@ -294,33 +288,23 @@ void G4EmDNAPhysics_option5::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -155,14 +155,9 @@ void G4EmDNAPhysics_option6::ConstructProcess()
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
//OLD
//aParticleIterator->reset();
//while( (*aParticleIterator)() )
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
@@ -256,35 +251,24 @@ void G4EmDNAPhysics_option6::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
// Warning : end of particles and processes are needed by EM Physics builders
@@ -174,60 +174,46 @@ void G4EmDNAPhysics_option7::ConstructProcess()
G4DNAUeharaScreenedRutherfordElasticModel* emElast =
new G4DNAUeharaScreenedRutherfordElasticModel();
emElast->SetHighEnergyLimit(1*MeV);
// emElast->SelectHighEnergyLimit(1*MeV);
theDNAElasticProcess->SetEmModel(emElast);
ph->RegisterProcess(theDNAElasticProcess, particle);
{
// *** Excitation ***
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("e-_G4DNAExcitation");
{
G4DNAEmfietzoglouExcitationModel* emExc = new G4DNAEmfietzoglouExcitationModel();
emExc->SetActivationLowEnergyLimit(8*eV);
emExc->SetActivationHighEnergyLimit(10.*keV);
theDNAExcitationProcess->SetEmModel(emExc,1);
theDNAExcitationProcess->AddEmModel(1, emExc);
}
// 1-st model should be Set
G4DNAEmfietzoglouExcitationModel* emExc = new G4DNAEmfietzoglouExcitationModel();
emExc->SetActivationLowEnergyLimit(8*eV);
emExc->SetActivationHighEnergyLimit(10.*keV);
theDNAExcitationProcess->SetEmModel(emExc);
// 2-nd model should be Add
G4DNABornExcitationModel* bornExc = new G4DNABornExcitationModel();
bornExc->SetActivationLowEnergyLimit(10*keV);
bornExc->SetActivationHighEnergyLimit(1.*MeV);
theDNAExcitationProcess->AddEmModel(1, bornExc);
{
G4DNABornExcitationModel* bornExc = new G4DNABornExcitationModel();
bornExc->SetActivationLowEnergyLimit(10*keV);
bornExc->SetActivationHighEnergyLimit(1.*MeV);
theDNAExcitationProcess->SetEmModel(bornExc,2);
theDNAExcitationProcess->AddEmModel(2, bornExc);
}
ph->RegisterProcess(theDNAExcitationProcess, particle);
}
{
// *** Ionisation ***
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Ionisation ***
G4DNAIonisation* theDNAIonisationProcess =
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("e-_G4DNAIonisation");
{
G4DNAEmfietzoglouIonisationModel* emIonModel = new G4DNAEmfietzoglouIonisationModel();
emIonModel->SetActivationLowEnergyLimit(10.*eV);
emIonModel->SetActivationHighEnergyLimit(10.*keV);
// 1-st model should be Set
G4DNAEmfietzoglouIonisationModel* emIonModel = new G4DNAEmfietzoglouIonisationModel();
emIonModel->SetActivationLowEnergyLimit(10.*eV);
emIonModel->SetActivationHighEnergyLimit(10.*keV);
theDNAIonisationProcess->SetEmModel(emIonModel);
theDNAIonisationProcess->SetEmModel(emIonModel,1);
theDNAIonisationProcess->AddEmModel(1,emIonModel);
}
// 2-nd model should be Add
G4DNABornIonisationModel* bornIon = new G4DNABornIonisationModel();
bornIon->SetActivationLowEnergyLimit(10*keV);
bornIon->SetActivationHighEnergyLimit(1.*MeV);
theDNAIonisationProcess->AddEmModel(1,bornIon);
{
G4DNABornIonisationModel* bornIon = new G4DNABornIonisationModel();
bornIon->SetActivationLowEnergyLimit(10*keV);
bornIon->SetActivationHighEnergyLimit(1.*MeV);
theDNAIonisationProcess->SetEmModel(bornIon,2);
theDNAIonisationProcess->AddEmModel(2,bornIon);
}
ph->RegisterProcess(theDNAIonisationProcess, particle);
}
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Vibrational excitation ***
ph->RegisterProcess(new G4DNAVibExcitation("e-_G4DNAVibExcitation"), particle);
@@ -293,33 +279,23 @@ void G4EmDNAPhysics_option7::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -173,37 +173,37 @@ void G4EmDNAPhysics_stationary::ConstructProcess()
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("e-_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel(new G4DNABornExcitationModel());
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SelectStationary(true);
new G4DNAExcitation("e-_G4DNAExcitation");
G4DNABornExcitationModel* modB = new G4DNABornExcitationModel();
theDNAExcitationProcess->SetEmModel(modB);
modB->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Ionisation ***
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("e-_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel());
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel()))
->SelectStationary(true);
new G4DNAIonisation("e-_G4DNAIonisation");
G4DNABornIonisationModel* modI = new G4DNABornIonisationModel();
theDNAIonisationProcess->SetEmModel(modI);
modI->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Vibrational excitation ***
G4DNAVibExcitation* theDNAVibExcitationProcess =
new G4DNAVibExcitation("e-_G4DNAVibExcitation");
theDNAVibExcitationProcess->SetEmModel(new G4DNASancheExcitationModel());
((G4DNASancheExcitationModel*)(theDNAVibExcitationProcess->EmModel()))
->SelectStationary(true);
G4DNASancheExcitationModel* modS = new G4DNASancheExcitationModel();
theDNAVibExcitationProcess->SetEmModel(modS);
modS->SelectStationary(true);
ph->RegisterProcess(theDNAVibExcitationProcess, particle);
// *** Attachment ***
G4DNAAttachment* theDNAAttachmentProcess =
new G4DNAAttachment("e-_G4DNAAttachment");
theDNAAttachmentProcess->SetEmModel(new G4DNAMeltonAttachmentModel());
((G4DNAMeltonAttachmentModel*)(theDNAAttachmentProcess->EmModel()))
->SelectStationary(true);
G4DNAMeltonAttachmentModel* modM = new G4DNAMeltonAttachmentModel();
theDNAAttachmentProcess->SetEmModel(modM);
modM->SelectStationary(true);
ph->RegisterProcess(theDNAAttachmentProcess, particle);
} else if ( particleName == "proton" ) {
@@ -228,18 +228,18 @@ void G4EmDNAPhysics_stationary::ConstructProcess()
->SetEmModel(new G4DNABornExcitationModel(),2);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(10*eV);
(theDNAExcitationProcess->EmModel(0)))->SetLowEnergyLimit(10*eV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(500*keV);
(theDNAExcitationProcess->EmModel(0)))->SetHighEnergyLimit(500*keV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SelectStationary(true);
(theDNAExcitationProcess->EmModel(0)))->SelectStationary(true);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SetLowEnergyLimit(500*keV);
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SetHighEnergyLimit(100*MeV);
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SelectStationary(true);
(theDNAExcitationProcess->EmModel(1)))->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
@@ -248,21 +248,21 @@ void G4EmDNAPhysics_stationary::ConstructProcess()
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("proton_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationModel,1);
theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel,2);
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationModel);
theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel);
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(0)))
->SetLowEnergyLimit(0*eV);
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(0)))
->SetHighEnergyLimit(500*keV);
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(0)))
->SelectStationary(true);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(2)))
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(2)))
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(2)))
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -488,38 +488,23 @@ void G4EmDNAPhysics_stationary::ConstructProcess()
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
G4PhotoElectricEffect*
thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel =
new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -228,22 +228,22 @@ void G4EmDNAPhysics_stationary_option2::ConstructProcess()
new G4DNAExcitation("proton_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel
(new G4DNAMillerGreenExcitationModel(),1);
(new G4DNAMillerGreenExcitationModel());
theDNAExcitationProcess->SetEmModel
(new G4DNABornExcitationModel(),2);
(new G4DNABornExcitationModel());
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SetLowEnergyLimit(10*eV);
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SetHighEnergyLimit(500*keV);
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SelectStationary(true);
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(2)))
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(2)))
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(2)))
((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
@@ -254,26 +254,26 @@ void G4EmDNAPhysics_stationary_option2::ConstructProcess()
new G4DNAIonisation("proton_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(
new G4DNARuddIonisationExtendedModel,1);
new G4DNARuddIonisationExtendedModel);
theDNAIonisationProcess->SetEmModel(
new G4DNABornIonisationModel,2);
new G4DNABornIonisationModel);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(0*eV);
(theDNAIonisationProcess->EmModel()))->SetLowEnergyLimit(0*eV);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(500*keV);
(theDNAIonisationProcess->EmModel()))->SetHighEnergyLimit(500*keV);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel()))->SelectStationary(true);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SelectStationary(true);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SelectStationary(true);
//
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SelectFasterComputation(true);
(theDNAIonisationProcess->EmModel(1)))->SelectFasterComputation(true);
//
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -500,37 +500,23 @@ void G4EmDNAPhysics_stationary_option2::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
G4PhotoElectricEffect* thePhotoElectricEffect =
new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel =
new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -228,24 +228,24 @@ void G4EmDNAPhysics_stationary_option4::ConstructProcess()
new G4DNAExcitation("proton_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel(
new G4DNAMillerGreenExcitationModel(),1);
new G4DNAMillerGreenExcitationModel());
theDNAExcitationProcess->SetEmModel(
new G4DNABornExcitationModel(),2);
new G4DNABornExcitationModel());
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(10*eV);
(theDNAExcitationProcess->EmModel()))->SetLowEnergyLimit(10*eV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(500*keV);
(theDNAExcitationProcess->EmModel()))->SetHighEnergyLimit(500*keV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel()))->SelectStationary(true);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SelectStationary(true);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Ionisation ***
@@ -254,26 +254,26 @@ void G4EmDNAPhysics_stationary_option4::ConstructProcess()
new G4DNAIonisation("proton_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(
new G4DNARuddIonisationExtendedModel,1);
new G4DNARuddIonisationExtendedModel);
theDNAIonisationProcess->SetEmModel(
new G4DNABornIonisationModel,2);
new G4DNABornIonisationModel);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(0*eV);
(theDNAIonisationProcess->EmModel()))->SetLowEnergyLimit(0*eV);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(500*keV);
(theDNAIonisationProcess->EmModel()))->SetHighEnergyLimit(500*keV);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel()))->SelectStationary(true);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SelectStationary(true);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SelectStationary(true);
//
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SelectFasterComputation(true);
(theDNAIonisationProcess->EmModel(1)))->SelectFasterComputation(true);
//
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -503,37 +503,23 @@ void G4EmDNAPhysics_stationary_option4::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
G4PhotoElectricEffect* thePhotoElectricEffect =
new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel =
new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -225,24 +225,24 @@ void G4EmDNAPhysics_stationary_option6::ConstructProcess()
new G4DNAExcitation("proton_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel(
new G4DNAMillerGreenExcitationModel(),1);
new G4DNAMillerGreenExcitationModel());
theDNAExcitationProcess->SetEmModel(
new G4DNABornExcitationModel(),2);
new G4DNABornExcitationModel());
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(10*eV);
(theDNAExcitationProcess->EmModel()))->SetLowEnergyLimit(10*eV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(500*keV);
(theDNAExcitationProcess->EmModel()))->SetHighEnergyLimit(500*keV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel()))->SelectStationary(true);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SelectStationary(true);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(2)))->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Ionisation ***
@@ -251,26 +251,26 @@ void G4EmDNAPhysics_stationary_option6::ConstructProcess()
new G4DNAIonisation("proton_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(
new G4DNARuddIonisationExtendedModel,1);
new G4DNARuddIonisationExtendedModel);
theDNAIonisationProcess->SetEmModel(
new G4DNABornIonisationModel,2);
new G4DNABornIonisationModel);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(0*eV);
(theDNAIonisationProcess->EmModel()))->SetLowEnergyLimit(0*eV);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(500*keV);
(theDNAIonisationProcess->EmModel()))->SetHighEnergyLimit(500*keV);
((G4DNARuddIonisationExtendedModel*)
(theDNAIonisationProcess->EmModel()))->SelectStationary(true);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(1)))->SelectStationary(true);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SelectStationary(true);
//
((G4DNABornIonisationModel*)
(theDNAIonisationProcess->EmModel(2)))->SelectFasterComputation(true);
(theDNAIonisationProcess->EmModel(1)))->SelectFasterComputation(true);
//
ph->RegisterProcess(theDNAIonisationProcess, particle);
@@ -498,37 +498,23 @@ void G4EmDNAPhysics_stationary_option6::ConstructProcess()
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = GeV;
G4PhotoElectricEffect* thePhotoElectricEffect =
new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel
->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel =
new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
ph->RegisterProcess(theRayleigh, particle);
}
@@ -23,11 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
// $Id: G4EmLivermorePhysics.cc 107183 2017-11-03 14:57:23Z gcosmo $
#include "G4EmLivermorePhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// *** Processes and models
@@ -54,6 +55,7 @@
#include "G4eBremsstrahlung.hh"
#include "G4LivermoreBremsstrahlungModel.hh"
#include "G4Generator2BS.hh"
#include "G4SeltzerBergerModel.hh"
// e+
#include "G4eplusAnnihilation.hh"
@@ -139,6 +141,7 @@ G4EmLivermorePhysics::G4EmLivermorePhysics(G4int ver, const G4String&)
param->SetMscRangeFactor(0.02);
param->SetMuHadLateralDisplacement(true);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -200,13 +203,8 @@ void G4EmLivermorePhysics::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
//G4hMultipleScattering* pimsc = new G4hMultipleScattering();
//pimsc->AddEmModel(0, new G4WentzelVIModel());
//G4hMultipleScattering* kmsc = new G4hMultipleScattering();
//kmsc->AddEmModel(0, new G4WentzelVIModel());
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
//pmsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
@@ -216,29 +214,25 @@ void G4EmLivermorePhysics::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Livermore EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
theComptonScattering->SetEmModel(new G4LivermoreComptonModel(),1);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel(),1);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
@@ -247,18 +241,18 @@ void G4EmLivermorePhysics::ConstructProcess()
} else if (particleName == "e-") {
// multiple scattering
// multiple and single scattering
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -276,7 +270,7 @@ void G4EmLivermorePhysics::ConstructProcess()
G4VEmModel* theBremLivermore = new G4LivermoreBremsstrahlungModel();
theBremLivermore->SetHighEnergyLimit(1*GeV);
theBremLivermore->SetAngularDistribution(new G4Generator2BS());
eBrem->SetEmModel(theBremLivermore,1);
eBrem->SetEmModel(theBremLivermore);
// register processes
ph->RegisterProcess(msc, particle);
@@ -286,18 +280,18 @@ void G4EmLivermorePhysics::ConstructProcess()
} else if (particleName == "e+") {
// multiple scattering
// multiple and single scattering
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -306,10 +300,16 @@ void G4EmLivermorePhysics::ConstructProcess()
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
// Bremsstrahlung from standard
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
G4VEmModel* mod = new G4SeltzerBergerModel();
mod->SetAngularDistribution(new G4Generator2BS());
eBrem->SetEmModel(mod);
// register processes
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(eBrem, particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
@@ -374,6 +374,8 @@ void G4EmLivermorePhysics::ConstructProcess()
particleName == "anti_proton") {
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.2, 50*um);
@@ -23,11 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLivermorePolarizedPhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
// $Id: G4EmLivermorePolarizedPhysics.cc 107183 2017-11-03 14:57:23Z gcosmo $
#include "G4EmLivermorePolarizedPhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// *** Processes and models
@@ -43,6 +44,8 @@
#include "G4RayleighScattering.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
// e+-
#include "G4eMultipleScattering.hh"
@@ -53,6 +56,8 @@
#include "G4eBremsstrahlung.hh"
#include "G4LivermoreBremsstrahlungModel.hh"
#include "G4Generator2BS.hh"
#include "G4SeltzerBergerModel.hh"
// e+
#include "G4eplusAnnihilation.hh"
@@ -131,10 +136,14 @@ G4EmLivermorePolarizedPhysics::G4EmLivermorePolarizedPhysics(G4int ver,
param->SetDefaults();
param->SetVerbose(verbose);
param->SetMinEnergy(100*eV);
param->SetMaxEnergy(1*TeV);
param->SetMaxEnergy(100*TeV);
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMscRangeFactor(0.02);
param->SetMuHadLateralDisplacement(true);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -196,13 +205,12 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
@@ -212,64 +220,48 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Livermore EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
//Applicability range for Livermore models
//for higher energies, the Standard models are used
G4double LivermoreHighEnergyLimit = GeV;
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePolarizedPhotoElectricModel* theLivermorePhotoElectricModel = new G4LivermorePolarizedPhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
G4VEmModel* mod = new G4LivermorePhotoElectricModel();
mod->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
thePhotoElectricEffect->SetEmModel(mod);
ph->RegisterProcess(thePhotoElectricEffect, particle);
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermorePolarizedComptonModel* theLivermoreComptonModel = new G4LivermorePolarizedComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
theComptonScattering->SetEmModel(new G4LivermorePolarizedComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermorePolarizedGammaConversionModel* theLivermoreGammaConversionModel = new G4LivermorePolarizedGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
theGammaConversion->SetEmModel(new G4LivermorePolarizedGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermorePolarizedRayleighModel* theRayleighModel = new G4LivermorePolarizedRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
theRayleigh->SetEmModel(new G4LivermorePolarizedRayleighModel());
ph->RegisterProcess(theRayleigh, particle);
} else if (particleName == "e-") {
// multiple scattering
// multiple and single scattering
G4eMultipleScattering* msc = new G4eMultipleScattering;
msc->SetStepLimitType(fUseDistanceToBoundary);
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(ss, particle);
// Ionisation
G4eIonisation* eIoni = new G4eIonisation();
@@ -278,11 +270,18 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
theIoniLivermore->SetHighEnergyLimit(0.1*MeV);
eIoni->AddEmModel(0, theIoniLivermore, new G4UniversalFluctuation() );
eIoni->SetStepFunction(0.2, 100*um); //
ph->RegisterProcess(eIoni, particle);
// Bremsstrahlung from standard
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
G4VEmModel* mod = new G4SeltzerBergerModel();
mod->SetAngularDistribution(new G4Generator2BS());
eBrem->SetEmModel(mod);
// register processes
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(eBrem, particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "e+") {
@@ -293,12 +292,12 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -307,9 +306,15 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
// Bremsstrahlung from standard
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
G4VEmModel* mod = new G4SeltzerBergerModel();
mod->SetAngularDistribution(new G4Generator2BS());
eBrem->SetEmModel(mod);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(eBrem, particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
@@ -327,8 +332,6 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
} else if (particleName == "alpha" ||
particleName == "He3" ) {
// Identical to G4EmStandardPhysics_option3
G4hMultipleScattering* msc = new G4hMultipleScattering();
G4ionIonisation* ionIoni = new G4ionIonisation();
@@ -339,8 +342,6 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
ph->RegisterProcess(pnuc, particle);
} else if (particleName == "GenericIon") {
// Identical to G4EmStandardPhysics_option3
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
@@ -353,7 +354,6 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
//G4hMultipleScattering* pimsc = new G4hMultipleScattering();
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.2, 50*um);
@@ -366,7 +366,6 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
//G4hMultipleScattering* kmsc = new G4hMultipleScattering();
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.2, 50*um);
@@ -379,7 +378,9 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.2, 50*um);
@@ -420,9 +421,6 @@ void G4EmLivermorePolarizedPhysics::ConstructProcess()
particleName == "triton" ||
particleName == "xi_c+" ||
particleName == "xi-" ) {
// Identical to G4EmStandardPhysics_option3
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pnuc, particle);
@@ -23,11 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmLowEPPhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
// $Id: G4EmLowEPPhysics.cc 107183 2017-11-03 14:57:23Z gcosmo $
#include "G4EmLowEPPhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// *** Processes and models
@@ -134,6 +135,7 @@ G4EmLowEPPhysics::G4EmLowEPPhysics(G4int ver, const G4String&)
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -193,42 +195,33 @@ void G4EmLowEPPhysics::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->SetEmModel(new G4LowEWentzelVIModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering();
hmsc->SetEmModel(new G4LowEWentzelVIModel());
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4LowEWentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4LowEWentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4LowEWentzelVIModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering();
hmsc->SetEmModel(new G4LowEWentzelVIModel());
// nuclear stopping
G4NuclearStopping* ionnuc = new G4NuclearStopping();
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add Livermore EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if(verbose > 1)
G4cout << "### " << GetPhysicsName() << " instantiates for "
<< particleName << G4endl;
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
// Photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model above 20 MeV, Monarsh's model below
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
theComptonScattering->SetEmModel(new G4LivermoreComptonModel(),1);
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
G4LowEPComptonModel* theLowEPComptonModel =
new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
@@ -237,7 +230,7 @@ void G4EmLowEPPhysics::ConstructProcess()
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel(),1);
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
@@ -248,7 +241,7 @@ void G4EmLowEPPhysics::ConstructProcess()
// multiple scattering
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
// Ionisation - Livermore should be used only for low energies
G4eIonisation* eIoni = new G4eIonisation();
@@ -263,7 +256,7 @@ void G4EmLowEPPhysics::ConstructProcess()
G4VEmModel* theBrem = new G4SeltzerBergerModel();
theBrem->SetHighEnergyLimit(1*GeV);
theBrem->SetAngularDistribution(new G4Generator2BS());
eBrem->SetEmModel(theBrem, 1);
eBrem->SetEmModel(theBrem);
// register processes
ph->RegisterProcess(msc, particle);
@@ -274,7 +267,7 @@ void G4EmLowEPPhysics::ConstructProcess()
// multiple scattering
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
// Standard ionisation
G4eIonisation* eIoni = new G4eIonisation();
@@ -285,7 +278,7 @@ void G4EmLowEPPhysics::ConstructProcess()
G4VEmModel* theBrem = new G4SeltzerBergerModel();
theBrem->SetHighEnergyLimit(1*GeV);
theBrem->SetAngularDistribution(new G4Generator2BS());
eBrem->SetEmModel(theBrem, 1);
eBrem->SetEmModel(theBrem);
// register processes
ph->RegisterProcess(msc, particle);
@@ -303,7 +296,6 @@ void G4EmLowEPPhysics::ConstructProcess()
ph->RegisterProcess(muIoni, particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
//ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "alpha" ||
particleName == "He3" ) {
@@ -350,6 +342,8 @@ void G4EmLowEPPhysics::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4LowEWentzelVIModel());
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.2, 50*um);
@@ -450,7 +450,7 @@ void G4EmModelActivator::ActivatePAI()
}
G4VEmModel* em = nullptr;
G4VEmFluctuationModel* fm = nullptr;
if(typesPAI[i] == "PAIphoton") {
if(typesPAI[i] == "PAIphoton" || typesPAI[i] == "pai_photon") {
G4PAIPhotModel* mod = new G4PAIPhotModel(p,"PAIPhotModel");
em = mod;
fm = mod;
@@ -23,11 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmPenelopePhysics.cc 99938 2016-10-12 08:06:52Z gcosmo $
// $Id: G4EmPenelopePhysics.cc 107183 2017-11-03 14:57:23Z gcosmo $
#include "G4EmPenelopePhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// *** Processes and models
@@ -137,12 +138,13 @@ G4EmPenelopePhysics::G4EmPenelopePhysics(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->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetMuHadLateralDisplacement(true);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
param->SetPIXEElectronCrossSectionModel("Penelope");
SetPhysicsType(bElectromagnetic);
@@ -205,13 +207,7 @@ void G4EmPenelopePhysics::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
//G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
//pimsc->AddEmModel(0, new G4WentzelVIModel());
//G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
//kmsc->AddEmModel(0, new G4WentzelVIModel());
//G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
//pmsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
@@ -220,19 +216,15 @@ void G4EmPenelopePhysics::ConstructProcess()
// nuclear stopping
G4NuclearStopping* pnuc = new G4NuclearStopping();
//Applicability range for Penelope models
//for higher energies, the Standard models are used
G4double PenelopeHighEnergyLimit = 1.0*GeV;
// Add Penelope EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
//Applicability range for Penelope models
//for higher energies, the Standard models are used
G4double PenelopeHighEnergyLimit = 1.0*GeV;
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
//Photo-electric effect
@@ -240,7 +232,7 @@ void G4EmPenelopePhysics::ConstructProcess()
G4PenelopePhotoElectricModel* thePEPenelopeModel = new
G4PenelopePhotoElectricModel();
thePEPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
thePhotoElectricEffect->SetEmModel(thePEPenelopeModel, 1);
thePhotoElectricEffect->SetEmModel(thePEPenelopeModel);
ph->RegisterProcess(thePhotoElectricEffect, particle);
//Compton scattering
@@ -248,14 +240,14 @@ void G4EmPenelopePhysics::ConstructProcess()
G4PenelopeComptonModel* theComptonPenelopeModel =
new G4PenelopeComptonModel();
theComptonPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
theComptonScattering->SetEmModel(theComptonPenelopeModel, 1);
theComptonScattering->SetEmModel(theComptonPenelopeModel);
ph->RegisterProcess(theComptonScattering, particle);
//Gamma conversion
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4PenelopeGammaConversionModel* theGCPenelopeModel =
new G4PenelopeGammaConversionModel();
theGammaConversion->SetEmModel(theGCPenelopeModel,1);
theGammaConversion->SetEmModel(theGCPenelopeModel);
ph->RegisterProcess(theGammaConversion, particle);
//Rayleigh scattering
@@ -263,7 +255,7 @@ void G4EmPenelopePhysics::ConstructProcess()
G4PenelopeRayleighModel* theRayleighPenelopeModel =
new G4PenelopeRayleighModel();
//theRayleighPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
theRayleigh->SetEmModel(theRayleighPenelopeModel, 1);
theRayleigh->SetEmModel(theRayleighPenelopeModel);
ph->RegisterProcess(theRayleigh, particle);
} else if (particleName == "e-") {
@@ -274,12 +266,12 @@ void G4EmPenelopePhysics::ConstructProcess()
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -297,7 +289,7 @@ void G4EmPenelopePhysics::ConstructProcess()
G4PenelopeBremsstrahlungModel* theBremPenelope = new
G4PenelopeBremsstrahlungModel();
theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
eBrem->AddEmModel(0,theBremPenelope);
eBrem->SetEmModel(theBremPenelope);
// register processes
ph->RegisterProcess(msc, particle);
@@ -313,12 +305,12 @@ void G4EmPenelopePhysics::ConstructProcess()
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -336,14 +328,14 @@ void G4EmPenelopePhysics::ConstructProcess()
G4PenelopeBremsstrahlungModel* theBremPenelope = new
G4PenelopeBremsstrahlungModel();
theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
eBrem->AddEmModel(0,theBremPenelope);
eBrem->SetEmModel(theBremPenelope);
//Annihilation
G4eplusAnnihilation* eAnni = new G4eplusAnnihilation();
G4PenelopeAnnihilationModel* theAnnPenelope = new
G4PenelopeAnnihilationModel();
theAnnPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
eAnni->AddEmModel(0,theAnnPenelope);
eAnni->AddEmModel(0, theAnnPenelope);
// register processes
ph->RegisterProcess(msc, particle);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics.cc 104043 2017-05-09 07:47:10Z gcosmo $
// $Id: G4EmStandardPhysics.cc 107183 2017-11-03 14:57:23Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -82,6 +82,7 @@
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -176,37 +177,31 @@ void G4EmStandardPhysics::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* pss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
pee->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(pee, particle);
ph->RegisterProcess(new G4ComptonScattering(), particle);
@@ -218,15 +213,14 @@ void G4EmStandardPhysics::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetNewDisplacementFlag(false);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -241,15 +235,14 @@ void G4EmStandardPhysics::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetNewDisplacementFlag(false);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -272,7 +265,6 @@ void G4EmStandardPhysics::ConstructProcess()
} else if (particleName == "alpha" ||
particleName == "He3") {
//ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
@@ -284,7 +276,6 @@ void G4EmStandardPhysics::ConstructProcess()
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
//G4hMultipleScattering* pimsc = new G4hMultipleScattering();
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
@@ -294,7 +285,6 @@ void G4EmStandardPhysics::ConstructProcess()
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
//G4hMultipleScattering* kmsc = new G4hMultipleScattering();
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
@@ -304,12 +294,14 @@ void G4EmStandardPhysics::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
@@ -33,6 +33,15 @@
//
// Modified:
//
// Class Description:
//
// Standard EM physics constructor for HEP applications with the Goudsmit
// -Saunderson MSC model for e-/e+ Coulomb scattering below 100 [MeV] (instead
// of the Urban model). Note, that the Goudsmit-Saunderson MSC model used here
// with its HEP settings (i.e. less accurate). The Goudsmit-Saunderson MSC
// model with its most accurate settings is used in the G4EmStandard_opt4
// physics constructor for e-/e+ Coulomb scattering.
//
//----------------------------------------------------------------------------
//
@@ -46,9 +55,8 @@
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
@@ -78,6 +86,7 @@
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -112,10 +121,8 @@ G4EmStandardPhysicsGS::G4EmStandardPhysicsGS(G4int ver, const G4String&)
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->SetMscRangeFactor(0.06);
// param->SetMscStepLimitType(fUseSafetyPlus); // corresponds to the error-free stepping
// param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -177,67 +184,50 @@ void G4EmStandardPhysicsGS::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* pss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(pee, particle);
ph->RegisterProcess(new G4ComptonScattering(), particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
/*
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(), 1);
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(pee, particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
ph->RegisterProcess(new G4RayleighScattering(), particle);
*/
} else if (particleName == "e-") {
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
msc1->SetOptionPWAScreening(false);
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -251,17 +241,15 @@ void G4EmStandardPhysicsGS::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
msc1->SetOptionPWAScreening(true);
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -284,7 +272,6 @@ void G4EmStandardPhysicsGS::ConstructProcess()
} else if (particleName == "alpha" ||
particleName == "He3") {
//ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
@@ -296,7 +283,6 @@ void G4EmStandardPhysicsGS::ConstructProcess()
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
//G4hMultipleScattering* pimsc = new G4hMultipleScattering();
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
@@ -306,7 +292,6 @@ void G4EmStandardPhysicsGS::ConstructProcess()
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
//G4hMultipleScattering* kmsc = new G4hMultipleScattering();
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
@@ -316,12 +301,14 @@ void G4EmStandardPhysicsGS::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
@@ -27,7 +27,7 @@
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmStandardPhysics
// ClassName: G4EmStandardPhysicsSS
//
// Author: V.Ivanchenko 09.11.2005
//
@@ -85,6 +85,7 @@
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -184,28 +185,24 @@ void G4EmStandardPhysicsSS::ConstructProcess()
// muon & hadron scattering
G4CoulombScattering* muss = new G4CoulombScattering();
muss->SetEmModel(new G4hCoulombScatteringModel(), 1);
muss->SetEmModel(new G4hCoulombScatteringModel());
G4CoulombScattering* piss = new G4CoulombScattering();
piss->SetEmModel(new G4hCoulombScatteringModel(), 1);
piss->SetEmModel(new G4hCoulombScatteringModel());
G4CoulombScattering* kss = new G4CoulombScattering();
kss->SetEmModel(new G4hCoulombScatteringModel(), 1);
G4CoulombScattering* pss = new G4CoulombScattering();
pss->SetEmModel(new G4hCoulombScatteringModel(), 1);
kss->SetEmModel(new G4hCoulombScatteringModel());
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(), 1);
cs->SetEmModel(new G4KleinNishinaModel());
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
pee->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(pee, particle);
@@ -216,7 +213,7 @@ void G4EmStandardPhysicsSS::ConstructProcess()
G4CoulombScattering* ss = new G4CoulombScattering();
if(G4EmParameters::Instance()->UseMottCorrection()) {
ss->SetEmModel(new G4eSingleCoulombScatteringModel(), 1);
ss->SetEmModel(new G4eSingleCoulombScatteringModel());
}
ph->RegisterProcess(new G4eIonisation(), particle);
@@ -270,6 +267,9 @@ void G4EmStandardPhysicsSS::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
G4CoulombScattering* pss = new G4CoulombScattering();
pss->SetEmModel(new G4hCoulombScatteringModel());
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
@@ -83,6 +83,7 @@
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -185,39 +186,32 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->SetEmModel(new G4WentzelVIRelModel());
G4CoulombScattering* muss = new G4CoulombScattering();
muss->SetEmModel(new G4hCoulombScatteringModel(), 1);
muss->SetEmModel(new G4hCoulombScatteringModel());
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIRelModel());
G4CoulombScattering* piss = new G4CoulombScattering();
piss->SetEmModel(new G4hCoulombScatteringModel(), 1);
piss->SetEmModel(new G4hCoulombScatteringModel());
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIRelModel());
G4CoulombScattering* kss = new G4CoulombScattering();
kss->SetEmModel(new G4hCoulombScatteringModel(), 1);
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIRelModel());
G4CoulombScattering* pss = new G4CoulombScattering();
pss->SetEmModel(new G4hCoulombScatteringModel(), 1);
kss->SetEmModel(new G4hCoulombScatteringModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(), 1);
cs->SetEmModel(new G4KleinNishinaModel());
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
pee->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(pee, particle);
@@ -259,7 +253,6 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
} else if (particleName == "alpha" ||
particleName == "He3") {
//ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
@@ -271,7 +264,6 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
//G4hMultipleScattering* pimsc = new G4hMultipleScattering();
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
@@ -281,7 +273,6 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
//G4hMultipleScattering* kmsc = new G4hMultipleScattering();
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
@@ -291,7 +282,11 @@ void G4EmStandardPhysicsWVI::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIRelModel());
G4CoulombScattering* pss = new G4CoulombScattering();
pss->SetEmModel(new G4hCoulombScatteringModel());
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option1.cc 99938 2016-10-12 08:06:52Z gcosmo $
// $Id: G4EmStandardPhysics_option1.cc 107183 2017-11-03 14:57:23Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -84,6 +84,7 @@
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -182,33 +183,27 @@ void G4EmStandardPhysics_option1::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* pss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
@@ -223,15 +218,14 @@ void G4EmStandardPhysics_option1::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetNewDisplacementFlag(false);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -249,15 +243,14 @@ void G4EmStandardPhysics_option1::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetNewDisplacementFlag(false);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -280,7 +273,6 @@ void G4EmStandardPhysics_option1::ConstructProcess()
} else if (particleName == "alpha" ||
particleName == "He3" ) {
//ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
@@ -292,7 +284,6 @@ void G4EmStandardPhysics_option1::ConstructProcess()
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
//G4hMultipleScattering* pimsc = new G4hMultipleScattering();
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
@@ -302,23 +293,23 @@ void G4EmStandardPhysics_option1::ConstructProcess()
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
//G4hMultipleScattering* kmsc = new G4hMultipleScattering();
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
ph->RegisterProcess(kp, particle);
ph->RegisterProcess(kss, particle);
// } else if (particleName == "proton" ) {
} else if (particleName == "proton" ||
particleName == "anti_proton") {
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option2.cc 99938 2016-10-12 08:06:52Z gcosmo $
// $Id: G4EmStandardPhysics_option2.cc 107183 2017-11-03 14:57:23Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -90,6 +90,7 @@
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -188,33 +189,27 @@ void G4EmStandardPhysics_option2::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* pss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
@@ -230,15 +225,14 @@ void G4EmStandardPhysics_option2::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetNewDisplacementFlag(false);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -248,8 +242,8 @@ void G4EmStandardPhysics_option2::ConstructProcess()
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1,1);
brem->SetEmModel(br2,2);
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(GeV);
ph->RegisterProcess(msc, particle);
@@ -265,11 +259,10 @@ void G4EmStandardPhysics_option2::ConstructProcess()
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetNewDisplacementFlag(false);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
@@ -283,8 +276,8 @@ void G4EmStandardPhysics_option2::ConstructProcess()
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1,1);
brem->SetEmModel(br2,2);
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(GeV);
ph->RegisterProcess(msc, particle);
@@ -305,7 +298,6 @@ void G4EmStandardPhysics_option2::ConstructProcess()
} else if (particleName == "alpha" ||
particleName == "He3") {
//ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
@@ -339,11 +331,13 @@ void G4EmStandardPhysics_option2::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
ph->RegisterProcess(pmsc, particle);
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option3.cc 104571 2017-06-06 13:45:47Z gcosmo $
// $Id: G4EmStandardPhysics_option3.cc 107183 2017-11-03 14:57:23Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -61,7 +61,6 @@
#include "G4DummyModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4CoulombScattering.hh"
#include "G4UniversalFluctuation2017.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
@@ -88,6 +87,7 @@
#include "G4IonParametrisedLossModel.hh"
#include "G4NuclearStopping.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -129,6 +129,7 @@ G4EmStandardPhysics_option3::G4EmStandardPhysics_option3(G4int ver,
param->SetNumberOfBinsPerDecade(20);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetMuHadLateralDisplacement(true);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -189,34 +190,23 @@ void G4EmStandardPhysics_option3::ConstructProcess()
G4hPairProduction* pp = new G4hPairProduction();
G4ePairProduction* ee = new G4ePairProduction();
// muon & hadron multiple scattering
// G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
// mumsc->AddEmModel(0, new G4WentzelVIModel());
// G4hMultipleScattering* pimsc = new G4hMultipleScattering();
// pimsc->AddEmModel(0, new G4WentzelVIModel());
// G4hMultipleScattering* kmsc = new G4hMultipleScattering();
// kmsc->AddEmModel(0, new G4WentzelVIModel());
//G4hMultipleScattering* pmsc = new G4hMultipleScattering();
//pmsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// nuclear stopping
G4NuclearStopping* pnuc = new G4NuclearStopping();
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(), 1);
cs->SetEmModel(new G4KleinNishinaModel());
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel(), 1);
pee->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(pee, particle);
ph->RegisterProcess(cs, particle);
@@ -229,15 +219,14 @@ void G4EmStandardPhysics_option3::ConstructProcess()
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
eIoni->SetFluctModel(new G4UniversalFluctuation2017());
G4eBremsstrahlung* brem = new G4eBremsstrahlung();
G4SeltzerBergerModel* br1 = new G4SeltzerBergerModel();
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1,1);
brem->SetEmModel(br2,2);
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(GeV);
// register processes
@@ -252,15 +241,14 @@ void G4EmStandardPhysics_option3::ConstructProcess()
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
eIoni->SetFluctModel(new G4UniversalFluctuation2017());
G4eBremsstrahlung* brem = new G4eBremsstrahlung();
G4SeltzerBergerModel* br1 = new G4SeltzerBergerModel();
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1,1);
brem->SetEmModel(br2,2);
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(GeV);
// register processes
@@ -281,7 +269,6 @@ void G4EmStandardPhysics_option3::ConstructProcess()
ph->RegisterProcess(muIoni, particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
//ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "alpha" ||
particleName == "He3") {
@@ -334,7 +321,6 @@ void G4EmStandardPhysics_option3::ConstructProcess()
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.2, 50*um);
hIoni->SetFluctModel(new G4UniversalFluctuation2017());
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(hIoni, particle);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmStandardPhysics_option4.cc 104020 2017-05-08 07:34:58Z gcosmo $
// $Id: G4EmStandardPhysics_option4.cc 107332 2017-11-08 16:44:06Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -33,6 +33,10 @@
//
// Modified:
//
// 22.09.17 M.Novak: change msc model for e-/e+ below 100 MeV from Urban+
// UseDistanceToBoundary stepping to GS + Mott-correction + error
// -free stepping.
//
//----------------------------------------------------------------------------
//
@@ -58,6 +62,7 @@
#include "G4hMultipleScattering.hh"
#include "G4MscStepLimitType.hh"
#include "G4UrbanMscModel.hh"
#include "G4GoudsmitSaundersonMscModel.hh"
#include "G4DummyModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4CoulombScattering.hh"
@@ -91,6 +96,7 @@
#include "G4IonParametrisedLossModel.hh"
#include "G4NuclearStopping.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -131,11 +137,14 @@ G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver,
param->SetLowestElectronEnergy(100*eV);
param->SetNumberOfBinsPerDecade(20);
param->ActivateAngularGeneratorForIonisation(true);
param->SetMscRangeFactor(0.02);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetUseMottCorrection(true); // use Mott-correction for e-/e+ msc gs
param->SetMscStepLimitType(fUseSafetyPlus); // error-free stepping for e-/e+ msc gs
param->SetMscSkin(3); // error-free stepping for e-/e+ msc gs
param->SetMscRangeFactor(0.2); // error-free stepping for e-/e+ msc gs
param->SetMuHadLateralDisplacement(true);
// param->SetLatDisplacementBeyondSafety(true);
param->SetFluo(true);
// param->SetFluo(true);
param->SetAugerCascade(true);
SetPhysicsType(bElectromagnetic);
}
@@ -179,7 +188,7 @@ void G4EmStandardPhysics_option4::ConstructParticle()
void G4EmStandardPhysics_option4::ConstructProcess()
{
if(verbose > 1) {
if(verbose > -1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
@@ -197,20 +206,16 @@ void G4EmStandardPhysics_option4::ConstructProcess()
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
mumsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* pimsc = new G4hMultipleScattering();
pimsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4hMultipleScattering* kmsc = new G4hMultipleScattering();
kmsc->SetEmModel(new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* pss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
@@ -221,25 +226,24 @@ void G4EmStandardPhysics_option4::ConstructProcess()
// nuclear stopping
G4NuclearStopping* pnuc = new G4NuclearStopping();
G4NuclearStopping* inuc = new G4NuclearStopping();
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(theLivermorePEModel,1);
pe->SetEmModel(theLivermorePEModel);
ph->RegisterProcess(pe, particle);
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(),1);
cs->SetEmModel(new G4KleinNishinaModel());
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
cs->AddEmModel(0, theLowEPComptonModel);
@@ -249,7 +253,7 @@ void G4EmStandardPhysics_option4::ConstructProcess()
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* thePenelopeGCModel = new G4PenelopeGammaConversionModel();
thePenelopeGCModel->SetHighEnergyLimit(1*GeV);
gc->SetEmModel(thePenelopeGCModel,1);
gc->SetEmModel(thePenelopeGCModel);
ph->RegisterProcess(gc, particle);
// Rayleigh scattering
@@ -259,16 +263,18 @@ void G4EmStandardPhysics_option4::ConstructProcess()
// multiple scattering
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
// e-/e+ msc gs with Mott-correction
// (Mott-correction is set through G4EmParameters)
G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -286,8 +292,8 @@ void G4EmStandardPhysics_option4::ConstructProcess()
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1,1);
brem->SetEmModel(br2,2);
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(GeV);
// register processes
@@ -301,16 +307,18 @@ void G4EmStandardPhysics_option4::ConstructProcess()
// multiple scattering
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
// e-/e+ msc gs with Mott-correction
// (Mott-correction is set through G4EmParameters)
G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
@@ -328,8 +336,8 @@ void G4EmStandardPhysics_option4::ConstructProcess()
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1,1);
brem->SetEmModel(br2,2);
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(GeV);
// register processes
@@ -371,7 +379,7 @@ void G4EmStandardPhysics_option4::ConstructProcess()
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(pnuc, particle);
ph->RegisterProcess(inuc, particle);
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
@@ -400,6 +408,8 @@ void G4EmStandardPhysics_option4::ConstructProcess()
} else if (particleName == "proton" ||
particleName == "anti_proton") {
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.1, 10*um);
@@ -407,7 +417,7 @@ void G4EmStandardPhysics_option4::ConstructProcess()
ph->RegisterProcess(hIoni, particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
ph->RegisterProcess(pnuc, particle);
} else if (particleName == "B+" ||
@@ -449,6 +459,7 @@ void G4EmStandardPhysics_option4::ConstructProcess()
// Nuclear stopping
pnuc->SetMaxKinEnergy(MeV);
inuc->SetMaxKinEnergy(MeV);
// Deexcitation
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
@@ -1,4 +1,4 @@
# $Id: GNUmakefile 77567 2013-11-26 09:40:31Z gcosmo $
# $Id: GNUmakefile 106950 2017-10-31 08:26:27Z gcosmo $
# ---------------------------------------------------------------------------
# GNUmakefile for physics_lists/constructors/electromagnetic library.
# Gunter Folger 10-Jan-2012.
@@ -60,6 +60,8 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
-I$(G4BASE)/processes/hadronic/models/gamma_nuclear/include \
-I$(G4BASE)/processes/hadronic/models/lend/include \
-I$(G4BASE)/processes/hadronic/models/lepto_nuclear/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \
@@ -1,4 +1,4 @@
$Id: History 104601 2017-06-07 09:01:37Z gcosmo $
$Id: History 107436 2017-11-13 07:36:25Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,18 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10-November-2017, T.Koi (phys-ctor-glnuclear-V10-03-04)
-Dumpping LEND target information in G4LENDBertiniGammaElectroNuclearBuilder
30-October-2017, T.Koi (phys-ctor-glnuclear-V10-03-03)
- Fix problem on GNUMake system
27-October-2017, T.Koi (phys-ctor-glnuclear-V10-03-02)
- Add G4LENDBertiniGammaElectroNuclearBuilder, which uses LEND
for low energy gamma-nuclear interaction
- Add option and UI command to use G4LENDBertiniGammaElectroNuclearBuilder
in the physics constructor of EmExtraPhysics
06-June-2017, V.Ivanchenko (phys-ctor-glnuclear-V10-03-01)
- G4EmExtraPhysics, G4EmMessenger - added extra UI commands to define
cross section factors for rare processes (requirement of ShiP
@@ -70,6 +70,7 @@ public:
void Synch(G4bool val);
void SynchAll(G4bool val);
void GammaNuclear(G4bool val);
void LENDGammaNuclear(G4bool val);
void ElectroNuclear(G4bool val);
void MuonNuclear(G4bool val);
void GammaToMuMu(G4bool val);
@@ -82,6 +83,7 @@ public:
private:
static G4bool gnActivated;
static G4bool gLENDActivated;
static G4bool eActivated;
static G4bool munActivated;
static G4bool synActivated;
@@ -61,6 +61,7 @@ private:
G4UIcmdWithABool* theSynch;
G4UIcmdWithABool* theSynchAll;
G4UIcmdWithABool* theGN;
G4UIcmdWithABool* theGLENDN;
G4UIcmdWithABool* theEN;
G4UIcmdWithABool* theMUN;
G4UIcmdWithABool* theGMM;
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef G4LENDBertiniGammaElectroNuclearBuilder_h
#define G4LENDBertiniGammaElectroNuclearBuilder_h 1
#include "G4BertiniElectroNuclearBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4TheoFSGenerator.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4QGSModel.hh"
#include "G4GammaParticipants.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4CascadeInterface.hh"
#include "G4ElectroVDNuclearModel.hh"
#include "G4PhotoNuclearProcess.hh"
#include "G4ElectronNuclearProcess.hh"
#include "G4PositronNuclearProcess.hh"
//A. Dotti (June2013): No need to change this class for MT
// Since each thread owns its own instance (created by G4EmExtraPhysics)
class G4LENDBertiniGammaElectroNuclearBuilder
:public G4BertiniElectroNuclearBuilder
{
using base = G4BertiniElectroNuclearBuilder;
public:
G4LENDBertiniGammaElectroNuclearBuilder(G4bool eNucl);
virtual ~G4LENDBertiniGammaElectroNuclearBuilder();
public:
virtual void Build();
};
#endif
@@ -11,7 +11,7 @@
#
# Generated on : 10/01/2013
#
# $Id: sources.cmake 78907 2014-02-03 14:59:37Z gcosmo $
# $Id: sources.cmake 106950 2017-10-31 08:26:27Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -66,7 +66,9 @@ include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_exci
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/multifragmentation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/photon_evaporation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/util/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/gamma_nuclear/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lepto_nuclear/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lend/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/diffraction/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/hadronization/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/management/include)
@@ -86,10 +88,12 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_glnuclear
G4BertiniElectroNuclearBuilder.hh
G4EmExtraPhysics.hh
G4EmMessenger.hh
G4LENDBertiniGammaElectroNuclearBuilder.hh
SOURCES
G4BertiniElectroNuclearBuilder.cc
G4EmExtraPhysics.cc
G4EmMessenger.cc
G4LENDBertiniGammaElectroNuclearBuilder.cc
GRANULAR_DEPENDENCIES
G4baryons
G4bosons
@@ -55,6 +55,7 @@
#include "G4SynchrotronRadiation.hh"
#include "G4BertiniElectroNuclearBuilder.hh"
#include "G4LENDBertiniGammaElectroNuclearBuilder.hh"
#include "G4MuonNuclearProcess.hh"
#include "G4MuonVDNuclearModel.hh"
@@ -73,6 +74,7 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmExtraPhysics);
G4bool G4EmExtraPhysics::gnActivated = true;
G4bool G4EmExtraPhysics::eActivated = true;
G4bool G4EmExtraPhysics::gLENDActivated = false;
G4bool G4EmExtraPhysics::munActivated = true;
G4bool G4EmExtraPhysics::synActivated = false;
G4bool G4EmExtraPhysics::synActivatedForAll = false;
@@ -124,6 +126,11 @@ void G4EmExtraPhysics::GammaNuclear(G4bool val)
gnActivated = val;
}
void G4EmExtraPhysics::LENDGammaNuclear(G4bool val)
{
gLENDActivated = val;
}
void G4EmExtraPhysics::ElectroNuclear(G4bool val)
{
eActivated = val;
@@ -183,7 +190,11 @@ void G4EmExtraPhysics::ConstructProcess()
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
if(gnActivated) {
if ( gLENDActivated != true ) {
theGNPhysics = new G4BertiniElectroNuclearBuilder(eActivated);
} else {
theGNPhysics = new G4LENDBertiniGammaElectroNuclearBuilder(eActivated);
}
theGNPhysics->Build();
}
if(munActivated) {
@@ -74,6 +74,11 @@ G4EmMessenger::G4EmMessenger(G4EmExtraPhysics* ab)
theGN->SetGuidance("Switching on gamma nuclear physics.");
theGN->AvailableForStates(G4State_PreInit);
// command for lend gamma nuclear physics.
theGLENDN = new G4UIcmdWithABool("/physics_lists/em/LENDGammaNuclear",this);
theGLENDN->SetGuidance("Switching on LEND gamma nuclear physics.");
theGLENDN->AvailableForStates(G4State_PreInit);
theEN = new G4UIcmdWithABool("/physics_lists/em/ElectroNuclear",this);
theEN->SetGuidance("Switching on e+- nuclear physics.");
theEN->AvailableForStates(G4State_PreInit);
@@ -113,6 +118,7 @@ G4EmMessenger::~G4EmMessenger()
delete theSynch;
delete theSynchAll;
delete theGN;
delete theGLENDN;
delete theEN;
delete theMUN;
delete theGMM;
@@ -130,6 +136,7 @@ void G4EmMessenger::SetNewValue(G4UIcommand* aComm, G4String aS)
if(aComm==theSynch) theB->Synch(theSynch->GetNewBoolValue(aS));
if(aComm==theSynchAll) theB->SynchAll(theSynchAll->GetNewBoolValue(aS));
if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
if(aComm==theGLENDN) theB->LENDGammaNuclear(theGLENDN->GetNewBoolValue(aS));
if(aComm==theEN) theB->ElectroNuclear(theEN->GetNewBoolValue(aS));
if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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: G4BertiniElectroNuclearBuilder.cc 104018 2017-05-08 07:32:45Z gcosmo $
//
//---------------------------------------------------------------------------
//
// ClassName: G4LENDBertiniGammaElectroNuclearBuilder
//
// Author: 2017 Oct. T. Koi
//
// Modified:
//----------------------------------------------------------------------------
//
#include "G4LENDBertiniGammaElectroNuclearBuilder.hh"
#include "G4LENDorBERTModel.hh"
#include "G4LENDCombinedCrossSection.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4ProcessManager.hh"
G4LENDBertiniGammaElectroNuclearBuilder::G4LENDBertiniGammaElectroNuclearBuilder(G4bool eNucl) :
G4BertiniElectroNuclearBuilder( eNucl )
/*
thePhotoNuclearProcess(nullptr), theElectronNuclearProcess(nullptr),
thePositronNuclearProcess(nullptr), theElectroReaction(nullptr),
theGammaReaction(nullptr), theModel(nullptr), theCascade(nullptr),
theStringModel(nullptr), theFragmentation(nullptr), theStringDecay(nullptr),
wasActivated(false), eActivated(eNucl)*/
{
}
G4LENDBertiniGammaElectroNuclearBuilder::~G4LENDBertiniGammaElectroNuclearBuilder()
{
if ( wasActivated ) {
delete theFragmentation;
delete theStringDecay;
}
}
void G4LENDBertiniGammaElectroNuclearBuilder::Build()
{
//G4cout << "G4LENDBertiniGammaElectroNuclearBuilder::Build()" << G4endl;
base::Build();
if ( getenv ("G4LENDDATA") == NULL ) {
G4String message = "\n Skipping activation of Low Energy Nuclear Data (LEND) model for gamma nuclear interactions.\n The LEND model needs data files and they are available from ftp://gdo-nuclear.ucllnl.org/GND_after2013/GND_v1.3.tar.gz.\n Please set the environment variable G4LENDDATA to point to the directory named v1.3 extracted from the archive file.\n";
G4Exception( "G4LENDBertiniGammaElectroNuclearBuilder::Build()"
, "G4LENDBertiniGammaElectroNuclearBuilder001"
, JustWarning , message);
return;
}
theGammaReaction->SetMinEnergy(20*MeV);
G4LENDorBERTModel* theGammaReactionLowE = new G4LENDorBERTModel( G4Gamma::Gamma() );
theGammaReactionLowE->DumpLENDTargetInfo(true);
G4LENDCombinedCrossSection* theGammaCrossSectionLowE = new G4LENDCombinedCrossSection( G4Gamma::Gamma() );
theGammaReactionLowE->SetMaxEnergy(20*MeV);
thePhotoNuclearProcess->RegisterMe(theGammaReactionLowE);
thePhotoNuclearProcess->AddDataSet(theGammaCrossSectionLowE);
}
@@ -1,4 +1,4 @@
$Id: History 104019 2017-05-08 07:34:08Z gcosmo $
$Id: History 107437 2017-11-13 07:37:11Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,31 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10-Nov-2017, T. Koi (phys-ctor-helastic-V10-03-04)
-Dumpping LEND target information in G4HadronElasticPhysicsLEND
7-Nov-2017, T. Koi (phys-ctor-helastic-V10-03-03)
- G4HadronElasticPhysicsLEND: Modify setting of selection of target data
19-Oct-2017, A. Ribon (phys-ctor-helastic-V10-03-02)
- G4HadronHElasticPhysics : use G4NuclNuclDiffuseElastic for the elastic
scattering of light and generic ions (this is possible now because
the latest version of G4NuclNuclDiffuseElastic respects reproducibility).
14-Aug-2017, A. Ribon (phys-ctor-helastic-V10-03-01)
- G4HadronElasticPhysics, G4HadronHElasticPhysics : changed kaon elastic
cross sections from, respectively, Gheisha (used in G4HadronElasticPhysics)
and Chips (used in G4HadronHElasticPhysics), to Grichine's Glauber Gribov
ones. In this way, the total (elastic + inelastic) kaon cross sections
are consistent with the PDG ones.
Notes:
- For the time being, kept the original elastic final-state model
(i.e. Gheisha in G4HadronElasticPhysics and Chips in
G4HadronHElasticPhysics).
- These two changes should be used also for the next patch of G4 10.3
(i.e. for 10.3.p03 : the two files G4HadronElasticPhysics.cc and
G4HadronHElasticPhysics.cc can be taken directly).
04-May-2017, V.Ivanchenko (phys-ctor-helastic-V10-03-00)
- G4ThermalNeutrons - new class for addition of thermal neutron
scattering below 4 eV (backported from CMS simulation)
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronElasticPhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
// $Id: G4HadronElasticPhysics.cc 105730 2017-08-16 12:51:52Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -63,6 +63,7 @@
#include "G4ElasticHadrNucleusHE.hh"
#include "G4AntiNuclElastic.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4ComponentGGNuclNuclXsc.hh"
#include "G4BGGNucleonElasticXS.hh"
@@ -142,6 +143,9 @@ void G4HadronElasticPhysics::ConstructProcess()
G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
he->SetMinEnergy(elimitPi);
G4VCrossSectionDataSet* theComponentGGHadronNucleusData =
new G4CrossSectionElastic( new G4ComponentGGHadronNucleusXsc );
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
@@ -232,6 +236,13 @@ void G4HadronElasticPhysics::ConstructProcess()
) {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
//AR-14Aug2017 : Replaced Gheisha elastic kaon cross sections with
// Grichine's Glauber-Gribov ones. In this way, the
// total (elastic + inelastic) kaon cross sections
// are consistent with the PDG ones.
// For the time being, kept Gheisha elastic as
// final-state model.
hel->AddDataSet( theComponentGGHadronNucleusData );
hel->RegisterMe(lhep0);
pmanager->AddDiscreteProcess(hel);
if(verbose > 1) {
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronElasticPhysicsLEND.cc 71037 2013-06-10 09:20:54Z gcosmo $
// $Id: G4HadronElasticPhysicsLEND.cc 107437 2017-11-13 07:37:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -94,13 +94,14 @@ void G4HadronElasticPhysicsLEND::ConstructProcess()
G4LENDElastic* lend = new G4LENDElastic( G4Neutron::Neutron() );
if ( evaluation.size() > 0 ) lend->ChangeDefaultEvaluation( evaluation );
//lend->AllowNaturalAbundanceTarget();
lend->AllowAnyCandidateTarget();
lend->AllowNaturalAbundanceTarget();
//lend->AllowAnyCandidateTarget();
lend->DumpLENDTargetInfo(true);
hel->RegisterMe(lend);
G4LENDElasticCrossSection* lend_XS = new G4LENDElasticCrossSection( G4Neutron::Neutron() );
if ( evaluation.size() > 0 ) lend_XS->ChangeDefaultEvaluation( evaluation );
//lend_XS->AllowNaturalAbundanceTarget();
lend_XS->AllowAnyCandidateTarget();
lend_XS->AllowNaturalAbundanceTarget();
//lend_XS->AllowAnyCandidateTarget();
hel->AddDataSet( lend_XS );
if(verbose > 1) {
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronHElasticPhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
// $Id: G4HadronHElasticPhysics.cc 106721 2017-10-20 09:46:54Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -72,6 +72,7 @@
#include "G4ChipsKaonZeroElasticXS.hh"
#include "G4ChipsHyperonElasticXS.hh"
#include "G4ChipsAntiBaryonElasticXS.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4ComponentGGNuclNuclXsc.hh"
#include "G4CrossSectionDataSetRegistry.hh"
@@ -149,6 +150,9 @@ void G4HadronHElasticPhysics::ConstructProcess() {
G4NuclNuclDiffuseElastic* diffuseNuclNuclElastic = new G4NuclNuclDiffuseElastic();
diffuseNuclNuclElastic->SetMinEnergy( elimitDiffuse );
G4VCrossSectionDataSet* theComponentGGHadronNucleusData =
new G4CrossSectionElastic( new G4ComponentGGHadronNucleusXsc );
G4VCrossSectionDataSet* theComponentGGNuclNuclData =
new G4CrossSectionElastic( new G4ComponentGGNuclNuclXsc() );
@@ -272,13 +276,13 @@ void G4HadronHElasticPhysics::ConstructProcess() {
pname == "kaon0L"
) {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
if ( pname == "kaon-" ) {
hel->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusElasticXS::Default_Name() ) );
} else if ( pname == "kaon+" ) {
hel->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusElasticXS::Default_Name() ) );
} else {
hel->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( G4ChipsKaonZeroElasticXS::Default_Name() ) );
}
//AR-14Aug2017 : Replaced Chips elastic kaon cross sections with
// Grichine's Glauber-Gribov ones. In this way, the
// total (elastic + inelastic) kaon cross sections
// are consistent with the PDG ones.
// For the time being, kept Chips elastic as
// final-state model.
hel->AddDataSet( theComponentGGHadronNucleusData );
hel->RegisterMe( chips1 );
pmanager->AddDiscreteProcess( hel );
if(fDiffraction) { hel->SetDiffraction(diffGen, diffRatio); }
@@ -295,11 +299,7 @@ void G4HadronHElasticPhysics::ConstructProcess() {
) {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->AddDataSet( theComponentGGNuclNuclData );
// To preserve reproducibility, replace temporarily
// G4NuclNuclDiffuseElastic with the Gheisha elastic model.
//hel->RegisterMe( diffuseNuclNuclElastic );
G4HadronElastic* lhepLightIon = new G4HadronElastic();
hel->RegisterMe( lhepLightIon );
hel->RegisterMe( diffuseNuclNuclElastic );
pmanager->AddDiscreteProcess( hel );
if ( verbose > 1 ) {
G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
@@ -333,16 +333,14 @@ void G4HadronHElasticPhysics::ConstructProcess() {
}
} else if ( pname == "GenericIon" ) {
// To preserve reproducibility, disable temporarily
// G4NuclNuclDiffuseElastic.
//G4HadronElasticProcess* hel = new G4HadronElasticProcess();
//hel->AddDataSet( theComponentGGNuclNuclData );
//hel->RegisterMe( diffuseNuclNuclElastic );
//pmanager->AddDiscreteProcess( hel );
//if ( verbose > 1 ) {
// G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
// << " added for " << particle->GetParticleName() << G4endl;
//}
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->AddDataSet( theComponentGGNuclNuclData );
hel->RegisterMe( diffuseNuclNuclElastic );
pmanager->AddDiscreteProcess( hel );
if ( verbose > 1 ) {
G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
<< " added for " << particle->GetParticleName() << G4endl;
}
}
@@ -1,4 +1,4 @@
$Id: History 102618 2017-02-10 07:59:27Z gcosmo $
$Id: History 107320 2017-11-08 16:30:22Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -13,6 +13,29 @@ introduced in the code and keeptrack of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
7-Nov-2017, Tatsumi Koi (phys-ctor-hinelastic-V10-03-06)
- Adding G4HadronPhysicsShieldingLEND
6-Nov-2017, Tatsumi Koi (phys-ctor-hinelastic-V10-03-05)
- Fix registration of cross section data set in G4HadronPhysicsShielding
16-Oct-2017, Alberto Ribon (phys-ctor-hinelastic-V10-03-04)
- G4HadronPhysicsFTFQGSP_BERT : fixing trivial compiler warnings
of the previous tag.
16-Oct-2017, Alberto Ribon (phys-ctor-hinelastic-V10-03-03)
- G4HadronPhysicsFTFQGSP_BERT : new hadron physics similar to
G4HadronPhysicsFTFP_BERT, but with QGS fragmentation of strings
(instead of the Lund string fragmentation).
28-Jul-2017, Andrea Dotti (phys-ctor-hinelastic-V10-03-02)
- Refactoring of QGSP_BERT, QGSP_BIC w/ variants
26-Jul-2017, Andrea Dotti
- Refactoring code of all FTFP_BERT variant, FTF_BIC and QGS_BIC
14-Jul-2017, Andrea Dotti (phys-ctor-hinelastic-V10-03-01)
- Refactoring of code of FTFP_BERT and register physics builders
09-Feb-2017, Makoto Asai (phys-ctor-hinelastic-V10-03-00)
- Print-out of the transition energy region between FTFP and BERT
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTFP_BERT.hh 101741 2016-11-24 10:45:35Z gcosmo $
// $Id: G4HadronPhysicsFTFP_BERT.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -46,28 +46,10 @@
#include "G4VPhysicsConstructor.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"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4Cache.hh"
class G4ComponentGGHadronNucleusXsc;
class G4VCrossSectionDataSet;
class G4HadronPhysicsFTFP_BERT : public G4VPhysicsConstructor
@@ -78,41 +60,39 @@ class G4HadronPhysicsFTFP_BERT : public G4VPhysicsConstructor
virtual ~G4HadronPhysicsFTFP_BERT();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void ConstructParticle() override;
//This will call in order:
// DumpBanner (for master)
// CreateModels
// ExtraConfiguation
virtual void ConstructProcess() override;
private:
void CreateModels();
virtual void TerminateWorker() override;
protected:
G4bool QuasiElastic;
//This calls the specific ones for the different particles in order
virtual void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Kaon();
virtual void Others();
virtual void DumpBanner();
//This contains extra configurataion specific to this PL
virtual void ExtraConfiguration();
// Simplify handling of TLS data, encapsulate everyhing in a structure
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4PionBuilder * thePion;
G4BertiniPionBuilder * theBertiniPion;
G4FTFPPionBuilder * theFTFPPion;
G4double minFTFP_pion;
G4double maxBERT_pion;
G4double minFTFP_kaon;
G4double maxBERT_kaon;
G4double minFTFP_proton;
G4double maxBERT_proton;
G4double minFTFP_neutron;
G4double maxBERT_neutron;
G4KaonBuilder * theKaon;
G4BertiniKaonBuilder * theBertiniKaon;
G4FTFPKaonBuilder * theFTFPKaon;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
G4FTFPProtonBuilder * theFTFPPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
//Thread-private data write them here to delete them
G4VectorCache<G4VCrossSectionDataSet*> xs_ds;
G4Cache<G4ComponentGGHadronNucleusXsc*> xs_k;
};
#endif
@@ -34,75 +34,28 @@
// The hadron physics of FTFP_BERT_ATL has the transition between Bertini
// (BERT) intra-nuclear cascade model and Fritiof (FTF) string model in the
// energy region [9, 12] GeV (instead of [4, 5] GeV as in FTFP_BERT).
//
// Modified:
// 18.07.2017 A.Dotti: refactor forllowin new code
//---------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsFTFP_BERT_ATL_h
#define G4HadronPhysicsFTFP_BERT_ATL_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsFTFP_BERT_ATL : public G4VPhysicsConstructor
class G4HadronPhysicsFTFP_BERT_ATL : public G4HadronPhysicsFTFP_BERT
{
public:
G4HadronPhysicsFTFP_BERT_ATL(G4int verbose =1);
G4HadronPhysicsFTFP_BERT_ATL(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTFP_BERT_ATL();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual ~G4HadronPhysicsFTFP_BERT_ATL() {}
private:
void CreateModels();
G4bool QuasiElastic;
// Simplify handling of TLS data, encapsulate everyhing in a structure
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4PiKBuilder * thePiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
G4FTFPProtonBuilder * theFTFPPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
//Modify the minimum needed
virtual void Pion() override;
virtual void Kaon() override;
virtual void DumpBanner() override;
};
#endif
@@ -33,88 +33,28 @@
// to include neutron HP
//
// Modified:
//
// 18.07.2017: A.Dotti: refactoring code
//----------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsFTFP_BERT_HP_h
#define G4HadronPhysicsFTFP_BERT_HP_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"
#include "G4VPhysicsConstructor.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"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsFTFP_BERT_HP : public G4VPhysicsConstructor
class G4HadronPhysicsFTFP_BERT_HP : public G4HadronPhysicsFTFP_BERT
{
public:
G4HadronPhysicsFTFP_BERT_HP(G4int verbose =1);
G4HadronPhysicsFTFP_BERT_HP(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTFP_BERT_HP();
virtual ~G4HadronPhysicsFTFP_BERT_HP() {}
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
protected:
//Modify the minimum needed
virtual void Neutron() override;
virtual void DumpBanner() override;
virtual void ExtraConfiguration() override;
private:
void CreateModels();
G4HadronicProcess* FindInelasticProcess(const G4ParticleDefinition*);
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4NeutronPHPBuilder * theHPNeutron;
G4PionBuilder * thePion;
G4BertiniPionBuilder * theBertiniPion;
G4FTFPPionBuilder * theFTFPPion;
G4KaonBuilder * theKaon;
G4BertiniKaonBuilder * theBertiniKaon;
G4FTFPKaonBuilder * theFTFPKaon;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
G4FTFPProtonBuilder * theFTFPPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
//G4VCrossSectionDataSet * BGGProton;
//G4VCrossSectionDataSet * BGGNeutron;
G4bool QuasiElastic;
double minBERT_neutron;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTFP_BERT_TRV.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsFTFP_BERT_TRV.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -36,76 +36,27 @@
// 08.06.2006 V.Ivanchenko: remove stopping
// 19.06.2008 G.Folger: change default for QE to NOT use Chips QE
// 01.11.2012 W.Pokorski & A.Ribon: use new cross sections
// 18.07.2016 A.Dotti: refactor following new code
//
//----------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsFTFP_BERT_TRV_h
#define G4HadronPhysicsFTFP_BERT_TRV_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsFTFP_BERT_TRV : public G4VPhysicsConstructor
class G4HadronPhysicsFTFP_BERT_TRV : public G4HadronPhysicsFTFP_BERT
{
public:
G4HadronPhysicsFTFP_BERT_TRV(G4int verbose =1);
G4HadronPhysicsFTFP_BERT_TRV(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTFP_BERT_TRV();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual ~G4HadronPhysicsFTFP_BERT_TRV() {}
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4PiKBuilder * thePiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
G4FTFPProtonBuilder * theFTFPPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
G4bool QuasiElastic;
//Modify the minimum needed
virtual void Pion() override;
virtual void Kaon() override;
virtual void DumpBanner() override;
};
#endif
@@ -0,0 +1,163 @@
//
// ********************************************************************
// * 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: $
//
//---------------------------------------------------------------------------
// Author: Alberto Ribon
// Date: October 2017
//
// Hadron physics for the new, experimental physics list FTFQGSP_BERT,
// with QGS fragmentation of strings, instead of the Lund string
// fragmentation. Note that the string excitation is still done with FTF,
// exactly as for FTFP_BERT.
// Given that it is an experimental, and perhaps temporary, new type of
// hadron physics, corresponding builders are not created and everything
// is implemented directly in this class.
//----------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsFTFQGSP_BERT_h
#define G4HadronPhysicsFTFQGSP_BERT_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4NeutronRadCapture.hh"
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4PreCompoundModel.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4CascadeInterface.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4AntiDeuteronInelasticProcess.hh"
#include "G4AntiTritonInelasticProcess.hh"
#include "G4AntiHe3InelasticProcess.hh"
#include "G4AntiAlphaInelasticProcess.hh"
#include "G4ChipsHyperonInelasticXS.hh"
class G4HadronPhysicsFTFQGSP_BERT : public G4VPhysicsConstructor
{
public:
G4HadronPhysicsFTFQGSP_BERT(G4int verbose =1);
G4HadronPhysicsFTFQGSP_BERT(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTFQGSP_BERT();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
void CreateModels();
G4NeutronRadCapture* theNeutronCaptureModel;
G4PreCompoundModel* thePreEquilib;
G4GeneratorPrecompoundInterface* theCascade;
G4FTFModel* theStringModel;
G4ExcitedStringDecay* theStringDecay;
G4QGSMFragmentation* theQGSMFragmentation;
G4ExcitationHandler* theHandler;
G4TheoFSGenerator* theModel1;
G4TheoFSGenerator* theModel2;
G4TheoFSGenerator* theModel3;
G4CascadeInterface* theBertini1;
G4CascadeInterface* theBertini2;
G4HadronCaptureProcess* theNeutronCaptureProcess;
G4NeutronInelasticProcess* theNeutronInelastic;
G4ProtonInelasticProcess* theProtonInelastic;
G4PionMinusInelasticProcess* thePionMinusInelastic;
G4PionPlusInelasticProcess* thePionPlusInelastic;
G4KaonMinusInelasticProcess* theKaonMinusInelastic;
G4KaonPlusInelasticProcess* theKaonPlusInelastic;
G4KaonZeroLInelasticProcess* theKaonZeroLInelastic;
G4KaonZeroSInelasticProcess* theKaonZeroSInelastic;
G4LambdaInelasticProcess* theLambdaInelastic;
G4AntiLambdaInelasticProcess* theAntiLambdaInelastic;
G4SigmaMinusInelasticProcess* theSigmaMinusInelastic;
G4AntiSigmaMinusInelasticProcess* theAntiSigmaMinusInelastic;
G4SigmaPlusInelasticProcess* theSigmaPlusInelastic;
G4AntiSigmaPlusInelasticProcess* theAntiSigmaPlusInelastic;
G4XiZeroInelasticProcess* theXiZeroInelastic;
G4AntiXiZeroInelasticProcess* theAntiXiZeroInelastic;
G4XiMinusInelasticProcess* theXiMinusInelastic;
G4AntiXiMinusInelasticProcess* theAntiXiMinusInelastic;
G4OmegaMinusInelasticProcess* theOmegaMinusInelastic;
G4AntiOmegaMinusInelasticProcess* theAntiOmegaMinusInelastic;
G4AntiProtonInelasticProcess* theAntiProtonInelastic;
G4AntiNeutronInelasticProcess* theAntiNeutronInelastic;
G4AntiDeuteronInelasticProcess* theAntiDeuteronInelastic;
G4AntiTritonInelasticProcess* theAntiTritonInelastic;
G4AntiHe3InelasticProcess* theAntiHe3Inelastic;
G4AntiAlphaInelasticProcess* theAntiAlphaInelastic;
G4VCrossSectionDataSet* thePiXS;
G4VCrossSectionDataSet* theKaonXS;
G4VCrossSectionDataSet* theChipsHyperonInelasticXS;
G4VCrossSectionDataSet* theAntiNucleonXS;
G4VCrossSectionDataSet* theNeutronInelasticXS;
G4VCrossSectionDataSet* theNeutronCaptureXS;
};
#endif
@@ -22,7 +22,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTF_BIC.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsFTF_BIC.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -43,27 +43,11 @@
#include "G4VPhysicsConstructor.hh"
#include "G4PionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BinaryPionBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFBinaryPionBuilder.hh"
#include "G4FTFBinaryKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFBinaryProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFBinaryNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4Cache.hh"
class G4ComponentGGHadronNucleusXsc;
class G4VCrossSectionDataSet;
class G4HadronPhysicsFTF_BIC : public G4VPhysicsConstructor
{
@@ -72,41 +56,30 @@ class G4HadronPhysicsFTF_BIC : public G4VPhysicsConstructor
G4HadronPhysicsFTF_BIC(const G4String& name,G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTF_BIC();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFBinaryNeutronBuilder * theFTFBinaryNeutron;
G4BinaryNeutronBuilder * theBinaryNeutron;
G4PionBuilder * thePion;
G4KaonBuilder * theKaon;
G4BinaryPionBuilder * theBICPion;
G4BertiniKaonBuilder * theBertiniKaon;
G4FTFBinaryPionBuilder * theFTFBinaryPion;
G4FTFBinaryKaonBuilder * theFTFBinaryKaon;
G4ProtonBuilder * thePro;
G4FTFBinaryProtonBuilder * theFTFBinaryPro;
G4BinaryProtonBuilder * theBinaryPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
virtual void ConstructParticle() override;
virtual void ConstructProcess() override;
virtual void TerminateWorker() override;
protected:
G4bool QuasiElastic;
//This calls the specific ones for the different particles in order
virtual void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Kaon();
virtual void Others();
virtual void DumpBanner() {}
//This contains extra configurataion specific to this PL
virtual void ExtraConfiguration();
G4double maxBIC_pion;
G4double maxBERT_kaon; //Bertini for kaons
G4double maxBIC_proton;
G4double maxBIC_neutron;
//Thread-private data
G4VectorCache<G4VCrossSectionDataSet*> xs_ds;
G4Cache<G4ComponentGGHadronNucleusXsc*> xs_k;
};
#endif
@@ -32,6 +32,7 @@
// Author: 2011 P. Kaitaniemi
//
// Modified:
// 19.07.2017 A. Dotti: Refactor code, following FTFP_BERT
// 22.05.2014 D. Mancusi: Extend INCL++ to 20 GeV
// 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT
// 01.03.2013 D. Mancusi: Rename to G4HadronPhysicsINCLXX and introduce
@@ -49,30 +50,7 @@
#include "G4VPhysicsConstructor.hh"
#include "G4PionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4QGSPPionBuilder.hh"
#include "G4FTFPPionBuilder.hh"
#include "G4QGSPKaonBuilder.hh"
#include "G4FTFPKaonBuilder.hh"
#include "G4INCLXXPionBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4INCLXXProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4INCLXXNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4Cache.hh"
/**
* Build hadronic physics using INCL++, high-energy models (QGSP or FTFP) and
* possibly NeutronHP.
@@ -83,6 +61,7 @@
* @see G4IonINCLXXBuilder
*/
class G4VCrossSectionDataSet;
class G4ComponentGGHadronNucleusXsc;
@@ -94,49 +73,28 @@ class G4HadronPhysicsINCLXX : public G4VPhysicsConstructor
virtual ~G4HadronPhysicsINCLXX();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void ConstructParticle() override;
virtual void ConstructProcess() override;
virtual void TerminateWorker() override;
void SetQuasiElastic(G4bool value) {QuasiElastic = value;};
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4INCLXXNeutronBuilder * theINCLXXNeutron;
G4NeutronPHPBuilder * theNeutronHP;
G4PionBuilder * thePion;
G4QGSPPionBuilder * theQGSPPion;
G4FTFPPionBuilder * theFTFPPion;
G4INCLXXPionBuilder * theINCLXXPion;
G4KaonBuilder * theKaon;
G4QGSPKaonBuilder * theQGSPKaon;
G4FTFPKaonBuilder * theFTFPKaon;
G4BertiniKaonBuilder * theBertiniKaon;
G4ProtonBuilder * thePro;
G4QGSPProtonBuilder * theQGSPPro;
G4FTFPProtonBuilder * theFTFPPro;
G4INCLXXProtonBuilder * theINCLXXPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate *tpdata;
protected:
virtual void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Kaon();
virtual void Others();
//This contains extra configurataion specific to this PL
virtual void ExtraConfiguration();
G4bool QuasiElastic;
G4bool withNeutronHP;
G4bool withFTFP;
//Thread-private data write them here to delete them
G4VectorCache<G4VCrossSectionDataSet*> xs_ds;
G4Cache<G4ComponentGGHadronNucleusXsc*> xs_k;
};
#endif
@@ -32,83 +32,58 @@
// Author: Julia Yarba, FNAL/CD (2014)
// Comment: somewhat "molded" after HadronPhysicsFTFP_BETT
//
// Modified:
// 18.07.2017 A.Dotti: refactoring following new standard
//----------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsNuBeam_h
#define G4HadronPhysicsNuBeam_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
//#include "globals.hh"
//#include "G4ios.hh"
//
//#include "G4VPhysicsConstructor.hh"
//
//#include "G4PiKBuilder.hh"
//#include "G4BertiniPiKBuilder.hh"
//#include "G4FTFPPiKBuilder.hh"
//
//#include "G4ProtonBuilder.hh"
//#include "G4BertiniProtonBuilder.hh"
//#include "G4FTFPNeutronBuilder.hh"
//#include "G4FTFPProtonBuilder.hh"
// specific to NuBeam case
#include "G4QGSPLundStrFragmProtonBuilder.hh"
//#include "G4QGSPLundStrFragmProtonBuilder.hh"
//
//#include "G4NeutronBuilder.hh"
//#include "G4BertiniNeutronBuilder.hh"
//#include "G4FTFPNeutronBuilder.hh"
//
//#include "G4HyperonFTFPBuilder.hh"
//#include "G4AntiBarionBuilder.hh"
//#include "G4FTFPAntiBarionBuilder.hh"
//
//class G4ComponentGGHadronNucleusXsc;
//
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsNuBeam : public G4VPhysicsConstructor
class G4HadronPhysicsNuBeam : public G4HadronPhysicsFTFP_BERT
{
public:
G4HadronPhysicsNuBeam(G4int verbose =1);
G4HadronPhysicsNuBeam(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsNuBeam();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual ~G4HadronPhysicsNuBeam() {}
private:
void CreateModels();
//Modify the minimum needed
virtual void Proton() override;
virtual void Pion() override;
virtual void Kaon() override;
virtual void DumpBanner() override {}
G4bool QuasiElastic;
// Simplify handling of TLS data, encapsulate everyhing in a structure
//
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4PiKBuilder * thePiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
G4FTFPProtonBuilder * theFTFPPro;
// specific to NuBeam
G4QGSPLundStrFragmProtonBuilder * theQGSPPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
double maxFTFP_proton;
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_BERT.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGSP_BERT.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -49,27 +49,10 @@
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4Cache.hh"
class G4ComponentGGHadronNucleusXsc;
class G4VCrossSectionDataSet;
class G4HadronPhysicsQGSP_BERT : public G4VPhysicsConstructor
{
@@ -78,43 +61,42 @@ class G4HadronPhysicsQGSP_BERT : public G4VPhysicsConstructor
G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_BERT();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void ConstructParticle() override;
virtual void ConstructProcess() override;
virtual void TerminateWorker() override;
void SetQuasiElastic(G4bool value) {QuasiElastic = value;};
private:
protected:
G4bool QuasiElasticFTF;
G4bool QuasiElasticQGS;
void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Kaon() { /*Done together w/ Pion*/ }
virtual void Others();
virtual void DumpBanner() {}
//This contains extra configurataion specific to this PL
virtual void ExtraConfiguration();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4PiKBuilder * thePiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4QGSPPiKBuilder * theQGSPPiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4ProtonBuilder * thePro;
G4FTFPProtonBuilder * theFTFPPro;
G4QGSPProtonBuilder * theQGSPPro;
G4BertiniProtonBuilder * theBertiniPro;
G4HyperonFTFPBuilder * theHyperon;
G4double minQGSP_proton;
G4double minQGSP_neutron;
G4double minQGSP_pik;
G4double minFTFP_proton;
G4double minFTFP_neutron;
G4double minFTFP_pik;
G4double maxFTFP_proton;
G4double maxFTFP_neutron;
G4double maxFTFP_pik;
G4double minBERT_proton;
G4double minBERT_neutron;
G4double minBERT_pik;
G4double maxBERT_proton;
G4double maxBERT_neutron;
G4double maxBERT_pik;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
G4bool QuasiElastic;
//Thread-private data write them here to delete them
G4VectorCache<G4VCrossSectionDataSet*> xs_ds;
G4Cache<G4ComponentGGHadronNucleusXsc*> xs_k;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_BERT_HP.hh 93878 2015-11-03 08:18:00Z gcosmo $
// $Id: G4HadronPhysicsQGSP_BERT_HP.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -42,76 +42,46 @@
#ifndef G4HadronPhysicsQGSP_BERT_HP_h
#define G4HadronPhysicsQGSP_BERT_HP_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4HadronPhysicsQGSP_BERT.hh"
#include "G4VPhysicsConstructor.hh"
//#include "globals.hh"
//#include "G4ios.hh"
//
//#include "G4VPhysicsConstructor.hh"
//
//#include "G4PiKBuilder.hh"
//#include "G4FTFPPiKBuilder.hh"
//#include "G4QGSPPiKBuilder.hh"
//#include "G4BertiniPiKBuilder.hh"
//
//#include "G4ProtonBuilder.hh"
//#include "G4FTFPProtonBuilder.hh"
//#include "G4QGSPProtonBuilder.hh"
//#include "G4BertiniProtonBuilder.hh"
//
//#include "G4NeutronBuilder.hh"
//#include "G4FTFPNeutronBuilder.hh"
//#include "G4QGSPNeutronBuilder.hh"
//#include "G4BertiniNeutronBuilder.hh"
//#include "G4NeutronPHPBuilder.hh"
//
//#include "G4HyperonFTFPBuilder.hh"
//#include "G4AntiBarionBuilder.hh"
//#include "G4FTFPAntiBarionBuilder.hh"
//
//class G4ComponentGGHadronNucleusXsc;
//
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsQGSP_BERT_HP : public G4VPhysicsConstructor
class G4HadronPhysicsQGSP_BERT_HP : public G4HadronPhysicsQGSP_BERT
{
public:
G4HadronPhysicsQGSP_BERT_HP(G4int verbose =1);
G4HadronPhysicsQGSP_BERT_HP(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_BERT_HP();
virtual ~G4HadronPhysicsQGSP_BERT_HP() {}
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4NeutronPHPBuilder * theHPNeutron;
G4PiKBuilder * thePiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4QGSPPiKBuilder * theQGSPPiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4ProtonBuilder * thePro;
G4FTFPProtonBuilder * theFTFPPro;
G4QGSPProtonBuilder * theQGSPPro;
G4BertiniProtonBuilder * theBertiniPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
// G4bool QuasiElastic;
protected:
virtual void Neutron() override;
virtual void ExtraConfiguration() override;
};
// 2002 by J.P. Wellisch
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_BIC.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGSP_BIC.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -44,31 +44,14 @@
#define G4HadronPhysicsQGSP_BIC_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4Cache.hh"
class G4ComponentGGHadronNucleusXsc;
class G4VCrossSectionDataSet;
class G4HadronPhysicsQGSP_BIC : public G4VPhysicsConstructor
{
@@ -77,41 +60,40 @@ class G4HadronPhysicsQGSP_BIC : public G4VPhysicsConstructor
G4HadronPhysicsQGSP_BIC(const G4String& name,G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_BIC();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void ConstructParticle() override;
virtual void ConstructProcess() override;
virtual void TerminateWorker() override;
private:
protected:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4BinaryNeutronBuilder * theBinaryNeutron;
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Kaon() { /*Done in Pion*/}
virtual void Others();
virtual void DumpBanner() {}
//This contains extra configurataion specific to this PL
virtual void ExtraConfiguration();
G4PiKBuilder * thePiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4QGSPPiKBuilder * theQGSPPiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4ProtonBuilder * thePro;
G4FTFPProtonBuilder * theFTFPPro;
G4QGSPProtonBuilder * theQGSPPro;
G4BinaryProtonBuilder * theBinaryPro;
//Thread-private data
G4VectorCache<G4VCrossSectionDataSet*> xs_ds;
G4Cache<G4ComponentGGHadronNucleusXsc*> xs_k;
G4HyperonFTFPBuilder * theHyperon;
G4double minQGSP_neutron;
G4double minQGSP_proton;
G4double minQGSP_pik;
G4double maxFTFP_proton;
G4double maxFTFP_neutron;
G4double maxFTFP_pik;
G4double minFTFP_proton;
G4double minFTFP_neutron;
G4double minFTFP_pik;
G4double maxBIC_proton;
G4double maxBIC_neutron;
G4double maxBERT_pik;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
// G4bool QuasiElastic;
G4bool QuasiElasticFTF;
G4bool QuasiElasticQGS;
};
#endif
@@ -28,82 +28,22 @@
#ifndef G4HadronPhysicsQGSP_BIC_AllHP_h
#define G4HadronPhysicsQGSP_BIC_AllHP_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4HadronPhysicsQGSP_BIC.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4BinaryDeuteronBuilder.hh"
#include "G4BinaryTritonBuilder.hh"
#include "G4BinaryHe3Builder.hh"
#include "G4BinaryAlphaBuilder.hh"
#include "G4ProtonPHPBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsQGSP_BIC_AllHP : public G4VPhysicsConstructor
class G4HadronPhysicsQGSP_BIC_AllHP : public G4HadronPhysicsQGSP_BIC
{
public:
G4HadronPhysicsQGSP_BIC_AllHP(G4int verbose =1);
G4HadronPhysicsQGSP_BIC_AllHP(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_BIC_AllHP();
virtual ~G4HadronPhysicsQGSP_BIC_AllHP() {}
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutronB;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4BinaryNeutronBuilder * theBinaryNeutron;
G4NeutronPHPBuilder * thePHPNeutron;
G4PiKBuilder * thePiKB;
G4FTFPPiKBuilder * theFTFPPiK;
G4QGSPPiKBuilder * theQGSPPiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4ProtonBuilder * theProtonB;
G4FTFPProtonBuilder * theFTFPProton;
G4QGSPProtonBuilder * theQGSPProton;
G4BinaryProtonBuilder * theBinaryProton;
G4ProtonPHPBuilder * thePHPProton;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
// G4bool QuasiElastic;
protected:
virtual void Neutron() override;
virtual void Proton() override;
G4double minBIC_neutron;
G4double minBIC_proton;
G4double maxHP_neutron;
G4double maxHP_proton;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_FTFP_BERT.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGSP_FTFP_BERT.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -39,78 +39,24 @@
#ifndef G4HadronPhysicsQGSP_FTFP_BERT_h
#define G4HadronPhysicsQGSP_FTFP_BERT_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
#include "G4HadronPhysicsQGSP_BERT.hh"
class G4HadronPhysicsQGSP_FTFP_BERT : public G4VPhysicsConstructor
class G4HadronPhysicsQGSP_FTFP_BERT : public G4HadronPhysicsQGSP_BERT
{
public:
G4HadronPhysicsQGSP_FTFP_BERT(G4int verbose =1);
G4HadronPhysicsQGSP_FTFP_BERT(const G4String& name,G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_FTFP_BERT();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
void SetQuasiElastic(G4bool value) {QuasiElastic = value;};
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4PiKBuilder * thePiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4QGSPPiKBuilder * theQGSPPiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4ProtonBuilder * thePro;
G4FTFPProtonBuilder * theFTFPPro;
G4QGSPProtonBuilder * theQGSPPro;
G4BertiniProtonBuilder * theBertiniPro;
G4HyperonFTFPBuilder *theHyperon;
G4AntiBarionBuilder *theAntiBaryon;
G4FTFPAntiBarionBuilder *theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
G4HadronPhysicsQGSP_FTFP_BERT(const G4String& name, G4bool quasiElastic=true);
protected:
virtual void DumpBanner() override;
G4bool QuasiElastic;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGS_BIC.hh 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGS_BIC.hh 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -41,36 +41,11 @@
#include "globals.hh"
#include "G4ios.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4PionBuilder.hh"
#include "G4BinaryPionBuilder.hh"
#include "G4BertiniPionBuilder.hh"
#include "G4FTFBinaryPionBuilder.hh"
#include "G4QGSBinaryPionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFBinaryKaonBuilder.hh"
#include "G4QGSBinaryKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFBinaryProtonBuilder.hh"
#include "G4QGSBinaryProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFBinaryNeutronBuilder.hh"
#include "G4QGSBinaryNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4Cache.hh"
class G4ComponentGGHadronNucleusXsc;
class G4VCrossSectionDataSet;
class G4HadronPhysicsQGS_BIC : public G4VPhysicsConstructor
{
@@ -79,47 +54,42 @@ class G4HadronPhysicsQGS_BIC : public G4VPhysicsConstructor
G4HadronPhysicsQGS_BIC(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGS_BIC();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void ConstructParticle() override;
virtual void ConstructProcess() override;
virtual void TerminateWorker() override;
private:
protected:
void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Kaon();
virtual void Others();
virtual void DumpBanner() {}
//This contains extra configurataion specific to this PL
virtual void ExtraConfiguration();
//Thread-private data
G4VectorCache<G4VCrossSectionDataSet*> xs_ds;
G4Cache<G4ComponentGGHadronNucleusXsc*> xs_k;
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFBinaryNeutronBuilder * theFTFBinaryNeutron;
G4QGSBinaryNeutronBuilder * theQGSBinaryNeutron;
G4BinaryNeutronBuilder * theBinaryNeutron;
G4PionBuilder * thePion;
G4BinaryPionBuilder * theBinaryPion;
G4BertiniPionBuilder * theBertiniPion;
G4FTFBinaryPionBuilder * theFTFBinaryPion;
G4QGSBinaryPionBuilder * theQGSBinaryPion;
G4KaonBuilder * theKaon;
G4BertiniKaonBuilder * theBertiniKaon;
G4FTFBinaryKaonBuilder * theFTFBinaryKaon;
G4QGSBinaryKaonBuilder * theQGSBinaryKaon;
G4ProtonBuilder * thePro;
G4FTFBinaryProtonBuilder * theFTFBinaryPro;
G4QGSBinaryProtonBuilder * theQGSBinaryPro;
G4BinaryProtonBuilder * theBinaryPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
// G4bool QuasiElastic;
G4double maxFTF_neutron;
G4double maxFTF_proton;
G4double minFTF_neutron;
G4double minFTF_proton;
G4double maxBIC_neutron;
G4double maxBIC_proton;
G4double maxFTF_pion;
G4double maxBERT_pion;
G4double minBERT_pion;
G4double maxBIC_pion;
G4double maxFTF_kaon;
G4double maxBERT_kaon;
G4bool QuasiElasticQGS;
G4bool QuasiElasticFTF;
};
#endif
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * 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: G4HadronPhysicsShieldingLEND.hh 101814 2016-11-30 18:16:07Z gunter $
//
//---------------------------------------------------------------------------
//
// ClassName:
//
// Author: 7 Nov 2017 Tatsumi Koi
// created from G4HadronPhysicsShielding
//
//----------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsShieldingLEND_h
#define G4HadronPhysicsShieldingLEND_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4VPhysicsConstructor.hh"
#include "G4PiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
class G4ComponentGGHadronNucleusXsc;
class G4HadronPhysicsShieldingLEND : public G4VPhysicsConstructor
{
public:
//G4HadronPhysicsShieldingLEND(G4int verbose =1,G4bool blend=false);
explicit G4HadronPhysicsShieldingLEND(G4int verbose=1);
explicit G4HadronPhysicsShieldingLEND(const G4String& name, G4bool );
explicit G4HadronPhysicsShieldingLEND(const G4String& name, G4int verbose=1,
G4double minFTFPEnergy=9.5*CLHEP::GeV, G4double maxBertiniEnergy=9.9*CLHEP::GeV);
virtual ~G4HadronPhysicsShieldingLEND();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
void UseLEND( G4String ss="" ){useLEND_=true;evaluation_=ss;};
void UnuseLEND(){useLEND_=false;};
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
//G4NeutronPHPBuilder * theHPNeutron;
G4VNeutronBuilder * theLENeutron;
G4BertiniNeutronBuilder * theBertiniNeutron;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4PiKBuilder * thePiK;
G4BertiniPiKBuilder * theBertiniPiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4ProtonBuilder * thePro;
G4BertiniProtonBuilder * theBertiniPro;
G4FTFPProtonBuilder * theFTFPPro;
G4HyperonFTFPBuilder * theHyperon;
G4AntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4ComponentGGHadronNucleusXsc * xsKaon;
G4VCrossSectionDataSet * theBGGxsNeutron;
G4VCrossSectionDataSet * theNeutronHPJENDLHEInelastic;
G4VCrossSectionDataSet * theBGGxsProton;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
// G4bool QuasiElastic;
G4bool useLEND_;
G4String evaluation_;
const G4double minFTFPEnergy_;
const G4double maxBertiniEnergy_;
const G4double minNonHPNeutronEnergy_;
};
#endif
@@ -11,7 +11,7 @@
#
# Generated on : 10/01/2013
#
# $Id: sources.cmake 96328 2016-04-06 15:52:31Z gcosmo $
# $Id: sources.cmake 107320 2017-11-08 16:30:22Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -93,6 +93,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_hinelastic
G4HadronPhysicsFTFP_BERT_HP.hh
G4HadronPhysicsFTFP_BERT_TRV.hh
G4HadronPhysicsFTFP_BERT_ATL.hh
G4HadronPhysicsFTFQGSP_BERT.hh
G4HadronPhysicsNuBeam.hh
G4HadronPhysicsQGS_BIC.hh
G4HadronPhysicsQGSP_BERT.hh
@@ -102,6 +103,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_hinelastic
G4HadronPhysicsQGSP_FTFP_BERT.hh
G4HadronPhysicsINCLXX.hh
G4HadronPhysicsShielding.hh
G4HadronPhysicsShieldingLEND.hh
G4VHadronPhysics.hh
G4HadronPhysicsQGSP_BIC_AllHP.hh
SOURCES
@@ -111,6 +113,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_hinelastic
G4HadronPhysicsFTFP_BERT_HP.cc
G4HadronPhysicsFTFP_BERT_TRV.cc
G4HadronPhysicsFTFP_BERT_ATL.cc
G4HadronPhysicsFTFQGSP_BERT.cc
G4HadronPhysicsNuBeam.cc
G4HadronPhysicsQGS_BIC.cc
G4HadronPhysicsQGSP_BERT.cc
@@ -120,6 +123,7 @@ GEANT4_DEFINE_MODULE(NAME G4phys_ctor_hinelastic
G4HadronPhysicsQGSP_FTFP_BERT.cc
G4HadronPhysicsINCLXX.cc
G4HadronPhysicsShielding.cc
G4HadronPhysicsShieldingLEND.cc
G4VHadronPhysics.cc
G4HadronPhysicsQGSP_BIC_AllHP.cc
GRANULAR_DEPENDENCIES
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTFP_BERT.cc 102618 2017-02-10 07:59:27Z gcosmo $
// $Id: G4HadronPhysicsFTFP_BERT.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -45,6 +45,26 @@
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.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"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
@@ -67,138 +87,29 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT);
G4ThreadLocal G4HadronPhysicsFTFP_BERT::ThreadPrivate* G4HadronPhysicsFTFP_BERT::tpdata=0;
G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(G4int)
: G4VPhysicsConstructor("hInelastic FTFP_BERT")
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0) */
, QuasiElastic(false)
/*, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
{}
G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(G4int) :
G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT",false) {}
G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)*/
, QuasiElastic(quasiElastic)
/*, xsKaonMinus(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
{}
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;
if(G4Threading::IsMasterThread()) {
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(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(maxBERT_proton);
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));
minFTFP_pion = 3.0 * GeV;
maxBERT_pion = 12.0 * GeV;
minFTFP_kaon = 3.0 * GeV;
maxBERT_kaon = 12.0 * GeV;
minFTFP_proton = 3.0 * GeV;
maxBERT_proton = 12.0 * GeV;
minFTFP_neutron = 3.0 * GeV;
maxBERT_neutron = 12.0 * GeV;
}
G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT()
{
if (!tpdata) return;
delete tpdata->theNeutrons;
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
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;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
//Note that here we need to set to 0 the pointer
//since tpdata is static and if thread are "reused"
//it can be problematic
delete tpdata; tpdata = 0;
//Detele master-owned stuff
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
}
void G4HadronPhysicsFTFP_BERT::ConstructParticle()
@@ -210,34 +121,145 @@ void G4HadronPhysicsFTFP_BERT::ConstructParticle()
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
pShortLivedConstructor.ConstructParticle();
}
void G4HadronPhysicsFTFP_BERT::TerminateWorker()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
xs_ds.Clear();
G4VPhysicsConstructor::TerminateWorker();
}
void G4HadronPhysicsFTFP_BERT::DumpBanner()
{
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;
}
void G4HadronPhysicsFTFP_BERT::CreateModels()
{
Neutron();
Proton();
Pion();
Kaon();
Others();
}
void G4HadronPhysicsFTFP_BERT::Neutron()
{
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
AddBuilder( ftfpn );
neu->RegisterMe(ftfpn);
ftfpn->SetMinEnergy(minFTFP_neutron);
auto bertn = new G4BertiniNeutronBuilder;
AddBuilder(bertn);
neu->RegisterMe(bertn);
bertn->SetMinEnergy(0.*GeV);
bertn->SetMaxEnergy(maxBERT_neutron);
neu->Build();
}
void G4HadronPhysicsFTFP_BERT::Proton()
{
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
AddBuilder(ftfpp);
pro->RegisterMe(ftfpp);
ftfpp->SetMinEnergy(minFTFP_proton);
auto bertp = new G4BertiniProtonBuilder;
AddBuilder(bertp);
pro->RegisterMe(bertp);
bertp->SetMaxEnergy(maxBERT_proton);
pro->Build();
}
void G4HadronPhysicsFTFP_BERT::Pion()
{
auto pi = new G4PionBuilder;
AddBuilder(pi);
auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
AddBuilder(ftfppi);
pi->RegisterMe(ftfppi);
ftfppi->SetMinEnergy(minFTFP_pion);
auto bertpi = new G4BertiniPionBuilder;
AddBuilder(bertpi);
pi->RegisterMe(bertpi);
bertpi->SetMaxEnergy(maxBERT_pion);
pi->Build();
}
void G4HadronPhysicsFTFP_BERT::Kaon()
{
auto k = new G4KaonBuilder;
AddBuilder(k);
auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
AddBuilder(ftfpk);
k->RegisterMe(ftfpk);
ftfpk->SetMinEnergy(minFTFP_kaon);
auto bertk = new G4BertiniKaonBuilder;
AddBuilder(bertk);
k->RegisterMe(bertk);
bertk->SetMaxEnergy(maxBERT_kaon);
k->Build();
}
void G4HadronPhysicsFTFP_BERT::Others()
{
//===== Hyperons ====== //
auto hyp = new G4HyperonFTFPBuilder;
AddBuilder( hyp );
hyp->Build();
///===== Anti-barions==== //
auto abar = new G4AntiBarionBuilder;
AddBuilder(abar);
auto ftfpabar = new G4FTFPAntiBarionBuilder(QuasiElastic);
AddBuilder(ftfpabar);
abar->RegisterMe(ftfpabar);
abar->Build();
}
void G4HadronPhysicsFTFP_BERT::ConstructProcess()
{
if(G4Threading::IsMasterThread()) {
DumpBanner();
}
CreateModels();
ExtraConfiguration();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsFTFP_BERT::ConstructProcess()
void G4HadronPhysicsFTFP_BERT::ExtraConfiguration()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
//Modify XS for kaons
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
//Modify Neutrons
auto xs_n_in = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet( xs_n_in );
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
@@ -250,7 +272,8 @@ void G4HadronPhysicsFTFP_BERT::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
auto xs_n_c = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_c);
capture->AddDataSet( xs_n_c );
capture->RegisterMe( new G4NeutronRadCapture() );
}
@@ -40,183 +40,57 @@
#include "G4HadronPhysicsFTFP_BERT_ATL.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_ATL);
G4ThreadLocal G4HadronPhysicsFTFP_BERT_ATL::ThreadPrivate* G4HadronPhysicsFTFP_BERT_ATL::tpdata=0;
G4HadronPhysicsFTFP_BERT_ATL::G4HadronPhysicsFTFP_BERT_ATL(G4int)
: G4VPhysicsConstructor("hInelastic FTFP_BERT_ATL")
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0) */
, QuasiElastic(false)
/*, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
G4HadronPhysicsFTFP_BERT_ATL::G4HadronPhysicsFTFP_BERT_ATL(G4int) :
G4HadronPhysicsFTFP_BERT_ATL("hInelastic FTFP_BERT_ATL",false)
{}
G4HadronPhysicsFTFP_BERT_ATL::G4HadronPhysicsFTFP_BERT_ATL(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)*/
, QuasiElastic(quasiElastic)
/*, xsKaonMinus(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
{}
void G4HadronPhysicsFTFP_BERT_ATL::CreateModels()
: G4HadronPhysicsFTFP_BERT(name,quasiElastic)
{
G4double minFTFP = 9.0 * GeV;
G4double maxBERT = 12.0 * GeV;
G4cout << " FTFP_BERT_ATL : new threshold between BERT and FTFP"
<< " is over the interval " << minFTFP/GeV << " to " << maxBERT/GeV
<< " GeV." << G4endl;
QuasiElastic= false;
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic));
tpdata->theFTFPPro->SetMinEnergy(minFTFP);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
tpdata->thePiK=new G4PiKBuilder;
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic));
tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
//Change configuration parameters of FTFP_BERT
minFTFP_pion = 9.0 * GeV;
maxBERT_pion = 12.0 * GeV;
minFTFP_kaon = 9.0 * GeV;
maxBERT_kaon = 12.0 * GeV;
minFTFP_proton = 9.0 * GeV;
maxBERT_proton = 12.0 * GeV;
minFTFP_neutron = 9.0 * GeV;
maxBERT_neutron = 12.0 * GeV;
QuasiElastic = false;
}
G4HadronPhysicsFTFP_BERT_ATL::~G4HadronPhysicsFTFP_BERT_ATL()
void G4HadronPhysicsFTFP_BERT_ATL::DumpBanner()
{
if (!tpdata) return;
delete tpdata->theNeutrons;
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->thePiK;
delete tpdata->theBertiniPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
delete tpdata->theFTFPPro;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
//Note that here we need to set to 0 the pointer
//since tpdata is static and if thread are "reused"
//it can be problematic
delete tpdata; tpdata = 0;
G4cout << " FTFP_BERT_ATL : new threshold between BERT and FTFP"
<< " is over the interval " << minFTFP_pion/GeV << " to "<< maxBERT_pion/GeV << " GeV." << G4endl;
}
void G4HadronPhysicsFTFP_BERT_ATL::ConstructParticle()
void G4HadronPhysicsFTFP_BERT_ATL::Pion()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
auto pik = new G4PiKBuilder;
AddBuilder(pik);
auto ftfppik = new G4FTFPPiKBuilder(QuasiElastic);
AddBuilder(ftfppik);
ftfppik->SetMinEnergy(minFTFP_pion);
pik->RegisterMe(ftfppik);
auto bertpik = new G4BertiniPiKBuilder();
AddBuilder(bertpik);
bertpik->SetMaxEnergy(maxBERT_pion);
pik->RegisterMe(bertpik);
pik->Build();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsFTFP_BERT_ATL::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
void G4HadronPhysicsFTFP_BERT_ATL::Kaon() {
//Use combined with pions
}
@@ -30,18 +30,14 @@
//------------------------------------------------------------------------
//
#include "G4HadronPhysicsFTFP_BERT_HP.hh"
#include "G4NeutronPHPBuilder.hh"
#include <iomanip>
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4ProcessManager.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4HadronCaptureProcess.hh"
@@ -49,184 +45,72 @@
#include "G4NeutronCaptureXS.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4LFission.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
#include "G4Threading.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_HP);
G4ThreadLocal G4HadronPhysicsFTFP_BERT_HP::ThreadPrivate*
G4HadronPhysicsFTFP_BERT_HP::tpdata=0;
G4HadronPhysicsFTFP_BERT_HP::G4HadronPhysicsFTFP_BERT_HP(G4int)
: G4VPhysicsConstructor("hInelastic FTFP_BERT_HP")
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, theHPNeutron(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)*/
, QuasiElastic(false)
/*, xsKaon(0)
, xsNeutronCaptureXS(0)*/
: G4HadronPhysicsFTFP_BERT_HP("hInelastic FTFP_BERT_HP",false)
{}
G4HadronPhysicsFTFP_BERT_HP::G4HadronPhysicsFTFP_BERT_HP(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, theHPNeutron(0)
, thePion(0)
, theBertiniPion(0)
, theFTFPPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFPKaon(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)*/
, QuasiElastic(quasiElastic)
/*, xsKaon(0)
, xsNeutronCaptureXS(0)*/
{}
void G4HadronPhysicsFTFP_BERT_HP::CreateModels()
: G4HadronPhysicsFTFP_BERT(name,quasiElastic)
{
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;
if(G4Threading::IsMasterThread()) {
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(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(maxBERT_proton);
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));
minBERT_neutron = 19.9*MeV;
}
G4HadronPhysicsFTFP_BERT_HP::~G4HadronPhysicsFTFP_BERT_HP()
void G4HadronPhysicsFTFP_BERT_HP::DumpBanner()
{
if (!tpdata) return;
delete tpdata->theNeutrons;
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->theHPNeutron;
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;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
delete tpdata; tpdata = 0;
}
void G4HadronPhysicsFTFP_BERT_HP::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
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;
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsFTFP_BERT_HP::ConstructProcess()
void G4HadronPhysicsFTFP_BERT_HP::Neutron()
{
if (tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
auto neu = new G4NeutronBuilder( true ); // Fission on
AddBuilder(neu);
auto ftfpneu = new G4FTFPNeutronBuilder(QuasiElastic);
AddBuilder(ftfpneu);
ftfpneu->SetMinEnergy(minFTFP_neutron);
neu->RegisterMe(ftfpneu);
auto bertneu = new G4BertiniNeutronBuilder;
AddBuilder(bertneu);
bertneu->SetMaxEnergy(maxBERT_neutron);
bertneu->SetMinEnergy(minBERT_neutron);
neu->RegisterMe(bertneu);
auto hpneu = new G4NeutronPHPBuilder;
AddBuilder(hpneu);
neu->RegisterMe(hpneu);
neu->Build();
}
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
void G4HadronPhysicsFTFP_BERT_HP::ExtraConfiguration()
{
//Modify XS for kaons
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
G4HadronicProcess* capture = 0;
@@ -244,17 +128,20 @@ void G4HadronPhysicsFTFP_BERT_HP::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->AddDataSet( new G4ParticleHPCaptureData );
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
auto xs_n_in = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
capture->AddDataSet( xs_n_in );
auto xs_n_hp = new G4ParticleHPCaptureData;
xs_ds.Push_back(xs_n_hp);//TODO: Is this needed? Original code does not need this
capture->AddDataSet( xs_n_hp );
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( minBERT_neutron );
capture->RegisterMe( theNeutronRadCapture );
if ( ! fission ) {
fission = new G4HadronFissionProcess("nFission");
pmanager->AddDiscreteProcess(fission);
}
G4LFission* theNeutronLEPFission = new G4LFission();
theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
theNeutronLEPFission->SetMinEnergy( minBERT_neutron );
fission->RegisterMe( theNeutronLEPFission );
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTFP_BERT_TRV.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsFTFP_BERT_TRV.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -39,191 +39,62 @@
#include <iomanip>
#include "G4HadronPhysicsFTFP_BERT_TRV.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV);
G4ThreadLocal G4HadronPhysicsFTFP_BERT_TRV::ThreadPrivate*
G4HadronPhysicsFTFP_BERT_TRV::tpdata = 0;
G4HadronPhysicsFTFP_BERT_TRV::G4HadronPhysicsFTFP_BERT_TRV(G4int)
: G4VPhysicsConstructor("hInelastic FTFP_BERT_TRV")
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)*/
, QuasiElastic(false)
/*, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
G4HadronPhysicsFTFP_BERT_TRV::G4HadronPhysicsFTFP_BERT_TRV(G4int) :
G4HadronPhysicsFTFP_BERT_TRV("hInelastic FTFP_BERT_TRV",false)
{}
G4HadronPhysicsFTFP_BERT_TRV::G4HadronPhysicsFTFP_BERT_TRV(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)*/
, QuasiElastic(quasiElastic)
/*, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
{}
void G4HadronPhysicsFTFP_BERT_TRV::CreateModels()
: G4HadronPhysicsFTFP_BERT(name,quasiElastic)
{
G4double minFTFP= 2.0 * GeV;
G4double maxBERT= 4.0 * GeV;
// G4double minFTFP= 5.0 * GeV; G4double maxBERT= 7.0 * GeV;
G4cout << " Revised FTFTP_BERT_TRV - new threshold between BERT and FTFP "
<< " is over the interval " << minFTFP/GeV << " to " << maxBERT/GeV
//Change configuration parameters of FTFP_BERT
minFTFP_pion = 2.0 * GeV;
maxBERT_pion = 4.0 * GeV;
minFTFP_kaon = 2.0 * GeV;
maxBERT_kaon = 4.0 * GeV;
minFTFP_proton = 2.0 * GeV;
maxBERT_proton = 4.0 * GeV;
minFTFP_neutron = 2.0 * GeV;
maxBERT_neutron = 4.0 * GeV;
QuasiElastic = false;
}
void G4HadronPhysicsFTFP_BERT_TRV::DumpBanner()
{
G4cout << " Revised FTFTP_BERT_TRV - new threshold between BERT and FTFP "
<< " is over the interval " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV
<< " GeV. " << G4endl;
G4cout << " -- quasiElastic was asked to be " << QuasiElastic
G4cout << " -- quasiElastic was asked to be " << QuasiElastic
<< " and it is reset to " << false << G4endl;
QuasiElastic= false;
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->thePro=new G4ProtonBuilder;
tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theFTFPPro->SetMinEnergy(minFTFP);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
tpdata->thePiK=new G4PiKBuilder;
tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
}
G4HadronPhysicsFTFP_BERT_TRV::~G4HadronPhysicsFTFP_BERT_TRV()
void G4HadronPhysicsFTFP_BERT_TRV::Pion()
{
if (!tpdata) return;
delete tpdata->theNeutrons;
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->thePiK;
delete tpdata->theBertiniPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
delete tpdata->theFTFPPro;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
delete tpdata; tpdata = 0;
auto pik = new G4PiKBuilder;
AddBuilder(pik);
auto ftfppik = new G4FTFPPiKBuilder(QuasiElastic);
AddBuilder(ftfppik);
ftfppik->SetMinEnergy(minFTFP_pion);
pik->RegisterMe(ftfppik);
auto bertpik = new G4BertiniPiKBuilder();
AddBuilder(bertpik);
bertpik->SetMaxEnergy(maxBERT_pion);
pik->RegisterMe(bertpik);
pik->Build();
}
void G4HadronPhysicsFTFP_BERT_TRV::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsFTFP_BERT_TRV::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
void G4HadronPhysicsFTFP_BERT_TRV::Kaon() {
//Use combined with pions
}
@@ -0,0 +1,443 @@
//
// ********************************************************************
// * 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: $
//
//---------------------------------------------------------------------------
// Author: Alberto Ribon
// Date: October 2017
//
// Hadron physics for the new, experimental physics list FTFQGSP_BERT,
// with QGS fragmentation of strings, instead of the Lund string
// fragmentation. Note that the string excitation is still done with FTF,
// exactly as for FTFP_BERT.
// Given that it is an experimental, and perhaps temporary, new type of
// hadron physics, corresponding builders are not created and everything
// is implemented directly in this class.
//----------------------------------------------------------------------------
//
#include <iomanip>
#include "G4HadronPhysicsFTFQGSP_BERT.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4ProcessManager.hh"
#include "G4BGGNucleonInelasticXS.hh"
#include "G4PiNuclearCrossSection.hh"
#include "G4CrossSectionPairGG.hh"
#include "G4ComponentAntiNuclNuclearXS.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFQGSP_BERT);
G4HadronPhysicsFTFQGSP_BERT::G4HadronPhysicsFTFQGSP_BERT(G4int)
: G4VPhysicsConstructor("hInelastic FTFQGSP_BERT")
, theNeutronCaptureModel(0)
, thePreEquilib(0)
, theCascade(0)
, theStringModel(0)
, theStringDecay(0)
, theQGSMFragmentation(0)
, theHandler(0)
, theModel1(0)
, theModel2(0)
, theModel3(0)
, theBertini1(0)
, theBertini2(0)
, theNeutronCaptureProcess(0)
, theNeutronInelastic(0)
, theProtonInelastic(0)
, thePionMinusInelastic(0)
, thePionPlusInelastic(0)
, theKaonMinusInelastic(0)
, theKaonPlusInelastic(0)
, theKaonZeroLInelastic(0)
, theKaonZeroSInelastic(0)
, theLambdaInelastic(0)
, theAntiLambdaInelastic(0)
, theSigmaMinusInelastic(0)
, theAntiSigmaMinusInelastic(0)
, theSigmaPlusInelastic(0)
, theAntiSigmaPlusInelastic(0)
, theXiZeroInelastic(0)
, theAntiXiZeroInelastic(0)
, theXiMinusInelastic(0)
, theAntiXiMinusInelastic(0)
, theOmegaMinusInelastic(0)
, theAntiOmegaMinusInelastic(0)
, theAntiProtonInelastic(0)
, theAntiNeutronInelastic(0)
, theAntiDeuteronInelastic(0)
, theAntiTritonInelastic(0)
, theAntiHe3Inelastic(0)
, theAntiAlphaInelastic(0)
, thePiXS(0)
, theKaonXS(0)
, theChipsHyperonInelasticXS(0)
, theAntiNucleonXS(0)
, theNeutronInelasticXS(0)
, theNeutronCaptureXS(0)
{}
G4HadronPhysicsFTFQGSP_BERT::G4HadronPhysicsFTFQGSP_BERT(const G4String& name, G4bool /* quasiElastic */)
: G4VPhysicsConstructor(name)
, theNeutronCaptureModel(0)
, thePreEquilib(0)
, theCascade(0)
, theStringModel(0)
, theStringDecay(0)
, theQGSMFragmentation(0)
, theHandler(0)
, theModel1(0)
, theModel2(0)
, theModel3(0)
, theBertini1(0)
, theBertini2(0)
, theNeutronCaptureProcess(0)
, theNeutronInelastic(0)
, theProtonInelastic(0)
, thePionMinusInelastic(0)
, thePionPlusInelastic(0)
, theKaonMinusInelastic(0)
, theKaonPlusInelastic(0)
, theKaonZeroLInelastic(0)
, theKaonZeroSInelastic(0)
, theLambdaInelastic(0)
, theAntiLambdaInelastic(0)
, theSigmaMinusInelastic(0)
, theAntiSigmaMinusInelastic(0)
, theSigmaPlusInelastic(0)
, theAntiSigmaPlusInelastic(0)
, theXiZeroInelastic(0)
, theAntiXiZeroInelastic(0)
, theXiMinusInelastic(0)
, theAntiXiMinusInelastic(0)
, theOmegaMinusInelastic(0)
, theAntiOmegaMinusInelastic(0)
, theAntiProtonInelastic(0)
, theAntiNeutronInelastic(0)
, theAntiDeuteronInelastic(0)
, theAntiTritonInelastic(0)
, theAntiHe3Inelastic(0)
, theAntiAlphaInelastic(0)
, thePiXS(0)
, theKaonXS(0)
, theChipsHyperonInelasticXS(0)
, theAntiNucleonXS(0)
, theNeutronInelasticXS(0)
, theNeutronCaptureXS(0)
{}
void G4HadronPhysicsFTFQGSP_BERT::CreateModels()
{
G4double minFTFP = 3.0 * GeV;
G4double maxBERT = 12.0 * GeV;
G4cout << " FTFQGSP_BERT : similar to FTFP_BERT but with" << G4endl
<< " QGS string fragmentation (instead of Lund string fragmentation)." << G4endl;
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay( theQGSMFragmentation = new G4QGSMFragmentation );
theStringModel->SetFragmentationModel( theStringDecay );
thePreEquilib = new G4PreCompoundModel( theHandler = new G4ExcitationHandler );
theCascade = new G4GeneratorPrecompoundInterface( thePreEquilib );
// FTF for neutrons, protons, pions, and kaons
theModel1 = new G4TheoFSGenerator( "FTFP" );
theModel1->SetMinEnergy( minFTFP );
theModel1->SetMaxEnergy( 100.0*TeV );
theModel1->SetTransport( theCascade );
theModel1->SetHighEnergyGenerator( theStringModel );
// BERT for neutrons, protons, pions, and kaons
theBertini1 = new G4CascadeInterface;
theBertini1->SetMinEnergy( 0.0*GeV );
theBertini1->SetMaxEnergy( maxBERT );
// FTF for hyperons
theModel2 = new G4TheoFSGenerator( "FTFP" );
theModel2->SetMinEnergy( 2.0*GeV );
theModel2->SetMaxEnergy( 100.0*TeV );
theModel2->SetTransport( theCascade );
theModel2->SetHighEnergyGenerator( theStringModel );
// BERT for hyperons
theBertini2 = new G4CascadeInterface;
theBertini2->SetMinEnergy( 0.0*GeV );
theBertini2->SetMaxEnergy( 6.0*GeV );
// FTF for Antibaryons
theModel3 = new G4TheoFSGenerator( "FTFP" );
theModel3->SetMinEnergy( 0.0*GeV );
theModel3->SetMaxEnergy( 100.0*TeV );
theModel3->SetTransport( theCascade );
theModel3->SetHighEnergyGenerator( theStringModel );
// Neutron Capture
theNeutronCaptureModel = new G4NeutronRadCapture;
theNeutronCaptureModel->SetMinEnergy( 0.0 );
theNeutronCaptureModel->SetMaxEnergy( 100.0*TeV );
// Cross sections
thePiXS = new G4CrossSectionPairGG( new G4PiNuclearCrossSection, 91*GeV );
theAntiNucleonXS = new G4CrossSectionInelastic( new G4ComponentAntiNuclNuclearXS );
theKaonXS = new G4CrossSectionInelastic( new G4ComponentGGHadronNucleusXsc );
theChipsHyperonInelasticXS = G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( G4ChipsHyperonInelasticXS::Default_Name() );
theNeutronInelasticXS = G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( G4NeutronInelasticXS::Default_Name() );
theNeutronCaptureXS = G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( G4NeutronCaptureXS::Default_Name() );
}
G4HadronPhysicsFTFQGSP_BERT::~G4HadronPhysicsFTFQGSP_BERT()
{
delete theStringDecay;
delete theStringModel;
delete thePreEquilib;
delete theCascade;
delete theQGSMFragmentation;
}
void G4HadronPhysicsFTFQGSP_BERT::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsFTFQGSP_BERT::ConstructProcess()
{
CreateModels();
G4ProcessManager * aProcMan = 0;
theNeutronInelastic = new G4NeutronInelasticProcess();
theNeutronInelastic->RegisterMe( theModel1 );
theNeutronInelastic->RegisterMe( theBertini1 );
theNeutronInelastic->AddDataSet( new G4BGGNucleonInelasticXS( G4Neutron::Neutron() ) );
theNeutronInelastic->AddDataSet( theNeutronInelasticXS );
aProcMan = G4Neutron::Neutron()->GetProcessManager();
aProcMan->AddDiscreteProcess( theNeutronInelastic );
theNeutronCaptureProcess = new G4HadronCaptureProcess();
theNeutronCaptureProcess->RegisterMe( theNeutronCaptureModel );
theNeutronCaptureProcess->AddDataSet( theNeutronCaptureXS );
aProcMan->AddDiscreteProcess( theNeutronCaptureProcess );
theProtonInelastic = new G4ProtonInelasticProcess();
theProtonInelastic->RegisterMe( theModel1 );
theProtonInelastic->RegisterMe( theBertini1 );
theProtonInelastic->AddDataSet( new G4BGGNucleonInelasticXS( G4Proton::Proton() ) );
aProcMan = G4Proton::Proton()->GetProcessManager();
aProcMan->AddDiscreteProcess( theProtonInelastic );
thePionMinusInelastic = new G4PionMinusInelasticProcess();
thePionMinusInelastic->RegisterMe( theModel1 );
thePionMinusInelastic->RegisterMe( theBertini1 );
thePionMinusInelastic->AddDataSet( thePiXS );
aProcMan = G4PionMinus::PionMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( thePionMinusInelastic );
thePionPlusInelastic = new G4PionPlusInelasticProcess();
thePionPlusInelastic->RegisterMe( theModel1 );
thePionPlusInelastic->RegisterMe( theBertini1 );
thePionPlusInelastic->AddDataSet( thePiXS );
aProcMan = G4PionPlus::PionPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess( thePionPlusInelastic );
theKaonMinusInelastic = new G4KaonMinusInelasticProcess();
theKaonMinusInelastic->RegisterMe( theModel1 );
theKaonMinusInelastic->RegisterMe( theBertini1 );
theKaonMinusInelastic->AddDataSet( theKaonXS );
aProcMan = G4KaonMinus::KaonMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theKaonMinusInelastic );
theKaonPlusInelastic = new G4KaonPlusInelasticProcess();
theKaonPlusInelastic->RegisterMe( theModel1 );
theKaonPlusInelastic->RegisterMe( theBertini1 );
theKaonPlusInelastic->AddDataSet( theKaonXS );
aProcMan = G4KaonPlus::KaonPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theKaonPlusInelastic );
theKaonZeroLInelastic = new G4KaonZeroLInelasticProcess();
theKaonZeroLInelastic->RegisterMe( theModel1 );
theKaonZeroLInelastic->RegisterMe( theBertini1 );
theKaonZeroLInelastic->AddDataSet( theKaonXS );
aProcMan = G4KaonZeroLong::KaonZeroLong()->GetProcessManager();
aProcMan->AddDiscreteProcess( theKaonZeroLInelastic );
theKaonZeroSInelastic = new G4KaonZeroSInelasticProcess();
theKaonZeroSInelastic->RegisterMe( theModel1 );
theKaonZeroSInelastic->RegisterMe( theBertini1 );
theKaonZeroSInelastic->AddDataSet( theKaonXS );
aProcMan = G4KaonZeroShort::KaonZeroShort()->GetProcessManager();
aProcMan->AddDiscreteProcess( theKaonZeroSInelastic );
theLambdaInelastic = new G4LambdaInelasticProcess();
theLambdaInelastic->RegisterMe( theModel2 );
theLambdaInelastic->RegisterMe( theBertini2 );
theLambdaInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4Lambda::Lambda()->GetProcessManager();
aProcMan->AddDiscreteProcess( theLambdaInelastic );
theAntiLambdaInelastic = new G4AntiLambdaInelasticProcess();
theAntiLambdaInelastic->RegisterMe( theModel3 );
theAntiLambdaInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4AntiLambda::AntiLambda()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiLambdaInelastic );
theSigmaMinusInelastic = new G4SigmaMinusInelasticProcess();
theSigmaMinusInelastic->RegisterMe( theModel2 );
theSigmaMinusInelastic->RegisterMe( theBertini2 );
theSigmaMinusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4SigmaMinus::SigmaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theSigmaMinusInelastic );
theAntiSigmaMinusInelastic = new G4AntiSigmaMinusInelasticProcess();
theAntiSigmaMinusInelastic->RegisterMe( theModel3 );
theAntiSigmaMinusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiSigmaMinusInelastic );
theSigmaPlusInelastic = new G4SigmaPlusInelasticProcess();
theSigmaPlusInelastic->RegisterMe( theModel2 );
theSigmaPlusInelastic->RegisterMe( theBertini2 );
theSigmaPlusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4SigmaPlus::SigmaPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theSigmaPlusInelastic );
theAntiSigmaPlusInelastic = new G4AntiSigmaPlusInelasticProcess();
theAntiSigmaPlusInelastic->RegisterMe( theModel3 );
theAntiSigmaPlusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiSigmaPlusInelastic );
theXiMinusInelastic = new G4XiMinusInelasticProcess();
theXiMinusInelastic->RegisterMe( theModel2 );
theXiMinusInelastic->RegisterMe( theBertini2 );
theXiMinusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4XiMinus::XiMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theXiMinusInelastic );
theAntiXiMinusInelastic = new G4AntiXiMinusInelasticProcess();
theAntiXiMinusInelastic->RegisterMe( theModel3 );
theAntiXiMinusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4AntiXiMinus::AntiXiMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiXiMinusInelastic );
theXiZeroInelastic = new G4XiZeroInelasticProcess();
theXiZeroInelastic->RegisterMe( theModel2 );
theXiZeroInelastic->RegisterMe( theBertini2 );
theXiZeroInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4XiZero::XiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess( theXiZeroInelastic );
theAntiXiZeroInelastic = new G4AntiXiZeroInelasticProcess();
theAntiXiZeroInelastic->RegisterMe( theModel3 );
theAntiXiZeroInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4AntiXiZero::AntiXiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiXiZeroInelastic );
theOmegaMinusInelastic = new G4OmegaMinusInelasticProcess();
theOmegaMinusInelastic->RegisterMe( theModel2 );
theOmegaMinusInelastic->RegisterMe( theBertini2 );
theOmegaMinusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4OmegaMinus::OmegaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theOmegaMinusInelastic );
theAntiOmegaMinusInelastic = new G4AntiOmegaMinusInelasticProcess();
theAntiOmegaMinusInelastic->RegisterMe( theModel3 );
theAntiOmegaMinusInelastic->AddDataSet( theChipsHyperonInelasticXS );
aProcMan = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiOmegaMinusInelastic );
theAntiProtonInelastic = new G4AntiProtonInelasticProcess();
theAntiProtonInelastic->RegisterMe( theModel3 );
theAntiProtonInelastic->AddDataSet( theAntiNucleonXS );
aProcMan = G4AntiProton::AntiProton()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiProtonInelastic );
theAntiNeutronInelastic = new G4AntiNeutronInelasticProcess();
theAntiNeutronInelastic->RegisterMe( theModel3 );
theAntiNeutronInelastic->AddDataSet( theAntiNucleonXS );
aProcMan = G4AntiNeutron::AntiNeutron()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiNeutronInelastic );
theAntiDeuteronInelastic = new G4AntiDeuteronInelasticProcess();
theAntiDeuteronInelastic->RegisterMe( theModel3 );
theAntiDeuteronInelastic->AddDataSet( theAntiNucleonXS );
aProcMan = G4AntiDeuteron::AntiDeuteron()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiDeuteronInelastic );
theAntiTritonInelastic = new G4AntiTritonInelasticProcess();
theAntiTritonInelastic->RegisterMe( theModel3 );
theAntiTritonInelastic->AddDataSet( theAntiNucleonXS );
aProcMan = G4AntiTriton::AntiTriton()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiTritonInelastic );
theAntiHe3Inelastic = new G4AntiHe3InelasticProcess();
theAntiHe3Inelastic->RegisterMe( theModel3 );
theAntiHe3Inelastic->AddDataSet( theAntiNucleonXS );
aProcMan = G4AntiHe3::AntiHe3()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiHe3Inelastic );
theAntiAlphaInelastic = new G4AntiAlphaInelasticProcess();
theAntiAlphaInelastic->RegisterMe( theModel3 );
theAntiAlphaInelastic->AddDataSet( theAntiNucleonXS );
aProcMan = G4AntiAlpha::AntiAlpha()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiAlphaInelastic );
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsFTF_BIC.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsFTF_BIC.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -36,143 +36,155 @@
//----------------------------------------------------------------------------
//
#include <iomanip>
#include "G4HadronPhysicsFTF_BIC.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4PionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BinaryPionBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFBinaryPionBuilder.hh"
#include "G4FTFBinaryKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFBinaryProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFBinaryNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTF_BIC);
G4ThreadLocal G4HadronPhysicsFTF_BIC::ThreadPrivate*
G4HadronPhysicsFTF_BIC::tpdata = 0;
G4HadronPhysicsFTF_BIC::G4HadronPhysicsFTF_BIC(G4int)
: G4VPhysicsConstructor("hInelastic FTF_BIC")
/* , theNeutrons(0)
, theFTFBinaryNeutron(0)
, theBinaryNeutron(0)
, thePion(0)
, theKaon(0)
, theBICPion(0)
, theBertiniKaon(0)
, theFTFBinaryPion(0)
, theFTFBinaryKaon(0)
, thePro(0)
, theFTFBinaryPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
, QuasiElastic(false)
{}
: G4HadronPhysicsFTF_BIC("hInelastic FTF_BIC",false) {}
G4HadronPhysicsFTF_BIC::G4HadronPhysicsFTF_BIC(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFBinaryNeutron(0)
, theBinaryNeutron(0)
, thePion(0)
, theKaon(0)
, theBICPion(0)
, theBertiniKaon(0)
, theFTFBinaryPion(0)
, theFTFBinaryKaon(0)
, thePro(0)
, theFTFBinaryPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
, QuasiElastic(quasiElastic)
{}
void G4HadronPhysicsFTF_BIC::CreateModels()
{
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theFTFBinaryNeutron=new G4FTFBinaryNeutronBuilder(QuasiElastic));
tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
tpdata->theBinaryNeutron->SetMaxEnergy(5.0*GeV);
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theFTFBinaryPro=new G4FTFBinaryProtonBuilder(QuasiElastic));
tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
tpdata->theBinaryPro->SetMaxEnergy(5.0*GeV);
tpdata->thePion=new G4PionBuilder;
tpdata->thePion->RegisterMe(tpdata->theFTFBinaryPion=new G4FTFBinaryPionBuilder(QuasiElastic));
tpdata->thePion->RegisterMe(tpdata->theBICPion = new G4BinaryPionBuilder);
tpdata->theBICPion->SetMaxEnergy(5*GeV); // use Binary up to 5GeV for pion
tpdata->theKaon=new G4KaonBuilder;
tpdata->theKaon->RegisterMe(tpdata->theFTFBinaryKaon=new G4FTFBinaryKaonBuilder(QuasiElastic));
tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
tpdata->theBertiniKaon->SetMaxEnergy(5*GeV);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
maxBIC_neutron = 5.*GeV;
maxBIC_proton = 5.*GeV;
maxBERT_kaon = 5.*GeV;
maxBIC_pion = 5.*GeV;
}
G4HadronPhysicsFTF_BIC::~G4HadronPhysicsFTF_BIC()
G4HadronPhysicsFTF_BIC::~G4HadronPhysicsFTF_BIC()
{
if (!tpdata) return;
delete xs_k.Get();
std::for_each( xs_ds.Begin(),xs_ds.End(),
[](G4VCrossSectionDataSet* el){delete el;});
}
delete tpdata->theFTFBinaryNeutron;
delete tpdata->theBinaryNeutron;
delete tpdata->theNeutrons;
void G4HadronPhysicsFTF_BIC::TerminateWorker()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
xs_ds.Clear();
G4VPhysicsConstructor::TerminateWorker();
}
void G4HadronPhysicsFTF_BIC::CreateModels()
{
Neutron();
Proton();
Pion();
Kaon();
Others();
}
delete tpdata->theFTFBinaryPro;
delete tpdata->theBinaryPro;
delete tpdata->thePro;
void G4HadronPhysicsFTF_BIC::Neutron()
{
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto ftfn = new G4FTFBinaryNeutronBuilder(QuasiElastic);
AddBuilder( ftfn );
neu->RegisterMe(ftfn);
auto bicn = new G4BinaryNeutronBuilder;
AddBuilder(bicn);
neu->RegisterMe(bicn);
bicn->SetMinEnergy(0.*GeV);
bicn->SetMaxEnergy(maxBIC_neutron);
neu->Build();
}
delete tpdata->theFTFBinaryPion;
delete tpdata->theBICPion;
delete tpdata->thePion;
void G4HadronPhysicsFTF_BIC::Proton()
{
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto ftfp = new G4FTFBinaryProtonBuilder(QuasiElastic);
AddBuilder(ftfp);
pro->RegisterMe(ftfp);
auto bicp = new G4BinaryProtonBuilder;
AddBuilder(bicp);
pro->RegisterMe(bicp);
bicp->SetMaxEnergy(maxBIC_proton);
pro->Build();
}
delete tpdata->theFTFBinaryKaon;
delete tpdata->theBertiniKaon;
delete tpdata->theKaon;
void G4HadronPhysicsFTF_BIC::Pion()
{
auto pi = new G4PionBuilder;
AddBuilder(pi);
auto ftfpi = new G4FTFBinaryPionBuilder(QuasiElastic);
AddBuilder(ftfpi);
pi->RegisterMe(ftfpi);
auto bicpi = new G4BinaryPionBuilder;
AddBuilder(bicpi);
pi->RegisterMe(bicpi);
bicpi->SetMaxEnergy(maxBIC_pion);
pi->Build();
}
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
void G4HadronPhysicsFTF_BIC::Kaon()
{
auto k = new G4KaonBuilder;
AddBuilder(k);
auto ftfk = new G4FTFBinaryKaonBuilder(QuasiElastic);
AddBuilder(ftfk);
k->RegisterMe(ftfk);
auto bertk = new G4BertiniKaonBuilder;
AddBuilder(bertk);
k->RegisterMe(bertk);
bertk->SetMaxEnergy(maxBERT_kaon);
k->Build();
}
delete tpdata; tpdata = 0;
void G4HadronPhysicsFTF_BIC::Others()
{
auto hyp = new G4HyperonFTFPBuilder;
AddBuilder(hyp);
hyp->Build();
auto abar = new G4AntiBarionBuilder;
AddBuilder(abar);
auto ftfpabar = new G4FTFPAntiBarionBuilder(QuasiElastic);
AddBuilder(ftfpabar);
abar->RegisterMe(ftfpabar);
abar->Build();
}
void G4HadronPhysicsFTF_BIC::ConstructParticle()
@@ -187,31 +199,33 @@ void G4HadronPhysicsFTF_BIC::ConstructParticle()
pShortLivedConstructor.ConstructParticle();
}
//#include "G4ProcessManager.hh"
#include "G4PhysListUtil.hh"
void G4HadronPhysicsFTF_BIC::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
if(G4Threading::IsMasterThread()) {
DumpBanner();
}
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
ExtraConfiguration();
}
//#include "G4ProcessManager.hh"
#include "G4PhysListUtil.hh"
void G4HadronPhysicsFTF_BIC::ExtraConfiguration()
{
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
auto xs_n_in = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
xs_ds.Push_back(xs_n_in); //TODO: Is this needed? Who owns the pointer?
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(xs_n_in);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
@@ -225,8 +239,9 @@ void G4HadronPhysicsFTF_BIC::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
auto xs_n_c = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_c); //TODO: Who owns this?
capture->AddDataSet(xs_n_c);
capture->RegisterMe(new G4NeutronRadCapture());
}
@@ -58,6 +58,30 @@
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4PionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4QGSPPionBuilder.hh"
#include "G4FTFPPionBuilder.hh"
#include "G4QGSPKaonBuilder.hh"
#include "G4FTFPKaonBuilder.hh"
#include "G4INCLXXPionBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4INCLXXProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4INCLXXNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
@@ -75,14 +99,14 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX);
G4ThreadLocal G4HadronPhysicsINCLXX::ThreadPrivate*
G4HadronPhysicsINCLXX::tpdata = 0;
//Constant for configuration
namespace {
const G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
const G4bool quasiElasticQGS= true; // For QGS, it must use it.
}
G4HadronPhysicsINCLXX::G4HadronPhysicsINCLXX(G4int)
: G4VPhysicsConstructor("hInelastic INCLXX")
, QuasiElastic(true)
, withNeutronHP(false)
, withFTFP(false)
: G4HadronPhysicsINCLXX("hInelastic INCLXX")
{
}
@@ -96,107 +120,148 @@ G4HadronPhysicsINCLXX::G4HadronPhysicsINCLXX(const G4String& name, const G4bool
void G4HadronPhysicsINCLXX::CreateModels()
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
Neutron();
Proton();
Pion();
Kaon();
Others();
}
// initialise fields in tpdata where assignment is optional below.
tpdata->theNeutronHP=0;
tpdata->theQGSPNeutron=0;
tpdata->theQGSPPro=0;
tpdata->theQGSPPion=0;
tpdata->theQGSPKaon=0;
tpdata->theFTFPNeutron=0;
tpdata->theFTFPPro=0;
tpdata->theFTFPPion=0;
tpdata->theFTFPKaon=0;
tpdata->theNeutrons=new G4NeutronBuilder( withNeutronHP );
void G4HadronPhysicsINCLXX::Neutron()
{
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder( withNeutronHP );
AddBuilder(neu);
G4PhysicsBuilderInterface* string = nullptr;
if(withFTFP) {
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
tpdata->theFTFPNeutron->SetMinEnergy(15.*GeV);
string = new G4FTFPNeutronBuilder(quasiElasticFTF);
} else {
tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
tpdata->theQGSPNeutron->SetMinEnergy(15.*GeV);
string = new G4QGSPNeutronBuilder(quasiElasticQGS);
}
tpdata->theNeutrons->RegisterMe(tpdata->theINCLXXNeutron=new G4INCLXXNeutronBuilder);
tpdata->theINCLXXNeutron->SetMaxEnergy(20.0*GeV);
string->SetMinEnergy(15.*GeV);
AddBuilder(string);
neu->RegisterMe(string);
auto inclxxn = new G4INCLXXNeutronBuilder;
inclxxn->SetMaxEnergy(20.*GeV);
AddBuilder(inclxxn);
neu->RegisterMe(inclxxn);
if(withNeutronHP) {
tpdata->theINCLXXNeutron->UsePreCompound(false);
tpdata->theINCLXXNeutron->SetMinEnergy(19.9*MeV);
tpdata->theNeutrons->RegisterMe(tpdata->theNeutronHP=new G4NeutronPHPBuilder);
inclxxn->UsePreCompound(false);
inclxxn->SetMinEnergy(19.9*MeV);
auto hpn = new G4NeutronPHPBuilder;
AddBuilder(hpn);
neu->RegisterMe(hpn);
} else {
tpdata->theINCLXXNeutron->UsePreCompound(true);
tpdata->theINCLXXNeutron->SetMinPreCompoundEnergy(0.0*MeV);
tpdata->theINCLXXNeutron->SetMaxPreCompoundEnergy(2.0*MeV);
tpdata->theINCLXXNeutron->SetMinEnergy(1.0*MeV);
inclxxn->UsePreCompound(true);
inclxxn->SetMinPreCompoundEnergy(0.0*MeV);
inclxxn->SetMaxPreCompoundEnergy(2.0*MeV);
inclxxn->SetMinEnergy(1.0*MeV);
}
tpdata->thePro=new G4ProtonBuilder;
neu->Build();
}
void G4HadronPhysicsINCLXX::Proton()
{
auto pro =new G4ProtonBuilder;
AddBuilder(pro);
G4PhysicsBuilderInterface* string = nullptr;
if(withFTFP) {
tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
tpdata->theFTFPPro->SetMinEnergy(15.*GeV);
string = new G4FTFPProtonBuilder(quasiElasticFTF);
} else {
tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
tpdata->theQGSPPro->SetMinEnergy(15.*GeV);
string = new G4QGSPProtonBuilder(quasiElasticQGS);
}
tpdata->thePro->RegisterMe(tpdata->theINCLXXPro=new G4INCLXXProtonBuilder);
tpdata->theINCLXXPro->SetMinEnergy(1.0*MeV);
tpdata->theINCLXXPro->SetMaxEnergy(20.0*GeV);
string->SetMinEnergy(15.*GeV);
AddBuilder(string);
pro->RegisterMe(string);
tpdata->thePion=new G4PionBuilder;
auto inclxxp = new G4INCLXXProtonBuilder;
AddBuilder(inclxxp);
inclxxp->SetMinEnergy(1.0*MeV);
inclxxp->SetMaxEnergy(20.0*GeV);
pro->RegisterMe(inclxxp);
pro->Build();
}
void G4HadronPhysicsINCLXX::Pion()
{
auto pi = new G4PionBuilder;
AddBuilder(pi);
G4PhysicsBuilderInterface* string = nullptr;
if(withFTFP) {
tpdata->thePion->RegisterMe(tpdata->theFTFPPion=new G4FTFPPionBuilder(quasiElasticFTF));
tpdata->theFTFPPion->SetMinEnergy(15.*GeV);
string = new G4FTFPPionBuilder(quasiElasticFTF);
} else {
tpdata->thePion->RegisterMe(tpdata->theQGSPPion=new G4QGSPPionBuilder(quasiElasticQGS));
tpdata->theQGSPPion->SetMinEnergy(15.*GeV);
string = new G4QGSPPionBuilder(quasiElasticQGS);
}
tpdata->thePion->RegisterMe(tpdata->theINCLXXPion=new G4INCLXXPionBuilder);
tpdata->theINCLXXPion->SetMinEnergy(0.0*GeV);
tpdata->theINCLXXPion->SetMaxEnergy(20.0*GeV);
string->SetMinEnergy(15.*GeV);
AddBuilder(string);
pi->RegisterMe(string);
tpdata->theKaon=new G4KaonBuilder;
auto inclxx = new G4INCLXXPionBuilder;
inclxx->SetMinEnergy(0.0*GeV);
inclxx->SetMaxEnergy(20.*GeV);
AddBuilder(inclxx);
pi->RegisterMe(inclxx);
pi->Build();
}
void G4HadronPhysicsINCLXX::Kaon()
{
auto k = new G4KaonBuilder;
AddBuilder(k);
G4PhysicsBuilderInterface* string = nullptr;
if(withFTFP) {
tpdata->theKaon->RegisterMe(tpdata->theFTFPKaon=new G4FTFPKaonBuilder(quasiElasticFTF));
tpdata->theFTFPKaon->SetMinEnergy(14.*GeV);
string = new G4FTFPKaonBuilder(quasiElasticFTF);
} else {
tpdata->theKaon->RegisterMe(tpdata->theQGSPKaon=new G4QGSPKaonBuilder(quasiElasticQGS));
tpdata->theQGSPKaon->SetMinEnergy(14.*GeV);
string = new G4QGSPKaonBuilder(quasiElasticQGS);
}
tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
tpdata->theBertiniKaon->SetMinEnergy(0.0*GeV);
tpdata->theBertiniKaon->SetMaxEnergy(15.0*GeV);
string->SetMinEnergy(14.*GeV);
AddBuilder(string);
k->RegisterMe(string);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
auto bert = new G4BertiniKaonBuilder;
bert->SetMinEnergy(0.0*GeV);
bert->SetMaxEnergy(15.0*GeV);
AddBuilder(bert);
k->RegisterMe(bert);
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
k->Build();
}
void G4HadronPhysicsINCLXX::Others()
{
auto hyp = new G4HyperonFTFPBuilder;
AddBuilder(hyp);
hyp->Build();
auto abar = new G4AntiBarionBuilder;
AddBuilder(abar);
auto ftfpabar = new G4FTFPAntiBarionBuilder(quasiElasticFTF);
AddBuilder(ftfpabar);
abar->RegisterMe(ftfpabar);
abar->Build();
}
G4HadronPhysicsINCLXX::~G4HadronPhysicsINCLXX()
{
if(tpdata) {
delete tpdata->theFTFPNeutron;
delete tpdata->theQGSPNeutron;
delete tpdata->theINCLXXNeutron;
delete tpdata->theNeutronHP;
delete tpdata->theFTFPPro;
delete tpdata->theQGSPPro;
delete tpdata->thePro;
delete tpdata->theINCLXXPro;
delete tpdata->theFTFPPion;
delete tpdata->theQGSPPion;
delete tpdata->theFTFPKaon;
delete tpdata->theQGSPKaon;
delete tpdata->theINCLXXPion;
delete tpdata->thePion;
delete tpdata->theKaon;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){delete el;});
}
delete tpdata; tpdata = 0;
}
void G4HadronPhysicsINCLXX::TerminateWorker()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
xs_ds.Clear();
G4VPhysicsConstructor::TerminateWorker();
}
void G4HadronPhysicsINCLXX::ConstructParticle()
@@ -214,27 +279,26 @@ void G4HadronPhysicsINCLXX::ConstructParticle()
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsINCLXX::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
//if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
ExtraConfiguration();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsINCLXX::ExtraConfiguration()
{
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
G4HadronicProcess* capture = 0;
G4HadronicProcess* fission = 0;
@@ -251,8 +315,9 @@ void G4HadronPhysicsINCLXX::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
auto xs_n_in = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
capture->AddDataSet(xs_n_in);
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
capture->RegisterMe( theNeutronRadCapture );
if ( withNeutronHP ) {
@@ -40,94 +40,63 @@
#include <iomanip>
#include "G4HadronPhysicsNuBeam.hh"
#include "G4QGSPLundStrFragmProtonBuilder.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
//#include "G4ParticleDefinition.hh"
//#include "G4ParticleTable.hh"
//
//#include "G4MesonConstructor.hh"
//#include "G4BaryonConstructor.hh"
//#include "G4ShortLivedConstructor.hh"
//
//#include "G4ComponentGGHadronNucleusXsc.hh"
//#include "G4CrossSectionInelastic.hh"
//#include "G4HadronCaptureProcess.hh"
//#include "G4NeutronRadCapture.hh"
//#include "G4NeutronInelasticXS.hh"
//#include "G4NeutronCaptureXS.hh"
//
//#include "G4CrossSectionDataSetRegistry.hh"
//
//#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsNuBeam);
G4ThreadLocal G4HadronPhysicsNuBeam::ThreadPrivate* G4HadronPhysicsNuBeam::tpdata=0;
//G4ThreadLocal G4HadronPhysicsNuBeam::ThreadPrivate* G4HadronPhysicsNuBeam::tpdata=0;
G4HadronPhysicsNuBeam::G4HadronPhysicsNuBeam(G4int)
: G4VPhysicsConstructor("hInelasticNuBeam")
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0) */
, QuasiElastic(false)
/* , xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0) */
G4HadronPhysicsNuBeam::G4HadronPhysicsNuBeam(G4int) :
G4HadronPhysicsNuBeam("hInelasticNuBeam",false)
{}
G4HadronPhysicsNuBeam::G4HadronPhysicsNuBeam(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theBertiniNeutron(0)
, theFTFPNeutron(0)
, thePiK(0)
, theBertiniPiK(0)
, theFTFPPiK(0)
, thePro(0)
, theBertiniPro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0) */
, QuasiElastic(quasiElastic)
/* , xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0) */
{}
void G4HadronPhysicsNuBeam::CreateModels()
: G4HadronPhysicsFTFP_BERT(name,quasiElastic)
{
minFTFP_neutron = 4.0*GeV;
maxBERT_neutron = 5.0*GeV;
minFTFP_proton = 3.0*GeV;
maxBERT_proton = 3.5*GeV;
maxFTFP_proton = 101*GeV;
minFTFP_pion = minFTFP_kaon = 3.0*GeV;
maxBERT_pion = maxBERT_kaon = 3.5*GeV;
// this is fairly "standard", and is the same in FTFP_BERT
//
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(5*GeV);
}
// this block has quite a few modifications,
// incl. energy ranges that are different from FTFP_BERT
//
tpdata->thePro=new G4ProtonBuilder;
//
void G4HadronPhysicsNuBeam::Proton()
{
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
// this is the new "custom" proton builder, tentatively for NuBeam
//
// no need to set the min energy because it's set in the ProBuilder (at 100GeV)
@@ -136,127 +105,157 @@ void G4HadronPhysicsNuBeam::CreateModels()
// also explicitly set quasi-elastic key ON for QGS
// (it should be OFF for FTF, controlled by QuasiElastic)
//
tpdata->theQGSPPro = new G4QGSPLundStrFragmProtonBuilder( true );
tpdata->thePro->RegisterMe(tpdata->theQGSPPro);
auto qgsppro = new G4QGSPLundStrFragmProtonBuilder( true );
AddBuilder(qgsppro);
pro->RegisterMe(qgsppro);
//
// standard FTFP builder, but energy range is adjusted
//
tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
tpdata->theFTFPPro->SetMinEnergy(3.*GeV);
tpdata->theFTFPPro->SetMaxEnergy(101.*GeV);
//
auto ftfppro = new G4FTFPProtonBuilder(QuasiElastic);
AddBuilder(ftfppro);
pro->RegisterMe(ftfppro);
ftfppro->SetMinEnergy(minFTFP_proton);
ftfppro->SetMaxEnergy(maxFTFP_proton);
//
// standard Bertini builder, but the validity limit in energy has been moved higher
//
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(3.5*GeV);
auto bertpro = new G4BertiniProtonBuilder;
AddBuilder(bertpro);
pro->RegisterMe(bertpro);
bertpro->SetMaxEnergy(maxBERT_proton);
pro->Build();
}
void G4HadronPhysicsNuBeam::Pion()
{
// this one has energy ranges different from FTFP_BERT,
// namely, Bertini is extended up to 10GeV, and FTFP starts at 7GeV
//
tpdata->thePiK=new G4PiKBuilder;
tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
tpdata->theFTFPPiK->SetMinEnergy(3.*GeV);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(3.5*GeV);
// this is "standard" and is the same as in FTFP_BERT
//
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
return;
}
G4HadronPhysicsNuBeam::~G4HadronPhysicsNuBeam()
{
if (!tpdata) return;
delete tpdata->theNeutrons;
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->thePiK;
delete tpdata->theBertiniPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
delete tpdata->theFTFPPro;
delete tpdata->theQGSPPro;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
}
void G4HadronPhysicsNuBeam::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
return;
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsNuBeam::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
//
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i )
{
if ( fCapture == ((*pv)[i])->GetProcessSubType() )
{
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
return;
auto pik = new G4PiKBuilder;
AddBuilder(pik);
auto ftfppik = new G4FTFPPiKBuilder(QuasiElastic);
AddBuilder(ftfppik);
ftfppik->SetMinEnergy(minFTFP_pion);
pik->RegisterMe(ftfppik);
auto bertpik = new G4BertiniPiKBuilder();
AddBuilder(bertpik);
bertpik->SetMaxEnergy(maxBERT_pion);
pik->RegisterMe(bertpik);
pik->Build();
}
void G4HadronPhysicsNuBeam::Kaon() {
//Use combined with pions
}
//void G4HadronPhysicsNuBeam::CreateModels()
//{
// // this one has energy ranges different from FTFP_BERT,
// // namely, Bertini is extended up to 10GeV, and FTFP starts at 7GeV
// //
// tpdata->thePiK=new G4PiKBuilder;
// tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
// tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
// tpdata->theFTFPPiK->SetMinEnergy(3.*GeV);
// tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
// tpdata->theBertiniPiK->SetMaxEnergy(3.5*GeV);
//
// // this is "standard" and is the same as in FTFP_BERT
// //
// tpdata->theHyperon=new G4HyperonFTFPBuilder;
// tpdata->theAntiBaryon=new G4AntiBarionBuilder;
// tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
//
// return;
//
//}
//G4HadronPhysicsNuBeam::~G4HadronPhysicsNuBeam()
//{
// if (!tpdata) return;
//
// delete tpdata->theNeutrons;
// delete tpdata->theBertiniNeutron;
// delete tpdata->theFTFPNeutron;
//
// delete tpdata->thePiK;
// delete tpdata->theBertiniPiK;
// delete tpdata->theFTFPPiK;
//
// delete tpdata->thePro;
// delete tpdata->theBertiniPro;
// delete tpdata->theFTFPPro;
// delete tpdata->theQGSPPro;
//
// delete tpdata->theHyperon;
// delete tpdata->theAntiBaryon;
// delete tpdata->theFTFPAntiBaryon;
//
//}
//void G4HadronPhysicsNuBeam::ConstructParticle()
//{
//
// G4MesonConstructor pMesonConstructor;
// pMesonConstructor.ConstructParticle();
//
// G4BaryonConstructor pBaryonConstructor;
// pBaryonConstructor.ConstructParticle();
//
// G4ShortLivedConstructor pShortLivedConstructor;
// pShortLivedConstructor.ConstructParticle();
//
// return;
//
//}
//
//#include "G4ProcessManager.hh"
//void G4HadronPhysicsNuBeam::ConstructProcess()
//{
//
// if ( tpdata == 0 ) tpdata = new ThreadPrivate;
//
// CreateModels();
//
// tpdata->theNeutrons->Build();
// tpdata->thePro->Build();
// tpdata->thePiK->Build();
//
// // --- Kaons ---
// tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
// G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
// G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
// G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
// G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
// G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
//
// tpdata->theHyperon->Build();
// tpdata->theAntiBaryon->Build();
//
// // --- Neutrons ---
// //
// tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
// G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
//
// G4HadronicProcess* capture = 0;
// G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
// G4ProcessVector* pv = pmanager->GetProcessList();
// for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i )
// {
// if ( fCapture == ((*pv)[i])->GetProcessSubType() )
// {
// capture = static_cast<G4HadronicProcess*>((*pv)[i]);
// }
// }
// if ( ! capture ) {
// capture = new G4HadronCaptureProcess("nCapture");
// pmanager->AddDiscreteProcess(capture);
// }
// tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
// capture->AddDataSet(tpdata->xsNeutronCaptureXS);
// capture->RegisterMe(new G4NeutronRadCapture());
//
// return;
//
//}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_BERT.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGSP_BERT.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -52,6 +52,24 @@
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
@@ -66,131 +84,132 @@
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4ProcessManager.hh"
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT);
G4ThreadLocal G4HadronPhysicsQGSP_BERT::ThreadPrivate*
G4HadronPhysicsQGSP_BERT::tpdata = 0;
G4HadronPhysicsQGSP_BERT::G4HadronPhysicsQGSP_BERT(G4int)
: G4VPhysicsConstructor("hInelastic QGSP_BERT")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBertiniNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBertiniPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
, QuasiElastic(true)
: G4HadronPhysicsQGSP_BERT("hInelastic QGSP_BERT",true) {}
G4HadronPhysicsQGSP_BERT::G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool /*quasiElastic*/)
: G4VPhysicsConstructor(name)
{
QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
QuasiElasticQGS= true; // For QGS, it must use it.
minQGSP_proton = minQGSP_neutron = minQGSP_pik = 12.*GeV;
maxFTFP_proton = maxFTFP_neutron = maxFTFP_pik = 25.*GeV;
minFTFP_proton = minFTFP_neutron = minFTFP_pik = 9.5*GeV;
maxBERT_proton = maxBERT_neutron = maxBERT_pik = 9.9*GeV;
minBERT_proton = minBERT_neutron = minBERT_pik = 0.*GeV;
}
G4HadronPhysicsQGSP_BERT::G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool quasiElastic)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBertiniNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBertiniPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
, QuasiElastic(quasiElastic)
{
}
void G4HadronPhysicsQGSP_BERT::CreateModels()
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
Neutron();
Proton();
Pion();
Kaon();
Others();
}
const G4double minQGSP = 12.0*GeV;
const G4double maxFTFP = 25.0*GeV;
const G4double minFTFP = 9.5*GeV;
const G4double maxBERT = 9.9*GeV;
const G4double minBERT = 0.0*GeV;
void G4HadronPhysicsQGSP_BERT::Neutron()
{
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bert = new G4BertiniNeutronBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_neutron);
bert->SetMaxEnergy(maxBERT_neutron);
neu->RegisterMe(bert);
neu->Build();
}
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
void G4HadronPhysicsQGSP_BERT::Proton()
{
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_proton);
pro->RegisterMe(qgs);
auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_proton);
ftf->SetMaxEnergy(maxFTFP_proton);
pro->RegisterMe(ftf);
auto bert = new G4BertiniProtonBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_proton);
bert->SetMaxEnergy(maxBERT_proton);
pro->RegisterMe(bert);
pro->Build();
}
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(minBERT);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
void G4HadronPhysicsQGSP_BERT::Pion()
{
auto pik = new G4PiKBuilder;
AddBuilder(pik);
auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_pik);
pik->RegisterMe(qgs);
auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_pik);
ftf->SetMaxEnergy(maxFTFP_pik);
pik->RegisterMe(ftf);
auto bert = new G4BertiniPiKBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_pik);
bert->SetMaxEnergy(maxBERT_pik);
pik->RegisterMe(bert);
pik->Build();
}
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
tpdata->theQGSPPro->SetMinEnergy(minQGSP);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
tpdata->theFTFPPro->SetMinEnergy(minFTFP);
tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
tpdata->thePiK=new G4PiKBuilder;
tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
void G4HadronPhysicsQGSP_BERT::Others()
{
auto hyp = new G4HyperonFTFPBuilder;
AddBuilder(hyp);
hyp->Build();
auto abar = new G4AntiBarionBuilder;
AddBuilder(abar);
auto ftf = new G4FTFPAntiBarionBuilder(QuasiElasticFTF);
AddBuilder(ftf);
abar->RegisterMe(ftf);
abar->Build();
}
G4HadronPhysicsQGSP_BERT::~G4HadronPhysicsQGSP_BERT()
{
if (!tpdata) return;
//Detele master-owned stuff
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
}
delete tpdata->theBertiniNeutron;
delete tpdata->theQGSPNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->theNeutrons;
delete tpdata->theBertiniPiK;
delete tpdata->theQGSPPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePiK;
delete tpdata->theBertiniPro;
delete tpdata->theQGSPPro;
delete tpdata->theFTFPPro;
delete tpdata->thePro;
delete tpdata->theFTFPAntiBaryon;
delete tpdata->theAntiBaryon;
delete tpdata->theHyperon;
delete tpdata; tpdata = 0;
void G4HadronPhysicsQGSP_BERT::TerminateWorker()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
xs_ds.Clear();
G4VPhysicsConstructor::TerminateWorker();
}
void G4HadronPhysicsQGSP_BERT::ConstructParticle()
@@ -208,30 +227,22 @@ void G4HadronPhysicsQGSP_BERT::ConstructParticle()
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsQGSP_BERT::ConstructProcess()
void G4HadronPhysicsQGSP_BERT::ExtraConfiguration()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
//Modify XS for kaons
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
//Modify Neutrons
auto xs_n_in = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet( xs_n_in );
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
@@ -244,8 +255,18 @@ void G4HadronPhysicsQGSP_BERT::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
auto xs_n_c = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_c);
capture->AddDataSet( xs_n_c );
capture->RegisterMe( new G4NeutronRadCapture() );
}
void G4HadronPhysicsQGSP_BERT::ConstructProcess()
{
if(G4Threading::IsMasterThread()) {
DumpBanner();
}
CreateModels();
ExtraConfiguration();
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_BERT_HP.cc 93878 2015-11-03 08:18:00Z gcosmo $
// $Id: G4HadronPhysicsQGSP_BERT_HP.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -51,11 +51,11 @@
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
@@ -64,6 +64,8 @@
#include "G4NeutronCaptureXS.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4LFission.hh"
#include "G4ProcessVector.hh"
#include "G4ProcessManager.hh"
#include "G4CrossSectionDataSetRegistry.hh"
@@ -74,162 +76,53 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP);
G4ThreadLocal G4HadronPhysicsQGSP_BERT_HP::ThreadPrivate*
G4HadronPhysicsQGSP_BERT_HP::tpdata = 0;
G4HadronPhysicsQGSP_BERT_HP::G4HadronPhysicsQGSP_BERT_HP(G4int)
: G4VPhysicsConstructor("hInelastic QGSP_BERT_HP")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBertiniNeutron(0)
, theHPNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBertiniPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(true)
: G4HadronPhysicsQGSP_BERT_HP("hInelastic QGSP_BERT_HP")
{}
G4HadronPhysicsQGSP_BERT_HP::G4HadronPhysicsQGSP_BERT_HP(const G4String& name, G4bool /*quasiElastic */ )
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBertiniNeutron(0)
, theHPNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBertiniPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(quasiElastic)
{}
void G4HadronPhysicsQGSP_BERT_HP::CreateModels()
: G4HadronPhysicsQGSP_BERT(name)
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
const G4double minQGSP = 12.0*GeV;
const G4double maxFTFP = 25.0*GeV;
const G4double minFTFP = 9.5*GeV;
const G4double maxBERT = 9.9*GeV;
const G4double maxHP = 19.9*MeV;
tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(maxHP);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronPHPBuilder);
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
tpdata->theQGSPPro->SetMinEnergy(minQGSP);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
tpdata->theFTFPPro->SetMinEnergy(minFTFP);
tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
tpdata->thePiK=new G4PiKBuilder;
tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
minBERT_neutron = 19.9*MeV;
}
G4HadronPhysicsQGSP_BERT_HP::~G4HadronPhysicsQGSP_BERT_HP()
void G4HadronPhysicsQGSP_BERT_HP::Neutron()
{
if (!tpdata) return;
delete tpdata->theHPNeutron;
delete tpdata->theBertiniNeutron;
delete tpdata->theQGSPNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->theNeutrons;
delete tpdata->theBertiniPiK;
delete tpdata->theQGSPPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePiK;
delete tpdata->theBertiniPro;
delete tpdata->theQGSPPro;
delete tpdata->theFTFPPro;
delete tpdata->thePro;
delete tpdata->theFTFPAntiBaryon;
delete tpdata->theAntiBaryon;
delete tpdata->theHyperon;
delete tpdata; tpdata = 0;
auto neu = new G4NeutronBuilder( true ); // Fission on
AddBuilder(neu);
auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bert = new G4BertiniNeutronBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_neutron);
bert->SetMaxEnergy(maxBERT_neutron);
neu->RegisterMe(bert);
auto hp = new G4NeutronPHPBuilder;
AddBuilder(hp);
neu->RegisterMe(hp);
neu->Build();
}
void G4HadronPhysicsQGSP_BERT_HP::ConstructParticle()
void G4HadronPhysicsQGSP_BERT_HP::ExtraConfiguration()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsQGSP_BERT_HP::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
//Modify XS for kaons
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
G4HadronicProcess* capture = 0;
G4HadronicProcess* fission = 0;
@@ -246,18 +139,20 @@ void G4HadronPhysicsQGSP_BERT_HP::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->AddDataSet( new G4ParticleHPCaptureData );
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
auto xs_n_in = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
capture->AddDataSet( xs_n_in );
auto xs_n_hp = new G4ParticleHPCaptureData;
xs_ds.Push_back(xs_n_hp);//TODO: Is this needed? Original code does not need this
capture->AddDataSet( xs_n_hp );
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( minBERT_neutron );
capture->RegisterMe( theNeutronRadCapture );
if ( ! fission ) {
fission = new G4HadronFissionProcess("nFission");
pmanager->AddDiscreteProcess(fission);
}
G4LFission* theNeutronLEPFission = new G4LFission();
theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
theNeutronLEPFission->SetMinEnergy( minBERT_neutron );
fission->RegisterMe( theNeutronLEPFission );
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_BIC.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGSP_BIC.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -44,6 +44,24 @@
#include "G4HadronPhysicsQGSP_BIC.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
@@ -65,123 +83,123 @@
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4ProcessManager.hh"
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC);
G4ThreadLocal G4HadronPhysicsQGSP_BIC::ThreadPrivate*
G4HadronPhysicsQGSP_BIC::tpdata = 0;
G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(G4int)
: G4VPhysicsConstructor("hInelastic QGSP_BIC")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBinaryNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(true)
: G4HadronPhysicsQGSP_BIC("hInelastic QGSP_BIC",true)
{}
G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(const G4String& name, G4bool /* quasiElastic */)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBinaryNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(quasiElastic)
{}
{
QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
QuasiElasticQGS= true; // For QGS, it must use it.
minQGSP_proton = minQGSP_neutron = minQGSP_pik = 12.0*GeV;
maxFTFP_proton = maxFTFP_neutron = maxFTFP_pik = 25.0*GeV;
minFTFP_proton = minFTFP_neutron = 9.5*GeV;
minFTFP_pik = 4.*GeV;
maxBIC_proton = maxBIC_neutron = 9.9*GeV;
maxBERT_pik = 5.0*GeV;
}
void G4HadronPhysicsQGSP_BIC::CreateModels()
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
Neutron();
Proton();
Pion();
Kaon();
Others();
}
const G4double maxFTFP = 25.0*GeV;
const G4double minFTFP = 9.5*GeV;
const G4double maxBIC = 9.9*GeV;
const G4double maxBERT = 5.0*GeV;
void G4HadronPhysicsQGSP_BIC::Neutron()
{
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bic = new G4BinaryNeutronBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBIC_neutron);
neu->RegisterMe(bic);
neu->Build();
}
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
void G4HadronPhysicsQGSP_BIC::Proton()
{
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_proton);
pro->RegisterMe(qgs);
auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_proton);
ftf->SetMaxEnergy(maxFTFP_proton);
pro->RegisterMe(ftf);
auto bic = new G4BinaryProtonBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBIC_proton);
pro->RegisterMe(bic);
pro->Build();
}
tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
void G4HadronPhysicsQGSP_BIC::Pion()
{
auto pik = new G4PiKBuilder;
AddBuilder(pik);
auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_pik);
pik->RegisterMe(qgs);
auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMaxEnergy(maxFTFP_pik);
ftf->SetMinEnergy(minFTFP_pik);
pik->RegisterMe(ftf);
auto bert = new G4BertiniPiKBuilder;
AddBuilder(bert);
bert->SetMaxEnergy(maxBERT_pik);
pik->RegisterMe(bert);
pik->Build();
}
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
tpdata->theFTFPPro->SetMinEnergy(minFTFP);
tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
tpdata->thePiK=new G4PiKBuilder;
tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
void G4HadronPhysicsQGSP_BIC::Others()
{
auto hyp = new G4HyperonFTFPBuilder;
AddBuilder(hyp);
hyp->Build();
auto abar = new G4AntiBarionBuilder;
AddBuilder(abar);
auto ftf = new G4FTFPAntiBarionBuilder(QuasiElasticFTF);
AddBuilder(ftf);
abar->RegisterMe(ftf);
abar->Build();
}
G4HadronPhysicsQGSP_BIC::~G4HadronPhysicsQGSP_BIC()
{
if (!tpdata) return;
delete xs_k.Get();
std::for_each( xs_ds.Begin(),xs_ds.End(),
[](G4VCrossSectionDataSet* el){delete el;});
}
delete tpdata->theBinaryNeutron;
delete tpdata->theQGSPNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->theBertiniPiK;
delete tpdata->theQGSPPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePiK;
delete tpdata->theBinaryPro;
delete tpdata->theQGSPPro;
delete tpdata->theFTFPPro;
delete tpdata->thePro;
delete tpdata->theFTFPAntiBaryon;
delete tpdata->theAntiBaryon;
delete tpdata->theHyperon;
delete tpdata->xsNeutronCaptureXS;
delete tpdata; tpdata =0 ;
void G4HadronPhysicsQGSP_BIC::TerminateWorker()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
xs_ds.Clear();
G4VPhysicsConstructor::TerminateWorker();
}
void G4HadronPhysicsQGSP_BIC::ConstructParticle()
@@ -199,29 +217,31 @@ void G4HadronPhysicsQGSP_BIC::ConstructParticle()
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsQGSP_BIC::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
if(G4Threading::IsMasterThread()) {
DumpBanner();
}
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
ExtraConfiguration();
}
void G4HadronPhysicsQGSP_BIC::ExtraConfiguration()
{
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
auto xs_n_in = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
xs_ds.Push_back(xs_n_in); //TODO: Is this needed? Who owns the pointer?
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(xs_n_in);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
@@ -235,8 +255,8 @@ void G4HadronPhysicsQGSP_BIC::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
auto xs_n_c = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_c); //TODO: Who owns this?
capture->AddDataSet(xs_n_c);
capture->RegisterMe(new G4NeutronRadCapture());
}
@@ -37,223 +37,89 @@
//
#include <iomanip>
#include "G4HadronPhysicsQGSP_BIC_AllHP.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4HadronPhysicsQGSP_BIC_AllHP.hh"
#include "G4ProtonPHPBuilder.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4ProtonPHPBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4LFission.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_AllHP);
G4ThreadLocal G4HadronPhysicsQGSP_BIC_AllHP::ThreadPrivate*
G4HadronPhysicsQGSP_BIC_AllHP::tpdata = 0;
G4HadronPhysicsQGSP_BIC_AllHP::G4HadronPhysicsQGSP_BIC_AllHP(G4int)
: G4VPhysicsConstructor("hInelastic QGSP_BIC_HP")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBinaryNeutron(0)
, theHPNeutron(0)
, thePiKB(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(true)
: G4HadronPhysicsQGSP_BIC_AllHP("hInelastic QGSP_BIC_HP")
{}
G4HadronPhysicsQGSP_BIC_AllHP::G4HadronPhysicsQGSP_BIC_AllHP(const G4String& name, G4bool /* quasiElastic */)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBinaryNeutron(0)
, theHPNeutron(0)
, thePiKB(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(quasiElastic)
{}
void G4HadronPhysicsQGSP_BIC_AllHP::CreateModels()
: G4HadronPhysicsQGSP_BIC(name)
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
const G4double maxFTFP = 25.0*GeV;
const G4double minFTFP = 9.5*GeV;
const G4double maxBIC = 9.9*GeV;
const G4double maxBERT = 5.0*GeV;
const G4double maxHP = 19.9*MeV;
tpdata->theNeutronB=new G4NeutronBuilder( true ); // Fission on
tpdata->theNeutronB->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
tpdata->theNeutronB->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
tpdata->theNeutronB->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
tpdata->theBinaryNeutron->SetMinEnergy(maxHP);
tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
//ParticleHP
tpdata->theNeutronB->RegisterMe(tpdata->thePHPNeutron=new G4NeutronPHPBuilder);
tpdata->theProtonB=new G4ProtonBuilder;
tpdata->theProtonB->RegisterMe(tpdata->theQGSPProton=new G4QGSPProtonBuilder(quasiElasticQGS));
tpdata->theProtonB->RegisterMe(tpdata->theFTFPProton=new G4FTFPProtonBuilder(quasiElasticFTF));
tpdata->theFTFPProton->SetMinEnergy(minFTFP);
tpdata->theFTFPProton->SetMaxEnergy(maxFTFP);
tpdata->theProtonB->RegisterMe(tpdata->theBinaryProton=new G4BinaryProtonBuilder);
tpdata->theBinaryProton->SetMaxEnergy(maxBIC);
//ParticleHP
tpdata->theBinaryProton->SetMinEnergy(200*MeV);
tpdata->thePHPProton=new G4ProtonPHPBuilder;
tpdata->theProtonB->RegisterMe(tpdata->thePHPProton);
tpdata->thePHPProton->SetMinEnergy(0.*MeV);
tpdata->thePHPProton->SetMaxEnergy(200*MeV);
tpdata->thePiKB=new G4PiKBuilder;
tpdata->thePiKB->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
tpdata->thePiKB->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
tpdata->thePiKB->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
minBIC_neutron = 19.9*MeV;
maxHP_neutron = 20.*MeV;
minBIC_proton = 200.*MeV;
maxHP_proton = 200.*MeV;
}
G4HadronPhysicsQGSP_BIC_AllHP::~G4HadronPhysicsQGSP_BIC_AllHP()
void G4HadronPhysicsQGSP_BIC_AllHP::Neutron()
{
if (!tpdata) return;
//ParticleHP
delete tpdata->thePHPNeutron;
delete tpdata->thePHPProton;
delete tpdata->theBinaryNeutron;
delete tpdata->theQGSPNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->theBertiniPiK;
delete tpdata->theQGSPPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePiKB;
delete tpdata->theBinaryProton;
delete tpdata->theQGSPProton;
delete tpdata->theFTFPProton;
delete tpdata->theProtonB;
delete tpdata->theFTFPAntiBaryon;
delete tpdata->theAntiBaryon;
delete tpdata->theHyperon;
delete tpdata->xsNeutronCaptureXS;
delete tpdata; tpdata = 0;
auto neu = new G4NeutronBuilder( true ); // Fission on
AddBuilder(neu);
auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bic = new G4BinaryNeutronBuilder;
AddBuilder(bic);
bic->SetMinEnergy(minBIC_neutron);
bic->SetMaxEnergy(maxBIC_neutron);
neu->RegisterMe(bic);
auto hp = new G4NeutronPHPBuilder;
AddBuilder(hp);
hp->SetMaxEnergy(maxHP_neutron);
neu->RegisterMe(hp);
neu->Build();
}
void G4HadronPhysicsQGSP_BIC_AllHP::ConstructParticle()
void G4HadronPhysicsQGSP_BIC_AllHP::Proton()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsQGSP_BIC_AllHP::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutronB->Build();
tpdata->theProtonB->Build();
tpdata->thePiKB->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
G4HadronicProcess* capture = 0;
G4HadronicProcess* fission = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
} else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
fission = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->AddDataSet( new G4ParticleHPCaptureData );
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
capture->RegisterMe( theNeutronRadCapture );
if ( ! fission ) {
fission = new G4HadronFissionProcess("nFission");
pmanager->AddDiscreteProcess(fission);
}
G4LFission* theNeutronLEPFission = new G4LFission();
theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
fission->RegisterMe( theNeutronLEPFission );
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_proton);
pro->RegisterMe(qgs);
auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_proton);
ftf->SetMaxEnergy(maxFTFP_proton);
pro->RegisterMe(ftf);
auto bic = new G4BinaryProtonBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBIC_proton);
bic->SetMinEnergy(minBIC_proton);
pro->RegisterMe(bic);
auto hp = new G4ProtonPHPBuilder;
AddBuilder(hp);
hp->SetMaxEnergy(maxHP_proton);
pro->RegisterMe(hp);
pro->Build();
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGSP_FTFP_BERT.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGSP_FTFP_BERT.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -37,222 +37,33 @@
#include <iomanip>
#include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_FTFP_BERT);
G4ThreadLocal G4HadronPhysicsQGSP_FTFP_BERT::ThreadPrivate*
G4HadronPhysicsQGSP_FTFP_BERT::tpdata = 0;
G4HadronPhysicsQGSP_FTFP_BERT::G4HadronPhysicsQGSP_FTFP_BERT(G4int)
: G4VPhysicsConstructor("hInelastic QGSP_FTFP_BERT")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBertiniNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBertiniPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
, QuasiElastic(true)
{
}
: G4HadronPhysicsQGSP_FTFP_BERT("hInelastic QGSP_FTFP_BERT",true) {}
G4HadronPhysicsQGSP_FTFP_BERT::G4HadronPhysicsQGSP_FTFP_BERT(const G4String&,
G4HadronPhysicsQGSP_FTFP_BERT::G4HadronPhysicsQGSP_FTFP_BERT(const G4String& name,
G4bool quasiElastic)
: G4VPhysicsConstructor("hInelastic QGSP_FTFP_BERT")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBertiniNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBertiniPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
, QuasiElastic(quasiElastic)
: G4HadronPhysicsQGSP_BERT(name,quasiElastic), QuasiElastic(quasiElastic)
{
maxBERT_proton = maxBERT_neutron = maxBERT_pik = 8.*GeV;
minFTFP_proton = minFTFP_neutron = minFTFP_pik = 6.*GeV;
}
void G4HadronPhysicsQGSP_FTFP_BERT::CreateModels()
void G4HadronPhysicsQGSP_FTFP_BERT::DumpBanner()
{
// First transition, between BERT and FTF/P
G4double minFTFP= 6.0 * GeV; // Was 9.5 for LEP (in FTFP_BERT 6.0 * GeV);
G4double maxBERT= 8.0 * GeV; // Was 9.9 for LEP (in FTFP_BERT 8.0 * GeV);
// Second transition, between FTF/P and QGS/P
G4double minQGSP= 12.0 * GeV;
G4double maxFTFP= 25.0 * GeV;
G4bool quasiElasFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasQGS= true; // For QGS, it must use it.
G4cout << " New QGSP_FTFP_BERT physics list, replaces LEP with FTF/P for p/n/pi (/K?)";
G4cout << " Thresholds: " << G4endl;
G4cout << " 1) between BERT and FTF/P over the interval "
<< minFTFP/GeV << " to " << maxBERT/GeV << " GeV. " << G4endl;
<< minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV. " << G4endl;
G4cout << " 2) between FTF/P and QGS/P over the interval "
<< minQGSP/GeV << " to " << maxFTFP/GeV << " GeV. " << G4endl;
<< minQGSP_proton/GeV << " to " << maxFTFP_proton/GeV << " GeV. " << G4endl;
G4cout << " -- quasiElastic was asked to be " << QuasiElastic << G4endl
<< " Changed to " << quasiElasQGS << " for QGS "
<< " and to " << quasiElasFTF << " (must be false) for FTF" << G4endl;
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasQGS));
tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasFTF));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP); // was (9.5*GeV);
tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP); // was (25*GeV);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT); // was (9.9*GeV);
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasQGS));
tpdata->theQGSPPro->SetMinEnergy(minQGSP);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasFTF));
tpdata->theFTFPPro->SetMinEnergy(minFTFP); // was (9.5*GeV);
tpdata->theFTFPPro->SetMaxEnergy(maxFTFP); // was (25*GeV);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(maxBERT); // was (9.9*GeV);
tpdata->thePiK=new G4PiKBuilder;
tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasQGS));
tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasFTF));
tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP); // was (25*GeV);
tpdata->theFTFPPiK->SetMinEnergy(minFTFP); // was (9.5*GeV);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT); // was (9.9*GeV);
// Hyperons use FTF
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF));
}
G4HadronPhysicsQGSP_FTFP_BERT::~G4HadronPhysicsQGSP_FTFP_BERT()
{
if (!tpdata) return;
delete tpdata->theQGSPNeutron;
delete tpdata->theFTFPNeutron;
delete tpdata->theBertiniNeutron;
delete tpdata->theNeutrons;
delete tpdata->theQGSPPro;
delete tpdata->theFTFPPro;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
delete tpdata->theQGSPPiK;
delete tpdata->theFTFPPiK;
delete tpdata->theBertiniPiK;
delete tpdata->thePiK;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
delete tpdata; tpdata = 0;
}
void G4HadronPhysicsQGSP_FTFP_BERT::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsQGSP_FTFP_BERT::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
<< " Changed to " << QuasiElasticQGS << " for QGS "
<< " and to " << QuasiElasticFTF << " (must be false) for FTF" << G4endl;
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsQGS_BIC.cc 93617 2015-10-27 09:00:41Z gcosmo $
// $Id: G4HadronPhysicsQGS_BIC.cc 105736 2017-08-16 13:01:11Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -39,6 +39,30 @@
#include <iomanip>
#include "G4HadronPhysicsQGS_BIC.hh"
#include "G4PionBuilder.hh"
#include "G4BinaryPionBuilder.hh"
#include "G4BertiniPionBuilder.hh"
#include "G4FTFBinaryPionBuilder.hh"
#include "G4QGSBinaryPionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFBinaryKaonBuilder.hh"
#include "G4QGSBinaryKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFBinaryProtonBuilder.hh"
#include "G4QGSBinaryProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFBinaryNeutronBuilder.hh"
#include "G4QGSBinaryNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
@@ -62,150 +86,152 @@
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGS_BIC);
G4ThreadLocal G4HadronPhysicsQGS_BIC::ThreadPrivate*
G4HadronPhysicsQGS_BIC::tpdata = 0;
G4HadronPhysicsQGS_BIC::G4HadronPhysicsQGS_BIC(G4int)
: G4VPhysicsConstructor("hInelastic QGS_BIC")
/* , theNeutrons(0)
, theFTFBinaryNeutron(0)
, theQGSBinaryNeutron(0)
, theBinaryNeutron(0)
, thePion(0)
, theBinaryPion(0)
, theBertiniPion(0)
, theFTFBinaryPion(0)
, theQGSBinaryPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFBinaryKaon(0)
, theQGSBinaryKaon(0)
, thePro(0)
, theFTFBinaryPro(0)
, theQGSBinaryPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(true)
{}
: G4HadronPhysicsQGS_BIC("hInelastic QGS_BIC",true) {}
G4HadronPhysicsQGS_BIC::G4HadronPhysicsQGS_BIC(const G4String& name, G4bool /* quasiElastic */)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFBinaryNeutron(0)
, theQGSBinaryNeutron(0)
, theBinaryNeutron(0)
, thePion(0)
, theBinaryPion(0)
, theBertiniPion(0)
, theFTFBinaryPion(0)
, theQGSBinaryPion(0)
, theKaon(0)
, theBertiniKaon(0)
, theFTFBinaryKaon(0)
, theQGSBinaryKaon(0)
, thePro(0)
, theFTFBinaryPro(0)
, theQGSBinaryPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsKaon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(quasiElastic)
{}
{
QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
QuasiElasticQGS= true; // For QGS, it must use it.
maxFTF_neutron = maxFTF_proton = 25.*GeV;
minFTF_neutron = minFTF_proton = 9.5*GeV;
maxBIC_neutron = maxBIC_proton = 9.9*GeV;
maxFTF_pion = 25.*GeV;
maxBERT_pion = 5.0*GeV;
minBERT_pion = 1.2*GeV;
maxBIC_pion = 1.3*GeV;
maxFTF_kaon = 25.*GeV;
maxBERT_kaon = 5.0*GeV;
}
G4HadronPhysicsQGS_BIC::~G4HadronPhysicsQGS_BIC()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(),xs_ds.End(),
[](G4VCrossSectionDataSet* el){delete el;});
}
void G4HadronPhysicsQGS_BIC::TerminateWorker()
{
delete xs_k.Get();
std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
xs_ds.Clear();
G4VPhysicsConstructor::TerminateWorker();
}
void G4HadronPhysicsQGS_BIC::CreateModels()
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
const G4double maxFTFP = 25.0*GeV;
const G4double minFTFP = 9.5*GeV;
const G4double maxBIC = 9.9*GeV;
const G4double maxPionBIC = 1.3*GeV;
const G4double maxPionBERT = 5.0*GeV;
const G4double minPionBERT = 1.2*GeV;
const G4double maxKaonBERT = 5.0*GeV;
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theQGSBinaryNeutron=new G4QGSBinaryNeutronBuilder(quasiElasticQGS));
tpdata->theNeutrons->RegisterMe(tpdata->theFTFBinaryNeutron=new G4FTFBinaryNeutronBuilder(quasiElasticFTF));
tpdata->theFTFBinaryNeutron->SetMinEnergy(minFTFP);
tpdata->theFTFBinaryNeutron->SetMaxEnergy(maxFTFP);
tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
tpdata->thePro=new G4ProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theQGSBinaryPro=new G4QGSBinaryProtonBuilder(quasiElasticQGS));
tpdata->thePro->RegisterMe(tpdata->theFTFBinaryPro=new G4FTFBinaryProtonBuilder(quasiElasticFTF));
tpdata->theFTFBinaryPro->SetMinEnergy(minFTFP);
tpdata->theFTFBinaryPro->SetMaxEnergy(maxFTFP);
tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
tpdata->thePion=new G4PionBuilder;
tpdata->thePion->RegisterMe(tpdata->theQGSBinaryPion=new G4QGSBinaryPionBuilder(quasiElasticQGS));
tpdata->thePion->RegisterMe(tpdata->theFTFBinaryPion=new G4FTFBinaryPionBuilder(quasiElasticFTF));
tpdata->theFTFBinaryPion->SetMaxEnergy(maxFTFP);
tpdata->thePion->RegisterMe(tpdata->theBertiniPion=new G4BertiniPionBuilder);
tpdata->theBertiniPion->SetMinEnergy(minPionBERT);
tpdata->theBertiniPion->SetMaxEnergy(maxPionBERT);
tpdata->thePion->RegisterMe(tpdata->theBinaryPion = new G4BinaryPionBuilder);
tpdata->theBinaryPion->SetMaxEnergy(maxPionBIC);
tpdata->theKaon=new G4KaonBuilder;
tpdata->theKaon->RegisterMe(tpdata->theQGSBinaryKaon=new G4QGSBinaryKaonBuilder(quasiElasticQGS));
tpdata->theKaon->RegisterMe(tpdata->theFTFBinaryKaon=new G4FTFBinaryKaonBuilder(quasiElasticFTF));
tpdata->theFTFBinaryKaon->SetMaxEnergy(maxFTFP);
tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
tpdata->theBertiniKaon->SetMaxEnergy(maxKaonBERT);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
Neutron();
Proton();
Pion();
Kaon();
Others();
}
G4HadronPhysicsQGS_BIC::~G4HadronPhysicsQGS_BIC()
void G4HadronPhysicsQGS_BIC::Neutron()
{
if (!tpdata) return;
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto qgsneu = new G4QGSBinaryNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgsneu);
neu->RegisterMe(qgsneu);
auto ftfneu = new G4FTFBinaryNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftfneu);
ftfneu->SetMinEnergy(minFTF_neutron);
ftfneu->SetMaxEnergy(maxFTF_neutron);
neu->RegisterMe(ftfneu);
auto bicn = new G4BinaryNeutronBuilder;
AddBuilder(bicn);
bicn->SetMaxEnergy(maxBIC_neutron);
neu->RegisterMe(bicn);
neu->Build();
}
delete tpdata->theBinaryNeutron;
delete tpdata->theQGSBinaryNeutron;
delete tpdata->theFTFBinaryNeutron;
delete tpdata->theNeutrons;
delete tpdata->theQGSBinaryPion;
delete tpdata->theFTFBinaryPion;
delete tpdata->theBertiniPion;
delete tpdata->theBinaryPion;
delete tpdata->thePion;
delete tpdata->theQGSBinaryKaon;
delete tpdata->theFTFBinaryKaon;
delete tpdata->theBertiniKaon;
delete tpdata->theKaon;
delete tpdata->theBinaryPro;
delete tpdata->theQGSBinaryPro;
delete tpdata->theFTFBinaryPro;
delete tpdata->thePro;
delete tpdata->theFTFPAntiBaryon;
delete tpdata->theAntiBaryon;
delete tpdata->theHyperon;
void G4HadronPhysicsQGS_BIC::Proton()
{
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSBinaryProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
pro->RegisterMe(qgs);
auto ftf = new G4FTFBinaryProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTF_proton);
ftf->SetMaxEnergy(maxFTF_proton);
pro->RegisterMe(ftf);
auto bic = new G4BinaryProtonBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBIC_proton);
pro->RegisterMe(bic);
pro->Build();
}
delete tpdata; tpdata = 0;
void G4HadronPhysicsQGS_BIC::Pion()
{
auto pi = new G4PionBuilder;
AddBuilder(pi);
auto qgs = new G4QGSBinaryPionBuilder(QuasiElasticQGS);
AddBuilder(qgs);
pi->RegisterMe(qgs);
auto ftf = new G4FTFBinaryPionBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMaxEnergy(maxFTF_pion);
pi->RegisterMe(ftf);
auto bert = new G4BertiniPionBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_pion);
bert->SetMaxEnergy(maxBERT_pion);
pi->RegisterMe(bert);
auto bic = new G4BinaryPionBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBIC_pion);
pi->RegisterMe(bic);
pi->Build();
}
void G4HadronPhysicsQGS_BIC::Kaon()
{
auto k = new G4KaonBuilder;
AddBuilder(k);
auto qgs = new G4QGSBinaryKaonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
k->RegisterMe(qgs);
auto ftf = new G4FTFBinaryKaonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMaxEnergy(maxFTF_kaon);
k->RegisterMe(ftf);
auto bert = new G4BertiniKaonBuilder;
AddBuilder(bert);
bert->SetMaxEnergy(maxBERT_kaon);
k->RegisterMe(bert);
k->Build();
}
void G4HadronPhysicsQGS_BIC::Others()
{
auto hyp = new G4HyperonFTFPBuilder;
AddBuilder(hyp);
hyp->Build();
auto abar = new G4AntiBarionBuilder;
AddBuilder(abar);
auto ftf = new G4FTFPAntiBarionBuilder(QuasiElasticFTF);
AddBuilder(ftf);
abar->RegisterMe(ftf);
abar->Build();
}
void G4HadronPhysicsQGS_BIC::ConstructParticle()
@@ -226,26 +252,29 @@ void G4HadronPhysicsQGS_BIC::ConstructParticle()
#include "G4ProcessManager.hh"
void G4HadronPhysicsQGS_BIC::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
if(G4Threading::IsMasterThread()) {
DumpBanner();
}
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePion->Build();
tpdata->theKaon->Build();
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
ExtraConfiguration();
}
void G4HadronPhysicsQGS_BIC::ExtraConfiguration()
{
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
auto xsk = new G4ComponentGGHadronNucleusXsc();
xs_k.Put(xsk);
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(xsk);
xs_ds.Push_back(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
auto xs_n_in = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
xs_ds.Push_back(xs_n_in); //TODO: Is this needed? Who owns the pointer?
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(xs_n_in);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
@@ -259,8 +288,9 @@ void G4HadronPhysicsQGS_BIC::ConstructProcess()
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
auto xs_n_c = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
xs_ds.Push_back(xs_n_c); //TODO: Who owns this?
capture->AddDataSet(xs_n_c);
capture->RegisterMe(new G4NeutronRadCapture());
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HadronPhysicsShielding.cc 93878 2015-11-03 08:18:00Z gcosmo $
// $Id: G4HadronPhysicsShielding.cc 107255 2017-11-07 09:55:47Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -206,18 +206,11 @@ void G4HadronPhysicsShielding::ConstructProcess()
tpdata->theNeutrons->Build();
tpdata->theBGGxsNeutron = 0; //set explictly to zero or destructor may fail
// tpdata->theBGGxsNeutron=new G4ParticleHPBGGNucleonInelasticXS(G4Neutron::Neutron());
// FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theBGGxsNeutron);
//
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(new G4BGGNucleonInelasticXS(G4Neutron::Neutron()));
tpdata->theNeutronHPJENDLHEInelastic=new G4ParticleHPJENDLHEInelasticData;
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theNeutronHPJENDLHEInelastic);
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(new G4ParticleHPInelasticData);
//Register the G4ParticleHPJENDLHEInelasticData as the 2nd priority.
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->GetCrossSectionDataStore()->AddDataSet(tpdata->theNeutronHPJENDLHEInelastic,1);
tpdata->theBGGxsProton=0;
// tpdata->theBGGxsProton=new G4BGGNucleonInelasticXS(G4Proton::Proton());
// G4PhysListUtil::FindInelasticProcess(G4Proton::Proton())->AddDataSet(tpdata->theBGGxsProton);
tpdata->thePiK->Build();
@@ -249,8 +242,8 @@ void G4HadronPhysicsShielding::ConstructProcess()
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->AddDataSet( new G4ParticleHPCaptureData );
//Register the G4NeutronCaptureXS data as the 2nd priority.
capture->GetCrossSectionDataStore()->AddDataSet(tpdata->xsNeutronCaptureXS,1);
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( minNonHPNeutronEnergy_ );
capture->RegisterMe( theNeutronRadCapture );
@@ -0,0 +1,246 @@
//
// ********************************************************************
// * 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: G4HadronPhysicsShieldingLEND.cc 107250 2017-11-07 01:37:11Z tkoi $
//
//---------------------------------------------------------------------------
//
// ClassName:
//
// Author: 7 Nov 2017 Tatsumi Koi
// created from G4HadronPhysicsShielding
//
// Modified:
//
//----------------------------------------------------------------------------
//
#include <iomanip>
#include "G4HadronPhysicsShieldingLEND.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ParticleHPBGGNucleonInelasticXS.hh"
#include "G4ParticleHPJENDLHEInelasticData.hh"
#include "G4ParticleHPInelasticData.hh"
#include "G4BGGNucleonInelasticXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4LFission.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsShieldingLEND);
G4ThreadLocal G4HadronPhysicsShieldingLEND::ThreadPrivate*
G4HadronPhysicsShieldingLEND::tpdata = 0;
G4HadronPhysicsShieldingLEND::G4HadronPhysicsShieldingLEND( G4int )
: G4VPhysicsConstructor("hInelastic Shielding")
, useLEND_(false)
, evaluation_()
, minFTFPEnergy_(9.5*GeV)
, maxBertiniEnergy_(9.9*GeV)
, minNonHPNeutronEnergy_(19.9*MeV)
{}
G4HadronPhysicsShieldingLEND::G4HadronPhysicsShieldingLEND(const G4String& name, G4bool /* quasiElastic */)
: G4VPhysicsConstructor(name)
, useLEND_(false)
, evaluation_()
, minFTFPEnergy_(9.5*GeV)
, maxBertiniEnergy_(9.9*GeV)
, minNonHPNeutronEnergy_(19.9*MeV)
{}
G4HadronPhysicsShieldingLEND::G4HadronPhysicsShieldingLEND(const G4String& name,
G4int /*verbose*/, G4double minFTFPEnergy, G4double maxBertiniEnergy)
: G4VPhysicsConstructor(name)
, useLEND_(false)
, evaluation_()
, minFTFPEnergy_(minFTFPEnergy)
, maxBertiniEnergy_(maxBertiniEnergy)
, minNonHPNeutronEnergy_(19.9*MeV)
{}
#include "G4NeutronLENDBuilder.hh"
void G4HadronPhysicsShieldingLEND::CreateModels()
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF);
tpdata->theFTFPNeutron->SetMinEnergy(minFTFPEnergy_);
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
tpdata->theBertiniNeutron->SetMinEnergy(minNonHPNeutronEnergy_);
tpdata->theBertiniNeutron->SetMaxEnergy(maxBertiniEnergy_);
tpdata->theNeutrons->RegisterMe(tpdata->theLENeutron=new G4NeutronLENDBuilder( evaluation_ ));
tpdata->thePro=new G4ProtonBuilder;
tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF);
tpdata->theFTFPPro->SetMinEnergy(minFTFPEnergy_);
tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
tpdata->theBertiniPro->SetMaxEnergy(maxBertiniEnergy_);
tpdata->thePiK=new G4PiKBuilder;
tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF);
tpdata->theFTFPPiK->SetMinEnergy(minFTFPEnergy_);
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBertiniEnergy_);
tpdata->theHyperon=new G4HyperonFTFPBuilder;
tpdata->theAntiBaryon=new G4AntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
}
G4HadronPhysicsShieldingLEND::~G4HadronPhysicsShieldingLEND()
{
if (!tpdata) return;
delete tpdata->theNeutrons;
delete tpdata->theBertiniNeutron;
delete tpdata->theFTFPNeutron;
//delete tpdata->theHPNeutron;
delete tpdata->theLENeutron;
delete tpdata->thePiK;
delete tpdata->theBertiniPiK;
delete tpdata->theFTFPPiK;
delete tpdata->thePro;
delete tpdata->theBertiniPro;
delete tpdata->theFTFPPro;
delete tpdata->theHyperon;
delete tpdata->theAntiBaryon;
delete tpdata->theFTFPAntiBaryon;
delete tpdata->theBGGxsNeutron;
delete tpdata->theNeutronHPJENDLHEInelastic;
delete tpdata->theBGGxsProton;
delete tpdata; tpdata=0;
}
void G4HadronPhysicsShieldingLEND::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void G4HadronPhysicsShieldingLEND::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->thePro->Build();
tpdata->theNeutrons->Build();
tpdata->theBGGxsNeutron = 0; //set explictly to zero or destructor may fail
tpdata->theNeutronHPJENDLHEInelastic=new G4ParticleHPJENDLHEInelasticData;
//Register the G4ParticleHPJENDLHEInelasticData as the 2nd priority.
G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->GetCrossSectionDataStore()->AddDataSet(tpdata->theNeutronHPJENDLHEInelastic,1);
tpdata->theBGGxsProton=0;
tpdata->thePiK->Build();
// --- Kaons ---
tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
G4HadronicProcess* capture = 0;
G4HadronicProcess* fission = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
} else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
fission = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
//Register the G4NeutronCaptureXS data as the 2nd priority.
capture->GetCrossSectionDataStore()->AddDataSet(tpdata->xsNeutronCaptureXS,1);
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( minNonHPNeutronEnergy_ );
capture->RegisterMe( theNeutronRadCapture );
if ( ! fission ) {
fission = new G4HadronFissionProcess("nFission");
pmanager->AddDiscreteProcess(fission);
}
G4LFission* theNeutronLEPFission = new G4LFission();
theNeutronLEPFission->SetMinEnergy( minNonHPNeutronEnergy_ );
fission->RegisterMe( theNeutronLEPFission );
}
@@ -1,4 +1,4 @@
$Id: History 102617 2017-02-10 07:58:33Z gcosmo $
$Id: History 107562 2017-11-22 15:39:24Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,12 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
22-Nov-2017, V. Ivanchenko (phys-ctor-limiters-V10-03-02)
- G4StepLimiterPhysics - fixed thread safety - removed possible
race condition
- G4NeutronTrackingCut - cosmetic change (removed commented code,
added explicit builder type)
09-Feb-2017, M. Asai (phys-ctor-limiters-V10-03-00)
- Print-out of G4NeutronTrackingCut is made only for the master thread.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NeutronTrackingCut.hh 83417 2014-08-21 15:29:32Z gcosmo $
// $Id: G4NeutronTrackingCut.hh 107562 2017-11-22 15:39:24Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -64,8 +64,6 @@ public:
private:
//G4NeutronKiller* pNeutronKiller;
G4double timeLimit;
G4double kineticEnergyLimit;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4StepLimiterPhysics.hh 98777 2016-08-09 14:37:59Z gcosmo $
// $Id: G4StepLimiterPhysics.hh 107562 2017-11-22 15:39:24Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -68,8 +68,6 @@ private:
G4StepLimiterPhysics & operator=(const G4StepLimiterPhysics &right);
G4StepLimiterPhysics(const G4StepLimiterPhysics&);
G4StepLimiter* fStepLimiter;
G4UserSpecialCuts* fUserSpecialCuts;
G4bool fApplyToAll;
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NeutronTrackingCut.cc 102617 2017-02-10 07:58:33Z gcosmo $
// $Id: G4NeutronTrackingCut.cc 107562 2017-11-22 15:39:24Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -45,6 +45,7 @@
#include "G4NeutronKiller.hh"
#include "G4HadronicProcessStore.hh"
#include "G4BuilderType.hh"
#include "G4Threading.hh"
// factory
@@ -54,19 +55,16 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4NeutronTrackingCut);
//
G4NeutronTrackingCut::G4NeutronTrackingCut(G4int ver)
: G4VPhysicsConstructor("neutronTrackingCut")
, verbose(ver)
: G4VPhysicsConstructor("neutronTrackingCut"), verbose(ver)
{
timeLimit = 10.*microsecond;
kineticEnergyLimit = 0.0;
SetPhysicsType(bUnknown);
}
G4NeutronTrackingCut::G4NeutronTrackingCut(const G4String& name, G4int ver)
: G4VPhysicsConstructor(name), verbose(ver)
{
timeLimit = 10.*microsecond;
kineticEnergyLimit = 0.0;
}
G4NeutronTrackingCut::G4NeutronTrackingCut(const G4String&, G4int ver)
: G4NeutronTrackingCut(ver)
{}
G4NeutronTrackingCut::~G4NeutronTrackingCut()
{}
@@ -46,6 +46,7 @@
#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"
#include "G4BuilderType.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -55,17 +56,15 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4StepLimiterPhysics::G4StepLimiterPhysics(const G4String& name)
: G4VPhysicsConstructor(name),fStepLimiter(0),fUserSpecialCuts(0),
fApplyToAll(false)
{}
: G4VPhysicsConstructor(name),fApplyToAll(false)
{
SetPhysicsType(bUnknown);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4StepLimiterPhysics::~G4StepLimiterPhysics()
{
delete fStepLimiter;
delete fUserSpecialCuts;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -79,8 +78,8 @@ void G4StepLimiterPhysics::ConstructProcess()
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
fStepLimiter = new G4StepLimiter();
fUserSpecialCuts = new G4UserSpecialCuts();
G4StepLimiter* stepLimiter = new G4StepLimiter();
G4UserSpecialCuts* userSpecialCuts = new G4UserSpecialCuts();
while ((*myParticleIterator)()) {
G4ParticleDefinition* particle = myParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
@@ -88,13 +87,13 @@ void G4StepLimiterPhysics::ConstructProcess()
if(!particle->IsShortLived()) {
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);
// All charged particles should have a step limiter
// to make sure that the steps do not get too long.
pmanager->AddDiscreteProcess(stepLimiter);
pmanager->AddDiscreteProcess(userSpecialCuts);
} else {
// Energy cuts for all other neutral particles
pmanager->AddDiscreteProcess(fUserSpecialCuts);
// Energy cuts for all other neutral particles
pmanager->AddDiscreteProcess(userSpecialCuts);
}
}
}