Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.2 2000/10/24 13:55:28 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.3 2002/01/15 16:45:54 grichine Exp $
|
||||
# --------------------------------------------------------------------
|
||||
# GNUmakefile for electromagnetic sub-library. John Allison, 25/6/98.
|
||||
# --------------------------------------------------------------------
|
||||
@@ -15,6 +15,7 @@ CPPFLAGS += \
|
||||
-I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.9 2001/11/12 10:59:26 maire Exp $
|
||||
$Id: History,v 1.15 2002/05/16 21:22:10 gum Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,26 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
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'
|
||||
|
||||
09 may 02: P. Gumplinger (xrays-V04-00-03)
|
||||
- changed method 'DoIt' in G4Scintillation so that origin of optical photons is
|
||||
the PostStepPoint location in case energy is lost to the medium by a neutral
|
||||
particle.
|
||||
|
||||
09 may 02: P. Gumplinger (xrays-V04-00-02)
|
||||
- changed method 'IsApplicable' for G4Scintillation to return .false. when it
|
||||
is called for an optical photon.
|
||||
|
||||
28 mar 02: G. Cosmo (xrays-V04-00-01)
|
||||
- fixed endl/G4endl compilation problem in G4VXTRenergyLoss.cc ...
|
||||
|
||||
22 mar 02: V. Grichine (xrays-V04-00-00)
|
||||
- new classes (G4VXTRenergyLoss,G4GammaXTRadiator and G4RegularXTRadiator) were
|
||||
added for the description of X-ray transition radiation as continuous process.
|
||||
|
||||
12 nov 01: mma (xrays-V03-02-02)
|
||||
- merge of 00a and 01
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Cerenkov.hh,v 1.5 2001/07/11 10:03:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ForwardXrayTR.hh,v 1.7 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// G4ForwardXrayTR -- header file
|
||||
//
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaXTRadiator.hh,v 1.1 2002/01/22 15:22:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough process describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are distributed according to gamma
|
||||
// distribution. x are thicknesses of plates or gas gaps:
|
||||
//
|
||||
// p(x) = (alpha/<x>)^alpha * x^(alpha-1) * exp(-alpha*x/<x>) / G(alpha)
|
||||
//
|
||||
// G(alpha) is Euler's gamma function.
|
||||
// Plates have mean <x> = fPlateThick > 0 and power alpha = fAlphaPlate > 0 :
|
||||
// Gas gaps have mean <x> = fGasThick > 0 and power alpha = fAlphaGas > 0 :
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 21.01.02 V. Grichine, first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4GammaXTRadiator_h
|
||||
#define G4GammaXTRadiator_h 1
|
||||
|
||||
#include "G4VXTRenergyLoss.hh"
|
||||
|
||||
class G4GammaXTRadiator : public G4VXTRenergyLoss
|
||||
{
|
||||
public:
|
||||
|
||||
G4GammaXTRadiator (G4LogicalVolume *anEnvelope,
|
||||
G4double,G4double,
|
||||
G4Material*,G4Material*,
|
||||
G4double,G4double,G4int,
|
||||
const G4String & processName = "XTRgammaRadiator");
|
||||
~G4GammaXTRadiator ();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
|
||||
private:
|
||||
|
||||
G4double fAlphaPlate, fAlphaGas ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXTRadiator.hh,v 1.2 2002/01/18 17:26:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Process describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are fixed.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 16.01.02 V. Grichine, first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4RegularXTRadiator_h
|
||||
#define G4RegularXTRadiator_h 1
|
||||
|
||||
#include "G4VXTRenergyLoss.hh"
|
||||
|
||||
class G4RegularXTRadiator : public G4VXTRenergyLoss
|
||||
{
|
||||
public:
|
||||
|
||||
G4RegularXTRadiator (G4LogicalVolume *anEnvelope,G4Material*,G4Material*,
|
||||
G4double,G4double,G4int,
|
||||
const G4String & processName = "XTRegularRadiator");
|
||||
~G4RegularXTRadiator ();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scintillation.hh,v 1.5 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Scintillation.hh,v 1.8 2002/05/16 21:19:39 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -34,7 +34,9 @@
|
||||
// Version: 1.0
|
||||
// Created: 1998-11-07
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 1999-10-29 add method and class descriptors
|
||||
// Updated: 2002-05-16 changed to inherit from VRestDiscreteProcess
|
||||
// 2002-05-09 changed IsApplicable method
|
||||
// 1999-10-29 add method and class descriptors
|
||||
//
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
@@ -53,7 +55,7 @@
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleMomentum.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4VRestDiscreteProcess.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Material.hh"
|
||||
@@ -62,15 +64,15 @@
|
||||
#include "G4PhysicsOrderedFreeVector.hh"
|
||||
|
||||
// Class Description:
|
||||
// Discrete Process - Generation of Scintillation Photons.
|
||||
// Class inherits publicly from G4VDiscreteProcess.
|
||||
// RestDiscrete Process - Generation of Scintillation Photons.
|
||||
// Class inherits publicly from G4VRestDiscreteProcess.
|
||||
// Class Description - End:
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
class G4Scintillation : public G4VDiscreteProcess
|
||||
class G4Scintillation : public G4VRestDiscreteProcess
|
||||
{
|
||||
|
||||
private:
|
||||
@@ -99,8 +101,13 @@ public: // Without description
|
||||
|
||||
public: // With description
|
||||
|
||||
// G4Scintillation Process has both PostStepDoIt (for energy
|
||||
// deposition of particles in flight) and AtRestDoIt (for energy
|
||||
// given to the medium by particles at rest)
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
|
||||
// Returns true -> 'is applicable', for any particle type.
|
||||
// Returns true -> 'is applicable', for any particle type except
|
||||
// for an 'opticalphoton'
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double ,
|
||||
@@ -109,9 +116,18 @@ public: // With description
|
||||
// but sets the 'Forced' 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.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
// This is the method implementing the scintillation process.
|
||||
G4VParticleChange* AtRestDoIt (const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
|
||||
// These are the methods implementing the scintillation process.
|
||||
|
||||
void SetTrackSecondariesFirst(const G4bool state);
|
||||
// If set, the primary particle tracking is interrupted and any
|
||||
@@ -178,7 +194,11 @@ private:
|
||||
inline
|
||||
G4bool G4Scintillation::IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
return true;
|
||||
if (aParticleType.GetParticleName() == "opticalphoton"){
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TransitionRadiation.hh,v 1.6 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// G4TransitionRadiation -- header file
|
||||
//
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VXTRenergyLoss.hh,v 1.3 2002/01/18 17:26:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// base class for 'fast' parametrisation model describing X-ray transition
|
||||
// created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
|
||||
// method
|
||||
//
|
||||
// History:
|
||||
// 15.01.02 V. Grichine first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4VXTRenergyLoss_h
|
||||
#define G4VXTRenergyLoss_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
#include "g4std/complex"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleMomentum.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VContinuousProcess.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4PhysicsOrderedFreeVector.hh"
|
||||
#include "G4Integrator.hh"
|
||||
|
||||
|
||||
class G4VXTRenergyLoss : public G4VContinuousProcess
|
||||
{
|
||||
public:
|
||||
|
||||
G4VXTRenergyLoss (G4LogicalVolume *anEnvelope,G4Material*,G4Material*,
|
||||
G4double,G4double,G4int,
|
||||
const G4String & processName = "XTRenergyLoss");
|
||||
virtual ~G4VXTRenergyLoss ();
|
||||
|
||||
// Pure virtuals must be implemented in inherited particular TR radiators
|
||||
|
||||
virtual G4double GetStackFactor( G4double energy, G4double gamma,
|
||||
G4double varAngle ) = 0 ;
|
||||
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
G4double GetContinuousStepLimit(const G4Track& aTrack,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& );
|
||||
// Returns the continuous step limit defined by the XTR process.
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
|
||||
void BuildTable() ;
|
||||
void BuildEnergyTable() ;
|
||||
void BuildAngleTable() ;
|
||||
|
||||
G4complex OneInterfaceXTRdEdx( G4double energy,
|
||||
G4double gamma,
|
||||
G4double varAngle ) ;
|
||||
|
||||
G4double SpectralAngleXTRdEdx(G4double varAngle) ;
|
||||
|
||||
G4double SpectralXTRdEdx(G4double energy) ;
|
||||
|
||||
G4double AngleSpectralXTRdEdx(G4double energy) ;
|
||||
|
||||
G4double AngleXTRdEdx(G4double varAngle) ;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
G4double OneBoundaryXTRNdensity( G4double energy,
|
||||
G4double gamma,
|
||||
G4double varAngle ) const ;
|
||||
|
||||
|
||||
// for photon energy distribution tables
|
||||
|
||||
G4double XTRNSpectralAngleDensity(G4double varAngle) ;
|
||||
G4double XTRNSpectralDensity(G4double energy) ;
|
||||
|
||||
// for photon angle distribution tables
|
||||
|
||||
G4double XTRNAngleSpectralDensity(G4double energy) ;
|
||||
G4double XTRNAngleDensity(G4double varAngle) ;
|
||||
|
||||
void GetNumberOfPhotons() ;
|
||||
|
||||
// Auxiliary functions for plate/gas material parameters
|
||||
|
||||
G4double GetPlateFormationZone(G4double,G4double,G4double) ;
|
||||
G4complex GetPlateComplexFZ(G4double,G4double,G4double) ;
|
||||
void ComputePlatePhotoAbsCof() ;
|
||||
G4double GetPlateLinearPhotoAbs(G4double) ;
|
||||
void GetPlateZmuProduct() ;
|
||||
G4double GetPlateZmuProduct(G4double,G4double,G4double) ;
|
||||
|
||||
G4double GetGasFormationZone(G4double,G4double,G4double) ;
|
||||
G4complex GetGasComplexFZ(G4double,G4double,G4double) ;
|
||||
void ComputeGasPhotoAbsCof() ;
|
||||
G4double GetGasLinearPhotoAbs(G4double) ;
|
||||
void GetGasZmuProduct() ;
|
||||
G4double GetGasZmuProduct(G4double,G4double,G4double) ;
|
||||
|
||||
G4double GetXTRrandomEnergy( G4double scaledTkin, G4int iTkin ) ;
|
||||
G4double GetXTRenergy( G4int iPlace, G4double position, G4int iTransfer ) ;
|
||||
|
||||
protected:
|
||||
|
||||
G4Gamma* fPtrGamma ; // pointer to TR photon
|
||||
|
||||
G4double* fGammaCutInKineticEnergy ; // TR photon cut in energy array
|
||||
G4double fGammaTkinCut ; // Tkin cut of TR photon in current mat.
|
||||
G4LogicalVolume* fEnvelope ;
|
||||
G4PhysicsTable* fAngleDistrTable ;
|
||||
G4PhysicsTable* fEnergyDistrTable ;
|
||||
|
||||
static G4PhysicsLogVector* fProtonEnergyVector ;
|
||||
|
||||
|
||||
static G4double fTheMinEnergyTR ; // static min TR energy
|
||||
static G4double fTheMaxEnergyTR ; // static max TR energy
|
||||
G4double fMinEnergyTR ; // min TR energy in material
|
||||
G4double fMaxEnergyTR ; // max TR energy in material
|
||||
static G4double fTheMaxAngle ; // max theta of TR quanta
|
||||
static G4double fTheMinAngle ; // max theta of TR quanta
|
||||
G4double fMaxThetaTR ; // max theta of TR quanta
|
||||
static G4int fBinTR ; // number of bins in TR vectors
|
||||
|
||||
static G4double fMinProtonTkin ; // min Tkin of proton in tables
|
||||
static G4double fMaxProtonTkin ; // max Tkin of proton in tables
|
||||
static G4int fTotBin ; // number of bins in log scale
|
||||
G4double fGamma ; // current Lorentz factor
|
||||
G4double fEnergy ; // energy and
|
||||
G4double fVarAngle ; // angle squared
|
||||
|
||||
static G4double fPlasmaCof ; // physical consts for plasma energy
|
||||
static G4double fCofTR ;
|
||||
|
||||
G4double fSigma1, fSigma2 ; // plasma energy Sq of matter1/2
|
||||
|
||||
G4int fMatIndex1, fMatIndex2 ;
|
||||
|
||||
G4int fPlateNumber ;
|
||||
G4double fTotalDist ;
|
||||
G4double** fPlatePhotoAbsCof ;
|
||||
G4int fPlateIntervalNumber ;
|
||||
G4double fPlateThick ;
|
||||
|
||||
G4double** fGasPhotoAbsCof ;
|
||||
G4int fGasIntervalNumber ;
|
||||
G4double fGasThick ;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cerenkov.cc,v 1.12 2001/11/07 17:07:40 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Cerenkov.cc,v 1.13 2002/05/16 21:21:14 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Cerenkov Radiation Class Implementation
|
||||
@@ -181,8 +181,10 @@ G4Cerenkov::AlongStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(NumPhotons);
|
||||
|
||||
if (fTrackSecondariesFirst)
|
||||
aParticleChange.SetStatusChange(fSuspend);
|
||||
if (fTrackSecondariesFirst) {
|
||||
if (aTrack.GetTrackStatus() == fAlive )
|
||||
aParticleChange.SetStatusChange(fSuspend);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ForwardXrayTR.cc,v 1.7 2001/10/24 16:40:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// G4ForwardXrayTR class -- implementation file
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaXTRadiator.cc,v 1.1 2002/01/22 15:22:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4GammaXTRadiator.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4GammaXTRadiator::G4GammaXTRadiator(G4LogicalVolume* anEnvelope,
|
||||
G4double alphaPlate,
|
||||
G4double alphaGas,
|
||||
G4Material* foilMat,G4Material* gasMat,
|
||||
G4double a, G4double b, G4int n,
|
||||
const G4String& processName) :
|
||||
G4VXTRenergyLoss(anEnvelope,foilMat,gasMat,a,b,n,processName)
|
||||
{
|
||||
G4cout<<"Gammma distributed X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons from
|
||||
// a radiator
|
||||
|
||||
fAlphaPlate = alphaPlate ;
|
||||
fAlphaGas = alphaGas ;
|
||||
G4cout<<"fAlphaPlate = "<<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl ;
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4GammaXTRadiator::~G4GammaXTRadiator()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough approximation for radiator interference factor for the case of
|
||||
// fully GamDistr radiator. The plate and gas gap thicknesses are distributed
|
||||
// according to exponent. The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be about XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4GammaXTRadiator::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Za, Zb, Ma, Mb ;
|
||||
|
||||
Za = GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
Zb = GetGasFormationZone(energy,gamma,varAngle) ;
|
||||
|
||||
Ma = GetPlateLinearPhotoAbs(energy) ;
|
||||
Mb = GetGasLinearPhotoAbs(energy) ;
|
||||
|
||||
|
||||
G4complex Ca(1.0+0.5*fPlateThick*Ma/fAlphaPlate,fPlateThick/Za/fAlphaPlate) ;
|
||||
G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas) ;
|
||||
|
||||
G4complex Ha = G4std::pow(Ca,-fAlphaPlate) ;
|
||||
G4complex Hb = G4std::pow(Cb,-fAlphaGas) ;
|
||||
G4complex H = Ha*Hb ;
|
||||
|
||||
G4complex F1 = (1.0 - Ha)*(1.0 - Hb )/(1.0 - H)
|
||||
* G4double(fPlateNumber) ;
|
||||
|
||||
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
|
||||
* (1.0 - G4std::pow(H,fPlateNumber)) ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXTRadiator.cc,v 1.2 2002/01/18 17:26:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4RegularXTRadiator.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4RegularXTRadiator::G4RegularXTRadiator(G4LogicalVolume *anEnvelope,
|
||||
G4Material* foilMat,G4Material* gasMat,
|
||||
G4double a, G4double b, G4int n,
|
||||
const G4String& processName) :
|
||||
G4VXTRenergyLoss(anEnvelope,foilMat,gasMat,a,b,n,processName)
|
||||
{
|
||||
G4cout<<"Regular X-ray TR radiator EM process is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons from
|
||||
// a radiator
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4RegularXTRadiator::~G4RegularXTRadiator()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Approximation for radiator interference factor for the case of
|
||||
// fully Regular radiator. The plate and gas gap thicknesses are fixed .
|
||||
// The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be about XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4RegularXTRadiator::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Qa, Qb, Q, aZa, bZb, aMa, bMb, D ;
|
||||
|
||||
aZa = fPlateThick/GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
bZb = fGasThick/GetGasFormationZone(energy,gamma,varAngle) ;
|
||||
|
||||
aMa = fPlateThick*GetPlateLinearPhotoAbs(energy) ;
|
||||
bMb = fGasThick*GetGasLinearPhotoAbs(energy) ;
|
||||
|
||||
Qa = exp(-aMa) ;
|
||||
Qb = exp(-bMb) ;
|
||||
Q = Qa*Qb ;
|
||||
|
||||
G4complex Ha( exp(-0.5*aMa)*cos(aZa),
|
||||
-exp(-0.5*aMa)*sin(aZa) ) ;
|
||||
|
||||
G4complex Hb( exp(-0.5*bMb)*cos(bZb),
|
||||
-exp(-0.5*bMb)*sin(bZb) ) ;
|
||||
|
||||
G4complex H = Ha*Hb ;
|
||||
|
||||
G4complex Hs = G4std::conj(H) ;
|
||||
|
||||
D = 1.0 /( (1 - sqrt(Q))*(1 - sqrt(Q)) +
|
||||
4*sqrt(Q)*sin(0.5*(aZa+bZb))*sin(0.5*(aZa+bZb)) ) ;
|
||||
|
||||
G4complex F1 = (1.0 - Ha)*(1.0 - Hb)*(1.0 - Hs)
|
||||
* G4double(fPlateNumber)*D ;
|
||||
|
||||
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb*(1.0-Hs)*(1.0-Hs)
|
||||
* (1.0 - G4std::pow(H,fPlateNumber)) * D*D ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,19 +21,23 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scintillation.cc,v 1.8 2001/11/07 17:07:41 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Scintillation.cc,v 1.10 2002/05/16 21:20:11 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Scintillation Light Class Implementation
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: G4Scintillation.cc
|
||||
// Description: Discrete Process - Generation of Scintillation Photons
|
||||
// Description: RestDiscrete Process - Generation of Scintillation Photons
|
||||
// Version: 1.0
|
||||
// Created: 1998-11-07
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 2000-09-18 by Peter Gumplinger
|
||||
// Updated: 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
|
||||
// 2000-09-18 by Peter Gumplinger
|
||||
// > change: aSecondaryPosition=x0+rand*aStep.GetDeltaPosition();
|
||||
// aSecondaryTrack->SetTouchable(0);
|
||||
// 2001-09-17, migration of Materials to pure STL (mma)
|
||||
@@ -62,7 +66,7 @@
|
||||
/////////////////
|
||||
|
||||
G4Scintillation::G4Scintillation(const G4String& processName)
|
||||
: G4VDiscreteProcess(processName)
|
||||
: G4VRestDiscreteProcess(processName)
|
||||
{
|
||||
fTrackSecondariesFirst = false;
|
||||
|
||||
@@ -99,6 +103,19 @@ G4Scintillation::~G4Scintillation()
|
||||
// Methods
|
||||
////////////
|
||||
|
||||
// AtRestDoIt
|
||||
// ----------
|
||||
//
|
||||
G4VParticleChange*
|
||||
G4Scintillation::AtRestDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
// This routine simply calls the equivalent PostStepDoIt since all the
|
||||
// necessary information resides in aStep.GetTotalEnergyDeposit()
|
||||
|
||||
{
|
||||
return G4Scintillation::PostStepDoIt(aTrack, aStep);
|
||||
}
|
||||
|
||||
// PostStepDoIt
|
||||
// -------------
|
||||
//
|
||||
@@ -113,6 +130,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
{
|
||||
aParticleChange.Initialize(aTrack);
|
||||
|
||||
const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
|
||||
const G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
|
||||
@@ -127,12 +145,12 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
G4MaterialPropertiesTable* aMaterialPropertiesTable =
|
||||
aMaterial->GetMaterialPropertiesTable();
|
||||
if (!aMaterialPropertiesTable)
|
||||
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
const G4MaterialPropertyVector* Intensity =
|
||||
aMaterialPropertiesTable->GetProperty("SCINTILLATION");
|
||||
if (!Intensity)
|
||||
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
G4double MeanNumPhotons = ScintillationYield * TotalEnergyDeposit;
|
||||
|
||||
@@ -145,15 +163,17 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
|
||||
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(NumPhotons);
|
||||
|
||||
if (fTrackSecondariesFirst)
|
||||
aParticleChange.SetStatusChange(fSuspend);
|
||||
if (fTrackSecondariesFirst) {
|
||||
if (aTrack.GetTrackStatus() == fAlive )
|
||||
aParticleChange.SetStatusChange(fSuspend);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -231,7 +251,13 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
// Generate new G4Track object:
|
||||
|
||||
G4double rand = G4UniformRand();
|
||||
G4double rand;
|
||||
|
||||
if (aParticle->GetDefinition()->GetPDGCharge() != 0) {
|
||||
rand = G4UniformRand();
|
||||
} else {
|
||||
rand = 1.0;
|
||||
}
|
||||
|
||||
G4double delta = rand * aStep.GetStepLength();
|
||||
G4double deltaTime = delta /
|
||||
@@ -262,7 +288,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
<< aParticleChange.GetNumberOfSecondaries() << G4endl;
|
||||
}
|
||||
|
||||
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
return G4VRestDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
}
|
||||
|
||||
// BuildThePhysicsTable for the scintillation process
|
||||
@@ -383,3 +409,16 @@ G4double G4Scintillation::GetMeanFreePath(const G4Track& aTrack,
|
||||
return DBL_MAX;
|
||||
|
||||
}
|
||||
|
||||
// GetMeanLifeTime
|
||||
// ---------------
|
||||
//
|
||||
|
||||
G4double G4Scintillation::GetMeanLifeTime(const G4Track& aTrack,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
|
||||
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-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// G4TransitionRadiation class -- implementation file
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user