Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
@@ -23,9 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
////////////////////////////////////////////////////////////////////////
// Cerenkov Radiation Class Definition
////////////////////////////////////////////////////////////////////////
@@ -46,22 +43,19 @@
#ifndef G4Cerenkov_h
#define G4Cerenkov_h 1
#include <CLHEP/Units/SystemOfUnits.h>
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Step.hh"
#include "G4VProcess.hh"
#include "G4OpticalPhoton.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4PhysicsTable.hh"
#include "G4ForceCondition.hh"
#include "G4GPILSelection.hh"
#include "G4MaterialPropertyVector.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4VProcess.hh"
class G4Material;
class G4ParticleDefinition;
class G4PhysicsTable;
class G4Step;
class G4Track;
class G4VParticleChange;
class G4Cerenkov : public G4VProcess
{
@@ -72,10 +66,8 @@ class G4Cerenkov : public G4VProcess
explicit G4Cerenkov(const G4Cerenkov& right);
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.
@@ -168,17 +160,21 @@ class G4Cerenkov : public G4VProcess
const G4Material* aMaterial,
G4MaterialPropertyVector* Rindex) const;
void DumpInfo() const override {ProcessDescription(G4cout);};
void ProcessDescription(std::ostream& out) const override;
protected:
G4PhysicsTable* thePhysicsTable;
private:
G4bool fTrackSecondariesFirst;
G4double fMaxBetaChange;
G4int fMaxPhotons;
G4int fNumPhotons;
G4bool fStackingFlag;
G4bool fTrackSecondariesFirst;
G4int fNumPhotons;
};
inline G4bool G4Cerenkov::GetTrackSecondariesFirst() const
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4ForwardXrayTR
//
// Class for description
@@ -42,149 +40,117 @@
#ifndef G4FORWARDXRAYTR_H
#define G4FORWARDXRAYTR_H
#include "globals.hh"
#include "templates.hh"
#include "geomdefs.hh"
#include "Randomize.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4OpticalSurface.hh"
#include "G4OpticalPhoton.hh"
#include "G4TransportationManager.hh"
#include "G4Track.hh"
#include "G4TransitionRadiation.hh"
#include "G4PhysicsTable.hh"
#include "G4Gamma.hh"
#include "G4PhysicsLogVector.hh"
#include "G4VParticleChange.hh"
class G4ParticleDefinition;
class G4PhysicsTable;
class G4PhysicsLogVector;
class G4ForwardXrayTR : public G4TransitionRadiation
{
public:
public:
explicit G4ForwardXrayTR(const G4String& matName1, const G4String& matName2,
const G4String& processName = "XrayTR");
// Constructors
explicit G4ForwardXrayTR(const G4String& processName = "XrayTR");
explicit G4ForwardXrayTR( const G4String& matName1, // G4Material* pMat1,
const G4String& matName2, // G4Material* pMat2,
const G4String& processName="XrayTR" );
explicit G4ForwardXrayTR( const G4String& processName="XrayTR" );
~G4ForwardXrayTR();
// Destructor // virtual
G4ForwardXrayTR(const G4ForwardXrayTR& right) = delete;
G4ForwardXrayTR& operator=(const G4ForwardXrayTR& right) = delete;
virtual ~G4ForwardXrayTR();
/////////////////////// Methods /////////////////////////////////
/////////////////////// Methods /////////////////////////////////
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
void BuildXrayTRtables();
G4double GetMeanFreePath(const G4Track&, G4double,
G4ForceCondition* condition) override;
G4ForceCondition* condition) override;
G4VParticleChange* PostStepDoIt( const G4Track& aTrack,
const G4Step& aStep ) override;
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
G4double GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const;
G4double GetThetaTR(G4int iMat, G4int jMat, G4int iTkin) const;
G4double GetThetaTR(G4int iMat, G4int jMat, G4int iTkin) const;
///////////////////// Angle distribution /////////////////////////////
//
///////////////////// Angle distribution /////////////////////////////
G4double SpectralAngleTRdensity( G4double energy,
G4double varAngle ) const override;
G4double SpectralAngleTRdensity(G4double energy,
G4double varAngle) const override;
G4double AngleDensity( G4double energy,
G4double varAngle ) const;
G4double AngleDensity(G4double energy, G4double varAngle) const;
G4double EnergyInterval( G4double energy1,
G4double energy2,
G4double varAngle ) const;
G4double EnergyInterval(G4double energy1, G4double energy2,
G4double varAngle) const;
G4double AngleSum( G4double varAngle1,
G4double varAngle2 ) const;
G4double AngleSum(G4double varAngle1, G4double varAngle2) const;
///////////////////////// Energy distribution ///////////////////////////////
///////////////////////// Energy distribution ///////////////////////////////
G4double SpectralDensity( G4double energy,
G4double x ) const;
G4double SpectralDensity(G4double energy, G4double x) const;
G4double AngleInterval( G4double energy,
G4double varAngle1,
G4double varAngle2 ) const;
G4double AngleInterval(G4double energy, G4double varAngle1,
G4double varAngle2) const;
G4double EnergySum( G4double energy1,
G4double energy2 ) const;
G4double EnergySum(G4double energy1, G4double energy2) const;
/////////////////////////// Access functions ////////////////////////////
/////////////////////////// Access functions ////////////////////////////
G4PhysicsTable* GetAngleDistrTable();
G4PhysicsTable* GetEnergyDistrTable();
static G4int GetSympsonNumber();
static G4int GetBinTR();
static G4int GetSympsonNumber();
static G4int GetBinTR();
static G4double GetMinProtonTkin();
static G4double GetMaxProtonTkin();
static G4int GetTotBin();
static G4int GetTotBin();
protected: // for access from X-ray TR fast simulation models
static constexpr G4double fTheMinEnergyTR =
1. * CLHEP::keV; // static min TR energy
static constexpr G4double fTheMaxEnergyTR =
100. * CLHEP::keV; // static max TR energy
static constexpr G4double fTheMaxAngle = 1.0e-3; // max theta of TR quanta
static constexpr G4double fTheMinAngle = 5.0e-6; // min theta of TR quanta
static constexpr G4double fMinProtonTkin =
100. * CLHEP::GeV; // min Tkin of proton in tables
static constexpr G4double fMaxProtonTkin =
100. * CLHEP::TeV; // max Tkin of proton in tables
static constexpr G4double fPlasmaCof =
4.0 * CLHEP::pi * CLHEP::fine_structure_const * CLHEP::hbarc *
CLHEP::hbarc * CLHEP::hbarc /
CLHEP::electron_mass_c2; // physical consts for plasma energy
static constexpr G4double fCofTR = CLHEP::fine_structure_const / CLHEP::pi;
protected: // for access from X-ray TR fast simulation models
static constexpr G4int fSympsonNumber =
100; // Accuracy of Sympson integration
static constexpr G4int fBinTR = 50; // number of bins in TR vectors
static constexpr G4int fTotBin = 50; // number of bins in log scale
// private : /////////////// Data members ///////////////////////////
const std::vector<G4double>* fGammaCutInKineticEnergy;
// TR photon cut in energy array
G4ParticleDefinition* fPtrGamma; // pointer to TR photon
G4ParticleDefinition* fPtrGamma; // pointer to TR photon
const std::vector<G4double>* fGammaCutInKineticEnergy;
// TR photon cut in energy array
G4double fGammaTkinCut; // Tkin cut of TR photon in current mat.
G4PhysicsTable* fAngleDistrTable;
G4PhysicsTable* fEnergyDistrTable;
G4PhysicsLogVector* fProtonEnergyVector;
static G4int fSympsonNumber; // Accuracy of Sympson integration
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
static G4double fPlasmaCof; // physical consts for plasma energy
static G4double fCofTR;
G4double fSigma1; // plasma energy Sq of matter1
G4double fSigma2; // plasma energy Sq of matter2
private:
// Operators
G4ForwardXrayTR(const G4ForwardXrayTR& right) = delete;
G4ForwardXrayTR& operator=(const G4ForwardXrayTR& right) = delete;
// G4bool operator==(const G4ForwardXrayTR& right)const;
// G4bool operator!=(const G4ForwardXrayTR& right)const;
}; // end of G4ForwardXrayTR class ---------------------------
#endif // G4FORWARDXRAYTR_H
G4PhysicsTable* fAngleDistrTable;
G4PhysicsTable* fEnergyDistrTable;
G4PhysicsLogVector* fProtonEnergyVector;
G4double fMinEnergyTR; // min TR energy in material
G4double fMaxEnergyTR; // max TR energy in material
G4double fMaxThetaTR; // max theta of TR quanta
G4double fGamma; // current Lorentz factor
G4double fGammaTkinCut; // Tkin cut of TR photon in current mat.
G4double fSigma1; // plasma energy Sq of matter1
G4double fSigma2; // plasma energy Sq of matter2
};
#endif // G4FORWARDXRAYTR_H
@@ -23,13 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
///////////////////////////////////////////////////////////////////////////
//
// Rough process describing a radiator of X-ray transition radiation.
// Thicknesses of plates and gas gaps are distributed according to gamma
//
// 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) * std::exp(-alpha*x/<x>) / G(alpha)
@@ -41,42 +38,32 @@
// 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
//
// History:
// 21.01.02 V. Grichine, first version
//
#ifndef G4GammaXTRadiator_h
#define G4GammaXTRadiator_h 1
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4GammaXTRadiator : public G4VXTRenergyLoss
{
public:
public:
explicit G4GammaXTRadiator(G4LogicalVolume* anEnvelope, G4double, G4double,
G4Material*, G4Material*, G4double, G4double,
G4int,
const G4String& processName = "XTRgammaRadiator");
~G4GammaXTRadiator();
explicit 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) override;
private:
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
};
#endif
@@ -23,45 +23,41 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
///////////////////////////////////////////////////////////////////////////
//
// Process describing a radiator of X-ray transition radiation.
//
// 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
//
//
// History:
// 16.01.02 V. Grichine, first version
//
#ifndef G4RegularXTRadiator_h
#define G4RegularXTRadiator_h 1
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4RegularXTRadiator : public G4VXTRenergyLoss
{
public:
explicit G4RegularXTRadiator (G4LogicalVolume *anEnvelope,
G4Material*,G4Material*,
G4double,G4double,G4int,
const G4String & processName = "XTRegularRadiator");
~G4RegularXTRadiator ();
public:
explicit G4RegularXTRadiator(
G4LogicalVolume* anEnvelope, G4Material*, G4Material*, G4double, G4double,
G4int, const G4String& processName = "XTRegularRadiator");
~G4RegularXTRadiator();
G4double SpectralXTRdEdx(G4double energy) override;
// Pure virtual function from base class
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
G4double GetStackFactor( G4double energy, G4double gamma,
G4double varAngle) override;
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
};
#endif
@@ -23,9 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
////////////////////////////////////////////////////////////////////////
// Scintillation Light Class Definition
////////////////////////////////////////////////////////////////////////
@@ -54,21 +51,13 @@
#define G4Scintillation_h 1
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4Poisson.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Step.hh"
#include "G4VRestDiscreteProcess.hh"
#include "G4OpticalPhoton.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4PhysicsTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4EmSaturation.hh"
#include "G4OpticalPhoton.hh"
#include "G4VRestDiscreteProcess.hh"
class G4PhysicsTable;
class G4Step;
class G4Track;
// Class Description:
// RestDiscrete Process - Generation of Scintillation Photons.
@@ -82,11 +71,9 @@ class G4Scintillation : public G4VRestDiscreteProcess
G4ProcessType type = fElectromagnetic);
~G4Scintillation();
private:
G4Scintillation(const G4Scintillation& right) = delete;
G4Scintillation& operator=(const G4Scintillation& right) = delete;
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)
@@ -95,6 +82,9 @@ class G4Scintillation : public G4VRestDiscreteProcess
// Returns true -> 'is applicable', for any particle type except
// for an 'opticalphoton' and for short-lived particles
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override {ProcessDescription(G4cout);};
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
// Build table at the right time
@@ -117,20 +107,16 @@ class G4Scintillation : public G4VRestDiscreteProcess
G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
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);
// allow multiple time constants with scint by particle type
// Returns the number of scintillation photons calculated when
// scintillation depends on the particle type and energy
// deposited (includes nonlinear dependendency) and updates the
// yields for each channel
void SetTrackSecondariesFirst(const G4bool state);
// If set, the primary particle tracking is interrupted and any
@@ -142,7 +128,7 @@ class G4Scintillation : public G4VRestDiscreteProcess
void SetFiniteRiseTime(const G4bool state);
// If set, the G4Scintillation process expects the user to have
// set the constant material property FAST/SLOWSCINTILLATIONRISETIME.
// set the constant material property SCINTILLATIONRISETIME{1,2,3}.
G4bool GetFiniteRiseTime() const;
// Returns the boolean flag for a finite scintillation rise time.
@@ -155,29 +141,6 @@ class G4Scintillation : public G4VRestDiscreteProcess
G4double GetScintillationYieldFactor() const;
// Returns the photon yield factor.
void SetScintillationExcitationRatio(const G4double ratio);
// Called to set the scintillation excitation ratio, needed when
// the scintillation level excitation is different for different
// types of particles. This overwrites the YieldRatio obtained
// from the G4MaterialPropertiesTable.
// DEPRECATED and will be removed in the next major release. Set
// the yields for different particles in material property table instead.
G4double GetScintillationExcitationRatio() const;
// Returns the scintillation level excitation ratio.
// DEPRECATED and will be removed in the next major release. Set
// the yields for different particles in material property table instead.
G4PhysicsTable* GetFastIntegralTable() const;
// Returns the address of the fast scintillation integral table.
// DEPRECATED and will be removed in the next major release. Use
// GetIntegralTable1() instead.
G4PhysicsTable* GetSlowIntegralTable() const;
// Returns the address of the slow scintillation integral table.
// DEPRECATED and will be removed in the next major release. Use
// GetIntegralTable3() instead.
G4PhysicsTable* GetIntegralTable1() const;
// Returns the address of scintillation integral table #1.
@@ -204,12 +167,6 @@ class G4Scintillation : public G4VRestDiscreteProcess
// Return the boolean that determines the method of scintillation
// production
void SetEnhancedTimeConstants(G4bool);
G4bool GetEnhancedTimeConstants() const;
// Starting with 10.7.beta, enable 3 time constants, either for
// all particles or by particle type. The names of the material
// properties have been generalized from FAST and SLOW to 1, 2, 3.
void SetScintillationTrackInfo(const G4bool trackType);
// Call by the user to set the G4ScintillationTrackInformation
// to scintillation photon track
@@ -230,21 +187,23 @@ class G4Scintillation : public G4VRestDiscreteProcess
void DumpPhysicsTable() const;
// Prints the fast and slow scintillation integral tables.
protected:
private:
G4PhysicsTable* fIntegralTable1;
G4PhysicsTable* fIntegralTable2;
G4PhysicsTable* fIntegralTable3;
private:
G4bool fTrackSecondariesFirst;
G4bool fFiniteRiseTime;
G4double fYieldFactor;
G4double fExcitationRatio;
G4EmSaturation* fEmSaturation;
const G4ParticleDefinition* opticalphoton =
G4OpticalPhoton::OpticalPhotonDefinition();
G4int fNumPhotons;
G4bool fScintillationByParticleType;
G4bool fScintillationTrackInfo;
G4bool fStackingFlag;
G4int fNumPhotons;
G4bool fEnhancedTimeConstants;
G4bool fTrackSecondariesFirst;
G4bool fFiniteRiseTime;
#ifdef G4DEBUG_SCINTILLATION
G4double ScintTrackEDep, ScintTrackYield;
@@ -256,9 +215,6 @@ class G4Scintillation : public G4VRestDiscreteProcess
// emission time distribution when there is a finite rise time
G4double sample_time(G4double tau1, G4double tau2);
G4EmSaturation* fEmSaturation;
G4ParticleDefinition* opticalphoton =
G4OpticalPhoton::OpticalPhotonDefinition();
};
////////////////////
@@ -285,38 +241,6 @@ inline G4bool G4Scintillation::GetFiniteRiseTime() const
return fFiniteRiseTime;
}
inline void G4Scintillation::SetScintillationYieldFactor(
const G4double yieldfactor)
{
fYieldFactor = yieldfactor;
}
inline G4double G4Scintillation::GetScintillationYieldFactor() const
{
return fYieldFactor;
}
inline void G4Scintillation::SetScintillationExcitationRatio(
const G4double ratio)
{
fExcitationRatio = ratio;
}
inline G4double G4Scintillation::GetScintillationExcitationRatio() const
{
return fExcitationRatio;
}
inline G4PhysicsTable* G4Scintillation::GetSlowIntegralTable() const
{
return fIntegralTable3;
}
inline G4PhysicsTable* G4Scintillation::GetFastIntegralTable() const
{
return fIntegralTable1;
}
inline G4PhysicsTable* G4Scintillation::GetIntegralTable1() const
{
return fIntegralTable1;
@@ -349,16 +273,6 @@ inline G4bool G4Scintillation::GetScintillationByParticleType() const
return fScintillationByParticleType;
}
inline void G4Scintillation::SetEnhancedTimeConstants(G4bool val)
{
fEnhancedTimeConstants = val;
}
inline G4bool G4Scintillation::GetEnhancedTimeConstants() const
{
return fEnhancedTimeConstants;
}
inline void G4Scintillation::SetScintillationTrackInfo(const G4bool trackType)
{
fScintillationTrackInfo = trackType;
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// Author : Valentin Libioulle valentin.libioulle@usherbrooke.ca (3IT - GRAMS)
//
//---------------------------------------------------------------
@@ -40,6 +38,7 @@
#ifndef G4SCINTILLATIONTRACKINFORMATION_H
#define G4SCINTILLATIONTRACKINFORMATION_H
#include "G4Allocator.hh"
#include "G4VUserTrackInformation.hh"
// Represents the scintillation type used to create the track (opticalphoton).
@@ -91,8 +90,6 @@ class G4ScintillationTrackInformation : public G4VUserTrackInformation
// Inline methods
///
#include "G4Allocator.hh"
// Forward declaration for the Allocator
class G4ScintillationTrackInformation;
@@ -23,58 +23,57 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
///////////////////////////////////////////////////////////////////////////
//
// Process describing a straw tube radiator of X-ray transition radiation.
//
// Process describing a straw tube radiator of X-ray transition radiation.
// Thicknesses of plates and gas gaps are gamma distributed.
// 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:
// 22.04.05 V. Grichine, first version
// 22.04.05 V. Grichine, first version
// 28.09.07, V.Ivanchenko general cleanup without change of algorithms
//
#ifndef G4StrawTubeXTRadiator_h
#define G4StrawTubeXTRadiator_h 1
#include <complex>
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4SandiaTable;
class G4StrawTubeXTRadiator : public G4VXTRenergyLoss
{
public:
explicit G4StrawTubeXTRadiator (G4LogicalVolume* anEnvelope, G4Material*,
G4Material*, G4double,G4double,G4Material*,G4bool unishut = false,
const G4String & processName = "StrawTubeXTRadiator");
virtual ~G4StrawTubeXTRadiator ();
public:
explicit G4StrawTubeXTRadiator(
G4LogicalVolume* anEnvelope, G4Material*, G4Material*, G4double, G4double,
G4Material*, G4bool unishut = false,
const G4String& processName = "StrawTubeXTRadiator");
~G4StrawTubeXTRadiator();
// Auxiliary functions for plate/gas material parameters
G4double GetMediumFormationZone(G4double, G4double, G4double);
void ComputeMediumPhotoAbsCof();
G4double GetMediumLinearPhotoAbs(G4double);
G4complex GetMediumComplexFZ(G4double, G4double, G4double);
G4double GetMediumFormationZone(G4double,G4double,G4double) ;
void ComputeMediumPhotoAbsCof() ;
G4double GetMediumLinearPhotoAbs(G4double) ;
G4complex GetMediumComplexFZ(G4double,G4double,G4double) ;
// Pure virtual function from base class
G4double GetStackFactor(G4double energy, G4double gamma,
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
protected:
G4int fMatIndex3;
G4double fSigma3;
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
protected:
G4SandiaTable* fMediumPhotoAbsCof;
G4double fSigma3;
G4int fMatIndex3;
};
#endif
@@ -23,107 +23,91 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
//
// History:
// 21-5-98 1 version , V. Grichine
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// 23-05-06, H. Burkhardt: Energy spectrum from function rather than table
//
//
// ------------------------------------------------------------
#ifndef G4SynchrotronRadiation_h
#define G4SynchrotronRadiation_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VDiscreteProcess.hh"
#include "G4TransportationManager.hh"
#include "G4FieldManager.hh"
#include "G4Field.hh"
#include "G4ThreeVector.hh"
#include "G4PropagatorInField.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4ThreeVector.hh"
#include "G4Track.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
class G4VEmAngularDistribution;
class G4LossTableManager;
class G4ParticleDefinition;
class G4PropagatorInField;
class G4VEmAngularDistribution;
class G4SynchrotronRadiation : public G4VDiscreteProcess
{
public:
public:
explicit G4SynchrotronRadiation(const G4String& pName = "SynRad",
G4ProcessType type = fElectromagnetic);
G4ProcessType type = fElectromagnetic);
virtual ~G4SynchrotronRadiation();
virtual G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) override;
G4SynchrotronRadiation& operator=(const G4SynchrotronRadiation& right) =
delete;
G4SynchrotronRadiation(const G4SynchrotronRadiation&) = delete;
virtual G4VParticleChange *PostStepDoIt( const G4Track& track,
const G4Step& Step ) override;
virtual G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition) override;
G4double GetPhotonEnergy( const G4Track& trackData,
const G4Step& stepData );
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step) override;
G4double GetRandomEnergySR( G4double, G4double, G4double );
G4double GetPhotonEnergy(const G4Track& trackData, const G4Step& stepData);
G4double GetRandomEnergySR(G4double, G4double, G4double);
G4double InvSynFracInt(G4double x);
G4double Chebyshev(G4double a,G4double b,const G4double c[],
G4int n, G4double x);
G4double Chebyshev(G4double a, G4double b, const G4double c[], G4int n,
G4double x);
virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
virtual void BuildPhysicsTable(const G4ParticleDefinition& ) override;
virtual void PrintInfoDefinition();
virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
void SetAngularGenerator(G4VEmAngularDistribution* p);
private:
G4SynchrotronRadiation &
operator=(const G4SynchrotronRadiation &right);
G4SynchrotronRadiation(const G4SynchrotronRadiation&);
G4LossTableManager* theManager;
G4VEmAngularDistribution* genAngle;
G4ParticleDefinition* theGamma;
private:
G4LossTableManager* theManager;
G4VEmAngularDistribution* genAngle;
G4ParticleDefinition* theGamma;
G4PropagatorInField* fFieldPropagator;
G4bool FirstTime;
G4bool FirstTime1;
};
////////////////////////// INLINE METHODS /////////////////////////////
inline G4double
G4SynchrotronRadiation::Chebyshev(G4double a, G4double b, const G4double c[],
G4int n, G4double x)
inline G4double G4SynchrotronRadiation::Chebyshev(G4double a, G4double b,
const G4double c[], G4int n,
G4double x)
{
G4double y;
G4double y2=2.0*(y=(2.0*x-a-b)/(b-a)); // Change of variable.
G4double d=0.,dd=0.;
for (G4int j=n-1;j>=1;--j) // Clenshaw's recurrence.
{ G4double sv=d;
d=y2*d-dd+c[j];
dd=sv;
G4double y2 = 2.0 * (y = (2.0 * x - a - b) / (b - a)); // Change of variable.
G4double d = 0., dd = 0.;
for(G4int j = n - 1; j >= 1; --j) // Clenshaw's recurrence.
{
G4double sv = d;
d = y2 * d - dd + c[j];
dd = sv;
}
return y*d-dd+0.5*c[0];
return y * d - dd + 0.5 * c[0];
}
#endif // end of G4SynchrotronRadiation.hh
@@ -23,133 +23,121 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
//
// History:
// History:
// 21-5-98 1 version , V. Grichine
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// 19-05-06, V.Ivanchenko rename from G4SynchrotronRadiation
//
//
// ------------------------------------------------------------
#ifndef G4SynchrotronRadiationInMat_h
#define G4SynchrotronRadiationInMat_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VDiscreteProcess.hh"
#include "G4TransportationManager.hh"
#include "G4FieldManager.hh"
#include "G4Field.hh"
#include "G4ThreeVector.hh"
#include "G4PropagatorInField.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4PhysicsTable.hh"
#include "G4Gamma.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsTable.hh"
#include "G4Positron.hh"
#include "G4Step.hh"
#include "G4ThreeVector.hh"
#include "G4Track.hh"
#include "G4TransportationManager.hh"
#include "G4VDiscreteProcess.hh"
#include "G4VParticleChange.hh"
class G4ParticleDefinition;
class G4PropagatorInField;
class G4SynchrotronRadiationInMat : public G4VDiscreteProcess
{
public:
public:
explicit G4SynchrotronRadiationInMat(
const G4String& processName = "SynchrotronRadiation",
G4ProcessType type = fElectromagnetic);
explicit G4SynchrotronRadiationInMat(const G4String& processName =
"SynchrotronRadiation",
G4ProcessType type = fElectromagnetic);
~G4SynchrotronRadiationInMat();
virtual ~G4SynchrotronRadiationInMat();
private:
G4SynchrotronRadiationInMat &
operator=(const G4SynchrotronRadiationInMat &right) = delete;
G4SynchrotronRadiationInMat& operator=(
const G4SynchrotronRadiationInMat& right) = delete;
G4SynchrotronRadiationInMat(const G4SynchrotronRadiationInMat&) = delete;
public: ///////////////// Post Step functions //////////////////////////
G4double GetMeanFreePath(const G4Track& track, G4double previousStepSize,
G4ForceCondition* condition) override;
G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) override;
G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step) override;
G4VParticleChange *PostStepDoIt( const G4Track& track,
const G4Step& Step ) override;
G4double GetPhotonEnergy(const G4Track& trackData, const G4Step& stepData);
G4double GetPhotonEnergy( const G4Track& trackData,
const G4Step& stepData );
G4double GetRandomEnergySR(G4double, G4double);
G4double GetRandomEnergySR( G4double, G4double );
G4double GetProbSpectrumSRforInt(G4double);
G4double GetIntProbSR(G4double);
G4double GetProbSpectrumSRforInt( G4double );
G4double GetIntProbSR( G4double );
G4double GetProbSpectrumSRforEnergy(G4double);
G4double GetEnergyProbSR(G4double);
G4double GetProbSpectrumSRforEnergy( G4double );
G4double GetEnergyProbSR( G4double );
G4double GetIntegrandForAngleK( G4double );
G4double GetAngleK( G4double );
G4double GetAngleNumberAtGammaKsi( G4double );
G4double GetIntegrandForAngleK(G4double);
G4double GetAngleK(G4double);
G4double GetAngleNumberAtGammaKsi(G4double);
G4bool IsApplicable(const G4ParticleDefinition&) override;
static G4double GetLambdaConst();
static G4double GetEnergyConst();
void SetRootNumber(G4int rn){ fRootNumber = rn; };
void SetVerboseLevel(G4int v){ fVerboseLevel = v; };
void SetKsi(G4double ksi){ fKsi = ksi; };
void SetEta(G4double eta){ fEta = eta; };
void SetPsiGamma(G4double psg){ fPsiGamma = psg; };
void SetOrderAngleK(G4double ord){ fOrderAngleK = ord; }; // should be 1/3 or 2/3
void SetRootNumber(G4int rn) { fRootNumber = rn; };
void SetVerboseLevel(G4int v) { fVerboseLevel = v; };
void SetKsi(G4double ksi) { fKsi = ksi; };
void SetEta(G4double eta) { fEta = eta; };
void SetPsiGamma(G4double psg) { fPsiGamma = psg; };
void SetOrderAngleK(G4double ord)
{
fOrderAngleK = ord;
}; // should be 1/3 or 2/3
private:
private:
// Constant for calculation of mean free path
// sqrt(3.) = 1.73...
static constexpr G4double fLambdaConst =
1.73205080756887729352 * CLHEP::electron_mass_c2 /
(2.5 * CLHEP::fine_structure_const * CLHEP::eplus * ::CLHEP::c_light);
static const G4double fLambdaConst;
// Constant for calculation of characterictic energy
static constexpr G4double fEnergyConst =
1.5 * CLHEP::c_light * CLHEP::c_light * CLHEP::eplus * CLHEP::hbar_Planck /
CLHEP::electron_mass_c2;
static const G4double fEnergyConst;
static const G4double fIntegralProbabilityOfSR[200];
const G4double
LowestKineticEnergy; // low energy limit of the cross-section formula
G4double CutInRange;
// Array of integral probability of synchrotron photons:
// the corresponding energy = 0.0001*i*i*(characteristic energy)
static const G4double fIntegralProbabilityOfSR[200];
const G4ParticleDefinition* theGamma;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* thePositron;
G4PropagatorInField* fFieldPropagator;
const G4double
LowestKineticEnergy; // low energy limit of the cross-section formula
G4double CutInRange;
G4double GammaCutInKineticEnergyNow;
G4double ElectronCutInKineticEnergyNow;
G4double PositronCutInKineticEnergyNow;
G4double ParticleCutInKineticEnergyNow;
G4double fAlpha;
G4int fRootNumber;
G4double fKsi; // omega/omega_c
G4double fPsiGamma; // Psi-angle*gamma
G4double fEta; //
G4double fOrderAngleK; // 1/3 or 2/3
G4int fVerboseLevel;
G4PropagatorInField* fFieldPropagator;
G4double fKsi; // omega/omega_c
G4double fPsiGamma; // Psi-angle*gamma
G4double fEta; //
G4double fOrderAngleK; // 1/3 or 2/3
G4int fRootNumber;
G4int fVerboseLevel;
};
#endif // end of G4SynchrotronRadiationInMat.hh
@@ -23,9 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// G4TransitionRadiation -- header file
//
// Class for description of transition radiation generated
// by charged particle crossed interface between material 1
// and material 2 (1 -> 2). Transition radiation could be of kind:
@@ -34,10 +31,7 @@
// - X-ray forward (for relativistic case Tkin/mass >= 10^2)
//
// GEANT 4 class header file --- Copyright CERN 1995
// CERB Geneva Switzerland
//
// for information related to this code, please, contact
// CERN, CN Division, ASD Group
// History:
// 18.12.97, V. Grichine (Vladimir.Grichine@cern.ch)
// 02.02.00, V.Grichine, new data fEnergy and fVarAngle for double
@@ -48,81 +42,71 @@
#ifndef G4TransitionRadiation_h
#define G4TransitionRadiation_h
#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Material.hh"
#include "G4VParticleChange.hh"
class G4TransitionRadiation : public G4VDiscreteProcess
class G4TransitionRadiation : public G4VDiscreteProcess
{
public:
public:
explicit G4TransitionRadiation(const G4String& processName = "TR",
G4ProcessType type = fElectromagnetic);
explicit G4TransitionRadiation( const G4String& processName = "TR",
G4ProcessType type = fElectromagnetic) ;
virtual ~G4TransitionRadiation();
virtual ~G4TransitionRadiation() ;
G4TransitionRadiation(const G4TransitionRadiation& right) = delete;
G4TransitionRadiation& operator=(const G4TransitionRadiation& right) = delete;
// Methods
G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
virtual G4double GetMeanFreePath(const G4Track&, G4double,
G4ForceCondition* condition) override;
G4ForceCondition* condition) override;
virtual G4VParticleChange* PostStepDoIt(const G4Track&,
virtual G4VParticleChange* PostStepDoIt(const G4Track&,
const G4Step&) override;
virtual
G4double SpectralAngleTRdensity( G4double energy,
G4double varAngle ) const = 0 ;
virtual void ProcessDescription(std::ostream&) const override;
virtual void DumpInfo() const override { ProcessDescription(G4cout); };
G4double IntegralOverEnergy( G4double energy1,
G4double energy2,
G4double varAngle ) const ;
virtual G4double SpectralAngleTRdensity(G4double energy,
G4double varAngle) const = 0;
G4double IntegralOverAngle( G4double energy,
G4double varAngle1,
G4double varAngle2 ) const ;
G4double IntegralOverEnergy(G4double energy1, G4double energy2,
G4double varAngle) const;
G4double AngleIntegralDistribution( G4double varAngle1,
G4double varAngle2 ) const ;
G4double IntegralOverAngle(G4double energy, G4double varAngle1,
G4double varAngle2) const;
G4double EnergyIntegralDistribution( G4double energy1,
G4double energy2 ) const ;
G4double AngleIntegralDistribution(G4double varAngle1,
G4double varAngle2) const;
G4double EnergyIntegralDistribution(G4double energy1, G4double energy2) const;
// Access functions
protected :
G4int fMatIndex1 ; // index of the 1st material
G4int fMatIndex2 ; // index of the 2nd material
// private :
G4double fGamma ;
G4double fEnergy ;
G4double fVarAngle ;
protected:
// Local constants
static const G4int fSympsonNumber ; // Accuracy of Sympson integration 10
static const G4int fGammaNumber ; // = 15
static const G4int fPointNumber ; // = 100
// Accuracy of Sympson integration
static constexpr G4int fSympsonNumber = 100;
static constexpr G4int fGammaNumber = 15;
static constexpr G4int fPointNumber = 100;
G4double fMinEnergy ; // min TR energy
G4double fMaxEnergy ; // max TR energy
G4double fMaxTheta ; // max theta of TR quanta
G4double fGamma;
G4double fEnergy;
G4double fVarAngle;
G4double fSigma1 ; // plasma energy Sq of matter1
G4double fSigma2 ; // plasma energy Sq of matter2
G4double fMinEnergy; // min TR energy
G4double fMaxEnergy; // max TR energy
G4double fMaxTheta; // max theta of TR quanta
private:
// Operators
G4TransitionRadiation(const G4TransitionRadiation& right) = delete;
G4TransitionRadiation&
operator=(const G4TransitionRadiation& right) = delete;
G4double fSigma1; // plasma energy Sq of matter1
G4double fSigma2; // plasma energy Sq of matter2
G4int fMatIndex1; // index of the 1st material
G4int fMatIndex2; // index of the 2nd material
};
#endif // G4TransitionRadiation_h
#endif // G4TransitionRadiation_h
@@ -23,46 +23,43 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
///////////////////////////////////////////////////////////////////////////
//
// Process describing a radiator of X-ray transition radiation.
//
// 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:
//
// 05.04.05 V. Grichine, first version
// 05.04.05 V. Grichine, first version
//
#ifndef G4TransparentRegXTRadiator_h
#define G4TransparentRegXTRadiator_h 1
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4TransparentRegXTRadiator : public G4VXTRenergyLoss
{
public:
explicit G4TransparentRegXTRadiator (G4LogicalVolume *anEnvelope,
G4Material*,G4Material*, G4double,G4double,G4int,
const G4String & processName = "TransparentRegXTRadiator");
~G4TransparentRegXTRadiator ();
public:
explicit G4TransparentRegXTRadiator(
G4LogicalVolume* anEnvelope, G4Material*, G4Material*, G4double, G4double,
G4int, const G4String& processName = "TransparentRegXTRadiator");
~G4TransparentRegXTRadiator();
// reimplementation of base class function in analytical way
G4double SpectralXTRdEdx(G4double energy) override;
// Pure virtual function from base class
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle) override;
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
};
#endif
@@ -23,60 +23,52 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VTRModel -- header file
//
// The model of transition radiation
//
// History:
//
// 04.10.05, V.Grichine move from pure virtual and new class name
// 04.10.05, V.Grichine move from pure virtual and new class name
// 29.02.04, V.Ivanchenko created
#ifndef G4VTRModel_h
#define G4VTRModel_h
#include "globals.hh"
#include "G4Material.hh"
#include "G4ThreeVector.hh"
#include "G4Track.hh"
#include "G4VParticleChange.hh"
#include <vector>
#include "globals.hh"
#include "G4ThreeVector.hh"
class G4Material;
class G4Track;
class G4VParticleChange;
class G4VTRModel
{
public:
public:
// Constructors
explicit G4VTRModel( const G4String& modelName) {fName = modelName;};
explicit G4VTRModel(const G4String& modelName) { fName = modelName; };
// Destructor
virtual ~G4VTRModel(){};
virtual ~G4VTRModel() {};
const G4String& GetName() const {return fName;};
const G4String& GetName() const { return fName; };
virtual void GenerateSecondaries(G4VParticleChange& pChange,
std::vector<const G4Material*>& materials,
std::vector<G4double>& steps,
std::vector<G4ThreeVector>& normals,
G4ThreeVector& startingPosition,
const G4Track& track);
G4ThreeVector& startingPosition,
const G4Track& track);
// disable assignment operator & copy constructor
G4VTRModel& operator=(const G4VTRModel& right) = delete;
G4VTRModel(const G4VTRModel&) = delete;
virtual void PrintInfo() { return; };
// disable assignment operator & copy constructor
G4VTRModel & operator=(const G4VTRModel &right) = delete;
G4VTRModel(const G4VTRModel&) = delete;
protected:
G4String fName;
protected:
G4String fName;
};
#endif // G4VTRModel_h
#endif // G4VTRModel_h
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VTransitionRadiation -- header file
//
// Generic process of transition radiation
@@ -36,72 +34,70 @@
#ifndef G4VTransitionRadiation_h
#define G4VTransitionRadiation_h
#include "G4VDiscreteProcess.hh"
#include "G4Track.hh"
#include "G4ForceCondition.hh"
#include "globals.hh"
#include "G4ForceCondition.hh"
#include "G4ParticleDefinition.hh"
#include "G4Region.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4VDiscreteProcess.hh"
#include "G4VParticleChange.hh"
#include <vector>
class G4Material;
class G4Region;
class G4VTRModel;
class G4particleDefinition;
class G4LossTableManager;
class G4Material;
class G4VTRModel;
class G4VTransitionRadiation : public G4VDiscreteProcess
class G4VTransitionRadiation : public G4VDiscreteProcess
{
public:
public:
// Constructors
explicit G4VTransitionRadiation(const G4String& processName = "TR",
G4ProcessType type = fElectromagnetic);
// Constructors
explicit G4VTransitionRadiation( const G4String& processName = "TR",
G4ProcessType type = fElectromagnetic);
// Destructor
virtual ~G4VTransitionRadiation();
virtual G4bool IsApplicable(
const G4ParticleDefinition& aParticleType) override;
// Destructor
virtual ~G4VTransitionRadiation() ;
virtual G4bool
IsApplicable(const G4ParticleDefinition& aParticleType) override;
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
virtual G4double GetMeanFreePath(const G4Track& track, G4double,
G4ForceCondition* condition) override;
G4ForceCondition* condition) override;
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& step) override;
virtual void PrintInfoDefinition();
// Print out of the class parameters
const G4Step& step) override;
void SetRegion(const G4Region* reg);
void SetModel(G4VTRModel* m);
// private :
void Clear();
// hide assignment operator
G4VTransitionRadiation &
operator=(const G4VTransitionRadiation &right);
G4VTransitionRadiation(const G4VTransitionRadiation&);
G4VTransitionRadiation& operator=(const G4VTransitionRadiation& right) =
delete;
G4VTransitionRadiation(const G4VTransitionRadiation&) = delete;
G4LossTableManager* theManager;
private:
G4LossTableManager* theManager;
const G4Region* region;
G4VTRModel* model;
std::vector<const G4Material*> materials;
std::vector<G4double> steps;
std::vector<G4ThreeVector> normals;
std::vector<const G4Material*> materials;
std::vector<G4double> steps;
std::vector<G4ThreeVector> normals;
G4ThreeVector startingPosition;
G4ThreeVector startingDirection;
const G4Region* region;
G4VTRModel* model;
G4ThreeVector startingPosition;
G4ThreeVector startingDirection;
G4int nSteps;
G4double gammaMin;
G4double cosDThetaMax;
G4double gammaMin;
G4double cosDThetaMax;
G4int nSteps;
};
#endif // G4VTransitionRadiation_h
#endif // G4VTransitionRadiation_h
@@ -23,15 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
///////////////////////////////////////////////////////////////////////////
//
//
// base class for 'fast' parametrisation model describing X-ray transition
// created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
// created in some G4Envelope. Angular distribuiton is very rough !!! (see DoIt
// method
//
//
// History:
// 06.10.05 V. Grichine first step to discrete process
// 15.01.02 V. Grichine first version
@@ -42,203 +39,182 @@
#ifndef G4VXTRenergyLoss_h
#define G4VXTRenergyLoss_h 1
#include <complex>
#include "globals.hh"
#include "Randomize.hh"
#include "G4LogicalVolume.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4Gamma.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4ParticleChange.hh"
#include "G4PhysicsTable.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4VContinuousProcess.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4PhysicsTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4Integrator.hh"
#include "G4ParticleChange.hh"
class G4SandiaTable;
class G4VParticleChange;
class G4PhysicsFreeVector;
class G4PhysicsLinearVector;
class G4PhysicsLogVector;
class G4VXTRenergyLoss : public G4VDiscreteProcess // G4VContinuousProcess
class G4VXTRenergyLoss : public G4VDiscreteProcess
{
public:
public:
explicit G4VXTRenergyLoss(G4LogicalVolume* anEnvelope, G4Material*,
G4Material*, G4double, G4double, G4int,
const G4String& processName = "XTRenergyLoss",
G4ProcessType type = fElectromagnetic);
virtual ~G4VXTRenergyLoss();
explicit G4VXTRenergyLoss (G4LogicalVolume *anEnvelope,G4Material*,
G4Material*, G4double,G4double,G4int,
const G4String & processName = "XTRenergyLoss",
G4ProcessType type = fElectromagnetic);
virtual ~G4VXTRenergyLoss ();
virtual void ProcessDescription(std::ostream&) const override;
virtual void DumpInfo() const override { ProcessDescription(G4cout); };
// These virtual has to be implemented in inherited particular TR radiators
virtual G4double GetStackFactor( G4double energy, G4double gamma,
G4double varAngle );
G4VXTRenergyLoss(G4VXTRenergyLoss&) = delete;
G4VXTRenergyLoss& operator=(const G4VXTRenergyLoss& right) = delete;
// Virtual methods to be implemented in inherited particular TR radiators
virtual G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle);
virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) override;
virtual G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition) override;
G4double previousStepSize,
G4ForceCondition* condition) override;
virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
void BuildEnergyTable() ;
void BuildAngleForEnergyBank() ;
void BuildEnergyTable();
void BuildAngleForEnergyBank();
void BuildTable(){} ;
void BuildAngleTable() ;
void BuildGlobalAngleTable() ;
void BuildTable(){};
void BuildAngleTable();
void BuildGlobalAngleTable();
G4complex OneInterfaceXTRdEdx( G4double energy,
G4double gamma,
G4double varAngle ) ;
G4complex OneInterfaceXTRdEdx(G4double energy, G4double gamma,
G4double varAngle);
G4double SpectralAngleXTRdEdx(G4double varAngle) ;
G4double SpectralAngleXTRdEdx(G4double varAngle);
virtual G4double SpectralXTRdEdx(G4double energy) ;
virtual G4double SpectralXTRdEdx(G4double energy);
G4double AngleSpectralXTRdEdx(G4double energy) ;
G4double AngleSpectralXTRdEdx(G4double energy);
G4double AngleXTRdEdx(G4double varAngle) ;
/////////////////////////////////////////////////////////////
G4double OneBoundaryXTRNdensity( G4double energy,
G4double gamma,
G4double varAngle ) const ;
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);
G4double XTRNSpectralAngleDensity(G4double varAngle) ;
G4double XTRNSpectralDensity(G4double energy) ;
// for photon angle distribution tables
G4double XTRNAngleSpectralDensity(G4double energy);
G4double XTRNAngleDensity(G4double varAngle);
G4double XTRNAngleSpectralDensity(G4double energy) ;
G4double XTRNAngleDensity(G4double varAngle) ;
void GetNumberOfPhotons() ;
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 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 GetGasFormationZone(G4double,G4double,G4double);
G4complex GetGasComplexFZ(G4double,G4double,G4double);
void ComputeGasPhotoAbsCof();
G4double GetGasLinearPhotoAbs(G4double);
void GetGasZmuProduct();
G4double GetGasZmuProduct(G4double,G4double,G4double);
G4double GetPlateCompton(G4double);
G4double GetGasCompton(G4double);
G4double GetComptonPerAtom(G4double, G4double);
G4double GetPlateCompton(G4double);
G4double GetGasCompton(G4double);
G4double GetComptonPerAtom(G4double,G4double);
G4double GetXTRrandomEnergy(G4double scaledTkin, G4int iTkin);
G4double GetXTRenergy(G4int iPlace, G4double position, G4int iTransfer);
G4double GetXTRrandomEnergy( G4double scaledTkin, G4int iTkin );
G4double GetXTRenergy( G4int iPlace, G4double position, G4int iTransfer );
G4double GetRandomAngle(G4double energyXTR, G4int iTkin);
G4double GetAngleXTR(G4int iTR, G4double position, G4int iAngle);
G4double GetRandomAngle( G4double energyXTR, G4int iTkin );
G4double GetAngleXTR(G4int iTR,G4double position,G4int iAngle);
G4double GetGamma() { return fGamma; };
G4double GetEnergy() { return fEnergy; };
G4double GetVarAngle() { return fVarAngle; };
G4double GetGamma() {return fGamma;};
G4double GetEnergy() {return fEnergy;};
G4double GetVarAngle(){return fVarAngle;};
void SetGamma(G4double gamma) {fGamma = gamma;};
void SetEnergy(G4double energy) {fEnergy = energy;};
void SetVarAngle(G4double varAngle){fVarAngle = varAngle;};
void SetAngleRadDistr(G4bool pAngleRadDistr){fAngleRadDistr=pAngleRadDistr;};
void SetCompton(G4bool pC){fCompton=pC;};
void SetGamma(G4double gamma) { fGamma = gamma; };
void SetEnergy(G4double energy) { fEnergy = energy; };
void SetVarAngle(G4double varAngle) { fVarAngle = varAngle; };
void SetAngleRadDistr(G4bool pAngleRadDistr)
{
fAngleRadDistr = pAngleRadDistr;
};
void SetCompton(G4bool pC) { fCompton = pC; };
G4PhysicsLogVector* GetProtonVector(){ return fProtonEnergyVector;};
G4int GetTotBin(){return fTotBin;};
G4PhysicsLogVector* GetProtonVector() { return fProtonEnergyVector; };
G4int GetTotBin() { return fTotBin; };
G4PhysicsFreeVector* GetAngleVector(G4double energy, G4int n);
protected:
protected:
// min TR energy
static constexpr G4double fTheMinEnergyTR = 1. * CLHEP::keV;
// max TR energy
static constexpr G4double fTheMaxEnergyTR = 100. * CLHEP::keV;
static constexpr G4double fTheMinAngle = 1.e-3; // min theta of TR quanta
static constexpr G4double fTheMaxAngle = 1.e-2; // max theta of TR quanta
// min Tkin of proton in tables
static constexpr G4double fMinProtonTkin = 100. * CLHEP::GeV;
// max Tkin of proton in tables
static constexpr G4double fMaxProtonTkin = 100. * CLHEP::TeV;
// physical constants for plasma energy
static constexpr G4double fPlasmaCof =
4. * CLHEP::pi * CLHEP::fine_structure_const * CLHEP::hbarc * CLHEP::hbarc *
CLHEP::hbarc / CLHEP::electron_mass_c2;
static constexpr G4double fCofTR = CLHEP::fine_structure_const / CLHEP::pi;
G4ParticleDefinition* 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 ;
G4PhysicsLogVector* fProtonEnergyVector ;
G4PhysicsLogVector* fXTREnergyVector ;
G4double fTheMinEnergyTR; // min TR energy
G4double fTheMaxEnergyTR; // max TR energy
G4double fMinEnergyTR; // min TR energy in material
G4double fMaxEnergyTR; // max TR energy in material
G4double fTheMaxAngle; // max theta of TR quanta
G4double fTheMinAngle; // max theta of TR quanta
G4double fMaxThetaTR; // max theta of TR quanta
G4int fBinTR; // number of bins in TR vectors
G4double fMinProtonTkin; // min Tkin of proton in tables
G4double fMaxProtonTkin; // max Tkin of proton in tables
G4int fTotBin; // number of bins in log scale
G4double fGamma; // current Lorentz factor
G4double fEnergy; // energy and
G4double fVarAngle; // angle squared
G4double fLambda;
G4double fPlasmaCof ; // physical consts for plasma energy
G4double fCofTR ;
G4bool fExitFlux;
G4bool fAngleRadDistr;
G4bool fCompton;
G4double fSigma1;
G4double fSigma2; // plasma energy Sq of matter1/2
G4int fMatIndex1;
G4int fMatIndex2;
G4int fPlateNumber;
G4double fTotalDist;
G4double fPlateThick;
G4double fGasThick;
G4double fAlphaPlate;
G4double fAlphaGas ;
static constexpr G4int fBinTR = 200; // number of bins in TR vectors
static constexpr G4int fTotBin = 50; // number of bins in log scale
G4ParticleDefinition* fPtrGamma; // pointer to TR photon
G4double* fGammaCutInKineticEnergy; // TR photon cut in energy array
G4LogicalVolume* fEnvelope;
G4PhysicsTable* fAngleDistrTable;
G4PhysicsTable* fEnergyDistrTable;
G4PhysicsTable* fAngleForEnergyTable;
G4PhysicsLogVector* fProtonEnergyVector;
G4PhysicsLogVector* fXTREnergyVector;
G4SandiaTable* fPlatePhotoAbsCof;
G4SandiaTable* fGasPhotoAbsCof;
G4ParticleChange fParticleChange;
std::vector<G4PhysicsTable*> fAngleBank;
G4PhysicsTable* fAngleForEnergyTable;
std::vector<G4PhysicsTable*> fAngleBank;
G4double fGammaTkinCut; // Tkin cut of TR photon in current mat.
G4double fMinEnergyTR; // min TR energy in material
G4double fMaxEnergyTR; // max TR energy in material
G4double fMaxThetaTR; // max theta of TR quanta
G4double fTotalDist;
G4double fPlateThick;
G4double fGasThick;
G4double fAlphaPlate;
G4double fAlphaGas;
G4double fGamma; // current Lorentz factor
G4double fEnergy; // energy and
G4double fVarAngle; // angle squared
G4double fLambda;
G4double fSigma1;
G4double fSigma2; // plasma energy Sq of matter1/2
private:
// copy constructor and hide assignment operator
G4VXTRenergyLoss(G4VXTRenergyLoss &) = delete;
G4VXTRenergyLoss & operator=(const G4VXTRenergyLoss &right) = delete;
G4int fMatIndex1;
G4int fMatIndex2;
G4int fPlateNumber;
G4bool fExitFlux;
G4bool fAngleRadDistr;
G4bool fCompton;
};
#endif
@@ -23,13 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
///////////////////////////////////////////////////////////////////////////
//
// Rough model describing a gamma function distributed radiator of X-ray
// transition radiation. XTR is considered to flux after radiator!
// Thicknesses of plates and gas gaps are distributed according to gamma
//
// Rough model describing a gamma function distributed radiator of X-ray
// transition radiation. XTR is considered to flux after radiator!
// 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) * std::exp(-alpha*x/<x>) / G(alpha)
@@ -41,37 +39,33 @@
// 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:
//
// 03.10.05 V. Grichine, first version
// 03.10.05 V. Grichine, first version
//
#ifndef G4XTRGammaRadModel_h
#define G4XTRGammaRadModel_h 1
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4XTRGammaRadModel : public G4VXTRenergyLoss
{
public:
public:
explicit G4XTRGammaRadModel(G4LogicalVolume* anEnvelope, G4double, G4double,
G4Material*, G4Material*, G4double, G4double,
G4int,
const G4String& processName = "XTRgammaRadiator");
~G4XTRGammaRadModel();
explicit G4XTRGammaRadModel (G4LogicalVolume *anEnvelope,
G4double,G4double,
G4Material*,G4Material*,
G4double,G4double,G4int,
const G4String & processName = "XTRgammaRadiator" );
virtual ~G4XTRGammaRadModel ();
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
// Pure virtual function from base class
G4double GetStackFactor(G4double energy, G4double gamma,
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
private:
// G4double fAlphaPlate, fAlphaGas ;
};
#endif
@@ -23,43 +23,41 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
///////////////////////////////////////////////////////////////////////////
//
//
// Model describing a regular radiator of X-ray transition radiation.
// It is Garibian like model for XTR after radiator
// It is Garibian like model for XTR after radiator
// 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:
// 10.10.05 V. Grichine, first version
// 10.10.05 V. Grichine, first version
//
#ifndef G4XTRRegularRadModel_h
#define G4XTRRegularRadModel_h 1
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4XTRRegularRadModel : public G4VXTRenergyLoss
{
public:
public:
explicit G4XTRRegularRadModel(G4LogicalVolume* anEnvelope, G4Material*,
G4Material*, G4double, G4double, G4int,
const G4String& processName = "XTRegularModel");
~G4XTRRegularRadModel();
explicit G4XTRRegularRadModel (G4LogicalVolume *anEnvelope,G4Material*,
G4Material*, G4double,G4double,G4int,
const G4String & processName = "XTRegularModel");
virtual ~G4XTRRegularRadModel ();
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
G4double SpectralXTRdEdx(G4double energy) override;
// Pure virtual function from base class
G4double GetStackFactor(G4double energy, G4double gamma,
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
};
@@ -23,44 +23,42 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
///////////////////////////////////////////////////////////////////////////
//
// Process describing a radiator of X-ray transition radiation.
//
// 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:
//
// 05.04.05 V. Grichine, first version
// 05.04.05 V. Grichine, first version
//
#ifndef G4XTRTransparentRegRadModel_h
#define G4XTRTransparentRegRadModel_h 1
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4XTRTransparentRegRadModel : public G4VXTRenergyLoss
{
public:
public:
explicit G4XTRTransparentRegRadModel(
G4LogicalVolume* anEnvelope, G4Material*, G4Material*, G4double, G4double,
G4int, const G4String& processName = "XTRTransparentRegRadModel");
~G4XTRTransparentRegRadModel();
explicit G4XTRTransparentRegRadModel (G4LogicalVolume *anEnvelope,G4Material*,
G4Material*, G4double,G4double,G4int,
const G4String & processName = "XTRTransparentRegRadModel");
~G4XTRTransparentRegRadModel ();
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
// reimplementation of base class function in analytical way
G4double SpectralXTRdEdx(G4double energy) override;
// Pure virtual function from base class
G4double GetStackFactor(G4double energy, G4double gamma,
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
};