Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -40,65 +40,45 @@
// > new physics/tracking scheme
// 1998-08-25 by Stefano Magni
// > Change process to use G4MaterialPropertiesTables
// mail: gum@triumf.ca
// magni@mi.infn.it
//
////////////////////////////////////////////////////////////////////////
#ifndef G4OpAbsorption_h
#define G4OpAbsorption_h 1
/////////////
// Includes
/////////////
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4OpticalPhoton.hh"
// Class Description:
// Discrete Process -- Bulk absorption of Optical Photons.
// Class inherits publicly from G4VDiscreteProcess
// Class Description - End:
class G4OpAbsorption : public G4VDiscreteProcess
{
public:
explicit G4OpAbsorption(const G4String& processName = "OpAbsorption",
G4ProcessType type = fOptical);
virtual ~G4OpAbsorption();
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
// Returns true -> 'is applicable' only for an optical photon.
virtual G4double GetMeanFreePath(const G4Track& aTrack,
G4double ,
G4ForceCondition*) override;
// Returns the absorption length for bulk absorption of optical
// photons in media with a specified attenuation length.
// Returns the absorption length for bulk absorption of optical
// photons in media with a specified attenuation length.
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
// This is the method implementing bulk absorption of optical
// photons.
// Method implementing bulk absorption of optical photons.
private:
G4OpAbsorption(const G4OpAbsorption &right) = delete;
G4OpAbsorption& operator=(const G4OpAbsorption &right) = delete;
size_t idx_absorption = 0;
};
////////////////////
// Inline methods
////////////////////
inline
G4bool G4OpAbsorption::IsApplicable(const G4ParticleDefinition& aParticleType)
@@ -58,68 +58,39 @@
//
// Author: Peter Gumplinger
// adopted from work by Werner Keil - April 2/96
// mail: gum@triumf.ca
//
////////////////////////////////////////////////////////////////////////
#ifndef G4OpBoundaryProcess_h
#define G4OpBoundaryProcess_h 1
#include "globals.hh"
#include "templates.hh"
#include "geomdefs.hh"
#include "Randomize.hh"
#include "G4RandomTools.hh"
#include "G4RandomDirection.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4OpticalSurface.hh"
#include "G4OpticalPhoton.hh"
#include "G4TransportationManager.hh"
// Class Description:
// Discrete Process -- reflection/refraction at optical interfaces.
// Class inherits publicly from G4VDiscreteProcess.
// Class Description - End:
enum G4OpBoundaryProcessStatus { Undefined,
Transmission, FresnelRefraction,
FresnelReflection, TotalInternalReflection,
LambertianReflection, LobeReflection,
SpikeReflection, BackScattering,
Absorption, Detection, NotAtBoundary,
SameMaterial, StepTooSmall, NoRINDEX,
PolishedLumirrorAirReflection,
PolishedLumirrorGlueReflection,
PolishedAirReflection,
PolishedTeflonAirReflection,
PolishedTiOAirReflection,
PolishedTyvekAirReflection,
PolishedVM2000AirReflection,
PolishedVM2000GlueReflection,
EtchedLumirrorAirReflection,
EtchedLumirrorGlueReflection,
EtchedAirReflection,
EtchedTeflonAirReflection,
EtchedTiOAirReflection,
EtchedTyvekAirReflection,
EtchedVM2000AirReflection,
EtchedVM2000GlueReflection,
GroundLumirrorAirReflection,
GroundLumirrorGlueReflection,
GroundAirReflection,
GroundTeflonAirReflection,
GroundTiOAirReflection,
GroundTyvekAirReflection,
GroundVM2000AirReflection,
GroundVM2000GlueReflection,
Dichroic };
enum G4OpBoundaryProcessStatus {
Undefined,
Transmission, FresnelRefraction,
FresnelReflection, TotalInternalReflection,
LambertianReflection, LobeReflection,
SpikeReflection, BackScattering,
Absorption, Detection,
NotAtBoundary, SameMaterial,
StepTooSmall, NoRINDEX,
PolishedLumirrorAirReflection, PolishedLumirrorGlueReflection,
PolishedAirReflection, PolishedTeflonAirReflection,
PolishedTiOAirReflection, PolishedTyvekAirReflection,
PolishedVM2000AirReflection, PolishedVM2000GlueReflection,
EtchedLumirrorAirReflection, EtchedLumirrorGlueReflection,
EtchedAirReflection, EtchedTeflonAirReflection,
EtchedTiOAirReflection, EtchedTyvekAirReflection,
EtchedVM2000AirReflection, EtchedVM2000GlueReflection,
GroundLumirrorAirReflection, GroundLumirrorGlueReflection,
GroundAirReflection, GroundTeflonAirReflection,
GroundTiOAirReflection, GroundTyvekAirReflection,
GroundVM2000AirReflection, GroundVM2000GlueReflection,
Dichroic };
class G4OpBoundaryProcess : public G4VDiscreteProcess
{
@@ -134,10 +105,9 @@ public:
// Returns true -> 'is applicable' only for an optical photon.
virtual G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition* condition) override;
// Returns infinity; i. e. the process does not limit the step,
// but sets the 'Forced' condition for the DoIt to be invoked at
// every step. However, only at a boundary will any action be
// taken.
// Returns infinity; i. e. the process does not limit the step, but sets the
// 'Forced' condition for the DoIt to be invoked at every step. However, only
// at a boundary will any action be taken.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
@@ -234,6 +204,20 @@ private:
G4Physics2DVector* DichroicVector;
G4bool fInvokeSD;
size_t idx_rindex1 = 0;
size_t idx_rindex_surface = 0;
size_t idx_reflect = 0;
size_t idx_eff = 0;
size_t idx_trans = 0;
size_t idx_lobe = 0;
size_t idx_spike = 0;
size_t idx_back = 0;
size_t idx_rindex2 = 0;
size_t idx_groupvel = 0;
size_t idx_rrindex = 0;
size_t idx_irindex = 0;
};
////////////////////
@@ -274,10 +258,10 @@ void G4OpBoundaryProcess::ChooseReflection()
theStatus = SpikeReflection;
theFacetNormal = theGlobalNormal;
}
else if ( rand >= prob_ss && rand <= prob_ss+prob_sl) {
else if (rand >= prob_ss && rand <= prob_ss+prob_sl) {
theStatus = LobeReflection;
}
else if ( rand > prob_ss+prob_sl && rand < prob_ss+prob_sl+prob_bs ) {
else if (rand > prob_ss+prob_sl && rand < prob_ss+prob_sl+prob_bs) {
theStatus = BackScattering;
}
else {
@@ -317,7 +301,7 @@ void G4OpBoundaryProcess::DoReflection()
if (fRealRIndexMPV && fImagRIndexMPV) {
//
} else {
theFacetNormal = GetFacetNormal(OldMomentum,theGlobalNormal);
theFacetNormal = GetFacetNormal(OldMomentum, theGlobalNormal);
}
G4double PdotN = OldMomentum * theFacetNormal;
NewMomentum = OldMomentum - (2.*PdotN)*theFacetNormal;
@@ -35,8 +35,6 @@
// Henyey-Greenstein phase function
// Forward and backward angles are treated separately.
//
// mail: gum@triumf.ca
//
////////////////////////////////////////////////////////////////////////
#ifndef G4OpMieHG_h
@@ -54,8 +52,6 @@ public:
G4ProcessType type = fOptical);
virtual ~G4OpMieHG();
public:
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
// Returns true -> 'is applicable' only for an optical photon.
@@ -73,6 +69,7 @@ private:
G4OpMieHG(const G4OpMieHG &right) = delete;
G4OpMieHG& operator=(const G4OpMieHG &right) = delete;
size_t idx_mie = 0;
};
inline
@@ -43,10 +43,11 @@
enum G4OpProcessSubType
{
fOpAbsorption = 31,
fOpBoundary = 32,
fOpRayleigh = 33,
fOpWLS = 34,
fOpMieHG = 35
fOpBoundary = 32,
fOpRayleigh = 33,
fOpWLS = 34,
fOpMieHG = 35,
fOpWLS2 = 36,
};
#endif
@@ -40,42 +40,24 @@
// 1999-10-29 add method and class descriptors
// 1997-04-09 by Peter Gumplinger
// > new physics/tracking scheme
// mail: gum@triumf.ca
//
////////////////////////////////////////////////////////////////////////
#ifndef G4OpRayleigh_h
#define G4OpRayleigh_h 1
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4OpticalPhoton.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
// Class Description:
// Discrete Process -- Rayleigh scattering of optical photons.
// Class inherits publicly from G4VDiscreteProcess.
// Class Description - End:
class G4OpRayleigh : public G4VDiscreteProcess
{
public:
explicit G4OpRayleigh(const G4String& processName = "OpRayleigh",
G4ProcessType type = fOptical);
virtual ~G4OpRayleigh();
public:
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
// Returns true -> 'is applicable' only for an optical photon.
@@ -100,9 +82,6 @@ public:
protected:
G4PhysicsTable* thePhysicsTable;
// A Physics Table can be either a cross-sections table or
// an energy table (or can be used for other specific
// purposes).
private:
@@ -112,7 +91,9 @@ private:
/// Calculates the mean free paths for a material as a function of
/// photon energy
G4PhysicsOrderedFreeVector*
CalculateRayleighMeanFreePaths( const G4Material* material ) const;
CalculateRayleighMeanFreePaths(const G4Material* material) const;
size_t idx_rslength = 0;
};
////////////////////
@@ -128,13 +109,9 @@ G4bool G4OpRayleigh::IsApplicable(const G4ParticleDefinition& aParticleType)
inline
void G4OpRayleigh::DumpPhysicsTable() const
{
G4int PhysicsTableSize = thePhysicsTable->entries();
G4PhysicsOrderedFreeVector *v;
for (G4int i = 0; i < PhysicsTableSize; ++i)
for (size_t i=0; i<thePhysicsTable->entries(); ++i)
{
v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i];
v->DumpValues();
((G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i])->DumpValues();
}
}
+5 -25
View File
@@ -37,40 +37,19 @@
// (Adaptation of G4Scintillation and G4OpAbsorption)
// Updated: 2005-07-28 add G4ProcessType to constructor
// 2006-05-07 - add G4VWLSTimeGeneratorProfile
// mail: gum@triumf.ca
// jparcham@phys.ualberta.ca
//
////////////////////////////////////////////////////////////////////////
#ifndef G4OpWLS_h
#define G4OpWLS_h 1
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4Poisson.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4OpticalPhoton.hh"
#include "G4PhysicsTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4VWLSTimeGeneratorProfile.hh"
// Class Description:
// Discrete Process -- Bulk absorption of Optical Photons.
// Class inherits publicly from G4VDiscreteProcess
// Class Description - End:
class G4VWLSTimeGeneratorProfile;
class G4OpWLS : public G4VDiscreteProcess
{
public:
explicit G4OpWLS(const G4String& processName = "OpWLS",
@@ -86,13 +65,12 @@ public:
virtual G4double GetMeanFreePath(const G4Track& aTrack,
G4double,
G4ForceCondition*) override;
// Returns the absorption length for bulk absorption of optical
// Returns the absorption length for WLS absorption of optical
// photons in media with a specified attenuation length.
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
// This is the method implementing bulk absorption of optical
// photons.
// This is the method implementing WLS for optical photons.
virtual G4PhysicsTable* GetIntegralTable() const;
// Returns the address of the WLS integral table.
@@ -112,6 +90,8 @@ private:
G4OpWLS(const G4OpWLS &right) = delete;
G4OpWLS& operator=(const G4OpWLS &right) = delete;
size_t idx_wls = 0;
};
////////////////////
@@ -136,7 +116,7 @@ void G4OpWLS::DumpPhysicsTable() const
G4int PhysicsTableSize = theIntegralTable->entries();
G4PhysicsOrderedFreeVector *v;
for (G4int i = 0; i < PhysicsTableSize; i++)
for (G4int i=0; i<PhysicsTableSize; ++i)
{
v = (G4PhysicsOrderedFreeVector*)(*theIntegralTable)[i];
v->DumpValues();
@@ -0,0 +1,126 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
////////////////////////////////////////////////////////////////////////
// Optical Photon WaveLength Shifting (WLS) Class Definition
////////////////////////////////////////////////////////////////////////
//
// File: G4OpWLS2.hh
// Description: Discrete Process -- Wavelength Shifting of Optical Photons
// Version: 1.0
// Created: 2003-05-13
// Author: John Paul Archambault
// (Adaptation of G4Scintillation and G4OpAbsorption)
// Updated: 2005-07-28 add G4ProcessType to constructor
// 2006-05-07 - add G4VWLSTimeGeneratorProfile
//
////////////////////////////////////////////////////////////////////////
#ifndef G4OpWL2S_h
#define G4OpWLS2_h 1
#include "G4VDiscreteProcess.hh"
#include "G4OpticalPhoton.hh"
class G4VWLSTimeGeneratorProfile;
class G4OpWLS2 : public G4VDiscreteProcess
{
public:
explicit G4OpWLS2(const G4String& processName = "OpWLS2",
G4ProcessType type = fOptical);
virtual ~G4OpWLS2();
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
// Returns true -> 'is applicable' only for an optical photon.
virtual void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
// Build the WLS2 integral table at the right time
virtual G4double GetMeanFreePath(const G4Track& aTrack,
G4double,
G4ForceCondition*) override;
// Returns the absorption length for WLS2 absorption of optical
// photons in media with a specified attenuation length.
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
// This is the method implementing WLS2 for optical photons.
virtual G4PhysicsTable* GetIntegralTable() const;
// Returns the address of the WLS2 integral table.
virtual void DumpPhysicsTable() const;
// Prints the WLS2 integral table.
void UseTimeProfile(const G4String name);
// Selects the time profile generator
protected:
G4VWLSTimeGeneratorProfile* WLSTimeGeneratorProfile;
G4PhysicsTable* theIntegralTable;
private:
G4OpWLS2(const G4OpWLS2 &right) = delete;
G4OpWLS2& operator=(const G4OpWLS2 &right) = delete;
size_t idx_wls2 = 0;
};
////////////////////
// Inline methods
////////////////////
inline
G4bool G4OpWLS2::IsApplicable(const G4ParticleDefinition& aParticleType)
{
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
}
inline
G4PhysicsTable* G4OpWLS2::GetIntegralTable() const
{
return theIntegralTable;
}
inline
void G4OpWLS2::DumpPhysicsTable() const
{
G4int PhysicsTableSize = theIntegralTable->entries();
G4PhysicsOrderedFreeVector *v;
for (G4int i=0; i<PhysicsTableSize; ++i)
{
v = (G4PhysicsOrderedFreeVector*)(*theIntegralTable)[i];
v->DumpValues();
}
}
#endif /* G4OpWLS2_h */
@@ -49,8 +49,9 @@
#define G4VWLSTimeGeneratorProfile_h 1
#include "G4ios.hh"
#include "globals.hh"
//#include "globals.hh"
#include "G4MaterialPropertiesTable.hh"
//class G4MaterialPropertiesTable;
class G4VWLSTimeGeneratorProfile
{