Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmCalculator.hh 96834 2016-05-12 09:19:10Z gcosmo $
// $Id: G4EmCalculator.hh 103954 2017-05-04 11:29:22Z gcosmo $
//
//
// -------------------------------------------------------------------
@@ -327,9 +327,11 @@ private:
const G4ParticleDefinition* lambdaParticle;
const G4ParticleDefinition* baseParticle;
const G4PhysicsTable* currentLambda;
G4VEmModel* currentModel;
G4VEmModel* loweModel;
G4VEnergyLossProcess* currentProcess;
G4VEmModel* currentModel;
G4VEmModel* loweModel;
G4VEnergyLossProcess* currentProcess;
G4VProcess* curProcess;
const G4ParticleDefinition* theGenericIon;
G4ionEffectiveCharge* ionEffCharge;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmCorrections.hh 100363 2016-10-19 09:24:47Z gcosmo $
// $Id: G4EmCorrections.hh 103954 2017-05-04 11:29:22Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -134,11 +134,6 @@ public:
const G4Material*,
G4double kineticEnergy);
G4double NuclearDEDX(const G4ParticleDefinition*,
const G4Material*,
G4double kineticEnergy,
G4bool fluct = true);
void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
G4PhysicsVector* dVector);
@@ -190,9 +185,6 @@ private:
G4double y1, G4double y2, G4double z11, G4double z21,
G4double z12, G4double z22) const;
G4double NuclearStoppingPower(G4double e, G4double z1, G4double z2,
G4double m1, G4double m2);
// hide assignment operator
G4EmCorrections & operator=(const G4EmCorrections &right) = delete;
G4EmCorrections(const G4EmCorrections&) = delete;
@@ -214,9 +206,7 @@ private:
static G4LPhysicsFreeVector* ThetaK;
static G4LPhysicsFreeVector* ThetaL;
G4double theZieglerFactor;
G4double alpha2;
G4bool lossFlucFlag;
std::vector<const G4Material*> currmat;
std::map< G4int, std::vector<G4double> > thcorr;
@@ -61,6 +61,7 @@
#include "G4MscStepLimitType.hh"
#include "G4NuclearFormfactorType.hh"
#include "G4EmSaturation.hh"
#include "G4Threading.hh"
#include <vector>
class G4EmParametersMessenger;
@@ -191,6 +192,9 @@ public:
void SetMscSkin(G4double val);
G4double MscSkin() const;
void SetScreeningFactor(G4double val);
G4double ScreeningFactor() const;
void SetStepFunction(G4double v1, G4double v2);
void SetStepFunctionMuHad(G4double v1, G4double v2);
@@ -243,6 +247,10 @@ public:
const std::vector<G4String>& RegionsMsc() const;
const std::vector<G4String>& TypesMsc() const;
void AddPhysics(const G4String& region, const G4String& type);
const std::vector<G4String>& RegionsPhysics() const;
const std::vector<G4String>& TypesPhysics() const;
void SetSubCutoff(G4bool val, const G4String& region = "");
void SetDeexActiveRegion(const G4String& region, G4bool fdeex,
@@ -329,6 +337,7 @@ private:
G4double finalRange;
G4double dRoverRangeMuHad;
G4double finalRangeMuHad;
G4double factorScreen;
G4int nbins;
G4int nbinsPerDecade;
@@ -376,6 +385,9 @@ private:
std::vector<G4double> m_factBiasedSec;
std::vector<G4double> m_elimBiasedSec;
#ifdef G4MULTITHREADED
static G4Mutex emParametersMutex;
#endif
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -117,6 +117,7 @@ private:
G4UIcmdWithADouble* fr1Cmd;
G4UIcmdWithADouble* fgCmd;
G4UIcmdWithADouble* skinCmd;
G4UIcmdWithADouble* screCmd;
G4UIcmdWithAnInteger* dedxCmd;
G4UIcmdWithAnInteger* lamCmd;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4LossTableManager.hh 99151 2016-09-07 08:03:17Z gcosmo $
// $Id: G4LossTableManager.hh 104349 2017-05-26 07:18:59Z gcosmo $
//
//
// -------------------------------------------------------------------
@@ -320,7 +320,7 @@ G4LossTableManager::GetEnergyLossProcess(const G4ParticleDefinition *aParticle)
if ((pos = loss_map.find(aParticle)) != loss_map.end()) {
currentLoss = (*pos).second;
} else {
currentLoss = 0;
currentLoss = nullptr;
if ((pos = loss_map.find(theGenericIon)) != loss_map.end()) {
currentLoss = (*pos).second;
}
@@ -337,9 +337,7 @@ G4double G4LossTableManager::GetDEDX(const G4ParticleDefinition *aParticle,
const G4MaterialCutsCouple *couple)
{
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = 0.0;
if(currentLoss) { x = currentLoss->GetDEDX(kineticEnergy, couple); }
return x;
return currentLoss ? currentLoss->GetDEDX(kineticEnergy, couple) : 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -350,9 +348,7 @@ G4double G4LossTableManager::GetSubDEDX(const G4ParticleDefinition *aParticle,
const G4MaterialCutsCouple *couple)
{
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = 0.0;
if(currentLoss) { x = currentLoss->GetDEDXForSubsec(kineticEnergy, couple); }
return x;
return currentLoss ? currentLoss->GetDEDXForSubsec(kineticEnergy, couple) : 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -363,9 +359,7 @@ G4double G4LossTableManager::GetCSDARange(const G4ParticleDefinition *aParticle,
const G4MaterialCutsCouple *couple)
{
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = DBL_MAX;
if(currentLoss) { x = currentLoss->GetCSDARange(kineticEnergy, couple); }
return x;
return currentLoss ? currentLoss->GetCSDARange(kineticEnergy, couple) : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -377,9 +371,7 @@ G4double G4LossTableManager::GetRangeFromRestricteDEDX(
const G4MaterialCutsCouple *couple)
{
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = DBL_MAX;
if(currentLoss) { x = currentLoss->GetRangeForLoss(kineticEnergy, couple); }
return x;
return currentLoss ? currentLoss->GetRangeForLoss(kineticEnergy, couple) : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -390,11 +382,7 @@ G4double G4LossTableManager::GetRange(const G4ParticleDefinition *aParticle,
const G4MaterialCutsCouple *couple)
{
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = DBL_MAX;
if(currentLoss) {
x = currentLoss->GetRange(kineticEnergy, couple);
}
return x;
return currentLoss ? currentLoss->GetRange(kineticEnergy, couple) : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -405,9 +393,7 @@ G4double G4LossTableManager::GetEnergy(const G4ParticleDefinition *aParticle,
const G4MaterialCutsCouple *couple)
{
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = 0;
if(currentLoss) { x = currentLoss->GetKineticEnergy(range, couple); }
return x;
return currentLoss ? currentLoss->GetKineticEnergy(range, couple) : 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -420,9 +406,7 @@ G4double G4LossTableManager::GetDEDXDispersion(
{
const G4ParticleDefinition* aParticle = dp->GetParticleDefinition();
if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
G4double x = 0.0;
if(currentLoss) { currentLoss->GetDEDXDispersion(couple, dp, length); }
return x;
return currentLoss ? currentLoss->GetDEDXDispersion(couple, dp, length) : 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEmModel.hh 97742 2016-06-08 09:24:54Z gcosmo $
// $Id: G4VEmModel.hh 104457 2017-05-31 15:52:37Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -315,6 +315,10 @@ public:
inline G4VEmAngularDistribution* GetAngularDistribution();
inline G4VEmModel* GetTripletModel();
inline void SetTripletModel(G4VEmModel*);
inline void SetAngularDistribution(G4VEmAngularDistribution*);
inline G4double HighEnergyLimit() const;
@@ -359,6 +363,8 @@ public:
inline void SetForceBuildTable(G4bool val);
inline void SetFluctuationFlag(G4bool val);
inline void SetMasterThread(G4bool val);
inline G4bool IsMaster() const;
@@ -424,6 +430,7 @@ protected:
const std::vector<G4double>* theDensityFactor;
const std::vector<G4int>* theDensityIdx;
size_t idxTable;
G4bool lossFlucFlag;
const static G4double inveplus;
// ======== Cached values - may be state dependent ================
@@ -433,6 +440,7 @@ private:
const G4MaterialCutsCouple* fCurrentCouple;
const G4Element* fCurrentElement;
const G4Isotope* fCurrentIsotope;
G4VEmModel* fTripletModel;
G4int nsec;
std::vector<G4double> xsec;
@@ -630,6 +638,23 @@ inline void G4VEmModel::SetAngularDistribution(G4VEmAngularDistribution* p)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4VEmModel* G4VEmModel::GetTripletModel()
{
return fTripletModel;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmModel::SetTripletModel(G4VEmModel* p)
{
if(p != fTripletModel) {
delete fTripletModel;
fTripletModel = p;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4VEmModel::HighEnergyLimit() const
{
return highLimit;
@@ -707,6 +732,13 @@ inline void G4VEmModel::SetAngularGeneratorFlag(G4bool val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmModel::SetFluctuationFlag(G4bool val)
{
lossFlucFlag = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmModel::SetMasterThread(G4bool val)
{
isMaster = val;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEnergyLossProcess.hh 96139 2016-03-17 14:10:31Z gcosmo $
// $Id: G4VEnergyLossProcess.hh 104349 2017-05-26 07:18:59Z gcosmo $
// GEANT4 tag $Name:
//
// -------------------------------------------------------------------
@@ -809,11 +809,9 @@ G4VEnergyLossProcess::GetCSDARange(G4double& kineticEnergy,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
G4double x = DBL_MAX;
if(theCSDARangeTable) {
x=GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
}
return x;
return (theCSDARangeTable) ?
GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor
: DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -824,11 +822,7 @@ G4VEnergyLossProcess::GetRangeForLoss(G4double& kineticEnergy,
{
// G4cout << "GetRangeForLoss: Range from " << GetProcessName() << G4endl;
DefineMaterial(couple);
G4double x =
GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
//G4cout << "GetRangeForLoss: Range from " << GetProcessName()
// << " e= " << kineticEnergy << " r= " << x << G4endl;
return x;
return GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -848,11 +842,7 @@ G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
G4double x = 0.0;
if(theLambdaTable) {
x = GetLambdaForScaledEnergy(kineticEnergy*massRatio);
}
return x;
return theLambdaTable ? GetLambdaForScaledEnergy(kineticEnergy*massRatio) : 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....