Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Cerenkov Radiation Class Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -40,7 +40,6 @@
|
||||
// 1999-10-29 add method and class descriptors
|
||||
// 1997-04-09 by Peter Gumplinger
|
||||
// > G4MaterialPropertiesTable; new physics/tracking scheme
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -66,21 +65,17 @@
|
||||
|
||||
class G4Cerenkov : public G4VProcess
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
explicit G4Cerenkov(const G4String& processName = "Cerenkov",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
public:
|
||||
explicit G4Cerenkov(const G4String& processName = "Cerenkov",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
~G4Cerenkov();
|
||||
|
||||
explicit G4Cerenkov(const G4Cerenkov &right);
|
||||
explicit G4Cerenkov(const G4Cerenkov& right);
|
||||
|
||||
private:
|
||||
|
||||
G4Cerenkov& operator=(const G4Cerenkov &right) = delete;
|
||||
|
||||
public:
|
||||
private:
|
||||
G4Cerenkov& operator=(const G4Cerenkov& right) = delete;
|
||||
|
||||
public:
|
||||
G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable', for all charged particles
|
||||
// except short-lived particles.
|
||||
@@ -88,43 +83,50 @@ public:
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
|
||||
// Build table at a right time
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double, G4ForceCondition* );
|
||||
void PreparePhysicsTable(const G4ParticleDefinition& part) override;
|
||||
void Initialise();
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*);
|
||||
// Returns the discrete step limit and sets the 'StronglyForced'
|
||||
// condition for the DoIt to be invoked at every step.
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double ,
|
||||
G4ForceCondition* ) override;
|
||||
G4double PostStepGetPhysicalInteractionLength(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*) override;
|
||||
// Returns the discrete step limit and sets the 'StronglyForced'
|
||||
// condition for the DoIt to be invoked at every step.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing the Cerenkov process.
|
||||
|
||||
// no operation in AtRestDoIt and AlongStepDoIt
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*
|
||||
) override { return -1.0; };
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&, G4double, G4double, G4double&, G4GPILSelection*) override
|
||||
{
|
||||
return -1.0;
|
||||
};
|
||||
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4ForceCondition*
|
||||
) override { return -1.0; };
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track&, G4ForceCondition*) override
|
||||
{
|
||||
return -1.0;
|
||||
};
|
||||
|
||||
// no operation in AtRestDoIt and AlongStepDoIt
|
||||
virtual G4VParticleChange* AtRestDoIt(const G4Track& , const G4Step& )
|
||||
override {return nullptr;};
|
||||
virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&) override
|
||||
{
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
virtual G4VParticleChange* AlongStepDoIt(const G4Track& , const G4Step&)
|
||||
override {return nullptr;};
|
||||
virtual G4VParticleChange* AlongStepDoIt(const G4Track&,
|
||||
const G4Step&) override
|
||||
{
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
void SetTrackSecondariesFirst(const G4bool state);
|
||||
// If set, the primary particle tracking is interrupted and any
|
||||
// produced Cerenkov photons are tracked next. When all have
|
||||
// If set, the primary particle tracking is interrupted and any
|
||||
// produced Cerenkov photons are tracked next. When all have
|
||||
// been tracked, the tracking of the primary resumes.
|
||||
|
||||
G4bool GetTrackSecondariesFirst() const;
|
||||
@@ -140,7 +142,7 @@ public:
|
||||
// Set the maximum number of Cerenkov photons allowed to be generated during
|
||||
// a tracking step. This is an average ONLY; the actual number will vary
|
||||
// around this average. If invoked, the maximum photon stack will roughly be
|
||||
// of the size set. If not called, the step is not limited by the number of
|
||||
// of the size set. If not called, the step is not limited by the number of
|
||||
// photons generated.
|
||||
|
||||
G4int GetMaxNumPhotonsPerStep() const;
|
||||
@@ -162,68 +164,45 @@ public:
|
||||
void DumpPhysicsTable() const;
|
||||
// Prints the physics table.
|
||||
|
||||
private:
|
||||
|
||||
void BuildThePhysicsTable();
|
||||
|
||||
G4double GetAverageNumberOfPhotons(const G4double charge,
|
||||
const G4double beta,
|
||||
const G4Material *aMaterial,
|
||||
G4double GetAverageNumberOfPhotons(const G4double charge, const G4double beta,
|
||||
const G4Material* aMaterial,
|
||||
G4MaterialPropertyVector* Rindex) const;
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
G4PhysicsTable* thePhysicsTable;
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
G4bool fTrackSecondariesFirst;
|
||||
G4double fMaxBetaChange;
|
||||
G4int fMaxPhotons;
|
||||
G4int fMaxPhotons;
|
||||
|
||||
G4bool fStackingFlag;
|
||||
|
||||
G4int fNumPhotons;
|
||||
};
|
||||
|
||||
inline
|
||||
G4bool G4Cerenkov::GetTrackSecondariesFirst() const
|
||||
inline G4bool G4Cerenkov::GetTrackSecondariesFirst() const
|
||||
{
|
||||
return fTrackSecondariesFirst;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Cerenkov::GetMaxBetaChangePerStep() const
|
||||
inline G4double G4Cerenkov::GetMaxBetaChangePerStep() const
|
||||
{
|
||||
return fMaxBetaChange;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4Cerenkov::GetMaxNumPhotonsPerStep() const
|
||||
{
|
||||
return fMaxPhotons;
|
||||
}
|
||||
inline G4int G4Cerenkov::GetMaxNumPhotonsPerStep() const { return fMaxPhotons; }
|
||||
|
||||
inline
|
||||
void G4Cerenkov::SetStackPhotons(const G4bool stackingFlag)
|
||||
inline void G4Cerenkov::SetStackPhotons(const G4bool stackingFlag)
|
||||
{
|
||||
fStackingFlag = stackingFlag;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Cerenkov::GetStackPhotons() const
|
||||
{
|
||||
return fStackingFlag;
|
||||
}
|
||||
inline G4bool G4Cerenkov::GetStackPhotons() const { return fStackingFlag; }
|
||||
|
||||
inline
|
||||
G4int G4Cerenkov::GetNumPhotons() const
|
||||
{
|
||||
return fNumPhotons;
|
||||
}
|
||||
inline G4int G4Cerenkov::GetNumPhotons() const { return fNumPhotons; }
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Cerenkov::GetPhysicsTable() const
|
||||
inline G4PhysicsTable* G4Cerenkov::GetPhysicsTable() const
|
||||
{
|
||||
return thePhysicsTable;
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Scintillation Light Class Definition
|
||||
// Scintillation Light Class Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: G4Scintillation.hh
|
||||
// File: G4Scintillation.hh
|
||||
// Description: Discrete Process - Generation of Scintillation Photons
|
||||
// Version: 1.0
|
||||
// Created: 1998-11-07
|
||||
@@ -47,7 +47,6 @@
|
||||
// 2002-05-09 changed IsApplicable method
|
||||
// 1999-10-29 add method and class descriptors
|
||||
//
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -64,7 +63,7 @@
|
||||
#include "G4VRestDiscreteProcess.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4PhysicsOrderedFreeVector.hh"
|
||||
@@ -78,21 +77,17 @@
|
||||
|
||||
class G4Scintillation : public G4VRestDiscreteProcess
|
||||
{
|
||||
public:
|
||||
explicit G4Scintillation(const G4String& processName = "Scintillation",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
~G4Scintillation();
|
||||
|
||||
public:
|
||||
private:
|
||||
G4Scintillation(const G4Scintillation& right) = delete;
|
||||
G4Scintillation& operator=(const G4Scintillation& right) = delete;
|
||||
|
||||
explicit G4Scintillation(const G4String& processName = "Scintillation",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
~G4Scintillation();
|
||||
|
||||
private:
|
||||
|
||||
G4Scintillation(const G4Scintillation &right) = delete;
|
||||
G4Scintillation& operator=(const G4Scintillation &right) = delete;
|
||||
|
||||
public:
|
||||
|
||||
// G4Scintillation Process has both PostStepDoIt (for energy
|
||||
public:
|
||||
// G4Scintillation Process has both PostStepDoIt (for energy
|
||||
// deposition of particles in flight) and AtRestDoIt (for energy
|
||||
// given to the medium by particles at rest)
|
||||
|
||||
@@ -103,43 +98,43 @@ public:
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
|
||||
// Build table at the right time
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double ,
|
||||
G4ForceCondition* ) override;
|
||||
void PreparePhysicsTable(const G4ParticleDefinition& part) override;
|
||||
void Initialise();
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*) override;
|
||||
// Returns infinity; i. e. the process does not limit the step,
|
||||
// but sets the 'StronglyForced' condition for the DoIt to be
|
||||
// but sets the 'StronglyForced' condition for the DoIt to be
|
||||
// invoked at every step.
|
||||
|
||||
G4double GetMeanLifeTime(const G4Track& aTrack,
|
||||
G4ForceCondition* ) override;
|
||||
G4double GetMeanLifeTime(const G4Track& aTrack, G4ForceCondition*) override;
|
||||
// Returns infinity; i. e. the process does not limit the time,
|
||||
// but sets the 'StronglyForced' condition for the DoIt to be
|
||||
// invoked at every step.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
G4VParticleChange* AtRestDoIt (const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
|
||||
G4double GetScintillationYieldByParticleType(const G4Track &aTrack,
|
||||
const G4Step &aStep);
|
||||
G4double GetScintillationYieldByParticleType(const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
// Returns the number of scintillation photons calculated when
|
||||
// scintillation depends on the particle type and energy
|
||||
// deposited (includes nonlinear dependendency)
|
||||
// DEPRECATED: to be removed in the next major release. Use the
|
||||
// following instead.
|
||||
|
||||
G4double GetScintillationYieldByParticleType(
|
||||
const G4Track &aTrack,
|
||||
const G4Step &aStep,
|
||||
G4double &yield1,
|
||||
G4double &yield2,
|
||||
G4double &yield3);
|
||||
G4double GetScintillationYieldByParticleType(const G4Track& aTrack,
|
||||
const G4Step& aStep,
|
||||
G4double& yield1,
|
||||
G4double& yield2,
|
||||
G4double& yield3);
|
||||
// allow multiple time constants with scint by particle type
|
||||
|
||||
void SetTrackSecondariesFirst(const G4bool state);
|
||||
// If set, the primary particle tracking is interrupted and any
|
||||
// produced scintillation photons are tracked next. When all
|
||||
// produced scintillation photons are tracked next. When all
|
||||
// have been tracked, the tracking of the primary resumes.
|
||||
|
||||
G4bool GetTrackSecondariesFirst() const;
|
||||
@@ -201,7 +196,7 @@ public:
|
||||
G4EmSaturation* GetSaturation() const;
|
||||
// Returns the Birks Saturation.
|
||||
|
||||
void SetScintillationByParticleType(const G4bool );
|
||||
void SetScintillationByParticleType(const G4bool);
|
||||
// Called by the user to set the scintillation yield as a function
|
||||
// of energy deposited by particle type
|
||||
|
||||
@@ -223,7 +218,7 @@ public:
|
||||
// Return the boolean for whether or not the
|
||||
// G4ScintillationTrackInformation is set to the scint. photon track
|
||||
|
||||
void SetStackPhotons(const G4bool );
|
||||
void SetStackPhotons(const G4bool);
|
||||
// Call by the user to set the flag for stacking the scint. photons
|
||||
|
||||
G4bool GetStackPhotons() const;
|
||||
@@ -235,27 +230,21 @@ public:
|
||||
void DumpPhysicsTable() const;
|
||||
// Prints the fast and slow scintillation integral tables.
|
||||
|
||||
protected:
|
||||
|
||||
void BuildThePhysicsTable();
|
||||
// It builds either the fast or slow scintillation integral table;
|
||||
// or both.
|
||||
|
||||
protected:
|
||||
G4PhysicsTable* fIntegralTable1;
|
||||
G4PhysicsTable* fIntegralTable2;
|
||||
G4PhysicsTable* fIntegralTable3;
|
||||
|
||||
private:
|
||||
|
||||
G4bool fTrackSecondariesFirst;
|
||||
G4bool fFiniteRiseTime;
|
||||
private:
|
||||
G4bool fTrackSecondariesFirst;
|
||||
G4bool fFiniteRiseTime;
|
||||
G4double fYieldFactor;
|
||||
G4double fExcitationRatio;
|
||||
G4bool fScintillationByParticleType;
|
||||
G4bool fScintillationTrackInfo;
|
||||
G4bool fStackingFlag;
|
||||
G4int fNumPhotons;
|
||||
G4bool fEnhancedTimeConstants;
|
||||
G4bool fScintillationByParticleType;
|
||||
G4bool fScintillationTrackInfo;
|
||||
G4bool fStackingFlag;
|
||||
G4int fNumPhotons;
|
||||
G4bool fEnhancedTimeConstants;
|
||||
|
||||
#ifdef G4DEBUG_SCINTILLATION
|
||||
G4double ScintTrackEDep, ScintTrackYield;
|
||||
@@ -268,169 +257,137 @@ private:
|
||||
G4double sample_time(G4double tau1, G4double tau2);
|
||||
|
||||
G4EmSaturation* fEmSaturation;
|
||||
G4ParticleDefinition* opticalphoton = G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
|
||||
G4ParticleDefinition* opticalphoton =
|
||||
G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
};
|
||||
|
||||
////////////////////
|
||||
// Inline methods
|
||||
////////////////////
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetTrackSecondariesFirst(const G4bool state)
|
||||
inline void G4Scintillation::SetTrackSecondariesFirst(const G4bool state)
|
||||
{
|
||||
fTrackSecondariesFirst = state;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Scintillation::GetTrackSecondariesFirst() const
|
||||
inline G4bool G4Scintillation::GetTrackSecondariesFirst() const
|
||||
{
|
||||
return fTrackSecondariesFirst;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetFiniteRiseTime(const G4bool state)
|
||||
inline void G4Scintillation::SetFiniteRiseTime(const G4bool state)
|
||||
{
|
||||
fFiniteRiseTime = state;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Scintillation::GetFiniteRiseTime() const
|
||||
inline G4bool G4Scintillation::GetFiniteRiseTime() const
|
||||
{
|
||||
return fFiniteRiseTime;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetScintillationYieldFactor(const G4double yieldfactor)
|
||||
inline void G4Scintillation::SetScintillationYieldFactor(
|
||||
const G4double yieldfactor)
|
||||
{
|
||||
fYieldFactor = yieldfactor;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::GetScintillationYieldFactor() const
|
||||
inline G4double G4Scintillation::GetScintillationYieldFactor() const
|
||||
{
|
||||
return fYieldFactor;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetScintillationExcitationRatio(const G4double ratio)
|
||||
inline void G4Scintillation::SetScintillationExcitationRatio(
|
||||
const G4double ratio)
|
||||
{
|
||||
fExcitationRatio = ratio;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::GetScintillationExcitationRatio() const
|
||||
inline G4double G4Scintillation::GetScintillationExcitationRatio() const
|
||||
{
|
||||
return fExcitationRatio;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Scintillation::GetSlowIntegralTable() const
|
||||
inline G4PhysicsTable* G4Scintillation::GetSlowIntegralTable() const
|
||||
{
|
||||
return fIntegralTable3;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Scintillation::GetFastIntegralTable() const
|
||||
inline G4PhysicsTable* G4Scintillation::GetFastIntegralTable() const
|
||||
{
|
||||
return fIntegralTable1;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Scintillation::GetIntegralTable1() const
|
||||
inline G4PhysicsTable* G4Scintillation::GetIntegralTable1() const
|
||||
{
|
||||
return fIntegralTable1;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Scintillation::GetIntegralTable2() const
|
||||
inline G4PhysicsTable* G4Scintillation::GetIntegralTable2() const
|
||||
{
|
||||
return fIntegralTable2;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Scintillation::GetIntegralTable3() const
|
||||
inline G4PhysicsTable* G4Scintillation::GetIntegralTable3() const
|
||||
{
|
||||
return fIntegralTable3;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::AddSaturation(G4EmSaturation* sat)
|
||||
inline void G4Scintillation::AddSaturation(G4EmSaturation* sat)
|
||||
{
|
||||
fEmSaturation = sat;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::RemoveSaturation()
|
||||
{
|
||||
fEmSaturation = nullptr;
|
||||
}
|
||||
inline void G4Scintillation::RemoveSaturation() { fEmSaturation = nullptr; }
|
||||
|
||||
inline
|
||||
G4EmSaturation* G4Scintillation::GetSaturation() const
|
||||
inline G4EmSaturation* G4Scintillation::GetSaturation() const
|
||||
{
|
||||
return fEmSaturation;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Scintillation::GetScintillationByParticleType() const
|
||||
inline G4bool G4Scintillation::GetScintillationByParticleType() const
|
||||
{
|
||||
return fScintillationByParticleType;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetEnhancedTimeConstants(G4bool val)
|
||||
inline void G4Scintillation::SetEnhancedTimeConstants(G4bool val)
|
||||
{
|
||||
fEnhancedTimeConstants = val;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Scintillation::GetEnhancedTimeConstants() const
|
||||
inline G4bool G4Scintillation::GetEnhancedTimeConstants() const
|
||||
{
|
||||
return fEnhancedTimeConstants;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetScintillationTrackInfo(const G4bool trackType)
|
||||
inline void G4Scintillation::SetScintillationTrackInfo(const G4bool trackType)
|
||||
{
|
||||
fScintillationTrackInfo = trackType;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Scintillation::GetScintillationTrackInfo() const
|
||||
inline G4bool G4Scintillation::GetScintillationTrackInfo() const
|
||||
{
|
||||
return fScintillationTrackInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetStackPhotons(const G4bool stackingFlag)
|
||||
inline void G4Scintillation::SetStackPhotons(const G4bool stackingFlag)
|
||||
{
|
||||
fStackingFlag = stackingFlag;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Scintillation::GetStackPhotons() const
|
||||
inline G4bool G4Scintillation::GetStackPhotons() const { return fStackingFlag; }
|
||||
|
||||
inline G4int G4Scintillation::GetNumPhotons() const { return fNumPhotons; }
|
||||
|
||||
inline G4double G4Scintillation::single_exp(G4double t, G4double tau2)
|
||||
{
|
||||
return fStackingFlag;
|
||||
return std::exp(-1.0 * t / tau2) / tau2;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4Scintillation::GetNumPhotons() const
|
||||
inline G4double G4Scintillation::bi_exp(G4double t, G4double tau1,
|
||||
G4double tau2)
|
||||
{
|
||||
return fNumPhotons;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::single_exp(G4double t, G4double tau2)
|
||||
{
|
||||
return std::exp(-1.0*t/tau2)/tau2;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::bi_exp(G4double t, G4double tau1, G4double tau2)
|
||||
{
|
||||
return std::exp(-1.0*t/tau2)*(1-std::exp(-1.0*t/tau1))/tau2/tau2*(tau1+tau2);
|
||||
return std::exp(-1.0 * t / tau2) * (1 - std::exp(-1.0 * t / tau1)) / tau2 /
|
||||
tau2 * (tau1 + tau2);
|
||||
}
|
||||
|
||||
#endif /* G4Scintillation_h */
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Concrete class of G4VUserTrackInformation used to store information
|
||||
// Concrete class of G4VUserTrackInformation used to store information
|
||||
// linked to the track generated in a scintillation process.
|
||||
//
|
||||
|
||||
@@ -43,38 +43,48 @@
|
||||
#include "G4VUserTrackInformation.hh"
|
||||
|
||||
// Represents the scintillation type used to create the track (opticalphoton).
|
||||
enum G4ScintillationType {Fast, Medium, Slow};
|
||||
enum G4ScintillationType
|
||||
{
|
||||
Fast,
|
||||
Medium,
|
||||
Slow
|
||||
};
|
||||
|
||||
class G4ScintillationTrackInformation : public G4VUserTrackInformation
|
||||
{
|
||||
public:
|
||||
public:
|
||||
explicit G4ScintillationTrackInformation(
|
||||
const G4ScintillationType& aType = Slow);
|
||||
virtual ~G4ScintillationTrackInformation();
|
||||
|
||||
explicit G4ScintillationTrackInformation(const G4ScintillationType& aType = Slow);
|
||||
virtual ~G4ScintillationTrackInformation();
|
||||
|
||||
// Required by G4VUserTrackInformation
|
||||
void *operator new(size_t);
|
||||
void operator delete(void *aScintillationTI);
|
||||
|
||||
// Copy Constructor/instruction
|
||||
G4ScintillationTrackInformation(const G4ScintillationTrackInformation&);
|
||||
G4ScintillationTrackInformation& operator=(const G4ScintillationTrackInformation&);
|
||||
|
||||
virtual void Print() const override;
|
||||
|
||||
const G4ScintillationType& GetScintillationType() const {return scintillationType;}
|
||||
|
||||
// Static class allowing to check if a G4VUserTrackInformation is a
|
||||
// G4ScintillationTrackInformation and cast it without changing the
|
||||
// pointer of the pointed data.
|
||||
static G4bool IsScintillationTrackInformation(const G4VUserTrackInformation* const);
|
||||
static G4ScintillationTrackInformation* Cast(const G4VUserTrackInformation* const);
|
||||
|
||||
private:
|
||||
// Required by G4VUserTrackInformation
|
||||
void* operator new(size_t);
|
||||
void operator delete(void* aScintillationTI);
|
||||
|
||||
G4ScintillationType scintillationType;
|
||||
// String given to G4VUserTrackInformation to identify this concrete class
|
||||
static const G4String BaseType;
|
||||
// Copy Constructor/instruction
|
||||
G4ScintillationTrackInformation(const G4ScintillationTrackInformation&);
|
||||
G4ScintillationTrackInformation& operator=(
|
||||
const G4ScintillationTrackInformation&);
|
||||
|
||||
virtual void Print() const override;
|
||||
|
||||
const G4ScintillationType& GetScintillationType() const
|
||||
{
|
||||
return scintillationType;
|
||||
}
|
||||
|
||||
// Static class allowing to check if a G4VUserTrackInformation is a
|
||||
// G4ScintillationTrackInformation and cast it without changing the
|
||||
// pointer of the pointed data.
|
||||
static G4bool IsScintillationTrackInformation(
|
||||
const G4VUserTrackInformation* const);
|
||||
static G4ScintillationTrackInformation* Cast(
|
||||
const G4VUserTrackInformation* const);
|
||||
|
||||
private:
|
||||
G4ScintillationType scintillationType;
|
||||
// String given to G4VUserTrackInformation to identify this concrete class
|
||||
static const G4String BaseType;
|
||||
};
|
||||
|
||||
///
|
||||
@@ -84,23 +94,29 @@ class G4ScintillationTrackInformation : public G4VUserTrackInformation
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
// Forward declaration for the Allocator
|
||||
class G4ScintillationTrackInformation;
|
||||
class G4ScintillationTrackInformation;
|
||||
|
||||
#if defined G4EM_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4ScintillationTrackInformation>*& aScintillationTIAllocator();
|
||||
extern G4DLLEXPORT G4Allocator<G4ScintillationTrackInformation>*&
|
||||
aScintillationTIAllocator();
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4ScintillationTrackInformation>*& aScintillationTIAllocator();
|
||||
extern G4DLLIMPORT G4Allocator<G4ScintillationTrackInformation>*&
|
||||
aScintillationTIAllocator();
|
||||
#endif
|
||||
|
||||
inline void* G4ScintillationTrackInformation::operator new(size_t)
|
||||
{
|
||||
if (!aScintillationTIAllocator()) aScintillationTIAllocator() = new G4Allocator<G4ScintillationTrackInformation>;
|
||||
return (void *) aScintillationTIAllocator()->MallocSingle();
|
||||
if(!aScintillationTIAllocator())
|
||||
aScintillationTIAllocator() =
|
||||
new G4Allocator<G4ScintillationTrackInformation>;
|
||||
return (void*) aScintillationTIAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4ScintillationTrackInformation::operator delete(void *aScintillationTI)
|
||||
inline void G4ScintillationTrackInformation::operator delete(
|
||||
void* aScintillationTI)
|
||||
{
|
||||
aScintillationTIAllocator()->FreeSingle((G4ScintillationTrackInformation *) aScintillationTI);
|
||||
aScintillationTIAllocator()->FreeSingle(
|
||||
(G4ScintillationTrackInformation*) aScintillationTI);
|
||||
}
|
||||
|
||||
#endif // G4SCINTILLATIONTRACKINFORMATION_H
|
||||
#endif // G4SCINTILLATIONTRACKINFORMATION_H
|
||||
|
||||
Reference in New Issue
Block a user