Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -51,37 +51,39 @@
|
||||
|
||||
class G4OpAbsorption : public G4VDiscreteProcess
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4OpAbsorption(const G4String& processName = "OpAbsorption",
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpAbsorption();
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpAbsorption();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
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;
|
||||
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.
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
// Method implementing bulk absorption of optical photons.
|
||||
|
||||
private:
|
||||
virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
|
||||
|
||||
G4OpAbsorption(const G4OpAbsorption &right) = delete;
|
||||
G4OpAbsorption& operator=(const G4OpAbsorption &right) = delete;
|
||||
virtual void Initialise();
|
||||
|
||||
size_t idx_absorption = 0;
|
||||
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)
|
||||
inline G4bool G4OpAbsorption::IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Optical Photon Boundary Process Class Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -37,9 +37,9 @@
|
||||
// Created: 1997-06-18
|
||||
// Modified: 2005-07-28 add G4ProcessType to constructor
|
||||
// 1999-10-29 add method and class descriptors
|
||||
// 1999-10-10 - Fill NewMomentum/NewPolarization in
|
||||
// 1999-10-10 - Fill NewMomentum/NewPolarization in
|
||||
// DoAbsorption. These members need to be
|
||||
// filled since DoIt calls
|
||||
// filled since DoIt calls
|
||||
// aParticleChange.SetMomentumChange etc.
|
||||
// upon return (thanks to: Clark McGrew)
|
||||
// 2006-11-04 - add capability of calculating the reflectivity
|
||||
@@ -69,48 +69,69 @@
|
||||
#include "G4OpticalSurface.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
|
||||
enum G4OpBoundaryProcessStatus {
|
||||
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 };
|
||||
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
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4OpBoundaryProcess(const G4String& processName = "OpBoundary",
|
||||
G4ProcessType type = fOptical);
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpBoundaryProcess();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual G4bool IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable' only for an optical photon.
|
||||
|
||||
virtual G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition* condition) override;
|
||||
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.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing boundary processes.
|
||||
|
||||
virtual G4OpBoundaryProcessStatus GetStatus() const;
|
||||
@@ -119,15 +140,18 @@ public:
|
||||
virtual void SetInvokeSD(G4bool);
|
||||
// Set flag for call to InvokeSD method.
|
||||
|
||||
private:
|
||||
virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
|
||||
|
||||
G4OpBoundaryProcess(const G4OpBoundaryProcess &right) = delete;
|
||||
G4OpBoundaryProcess& operator=(const G4OpBoundaryProcess &right) = delete;
|
||||
virtual void Initialise();
|
||||
|
||||
private:
|
||||
G4OpBoundaryProcess(const G4OpBoundaryProcess& right) = delete;
|
||||
G4OpBoundaryProcess& operator=(const G4OpBoundaryProcess& right) = delete;
|
||||
|
||||
G4bool G4BooleanRand(const G4double prob) const;
|
||||
|
||||
G4ThreeVector GetFacetNormal(const G4ThreeVector& Momentum,
|
||||
const G4ThreeVector& Normal) const;
|
||||
const G4ThreeVector& Normal) const;
|
||||
|
||||
void DielectricMetal();
|
||||
void DielectricDielectric();
|
||||
@@ -144,10 +168,8 @@ private:
|
||||
G4double GetIncidentAngle();
|
||||
// Returns the incident angle of optical photon
|
||||
|
||||
G4double GetReflectivity(G4double E1_perp,
|
||||
G4double E1_parl,
|
||||
G4double incidentangle,
|
||||
G4double RealRindex,
|
||||
G4double GetReflectivity(G4double E1_perp, G4double E1_parl,
|
||||
G4double incidentangle, G4double RealRindex,
|
||||
G4double ImaginaryRindex);
|
||||
// Returns the Reflectivity on a metalic surface
|
||||
|
||||
@@ -205,81 +227,77 @@ private:
|
||||
|
||||
G4bool fInvokeSD;
|
||||
|
||||
size_t idx_rindex1 = 0;
|
||||
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;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
////////////////////
|
||||
// Inline methods
|
||||
////////////////////
|
||||
|
||||
inline
|
||||
G4bool G4OpBoundaryProcess::G4BooleanRand(const G4double prob) const
|
||||
inline G4bool G4OpBoundaryProcess::G4BooleanRand(const G4double prob) const
|
||||
{
|
||||
/* Returns a random boolean variable with the specified probability */
|
||||
return (G4UniformRand() < prob);
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4OpBoundaryProcess::IsApplicable(const G4ParticleDefinition&
|
||||
aParticleType)
|
||||
inline G4bool G4OpBoundaryProcess::IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
|
||||
}
|
||||
|
||||
inline
|
||||
G4OpBoundaryProcessStatus G4OpBoundaryProcess::GetStatus() const
|
||||
inline G4OpBoundaryProcessStatus G4OpBoundaryProcess::GetStatus() const
|
||||
{
|
||||
return theStatus;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4OpBoundaryProcess::SetInvokeSD(G4bool flag)
|
||||
{
|
||||
fInvokeSD = flag;
|
||||
}
|
||||
inline void G4OpBoundaryProcess::SetInvokeSD(G4bool flag) { fInvokeSD = flag; }
|
||||
|
||||
inline
|
||||
void G4OpBoundaryProcess::ChooseReflection()
|
||||
inline void G4OpBoundaryProcess::ChooseReflection()
|
||||
{
|
||||
G4double rand = G4UniformRand();
|
||||
if (rand >= 0.0 && rand < prob_ss) {
|
||||
theStatus = SpikeReflection;
|
||||
if(rand >= 0.0 && rand < prob_ss)
|
||||
{
|
||||
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 {
|
||||
else
|
||||
{
|
||||
theStatus = LambertianReflection;
|
||||
}
|
||||
}
|
||||
|
||||
inline
|
||||
void G4OpBoundaryProcess::DoAbsorption()
|
||||
inline void G4OpBoundaryProcess::DoAbsorption()
|
||||
{
|
||||
theStatus = Absorption;
|
||||
|
||||
if (G4BooleanRand(theEfficiency)) {
|
||||
if(G4BooleanRand(theEfficiency))
|
||||
{
|
||||
// EnergyDeposited =/= 0 means: photon has been detected
|
||||
theStatus = Detection;
|
||||
aParticleChange.ProposeLocalEnergyDeposit(thePhotonMomentum);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.0);
|
||||
}
|
||||
|
||||
@@ -289,31 +307,36 @@ void G4OpBoundaryProcess::DoAbsorption()
|
||||
aParticleChange.ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4OpBoundaryProcess::DoReflection()
|
||||
inline void G4OpBoundaryProcess::DoReflection()
|
||||
{
|
||||
if (theStatus == LambertianReflection) {
|
||||
NewMomentum = G4LambertianRand(theGlobalNormal);
|
||||
if(theStatus == LambertianReflection)
|
||||
{
|
||||
NewMomentum = G4LambertianRand(theGlobalNormal);
|
||||
theFacetNormal = (NewMomentum - OldMomentum).unit();
|
||||
}
|
||||
else if (theFinish == ground) {
|
||||
else if(theFinish == ground)
|
||||
{
|
||||
theStatus = LobeReflection;
|
||||
if (fRealRIndexMPV && fImagRIndexMPV) {
|
||||
if(fRealRIndexMPV && fImagRIndexMPV)
|
||||
{
|
||||
//
|
||||
} else {
|
||||
theFacetNormal = GetFacetNormal(OldMomentum, theGlobalNormal);
|
||||
}
|
||||
else
|
||||
{
|
||||
theFacetNormal = GetFacetNormal(OldMomentum, theGlobalNormal);
|
||||
}
|
||||
G4double PdotN = OldMomentum * theFacetNormal;
|
||||
NewMomentum = OldMomentum - (2.*PdotN)*theFacetNormal;
|
||||
NewMomentum = OldMomentum - (2. * PdotN) * theFacetNormal;
|
||||
}
|
||||
else {
|
||||
theStatus = SpikeReflection;
|
||||
else
|
||||
{
|
||||
theStatus = SpikeReflection;
|
||||
theFacetNormal = theGlobalNormal;
|
||||
G4double PdotN = OldMomentum * theFacetNormal;
|
||||
NewMomentum = OldMomentum - (2.*PdotN)*theFacetNormal;
|
||||
NewMomentum = OldMomentum - (2. * PdotN) * theFacetNormal;
|
||||
}
|
||||
G4double EdotN = OldPolarization * theFacetNormal;
|
||||
NewPolarization = -OldPolarization + (2.*EdotN)*theFacetNormal;
|
||||
G4double EdotN = OldPolarization * theFacetNormal;
|
||||
NewPolarization = -OldPolarization + (2. * EdotN) * theFacetNormal;
|
||||
}
|
||||
|
||||
#endif /* G4OpBoundaryProcess_h */
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
// Author: Xin Qian
|
||||
// Based on work from Vlasios Vasileiou
|
||||
//
|
||||
// This subroutine will mimic the Mie scattering based on
|
||||
// This subroutine will mimic the Mie scattering based on
|
||||
// Henyey-Greenstein phase function
|
||||
// Forward and backward angles are treated separately.
|
||||
//
|
||||
@@ -45,35 +45,34 @@
|
||||
|
||||
class G4OpMieHG : public G4VDiscreteProcess
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4OpMieHG(const G4String& processName = "OpMieHG",
|
||||
G4ProcessType type = fOptical);
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpMieHG();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual G4bool IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable' only for an optical photon.
|
||||
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double,
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*) override;
|
||||
// Return the mean free path of Mie scattering
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing Mie scattering.
|
||||
|
||||
private:
|
||||
virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
|
||||
virtual void Initialise();
|
||||
|
||||
G4OpMieHG(const G4OpMieHG &right) = delete;
|
||||
G4OpMieHG& operator=(const G4OpMieHG &right) = delete;
|
||||
private:
|
||||
G4OpMieHG(const G4OpMieHG& right) = delete;
|
||||
G4OpMieHG& operator=(const G4OpMieHG& right) = delete;
|
||||
|
||||
size_t idx_mie = 0;
|
||||
};
|
||||
|
||||
inline
|
||||
G4bool G4OpMieHG::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
inline G4bool G4OpMieHG::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
#ifndef G4OpProcessSubType_h
|
||||
#define G4OpProcessSubType_h 1
|
||||
|
||||
enum G4OpProcessSubType
|
||||
{
|
||||
enum G4OpProcessSubType
|
||||
{
|
||||
fOpAbsorption = 31,
|
||||
fOpBoundary = 32,
|
||||
fOpRayleigh = 33,
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Optical Photon Rayleigh Scattering Class Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: G4OpRayleigh.hh
|
||||
// Description: Discrete Process -- Rayleigh scattering of optical photons
|
||||
// Description: Discrete Process -- Rayleigh scattering of optical photons
|
||||
// Version: 1.0
|
||||
// Created: 1996-05-31
|
||||
// Author: Juliet Armstrong
|
||||
@@ -52,25 +52,25 @@
|
||||
|
||||
class G4OpRayleigh : public G4VDiscreteProcess
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4OpRayleigh(const G4String& processName = "OpRayleigh",
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpRayleigh();
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpRayleigh();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual G4bool IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable' only for an optical photon.
|
||||
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual void BuildPhysicsTable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Build thePhysicsTable at a right time
|
||||
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double,
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*) override;
|
||||
// Returns the mean free path for Rayleigh scattering
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing Rayleigh scattering.
|
||||
|
||||
virtual G4PhysicsTable* GetPhysicsTable() const;
|
||||
@@ -79,19 +79,20 @@ public:
|
||||
virtual void DumpPhysicsTable() const;
|
||||
// Prints the physics table.
|
||||
|
||||
protected:
|
||||
virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
|
||||
virtual void Initialise();
|
||||
|
||||
G4PhysicsTable* thePhysicsTable;
|
||||
protected:
|
||||
G4PhysicsTable* thePhysicsTable;
|
||||
|
||||
private:
|
||||
|
||||
G4OpRayleigh(const G4OpRayleigh &right) = delete;
|
||||
G4OpRayleigh& operator=(const G4OpRayleigh &right) = delete;
|
||||
private:
|
||||
G4OpRayleigh(const G4OpRayleigh& right) = delete;
|
||||
G4OpRayleigh& operator=(const G4OpRayleigh& right) = delete;
|
||||
|
||||
/// Calculates the mean free paths for a material as a function of
|
||||
/// photon energy
|
||||
G4PhysicsOrderedFreeVector*
|
||||
CalculateRayleighMeanFreePaths(const G4Material* material) const;
|
||||
G4PhysicsOrderedFreeVector* CalculateRayleighMeanFreePaths(
|
||||
const G4Material* material) const;
|
||||
|
||||
size_t idx_rslength = 0;
|
||||
};
|
||||
@@ -100,18 +101,17 @@ private:
|
||||
// Inline methods
|
||||
////////////////////
|
||||
|
||||
inline
|
||||
G4bool G4OpRayleigh::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
inline G4bool G4OpRayleigh::IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
|
||||
}
|
||||
|
||||
inline
|
||||
void G4OpRayleigh::DumpPhysicsTable() const
|
||||
inline void G4OpRayleigh::DumpPhysicsTable() const
|
||||
{
|
||||
for (size_t i=0; i<thePhysicsTable->entries(); ++i)
|
||||
for(size_t i = 0; i < thePhysicsTable->entries(); ++i)
|
||||
{
|
||||
((G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i])->DumpValues();
|
||||
((G4PhysicsOrderedFreeVector*) (*thePhysicsTable)[i])->DumpValues();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: G4OpWLS.hh
|
||||
// Description: Discrete Process -- Wavelength Shifting of Optical Photons
|
||||
// Description: Discrete Process -- Wavelength Shifting of Optical Photons
|
||||
// Version: 1.0
|
||||
// Created: 2003-05-13
|
||||
// Author: John Paul Archambault
|
||||
@@ -50,26 +50,26 @@ class G4VWLSTimeGeneratorProfile;
|
||||
|
||||
class G4OpWLS : public G4VDiscreteProcess
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4OpWLS(const G4String& processName = "OpWLS",
|
||||
G4ProcessType type = fOptical);
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpWLS();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual G4bool IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable' only for an optical photon.
|
||||
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual void BuildPhysicsTable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Build the WLS integral table at the right time
|
||||
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double,
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*) override;
|
||||
// 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;
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing WLS for optical photons.
|
||||
|
||||
virtual G4PhysicsTable* GetIntegralTable() const;
|
||||
@@ -78,18 +78,19 @@ public:
|
||||
virtual void DumpPhysicsTable() const;
|
||||
// Prints the WLS integral table.
|
||||
|
||||
void UseTimeProfile(const G4String name);
|
||||
virtual void UseTimeProfile(const G4String name);
|
||||
// Selects the time profile generator
|
||||
|
||||
protected:
|
||||
virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
|
||||
virtual void Initialise();
|
||||
|
||||
protected:
|
||||
G4VWLSTimeGeneratorProfile* WLSTimeGeneratorProfile;
|
||||
G4PhysicsTable* theIntegralTable;
|
||||
|
||||
private:
|
||||
|
||||
G4OpWLS(const G4OpWLS &right) = delete;
|
||||
G4OpWLS& operator=(const G4OpWLS &right) = delete;
|
||||
private:
|
||||
G4OpWLS(const G4OpWLS& right) = delete;
|
||||
G4OpWLS& operator=(const G4OpWLS& right) = delete;
|
||||
|
||||
size_t idx_wls = 0;
|
||||
};
|
||||
@@ -98,27 +99,24 @@ private:
|
||||
// Inline methods
|
||||
////////////////////
|
||||
|
||||
inline
|
||||
G4bool G4OpWLS::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
inline G4bool G4OpWLS::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4OpWLS::GetIntegralTable() const
|
||||
inline G4PhysicsTable* G4OpWLS::GetIntegralTable() const
|
||||
{
|
||||
return theIntegralTable;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4OpWLS::DumpPhysicsTable() const
|
||||
inline void G4OpWLS::DumpPhysicsTable() const
|
||||
{
|
||||
G4int PhysicsTableSize = theIntegralTable->entries();
|
||||
G4PhysicsOrderedFreeVector *v;
|
||||
G4PhysicsOrderedFreeVector* v;
|
||||
|
||||
for (G4int i=0; i<PhysicsTableSize; ++i)
|
||||
for(G4int i = 0; i < PhysicsTableSize; ++i)
|
||||
{
|
||||
v = (G4PhysicsOrderedFreeVector*)(*theIntegralTable)[i];
|
||||
v = (G4PhysicsOrderedFreeVector*) (*theIntegralTable)[i];
|
||||
v->DumpValues();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: G4OpWLS2.hh
|
||||
// Description: Discrete Process -- Wavelength Shifting of Optical Photons
|
||||
// Description: Discrete Process -- Wavelength Shifting of Optical Photons
|
||||
// Version: 1.0
|
||||
// Created: 2003-05-13
|
||||
// Author: John Paul Archambault
|
||||
@@ -41,35 +41,35 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef G4OpWL2S_h
|
||||
#define G4OpWLS2_h 1
|
||||
# define G4OpWLS2_h 1
|
||||
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
# include "G4VDiscreteProcess.hh"
|
||||
# include "G4OpticalPhoton.hh"
|
||||
|
||||
class G4VWLSTimeGeneratorProfile;
|
||||
|
||||
class G4OpWLS2 : public G4VDiscreteProcess
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4OpWLS2(const G4String& processName = "OpWLS2",
|
||||
G4ProcessType type = fOptical);
|
||||
G4ProcessType type = fOptical);
|
||||
virtual ~G4OpWLS2();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual G4bool IsApplicable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable' only for an optical photon.
|
||||
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
|
||||
virtual void BuildPhysicsTable(
|
||||
const G4ParticleDefinition& aParticleType) override;
|
||||
// Build the WLS2 integral table at the right time
|
||||
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double,
|
||||
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;
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing WLS2 for optical photons.
|
||||
|
||||
virtual G4PhysicsTable* GetIntegralTable() const;
|
||||
@@ -78,18 +78,19 @@ public:
|
||||
virtual void DumpPhysicsTable() const;
|
||||
// Prints the WLS2 integral table.
|
||||
|
||||
void UseTimeProfile(const G4String name);
|
||||
virtual void UseTimeProfile(const G4String name);
|
||||
// Selects the time profile generator
|
||||
|
||||
protected:
|
||||
virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
|
||||
virtual void Initialise();
|
||||
|
||||
protected:
|
||||
G4VWLSTimeGeneratorProfile* WLSTimeGeneratorProfile;
|
||||
G4PhysicsTable* theIntegralTable;
|
||||
|
||||
private:
|
||||
|
||||
G4OpWLS2(const G4OpWLS2 &right) = delete;
|
||||
G4OpWLS2& operator=(const G4OpWLS2 &right) = delete;
|
||||
private:
|
||||
G4OpWLS2(const G4OpWLS2& right) = delete;
|
||||
G4OpWLS2& operator=(const G4OpWLS2& right) = delete;
|
||||
|
||||
size_t idx_wls2 = 0;
|
||||
};
|
||||
@@ -98,27 +99,24 @@ private:
|
||||
// Inline methods
|
||||
////////////////////
|
||||
|
||||
inline
|
||||
G4bool G4OpWLS2::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
inline G4bool G4OpWLS2::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4OpWLS2::GetIntegralTable() const
|
||||
inline G4PhysicsTable* G4OpWLS2::GetIntegralTable() const
|
||||
{
|
||||
return theIntegralTable;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4OpWLS2::DumpPhysicsTable() const
|
||||
inline void G4OpWLS2::DumpPhysicsTable() const
|
||||
{
|
||||
G4int PhysicsTableSize = theIntegralTable->entries();
|
||||
G4PhysicsOrderedFreeVector *v;
|
||||
G4PhysicsOrderedFreeVector* v;
|
||||
|
||||
for (G4int i=0; i<PhysicsTableSize; ++i)
|
||||
for(G4int i = 0; i < PhysicsTableSize; ++i)
|
||||
{
|
||||
v = (G4PhysicsOrderedFreeVector*)(*theIntegralTable)[i];
|
||||
v = (G4PhysicsOrderedFreeVector*) (*theIntegralTable)[i];
|
||||
v->DumpValues();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
// File name: G4VWLSTimeGeneratorProfile.hh
|
||||
//
|
||||
// Author: Pedro Rodrigues, Andreia Trindade
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Creation date: 2006-05-07
|
||||
//
|
||||
// Modifications:
|
||||
// Modifications:
|
||||
//
|
||||
// Class Description:
|
||||
// Class Description:
|
||||
//
|
||||
// Abstract class for a WLSTimeGeneratorProfile
|
||||
|
||||
@@ -51,28 +51,24 @@
|
||||
#include "G4ios.hh"
|
||||
//#include "globals.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
//class G4MaterialPropertiesTable;
|
||||
// class G4MaterialPropertiesTable;
|
||||
|
||||
class G4VWLSTimeGeneratorProfile
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
G4VWLSTimeGeneratorProfile(const G4String& name);
|
||||
|
||||
virtual ~G4VWLSTimeGeneratorProfile();
|
||||
|
||||
virtual G4double GenerateTime(const G4double time_constant) = 0;
|
||||
virtual G4double GenerateTime(const G4double time_constant) = 0;
|
||||
virtual G4double GenerateTime(const G4MaterialPropertiesTable*) = 0;
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
// hide assignment operator
|
||||
|
||||
G4VWLSTimeGeneratorProfile & operator=
|
||||
(const G4VWLSTimeGeneratorProfile &right) = delete;
|
||||
G4VWLSTimeGeneratorProfile(const G4VWLSTimeGeneratorProfile&) = delete;
|
||||
|
||||
G4VWLSTimeGeneratorProfile& operator=
|
||||
(const G4VWLSTimeGeneratorProfile& right) = delete;
|
||||
G4VWLSTimeGeneratorProfile(const G4VWLSTimeGeneratorProfile&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
// File name: G4WLSTimeGeneratorProfileDelta.hh
|
||||
//
|
||||
// Author: Pedro Rodrigues, Andreia Trindade
|
||||
//
|
||||
//
|
||||
// Creation date: 2006-05-07
|
||||
//
|
||||
// Modifications:
|
||||
// Modifications:
|
||||
//
|
||||
// Class Description: Discrete Class of WLSTimeGeneratorProfile
|
||||
//
|
||||
@@ -49,9 +49,7 @@
|
||||
|
||||
class G4WLSTimeGeneratorProfileDelta : public G4VWLSTimeGeneratorProfile
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4WLSTimeGeneratorProfileDelta(const G4String& name);
|
||||
|
||||
virtual ~G4WLSTimeGeneratorProfileDelta();
|
||||
@@ -60,16 +58,14 @@ public:
|
||||
|
||||
virtual G4double GenerateTime(const G4MaterialPropertiesTable*) override;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
protected:
|
||||
private:
|
||||
// hide assignment operator
|
||||
|
||||
G4WLSTimeGeneratorProfileDelta & operator=
|
||||
(const G4WLSTimeGeneratorProfileDelta &right) = delete;
|
||||
G4WLSTimeGeneratorProfileDelta(const G4WLSTimeGeneratorProfileDelta&) = delete;
|
||||
|
||||
G4WLSTimeGeneratorProfileDelta& operator=
|
||||
(const G4WLSTimeGeneratorProfileDelta& right) = delete;
|
||||
G4WLSTimeGeneratorProfileDelta(const G4WLSTimeGeneratorProfileDelta&) =
|
||||
delete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
// File name: G4WLSTimeGeneratorProfileExponential.hh
|
||||
//
|
||||
// Author: Pedro Rodrigues, Andreia Trindade
|
||||
//
|
||||
//
|
||||
// Creation date: 2006-05-07
|
||||
//
|
||||
// Modifications:
|
||||
// Modifications:
|
||||
//
|
||||
// Class Description:
|
||||
// Class Description:
|
||||
//
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
@@ -50,9 +50,7 @@
|
||||
|
||||
class G4WLSTimeGeneratorProfileExponential : public G4VWLSTimeGeneratorProfile
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit G4WLSTimeGeneratorProfileExponential(const G4String& name);
|
||||
|
||||
virtual ~G4WLSTimeGeneratorProfileExponential();
|
||||
@@ -61,16 +59,14 @@ public:
|
||||
|
||||
virtual G4double GenerateTime(const G4MaterialPropertiesTable*) override;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
protected:
|
||||
private:
|
||||
// hide assignment operator
|
||||
|
||||
G4WLSTimeGeneratorProfileExponential & operator=
|
||||
(const G4WLSTimeGeneratorProfileExponential &right) = delete;
|
||||
G4WLSTimeGeneratorProfileExponential(const G4WLSTimeGeneratorProfileExponential&) = delete;
|
||||
|
||||
G4WLSTimeGeneratorProfileExponential& operator=
|
||||
(const G4WLSTimeGeneratorProfileExponential& right) = delete;
|
||||
G4WLSTimeGeneratorProfileExponential(
|
||||
const G4WLSTimeGeneratorProfileExponential&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user