Import Geant4 8.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:07:44 +02:00
parent fe73f43734
commit 75c7fd177d
764 changed files with 45230 additions and 95238 deletions
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmCalculator.hh,v 1.17 2006/09/29 10:13:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4EmCalculator.hh,v 1.18 2007/03/15 12:34:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// -------------------------------------------------------------------
@@ -44,6 +44,7 @@
// 26.01.2006 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko)
// 22.03.2006 Add ComputeElectronicDEDX and ComputeTotalDEDX (V.Ivanchenko)
// 29.09.2006 Add member loweModel (V.Ivanchenko)
// 15.03.2007 Add ComputeEnergyCutFromRangeCut methods (V.Ivanchenko)
//
// Class Description:
//
@@ -181,6 +182,13 @@ public:
G4double kinEnergy, const G4String&, const G4String&,
const G4String& processName, G4double cut = 0.0);
G4double ComputeEnergyCutFromRangeCut(
G4double range, const G4ParticleDefinition*,
const G4Material*);
G4double ComputeEnergyCutFromRangeCut(
G4double range, const G4String&,
const G4String&);
const G4ParticleDefinition* FindParticle(const G4String&);
const G4Material* FindMaterial(const G4String&);
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmModelManager.hh,v 1.19 2006/06/29 19:54:25 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4EmModelManager.hh,v 1.21 2007/03/17 19:24:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
@@ -51,6 +51,7 @@
// 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
// 20-01-06 Introduce G4EmTableType and reducing number of methods (VI)
// 13-05-06 Add GetModel by index method (VI)
// 15-03-07 Add maxCutInRange (V.Ivanchenko)
//
// Class Description:
//
@@ -184,6 +185,8 @@ private:
G4RegionModels** setOfRegionModels;
G4double minSubRange;
G4double maxCutInRange;
G4double maxSubCutInRange;
const G4ParticleDefinition* particle;
const G4ParticleDefinition* secondaryParticle;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmProcessOptions.hh,v 1.9 2006/06/29 19:54:29 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4EmProcessOptions.hh,v 1.11 2007/02/12 12:31:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// -------------------------------------------------------------------
@@ -41,6 +41,7 @@
// Modifications:
// 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
// 22-05-06 Add SetBremsstrahlungTh (V.Ivanchenko)
// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
//
//
// Class Description:
@@ -102,12 +103,18 @@ public:
void SetLambdaFactor(G4double val);
void SetLinearLossLimit(G4double val);
void SetSkin(G4double val);
void ActivateDeexcitation(G4bool val, const G4Region* r = 0);
void SetMscStepLimitation(G4bool algorithm, G4double factor = -1.);
void SetLPMFlag(G4bool val);
void SetMscLateralDisplacement(G4bool val);
void SetBremsstrahlungTh(G4double val);
private:
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4EmTableType.hh,v 1.2 2006/06/29 19:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4EmTableType.hh,v 1.3 2007/01/15 17:27:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//---------------------------------------------------------------
//
@@ -37,6 +37,8 @@
// Author: Vladimir Ivanchenko
//
// Creation date: 19.01.2006
// Modifications:
// 15.01.07 Add two types (V.Ivanchenko)
//
//---------------------------------------------------------------
@@ -47,7 +49,9 @@ enum G4EmTableType
{
fTotal = 0,
fRestricted,
fSubRestricted
fSubRestricted,
fIonisation,
fSubIonisation
};
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4EnergyLossMessenger.hh,v 1.14 2006/11/10 18:34:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4EnergyLossMessenger.hh,v 1.17 2007/03/17 19:24:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
@@ -41,6 +41,8 @@
// 10-01-06 SetStepLimits -> SetStepFunction (V.Ivantchenko)
// 10-05-06 Add command MscStepLimit (V.Ivantchenko)
// 10-11-06 Add command binsDEDX (V.Ivantchenko)
// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
// 16-03-07 modify /process/eLoss/minsubsec command (V.Ivanchenko)
//
// -------------------------------------------------------------------
//
@@ -74,6 +76,7 @@ class G4UIdirectory;
class G4UIcommand;
class G4UIcmdWithABool;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADouble;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -93,7 +96,7 @@ private:
G4UIcmdWithABool* RndmStepCmd;
G4UIcmdWithABool* EnlossFlucCmd;
G4UIcmdWithABool* SubSecCmd;
G4UIcmdWithADoubleAndUnit* MinSubSecCmd;
G4UIcmdWithADouble* MinSubSecCmd;
G4UIcommand* StepFuncCmd;
G4UIcommand* mscCmd;
G4UIcmdWithADoubleAndUnit* MinEnCmd;
@@ -101,9 +104,12 @@ private:
G4UIcmdWithABool* IntegCmd;
G4UIcmdWithABool* rangeCmd;
G4UIcmdWithABool* lpmCmd;
G4UIcmdWithABool* latCmd;
G4UIcmdWithAnInteger* verCmd;
G4UIcmdWithAnInteger* dedxCmd;
G4UIcmdWithAnInteger* lbCmd;
G4UIcmdWithADouble* lllCmd;
G4UIcmdWithADouble* skinCmd;
};
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4LossTableManager.hh,v 1.43 2006/10/23 19:05:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4LossTableManager.hh,v 1.46 2007/02/12 12:31:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// -------------------------------------------------------------------
@@ -58,6 +58,7 @@
// 26-01-06 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko)
// 10-05-06 Add methods SetMscStepLimitation, FacRange and MscFlag (VI)
// 22-05-06 Add methods Set/Get bremsTh (VI)
// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
//
// Class Description:
//
@@ -192,6 +193,12 @@ public:
void SetLPMFlag(G4bool val);
void SetMscLateralDisplacement(G4bool val);
void SetSkin(G4double val);
void SetLinearLossLimit(G4double val);
void SetBremsstrahlungTh(G4double val);
void SetVerbose(G4int val);
@@ -206,11 +213,13 @@ public:
G4bool MscFlag() const;
G4bool MscLateralDisplacementFlag() const;
G4double FacRange() const;
G4double BremsstrahlungTh() const;
G4VEnergyLossProcess* GetEnergyLossProcess(const G4ParticleDefinition *aParticle);
G4VEnergyLossProcess* GetEnergyLossProcess(const G4ParticleDefinition*);
const std::vector<G4VEnergyLossProcess*>& GetEnergyLossProcessVector();
@@ -259,9 +268,10 @@ private:
PD theElectron;
G4int n_loss;
G4int run;
G4bool all_tables_are_built;
G4bool first_entry;
// G4bool first_entry;
G4bool lossFluctuationFlag;
G4bool subCutoffFlag;
G4bool rndmStepFlag;
@@ -275,6 +285,7 @@ private:
G4bool stepFunctionActive;
G4bool flagLPM;
G4bool flagMSC;
G4bool flagMSCLateral;
G4bool mscActive;
G4double minSubRange;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEnergyLossProcess.hh,v 1.57 2006/08/15 16:21:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4VEnergyLossProcess.hh,v 1.62 2007/03/17 19:24:39 vnivanch Exp $
// GEANT4 tag $Name:
//
// -------------------------------------------------------------------
//
@@ -70,6 +70,10 @@
// 22-03-06 Add SetDynamicMassCharge (V.Ivanchenko)
// 23-03-06 Use isIonisation flag (V.Ivanchenko)
// 13-05-06 Add method to access model by index (V.Ivanchenko)
// 14-01-07 add SetEmModel(index) and SetFluctModel() (mma)
// 15-01-07 Add separate ionisation tables and reorganise get/set methods for
// dedx tables (V.Ivanchenko)
// 13-03-07 use SafetyHelper instead of navigator (V.Ivanchenko)
//
// Class Description:
//
@@ -103,7 +107,7 @@ class G4VEmModel;
class G4VEmFluctuationModel;
class G4DataVector;
class G4Region;
class G4Navigator;
class G4SafetyHelper;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -112,7 +116,7 @@ class G4VEnergyLossProcess : public G4VContinuousDiscreteProcess
public:
G4VEnergyLossProcess(const G4String& name = "EnergyLoss",
G4ProcessType type = fElectromagnetic);
G4ProcessType type = fElectromagnetic);
virtual ~G4VEnergyLossProcess();
@@ -218,6 +222,18 @@ public:
const G4String& directory,
G4bool ascii);
// Assign a model to a process
void SetEmModel(G4VEmModel*, G4int index=1);
// return the assigned model
G4VEmModel* EmModel(G4int index=1);
// Assign a fluctuation model to a process
void SetFluctModel(G4VEmFluctuationModel*);
// return the assigned fluctuation model
G4VEmFluctuationModel* FluctModel();
// Add EM model coupled with fluctuation model for the region
void AddEmModel(G4int, G4VEmModel*, G4VEmFluctuationModel* fluc = 0,
const G4Region* region = 0);
@@ -231,14 +247,12 @@ public:
// Activate deexcitation code
virtual void ActivateDeexcitation(G4bool, const G4Region* region = 0);
void SetDEDXTable(G4PhysicsTable* p);
void SetDEDXTable(G4PhysicsTable* p, G4EmTableType tType);
G4PhysicsTable* DEDXTable() const;
void SetDEDXTableForSubsec(G4PhysicsTable* p);
G4PhysicsTable* DEDXTableForSubsec() const;
void SetDEDXunRestrictedTable(G4PhysicsTable* p);
G4PhysicsTable* DEDXunRestrictedTable() const;
G4PhysicsTable* IonisationTable() const;
G4PhysicsTable* IonisationTableForSubsec() const;
void SetCSDARangeTable(G4PhysicsTable* pRange);
G4PhysicsTable* CSDARangeTable() const;
@@ -259,7 +273,8 @@ public:
// Return values for given G4MaterialCutsCouple
G4double GetDEDX(G4double& kineticEnergy, const G4MaterialCutsCouple*);
G4double GetDEDXForSubsec(G4double& kineticEnergy, const G4MaterialCutsCouple*);
G4double GetDEDXForSubsec(G4double& kineticEnergy,
const G4MaterialCutsCouple*);
G4double GetRange(G4double& kineticEnergy, const G4MaterialCutsCouple*);
G4double GetCSDARange(G4double& kineticEnergy, const G4MaterialCutsCouple*);
G4double GetRangeForLoss(G4double& kineticEnergy, const G4MaterialCutsCouple*);
@@ -313,7 +328,7 @@ public:
void AddCollaborativeProcess(G4VEnergyLossProcess*);
void SampleSubCutSecondaries(std::vector<G4Track*>&, const G4Step&,
G4double& cut, G4VEmModel* model);
G4VEmModel* model, G4int matIdx);
// Set scaling parameters
void SetDynamicMassCharge(G4double massratio, G4double charge2ratio);
@@ -335,7 +350,8 @@ protected:
G4double GetCurrentRange() const;
G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*, G4double cut);
G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*,
G4double cut);
private:
@@ -348,6 +364,8 @@ private:
//
G4double GetDEDXForScaledEnergy(G4double scaledKinEnergy);
G4double GetSubDEDXForScaledEnergy(G4double scaledKinEnergy);
G4double GetIonisationForScaledEnergy(G4double scaledKinEnergy);
G4double GetSubIonisationForScaledEnergy(G4double scaledKinEnergy);
G4double GetScaledRangeForScaledEnergy(G4double scaledKinEnergy);
G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy);
G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy);
@@ -368,6 +386,8 @@ protected:
private:
G4EmModelManager* modelManager;
G4VEmModel* emModel[5];
G4VEmFluctuationModel* fluctModel;
std::vector<const G4Region*> scoffRegions;
G4int nSCoffRegions;
G4int* idxSCoffRegions;
@@ -379,6 +399,8 @@ private:
G4PhysicsTable* theDEDXTable;
G4PhysicsTable* theDEDXSubTable;
G4PhysicsTable* theDEDXunRestrictedTable;
G4PhysicsTable* theIonisationTable;
G4PhysicsTable* theIonisationSubTable;
G4PhysicsTable* theRangeTableForLoss;
G4PhysicsTable* theCSDARangeTable;
G4PhysicsTable* theSecondaryRangeTable;
@@ -393,7 +415,7 @@ private:
const G4DataVector* theCuts;
const G4DataVector* theSubCuts;
G4Navigator* navigator;
G4SafetyHelper* safetyHelper;
const G4ParticleDefinition* particle;
const G4ParticleDefinition* baseParticle;
@@ -500,6 +522,35 @@ inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e)
{
G4bool b;
G4double x = 0.0;
if(theIonisationTable) {
x = ((*theIonisationTable)[currentMaterialIndex]->GetValue(e, b))
*chargeSqRatio;
if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);
}
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e)
{
G4bool b;
G4double x = 0.0;
if(theIonisationSubTable) {
x = ((*theIonisationSubTable)[currentMaterialIndex]->GetValue(e, b))
*chargeSqRatio;
if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);
}
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4VEnergyLossProcess::GetRange(G4double& kineticEnergy,
const G4MaterialCutsCouple* couple)
{
@@ -556,7 +607,8 @@ inline G4double G4VEnergyLossProcess::GetRangeForLoss(
G4double x = DBL_MAX;
if(theRangeTableForLoss)
x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
// G4cout << "Range from " << GetProcessName() << " e= " << kineticEnergy << " r= " << x << G4endl;
// G4cout << "Range from " << GetProcessName()
// << " e= " << kineticEnergy << " r= " << x << G4endl;
return x;
}
@@ -805,6 +857,24 @@ inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const
{
G4PhysicsTable* t = theDEDXTable;
if(theIonisationTable) t = theIonisationTable;
return t;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const
{
G4PhysicsTable* t = theDEDXSubTable;
if(theIonisationSubTable) t = theIonisationSubTable;
return t;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const
{
return theCSDARangeTable;
@@ -870,14 +940,6 @@ inline G4double G4VEnergyLossProcess::GetCurrentRange() const
return fRange;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEnergyLossProcess::AddCollaborativeProcess(
G4VEnergyLossProcess* p)
{
scProcesses.push_back(p);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4VEmModel* G4VEnergyLossProcess::GetModelByIndex(G4int idx)
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VMultipleScattering.hh,v 1.39 2006/06/29 19:54:51 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4VMultipleScattering.hh,v 1.42 2007/03/15 12:33:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
@@ -48,7 +48,7 @@
// part of calculations for all charged particles
//
// 26-11-03 bugfix in AlongStepDoIt (L.Urban)
// 25-05-04 add protection against case when range is less than steplimit (V.Ivanchenko)
// 25-05-04 add protection against case when range is less than steplimit (VI)
// 30-06-04 make destructor virtual (V.Ivanchenko)
// 27-08-04 Add InitialiseForRun method (V.Ivanchneko)
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko)
@@ -60,6 +60,7 @@
// 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko)
// 07-03-06 Move step limit calculation to model (V.Ivanchenko)
// 13-05-06 Add method to access model by index (V.Ivanchenko)
// 12-02-07 Add get/set skin (V.Ivanchenko)
//
// -------------------------------------------------------------------
@@ -185,6 +186,10 @@ public:
void SetLateralDisplasmentFlag(G4bool val);
// lateral displacement to be/not to be computed
G4double Skin() const;
void SetSkin(G4double val);
// skin parameter
void SetBuildLambdaTable(G4bool val);
G4PhysicsTable* LambdaTable() const;
@@ -252,6 +257,7 @@ private:
G4double minKinEnergy;
G4double maxKinEnergy;
G4double skin;
G4bool latDisplasment;
G4bool buildLambdaTable;
@@ -305,13 +311,20 @@ inline G4double G4VMultipleScattering::GetContinuousStepLimit(
G4double currentMinimalStep,
G4double&)
{
G4double x = currentMinimalStep;
G4double e = track.GetKineticEnergy();
DefineMaterial(track.GetMaterialCutsCouple());
currentModel = SelectModel(track.GetKineticEnergy());
G4double tPathLength =
currentModel->ComputeTruePathLengthLimit(track, theLambdaTable, currentMinimalStep);
if (tPathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;
// G4cout << "tPathLength= " << tPathLength << " currentMinimalStep= " << currentMinimalStep<< G4endl;
return currentModel->ComputeGeomPathLength(tPathLength);
currentModel = SelectModel(e);
if(x > 0.0 && e > 0.0) {
G4double tPathLength =
currentModel->ComputeTruePathLengthLimit(track, theLambdaTable, x);
if (tPathLength < x) valueGPILSelectionMSC = CandidateForSelection;
x = currentModel->ComputeGeomPathLength(tPathLength);
// G4cout << "tPathLength= " << tPathLength
// << " stepLimit= " << x
// << " currentMinimalStep= " << currentMinimalStep<< G4endl;
}
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -437,6 +450,20 @@ inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4VMultipleScattering::Skin() const
{
return skin;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VMultipleScattering::SetSkin(G4double val)
{
skin = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val)
{
buildLambdaTable = val;