Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.15 2002/05/16 21:22:10 gum Exp $
|
||||
$Id: History,v 1.18 2002/11/25 18:50:19 gum Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,19 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
25 November 02: P. Gumplinger (xrays-V04-01-03)
|
||||
- G4Scintillation now allows for particle dependent excitation levels
|
||||
|
||||
21 November 02: P. Gumplinger (xrays-V04-01-02)
|
||||
- G4Scintillation now uses G4Poisson for small MeanNumPhotons in a step
|
||||
|
||||
14 November 02: P. Gumplinger (xrays-V04-01-01)
|
||||
- G4Scintillation now uses the nearest integer to calculate the number of photons in DoIt
|
||||
|
||||
07 November 02: P. Gumplinger (xrays-V04-01-00)
|
||||
- G4Scintillation now allows for fast and slow components. Scintillation properties are stored
|
||||
with the material and retrieved with GetConstProperty.
|
||||
|
||||
16 may 02: P. Gumplinger (xrays-V04-00-04)
|
||||
- G4Scintillation now inherits from G4VRestDiscreteProcess changes made accordingly
|
||||
G4Scintillation/G4Cerenkov now only suspend the track when it is still 'fAlive'
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Cerenkov.hh,v 1.5 2001/07/11 10:03:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ForwardXrayTR.hh,v 1.7 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// G4ForwardXrayTR -- header file
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaXTRadiator.hh,v 1.1 2002/01/22 15:22:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXTRadiator.hh,v 1.2 2002/01/18 17:26:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scintillation.hh,v 1.8 2002/05/16 21:19:39 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Scintillation.hh,v 1.11 2002/11/25 18:48:51 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -34,7 +34,10 @@
|
||||
// Version: 1.0
|
||||
// Created: 1998-11-07
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 2002-05-16 changed to inherit from VRestDiscreteProcess
|
||||
// Updated: 2002-11-21 change to user G4Poisson for small MeanNumPotons
|
||||
// 2002-11-07 allow for fast and slow scintillation
|
||||
// 2002-11-05 make use of constant material properties
|
||||
// 2002-05-16 changed to inherit from VRestDiscreteProcess
|
||||
// 2002-05-09 changed IsApplicable method
|
||||
// 1999-10-29 add method and class descriptors
|
||||
//
|
||||
@@ -52,6 +55,7 @@
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Poisson.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleMomentum.hh"
|
||||
#include "G4Step.hh"
|
||||
@@ -113,14 +117,14 @@ public: // With description
|
||||
G4double ,
|
||||
G4ForceCondition* );
|
||||
// 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.
|
||||
// but sets the 'StronglyForced' condition for the DoIt to be
|
||||
// invoked at every step.
|
||||
|
||||
G4double GetMeanLifeTime(const G4Track& aTrack,
|
||||
G4ForceCondition* );
|
||||
// Returns infinity; i. e. the process does not limit the time,
|
||||
// but sets the 'Forced' condition for the DoIt to be invoked at
|
||||
// every step.
|
||||
// but sets the 'StronglyForced' condition for the DoIt to be
|
||||
// invoked at every step.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
@@ -137,34 +141,37 @@ public: // With description
|
||||
G4bool GetTrackSecondariesFirst() const;
|
||||
// Returns the boolean flag for tracking secondaries first.
|
||||
|
||||
void SetScintillationYield(const G4double yield);
|
||||
// Called to set the scintillation photon yield per unit of
|
||||
// energy deposition. IMPORTANT: 'yield' has units of 1/energy
|
||||
// and is not a simple number!
|
||||
G4double GetScintillationYield() const;
|
||||
// Returns the photon yield per energy unit.
|
||||
void SetScintillationYieldFactor(const G4double yieldfactor);
|
||||
// Called to set the scintillation photon yield factor, needed when
|
||||
// the yield is different for different types of particles. This
|
||||
// scales the yield obtained from the G4MaterialPropertiesTable.
|
||||
|
||||
void SetResolutionScale(const G4double scale);
|
||||
// Called to set sigma of the Gaussian photon yield distribution.
|
||||
G4double GetResolutionScale() const;
|
||||
// Returns the sigma of the Gaussian photon yield distribution.
|
||||
G4double GetScintillationYieldFactor() const;
|
||||
// Returns the photon yield factor.
|
||||
|
||||
void SetScintillationTime(const G4double time);
|
||||
// Called to set the exponential time constant for the delayed
|
||||
// scintillation photon emission.
|
||||
G4double GetScintillationTime() const;
|
||||
// Returns the exponential time constant for the delayed
|
||||
// scintillation photon emission.
|
||||
void SetScintillationExcitationRatio(const G4double excitationratio);
|
||||
// Called to set the scintillation exciation ratio, needed when
|
||||
// the scintillation level excitation is different for different
|
||||
// types of particles. This overwrites the YieldRatio obtained
|
||||
// from the G4MaterialPropertiesTable.
|
||||
|
||||
G4PhysicsTable* GetPhysicsTable() const;
|
||||
// Returns the address of the physics table.
|
||||
G4double GetScintillationExcitationRatio() const;
|
||||
// Returns the scintillation level excitation ratio.
|
||||
|
||||
G4PhysicsTable* GetFastIntegralTable() const;
|
||||
// Returns the address of the fast scintillation integral table.
|
||||
|
||||
G4PhysicsTable* GetSlowIntegralTable() const;
|
||||
// Returns the address of the slow scintillation integral table.
|
||||
|
||||
void DumpPhysicsTable() const;
|
||||
// Prints the physics table.
|
||||
// Prints the fast and slow scintillation integral tables.
|
||||
|
||||
private:
|
||||
|
||||
void BuildThePhysicsTable();
|
||||
// It builds either the fast or slow scintillation integral table;
|
||||
// or both.
|
||||
|
||||
///////////////////////
|
||||
// Class Data Members
|
||||
@@ -172,18 +179,16 @@ private:
|
||||
|
||||
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).
|
||||
G4PhysicsTable* theSlowIntegralTable;
|
||||
G4PhysicsTable* theFastIntegralTable;
|
||||
|
||||
private:
|
||||
|
||||
G4bool fTrackSecondariesFirst;
|
||||
|
||||
G4double ScintillationYield;
|
||||
G4double ScintillationTime;
|
||||
G4double ResolutionScale;
|
||||
G4double YieldFactor;
|
||||
|
||||
G4double ExcitationRatio;
|
||||
|
||||
};
|
||||
|
||||
@@ -214,58 +219,65 @@ G4bool G4Scintillation::GetTrackSecondariesFirst() const
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetScintillationYield(const G4double yield)
|
||||
void G4Scintillation::SetScintillationYieldFactor(const G4double yieldfactor)
|
||||
{
|
||||
ScintillationYield = yield;
|
||||
YieldFactor = yieldfactor;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::GetScintillationYield() const
|
||||
G4double G4Scintillation::GetScintillationYieldFactor() const
|
||||
{
|
||||
return ScintillationYield;
|
||||
return YieldFactor;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetResolutionScale(const G4double scale)
|
||||
void G4Scintillation::SetScintillationExcitationRatio(const G4double excitationratio)
|
||||
{
|
||||
ResolutionScale = scale;
|
||||
ExcitationRatio = excitationratio;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::GetResolutionScale() const
|
||||
G4double G4Scintillation::GetScintillationExcitationRatio() const
|
||||
{
|
||||
return ResolutionScale;
|
||||
return ExcitationRatio;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::SetScintillationTime(const G4double time)
|
||||
G4PhysicsTable* G4Scintillation::GetSlowIntegralTable() const
|
||||
{
|
||||
ScintillationTime = time;
|
||||
return theSlowIntegralTable;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4Scintillation::GetScintillationTime() const
|
||||
G4PhysicsTable* G4Scintillation::GetFastIntegralTable() const
|
||||
{
|
||||
return ScintillationTime;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PhysicsTable* G4Scintillation::GetPhysicsTable() const
|
||||
{
|
||||
return thePhysicsTable;
|
||||
return theFastIntegralTable;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Scintillation::DumpPhysicsTable() const
|
||||
{
|
||||
G4int PhysicsTableSize = thePhysicsTable->entries();
|
||||
G4PhysicsOrderedFreeVector *v;
|
||||
if (theFastIntegralTable) {
|
||||
G4int PhysicsTableSize = theFastIntegralTable->entries();
|
||||
G4PhysicsOrderedFreeVector *v;
|
||||
|
||||
for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
|
||||
{
|
||||
v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i];
|
||||
for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
|
||||
{
|
||||
v = (G4PhysicsOrderedFreeVector*)(*theFastIntegralTable)[i];
|
||||
v->DumpValues();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (theSlowIntegralTable) {
|
||||
G4int PhysicsTableSize = theSlowIntegralTable->entries();
|
||||
G4PhysicsOrderedFreeVector *v;
|
||||
|
||||
for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
|
||||
{
|
||||
v = (G4PhysicsOrderedFreeVector*)(*theSlowIntegralTable)[i];
|
||||
v->DumpValues();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* G4Scintillation_h */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TransitionRadiation.hh,v 1.6 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// G4TransitionRadiation -- header file
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VXTRenergyLoss.hh,v 1.3 2002/01/18 17:26:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Cerenkov.cc,v 1.13 2002/05/16 21:21:14 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Cerenkov Radiation Class Implementation
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ForwardXrayTR.cc,v 1.7 2001/10/24 16:40:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// G4ForwardXrayTR class -- implementation file
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaXTRadiator.cc,v 1.1 2002/01/22 15:22:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXTRadiator.cc,v 1.2 2002/01/18 17:26:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scintillation.cc,v 1.10 2002/05/16 21:20:11 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Scintillation.cc,v 1.16 2002/11/26 00:52:13 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Scintillation Light Class Implementation
|
||||
@@ -33,7 +33,13 @@
|
||||
// Version: 1.0
|
||||
// Created: 1998-11-07
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 2002-05-09 by Peter Gumplinger
|
||||
// Updated: 2002-11-21 by Peter Gumplinger
|
||||
// > change to use G4Poisson for small MeanNumPhotons
|
||||
// 2002-11-07 by Peter Gumplinger
|
||||
// > now allow for fast and slow scintillation component
|
||||
// 2002-11-05 by Peter Gumplinger
|
||||
// > now use scintillation constants from G4Material
|
||||
// 2002-05-09 by Peter Gumplinger
|
||||
// > use only the PostStepPoint location for the origin of
|
||||
// scintillation photons when energy is lost to the medium
|
||||
// by a neutral particle
|
||||
@@ -70,11 +76,11 @@ G4Scintillation::G4Scintillation(const G4String& processName)
|
||||
{
|
||||
fTrackSecondariesFirst = false;
|
||||
|
||||
ScintillationYield = 0.0;
|
||||
ScintillationTime = 0.0;
|
||||
ResolutionScale = 1.0;
|
||||
YieldFactor = 1.0;
|
||||
ExcitationRatio = 1.0;
|
||||
|
||||
thePhysicsTable = NULL;
|
||||
theFastIntegralTable = NULL;
|
||||
theSlowIntegralTable = NULL;
|
||||
|
||||
if (verboseLevel>0) {
|
||||
G4cout << GetProcessName() << " is created " << G4endl;
|
||||
@@ -83,20 +89,20 @@ G4Scintillation::G4Scintillation(const G4String& processName)
|
||||
BuildThePhysicsTable();
|
||||
}
|
||||
|
||||
// G4Scintillation::G4Scintillation(const G4Scintillation &right)
|
||||
// {
|
||||
// }
|
||||
|
||||
////////////////
|
||||
// Destructors
|
||||
////////////////
|
||||
|
||||
G4Scintillation::~G4Scintillation()
|
||||
{
|
||||
if (thePhysicsTable != NULL) {
|
||||
thePhysicsTable->clearAndDestroy();
|
||||
delete thePhysicsTable;
|
||||
if (theFastIntegralTable != NULL) {
|
||||
theFastIntegralTable->clearAndDestroy();
|
||||
delete theFastIntegralTable;
|
||||
}
|
||||
if (theSlowIntegralTable != NULL) {
|
||||
theSlowIntegralTable->clearAndDestroy();
|
||||
delete theSlowIntegralTable;
|
||||
}
|
||||
}
|
||||
|
||||
////////////
|
||||
@@ -123,9 +129,9 @@ G4VParticleChange*
|
||||
G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
// This routine is called for each tracking step of a charged particle
|
||||
// in a scintillator. A Gaussian-distributed number of photons is generated
|
||||
// according to the scintillation yield formula, distributed evenly along
|
||||
// the track segment and uniformly into 4pi.
|
||||
// in a scintillator. A Poisson/Gauss-distributed number of photons is
|
||||
// generated according to the scintillation yield formula, distributed
|
||||
// evenly along the track segment and uniformly into 4pi.
|
||||
|
||||
{
|
||||
aParticleChange.Initialize(aTrack);
|
||||
@@ -147,23 +153,42 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
if (!aMaterialPropertiesTable)
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
const G4MaterialPropertyVector* Intensity =
|
||||
aMaterialPropertiesTable->GetProperty("SCINTILLATION");
|
||||
if (!Intensity)
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
const G4MaterialPropertyVector* Fast_Intensity =
|
||||
aMaterialPropertiesTable->GetProperty("FASTCOMPONENT");
|
||||
const G4MaterialPropertyVector* Slow_Intensity =
|
||||
aMaterialPropertiesTable->GetProperty("SLOWCOMPONENT");
|
||||
|
||||
if (!Fast_Intensity && !Slow_Intensity )
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
G4int nscnt = 1;
|
||||
if (Fast_Intensity && Slow_Intensity) nscnt = 2;
|
||||
|
||||
G4double ScintillationYield = aMaterialPropertiesTable->
|
||||
GetConstProperty("SCINTILLATIONYIELD");
|
||||
G4double ResolutionScale = aMaterialPropertiesTable->
|
||||
GetConstProperty("RESOLUTIONSCALE");
|
||||
|
||||
ScintillationYield = YieldFactor * ScintillationYield;
|
||||
|
||||
G4double MeanNumPhotons = ScintillationYield * TotalEnergyDeposit;
|
||||
|
||||
G4int NumPhotons = (G4int) MeanNumPhotons +
|
||||
int( ResolutionScale * G4RandGauss::shoot(0.0,sqrt(MeanNumPhotons)));
|
||||
G4int NumPhotons;
|
||||
if (MeanNumPhotons > 10.) {
|
||||
G4double sigma = ResolutionScale * sqrt(MeanNumPhotons);
|
||||
NumPhotons = G4int(G4RandGauss::shoot(MeanNumPhotons,sigma)+0.5);
|
||||
}
|
||||
else {
|
||||
NumPhotons = G4int(G4Poisson(MeanNumPhotons));
|
||||
}
|
||||
|
||||
if (NumPhotons <= 0) {
|
||||
|
||||
// return unchanged particle and no secondaries
|
||||
// return unchanged particle and no secondaries
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -182,14 +207,58 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
// Retrieve the Scintillation Integral for this material
|
||||
// new G4PhysicsOrderedFreeVector allocated to hold CII's
|
||||
|
||||
G4PhysicsOrderedFreeVector* ScintillationIntegral =
|
||||
(G4PhysicsOrderedFreeVector*)((*thePhysicsTable)(materialIndex));
|
||||
G4int Num = NumPhotons;
|
||||
|
||||
for (G4int scnt = 1; scnt <= nscnt; scnt++) {
|
||||
|
||||
G4double ScintillationTime = 0.*ns;
|
||||
G4PhysicsOrderedFreeVector* ScintillationIntegral = NULL;
|
||||
|
||||
if (scnt == 1) {
|
||||
if (nscnt == 1) {
|
||||
if(Fast_Intensity){
|
||||
ScintillationTime = aMaterialPropertiesTable->
|
||||
GetConstProperty("FASTTIMECONSTANT");
|
||||
ScintillationIntegral =
|
||||
(G4PhysicsOrderedFreeVector*)((*theFastIntegralTable)(materialIndex));
|
||||
}
|
||||
if(Slow_Intensity){
|
||||
ScintillationTime = aMaterialPropertiesTable->
|
||||
GetConstProperty("SLOWTIMECONSTANT");
|
||||
ScintillationIntegral =
|
||||
(G4PhysicsOrderedFreeVector*)((*theSlowIntegralTable)(materialIndex));
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4double YieldRatio = aMaterialPropertiesTable->
|
||||
GetConstProperty("YIELDRATIO");
|
||||
if ( ExcitationRatio == 1.0 ) {
|
||||
Num = G4int (G4std::min(YieldRatio,1.0) * NumPhotons);
|
||||
}
|
||||
else {
|
||||
Num = G4int (G4std::min(ExcitationRatio,1.0) * NumPhotons);
|
||||
}
|
||||
ScintillationTime = aMaterialPropertiesTable->
|
||||
GetConstProperty("FASTTIMECONSTANT");
|
||||
ScintillationIntegral =
|
||||
(G4PhysicsOrderedFreeVector*)((*theFastIntegralTable)(materialIndex));
|
||||
}
|
||||
}
|
||||
else {
|
||||
Num = NumPhotons - Num;
|
||||
ScintillationTime = aMaterialPropertiesTable->
|
||||
GetConstProperty("SLOWTIMECONSTANT");
|
||||
ScintillationIntegral =
|
||||
(G4PhysicsOrderedFreeVector*)((*theSlowIntegralTable)(materialIndex));
|
||||
}
|
||||
|
||||
if (!ScintillationIntegral) continue;
|
||||
|
||||
// Max Scintillation Integral
|
||||
// Max Scintillation Integral
|
||||
|
||||
G4double CIImax = ScintillationIntegral->GetMaxValue();
|
||||
G4double CIImax = ScintillationIntegral->GetMaxValue();
|
||||
|
||||
for (G4int i = 0; i < NumPhotons; i++) {
|
||||
for (G4int i = 0; i < Num; i++) {
|
||||
|
||||
// Determine photon momentum
|
||||
|
||||
@@ -281,7 +350,8 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
aParticleChange.AddSecondary(aSecondaryTrack);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (verboseLevel>0) {
|
||||
G4cout << "\n Exiting from G4Scintillation::DoIt -- NumberOfSecondaries = "
|
||||
@@ -297,7 +367,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
void G4Scintillation::BuildThePhysicsTable()
|
||||
{
|
||||
if (thePhysicsTable) return;
|
||||
if (theFastIntegralTable && theSlowIntegralTable) return;
|
||||
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
@@ -305,7 +375,8 @@ void G4Scintillation::BuildThePhysicsTable()
|
||||
|
||||
// create new physics table
|
||||
|
||||
thePhysicsTable = new G4PhysicsTable(numOfMaterials);
|
||||
if(!theFastIntegralTable)theFastIntegralTable = new G4PhysicsTable(numOfMaterials);
|
||||
if(!theSlowIntegralTable)theSlowIntegralTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
// loop for materials
|
||||
|
||||
@@ -313,10 +384,11 @@ void G4Scintillation::BuildThePhysicsTable()
|
||||
{
|
||||
G4PhysicsOrderedFreeVector* aPhysicsOrderedFreeVector =
|
||||
new G4PhysicsOrderedFreeVector();
|
||||
G4PhysicsOrderedFreeVector* bPhysicsOrderedFreeVector =
|
||||
new G4PhysicsOrderedFreeVector();
|
||||
|
||||
// Retrieve vector of scintillation wavelength intensity
|
||||
// for the material from the material's optical
|
||||
// properties table
|
||||
// Retrieve vector of scintillation wavelength intensity for
|
||||
// the material from the material's optical properties table.
|
||||
|
||||
G4Material* aMaterial = (*theMaterialTable)[i];
|
||||
|
||||
@@ -325,18 +397,18 @@ void G4Scintillation::BuildThePhysicsTable()
|
||||
|
||||
if (aMaterialPropertiesTable) {
|
||||
|
||||
G4MaterialPropertyVector* theScintillationLightVector =
|
||||
aMaterialPropertiesTable->GetProperty("SCINTILLATION");
|
||||
G4MaterialPropertyVector* theFastLightVector =
|
||||
aMaterialPropertiesTable->GetProperty("FASTCOMPONENT");
|
||||
|
||||
if (theScintillationLightVector) {
|
||||
if (theFastLightVector) {
|
||||
|
||||
// Retrieve the first intensity point in vector
|
||||
// of (photon momentum, intensity) pairs
|
||||
|
||||
theScintillationLightVector->ResetIterator();
|
||||
++(*theScintillationLightVector); // advance to 1st entry
|
||||
theFastLightVector->ResetIterator();
|
||||
++(*theFastLightVector); // advance to 1st entry
|
||||
|
||||
G4double currentIN = theScintillationLightVector->
|
||||
G4double currentIN = theFastLightVector->
|
||||
GetProperty();
|
||||
|
||||
if (currentIN >= 0.0) {
|
||||
@@ -344,7 +416,7 @@ void G4Scintillation::BuildThePhysicsTable()
|
||||
// Create first (photon momentum, Scintillation
|
||||
// Integral pair
|
||||
|
||||
G4double currentPM = theScintillationLightVector->
|
||||
G4double currentPM = theFastLightVector->
|
||||
GetPhotonMomentum();
|
||||
|
||||
G4double currentCII = 0.0;
|
||||
@@ -361,12 +433,12 @@ void G4Scintillation::BuildThePhysicsTable()
|
||||
// loop over all (photon momentum, intensity)
|
||||
// pairs stored for this material
|
||||
|
||||
while(++(*theScintillationLightVector))
|
||||
while(++(*theFastLightVector))
|
||||
{
|
||||
currentPM = theScintillationLightVector->
|
||||
currentPM = theFastLightVector->
|
||||
GetPhotonMomentum();
|
||||
|
||||
currentIN=theScintillationLightVector->
|
||||
currentIN=theFastLightVector->
|
||||
GetProperty();
|
||||
|
||||
currentCII = 0.5 * (prevIN + currentIN);
|
||||
@@ -384,14 +456,74 @@ void G4Scintillation::BuildThePhysicsTable()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
G4MaterialPropertyVector* theSlowLightVector =
|
||||
aMaterialPropertiesTable->GetProperty("SLOWCOMPONENT");
|
||||
|
||||
if (theSlowLightVector) {
|
||||
|
||||
// Retrieve the first intensity point in vector
|
||||
// of (photon momentum, intensity) pairs
|
||||
|
||||
theSlowLightVector->ResetIterator();
|
||||
++(*theSlowLightVector); // advance to 1st entry
|
||||
|
||||
G4double currentIN = theSlowLightVector->
|
||||
GetProperty();
|
||||
|
||||
if (currentIN >= 0.0) {
|
||||
|
||||
// Create first (photon momentum, Scintillation
|
||||
// Integral pair
|
||||
|
||||
G4double currentPM = theSlowLightVector->
|
||||
GetPhotonMomentum();
|
||||
|
||||
G4double currentCII = 0.0;
|
||||
|
||||
bPhysicsOrderedFreeVector->
|
||||
InsertValues(currentPM , currentCII);
|
||||
|
||||
// Set previous values to current ones prior to loop
|
||||
|
||||
G4double prevPM = currentPM;
|
||||
G4double prevCII = currentCII;
|
||||
G4double prevIN = currentIN;
|
||||
|
||||
// loop over all (photon momentum, intensity)
|
||||
// pairs stored for this material
|
||||
|
||||
while(++(*theSlowLightVector))
|
||||
{
|
||||
currentPM = theSlowLightVector->
|
||||
GetPhotonMomentum();
|
||||
|
||||
currentIN=theSlowLightVector->
|
||||
GetProperty();
|
||||
|
||||
currentCII = 0.5 * (prevIN + currentIN);
|
||||
|
||||
currentCII = prevCII +
|
||||
(currentPM - prevPM) * currentCII;
|
||||
|
||||
bPhysicsOrderedFreeVector->
|
||||
InsertValues(currentPM, currentCII);
|
||||
|
||||
prevPM = currentPM;
|
||||
prevCII = currentCII;
|
||||
prevIN = currentIN;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The scintillation integral for a given material
|
||||
// will be inserted in thePhysicsTable
|
||||
// according to the position of the material in
|
||||
// the material table.
|
||||
// The scintillation integral(s) for a given material
|
||||
// will be inserted in the table(s) according to the
|
||||
// position of the material in the material table.
|
||||
|
||||
thePhysicsTable->insertAt(i,aPhysicsOrderedFreeVector);
|
||||
theFastIntegralTable->insertAt(i,aPhysicsOrderedFreeVector);
|
||||
theSlowIntegralTable->insertAt(i,bPhysicsOrderedFreeVector);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -404,7 +536,7 @@ G4double G4Scintillation::GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
*condition = StronglyForced;
|
||||
|
||||
return DBL_MAX;
|
||||
|
||||
@@ -417,7 +549,7 @@ G4double G4Scintillation::GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double G4Scintillation::GetMeanLifeTime(const G4Track& aTrack,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
*condition = StronglyForced;
|
||||
|
||||
return DBL_MAX;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TransitionRadiation.cc,v 1.3 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// G4TransitionRadiation class -- implementation file
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VXTRenergyLoss.cc,v 1.5 2002/03/28 07:58:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
|
||||
Reference in New Issue
Block a user