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
+21 -1
View File
@@ -1,4 +1,4 @@
$Id: History 103220 2017-03-22 11:35:04Z gcosmo $
$Id: History 107366 2017-11-09 10:55:20Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,26 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
08 November 17: D.Sawkey (emmuons-V10-03-06)
- G4MuMultipleScattering - modify ProcessDescription text
31 October 17: D.Sawkey (emmuons-V10-03-05)
- G4MuMultipleScattering, G4MuBremsstrahlung, G4MuIonisation,
G4MuPairProduction, G4ePairProduction
- modify Process Description
19 October 17: D.Sawkey (emmuons-V10-03-04)
- G4ePairProduction, G4MuBremsstrahlung, G4MuIonisation, G4MuPairProduction
- add dummy ProcessDescription for html output
12 October 17: V.Ivant (emmuons-V10-03-03)
- G4MuMultipleScattering, G4MuPairProduction,
G4ePairProduction - switched from ProcessDescription to StreamProcessInfo
03 August 17: V.Ivant (emmuons-V10-03-01)
- G4MuIonisation, G4MuMultipleScattering, G4MuPairProduction,
G4ePairProduction - make coherent model initialisation
22 March 17: V.Ivant (emmuons-V10-03-00)
- G4MuBremmstrahlungModel, G4MuPairProductionModel - make all data
members protected allowing to reuse these classes as based
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlung.hh 97392 2016-06-02 10:10:32Z gcosmo $
// $Id: G4MuBremsstrahlung.hh 106716 2017-10-20 09:40:09Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -94,6 +94,9 @@ public:
inline void SetLowestKineticEnergy(G4double e);
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuIonisation.hh 97392 2016-06-02 10:10:32Z gcosmo $
// $Id: G4MuIonisation.hh 106716 2017-10-20 09:40:09Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -99,6 +99,9 @@ public:
// Print out of the class parameters
virtual void PrintInfo() override;
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuMultipleScattering.hh 97392 2016-06-02 10:10:32Z gcosmo $
// $Id: G4MuMultipleScattering.hh 107056 2017-11-01 14:52:32Z gcosmo $
//
// -----------------------------------------------------------------------------
//
@@ -69,11 +69,15 @@ public: // with description
// returns true for charged particles, false otherwise
G4bool IsApplicable (const G4ParticleDefinition& p) override;
// Print few lines of informations about the process: validity range,
void PrintInfo() override;
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
protected:
// Print out of the class parameters
virtual void StreamProcessInfo(std::ostream& outFile,
G4String endOfLine=G4String("\n")) const override;
// This function initialise models
void InitialiseProcess(const G4ParticleDefinition*) override;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuPairProduction.hh 96156 2016-03-21 08:10:21Z gcosmo $
// $Id: G4MuPairProduction.hh 106716 2017-10-20 09:40:09Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -84,12 +84,17 @@ public:
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut) override;
virtual void PrintInfo() override;
inline void SetLowestKineticEnergy(G4double e);
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
protected:
// Print out of the class parameters
virtual void StreamProcessInfo(std::ostream& outFile,
G4String endOfLine=G4String("\n")) const override;
virtual void
InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) override;
@@ -68,12 +68,17 @@ public:
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut) override;
virtual void PrintInfo() override;
inline void SetLowestKineticEnergy(G4double e);
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
protected:
// Print out of the class parameters
virtual void StreamProcessInfo(std::ostream& outFile,
G4String endOfLine=G4String("\n")) const override;
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) override;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlung.cc 97392 2016-06-02 10:10:32Z gcosmo $
// $Id: G4MuBremsstrahlung.cc 107056 2017-11-01 14:52:32Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -131,3 +131,10 @@ void G4MuBremsstrahlung::PrintInfo()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuBremsstrahlung::ProcessDescription(std::ostream& out) const
{
out << "<strong>Muon bremsstrahlung</strong>";
G4VEnergyLossProcess::ProcessDescription(out);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuIonisation.cc 97392 2016-06-02 10:10:32Z gcosmo $
// $Id: G4MuIonisation.cc 107056 2017-11-01 14:52:32Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -149,29 +149,29 @@ void G4MuIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* par
G4double ehigh = std::min(1*GeV, emax);
// Bragg peak model
if (!EmModel(1)) {
if(q > 0.0) { SetEmModel(new G4BraggModel(),1); }
else { SetEmModel(new G4ICRU73QOModel(),1); }
if (!EmModel(0)) {
if(q > 0.0) { SetEmModel(new G4BraggModel()); }
else { SetEmModel(new G4ICRU73QOModel()); }
}
EmModel(1)->SetLowEnergyLimit(param->MinKinEnergy());
EmModel(1)->SetHighEnergyLimit(elow);
AddEmModel(1, EmModel(1), new G4IonFluctuations());
EmModel(0)->SetLowEnergyLimit(param->MinKinEnergy());
EmModel(0)->SetHighEnergyLimit(elow);
AddEmModel(1, EmModel(0), new G4IonFluctuations());
// high energy fluctuation model
if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
// moderate energy model
if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
EmModel(2)->SetLowEnergyLimit(elow);
EmModel(2)->SetHighEnergyLimit(ehigh);
AddEmModel(2, EmModel(2), FluctModel());
if (!EmModel(1)) { SetEmModel(new G4BetheBlochModel()); }
EmModel(1)->SetLowEnergyLimit(elow);
EmModel(1)->SetHighEnergyLimit(ehigh);
AddEmModel(2, EmModel(1), FluctModel());
// high energy model
if(ehigh < emax) {
if (!EmModel(3)) { SetEmModel(new G4MuBetheBlochModel(),3); }
EmModel(3)->SetLowEnergyLimit(ehigh);
EmModel(3)->SetHighEnergyLimit(emax);
AddEmModel(3, EmModel(3), FluctModel());
if (!EmModel(2)) { SetEmModel(new G4MuBetheBlochModel()); }
EmModel(2)->SetLowEnergyLimit(ehigh);
EmModel(2)->SetHighEnergyLimit(emax);
AddEmModel(3, EmModel(2), FluctModel());
}
ratio = electron_mass_c2/mass;
isInitialised = true;
@@ -185,6 +185,10 @@ void G4MuIonisation::PrintInfo()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuIonisation::ProcessDescription(std::ostream& out) const
{
out << "<strong>Muon ionisation</strong>";
G4VEnergyLossProcess::ProcessDescription(out);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuMultipleScattering.cc 97740 2016-06-08 09:23:36Z gcosmo $
// $Id: G4MuMultipleScattering.cc 107366 2017-11-09 10:55:20Z gcosmo $
//
// -----------------------------------------------------------------------------
//
@@ -78,21 +78,32 @@ void G4MuMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
{
// Modification of parameters between runs
if(isInitialized) { return; }
if(!EmModel(1)) { SetEmModel(new G4UrbanMscModel(), 1); }
AddEmModel(1, EmModel(1));
if(!EmModel(0)) { SetEmModel(new G4UrbanMscModel()); }
AddEmModel(1, EmModel(0));
isInitialized = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuMultipleScattering::PrintInfo()
void G4MuMultipleScattering::StreamProcessInfo(std::ostream& out,
G4String endOfLine) const
{
G4cout << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", polarAngleLimit(deg)= " << PolarAngleLimit()/degree
<< G4endl;
out << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", polarAngleLimit(deg)= " << PolarAngleLimit()/degree
<< endOfLine;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuMultipleScattering::ProcessDescription(std::ostream& out) const
{
out << "<strong>"
"Muon multiple scattering</strong>. Simulates combined effects of <br>"
"elastic scattering at the end of the step, to save computing time. May<br>"
"be combined with Coulomb scattering in a 'mixed' scattering algorithm.";
G4VMultipleScattering::ProcessDescription(out);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuPairProduction.cc 97392 2016-06-02 10:10:32Z gcosmo $
// $Id: G4MuPairProduction.cc 107056 2017-11-01 14:52:32Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -125,7 +125,7 @@ void G4MuPairProduction::InitialiseEnergyLossProcess(
theParticle = part;
G4MuPairProductionModel* mod = new G4MuPairProductionModel(part);
SetEmModel(mod, 1);
SetEmModel(mod);
lowestKinEnergy = std::max(lowestKinEnergy, part->GetPDGMass()*8.0);
mod->SetLowestKineticEnergy(lowestKinEnergy);
@@ -140,18 +140,19 @@ void G4MuPairProduction::InitialiseEnergyLossProcess(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuPairProduction::PrintInfo()
void G4MuPairProduction::StreamProcessInfo(std::ostream& out,
G4String endOfLine) const
{
G4ElementData* ed = EmModel()->GetElementData();
if(ed) {
for(G4int Z=1; Z<93; ++Z) {
G4Physics2DVector* pv = ed->GetElement2DData(Z);
if(pv) {
G4cout << " Sampling table " << pv->GetLengthY()
<< "x" << pv->GetLengthX() << "; from "
<< exp(pv->GetY(0))/GeV << " GeV to "
<< exp(pv->GetY(pv->GetLengthY()-1))/TeV
<< " TeV " << G4endl;
out << " Sampling table " << pv->GetLengthY()
<< "x" << pv->GetLengthX() << "; from "
<< exp(pv->GetY(0))/GeV << " GeV to "
<< exp(pv->GetY(pv->GetLengthY()-1))/TeV
<< " TeV " << endOfLine;
break;
}
}
@@ -160,6 +161,10 @@ void G4MuPairProduction::PrintInfo()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuPairProduction::ProcessDescription(std::ostream& out) const
{
out << "<strong>Pair production</strong>";
G4VEnergyLossProcess::ProcessDescription(out);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -101,7 +101,7 @@ void G4ePairProduction::InitialiseEnergyLossProcess(
theParticle = part;
G4MuPairProductionModel* mod = new G4MuPairProductionModel(part);
SetEmModel(mod, 1);
SetEmModel(mod);
lowestKinEnergy = std::max(lowestKinEnergy, part->GetPDGMass()*8.0);
mod->SetLowestKineticEnergy(lowestKinEnergy);
@@ -116,18 +116,19 @@ void G4ePairProduction::InitialiseEnergyLossProcess(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ePairProduction::PrintInfo()
void G4ePairProduction::StreamProcessInfo(std::ostream& out,
G4String endOfLine) const
{
G4ElementData* ed = EmModel(1)->GetElementData();
G4ElementData* ed = EmModel(0)->GetElementData();
if(ed) {
for(G4int Z=1; Z<93; ++Z) {
G4Physics2DVector* pv = ed->GetElement2DData(Z);
if(pv) {
G4cout << " Sampling table " << pv->GetLengthY()
<< "x" << pv->GetLengthX() << "; from "
<< G4Exp(pv->GetY(0))/GeV << " GeV to "
<< G4Exp(pv->GetY(pv->GetLengthY()-1))/TeV
<< " TeV " << G4endl;
out << " Sampling table " << pv->GetLengthY()
<< "x" << pv->GetLengthX() << "; from "
<< G4Exp(pv->GetY(0))/GeV << " GeV to "
<< G4Exp(pv->GetY(pv->GetLengthY()-1))/TeV
<< " TeV " << endOfLine;
break;
}
}
@@ -136,6 +137,10 @@ void G4ePairProduction::PrintInfo()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ePairProduction::ProcessDescription(std::ostream& out) const
{
out << "<strong>Pair production</strong>";
G4VEnergyLossProcess::ProcessDescription(out);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....