Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -163,6 +163,9 @@ class G4Cerenkov : public G4VProcess
void DumpInfo() const override {ProcessDescription(G4cout);};
void ProcessDescription(std::ostream& out) const override;
void SetVerboseLevel(G4int);
// sets verbosity
protected:
G4PhysicsTable* thePhysicsTable;
@@ -175,6 +178,8 @@ class G4Cerenkov : public G4VProcess
G4bool fStackingFlag;
G4bool fTrackSecondariesFirst;
G4int secID = -1; // creator modelID
};
inline G4bool G4Cerenkov::GetTrackSecondariesFirst() const
@@ -189,11 +194,6 @@ inline G4double G4Cerenkov::GetMaxBetaChangePerStep() const
inline G4int G4Cerenkov::GetMaxNumPhotonsPerStep() const { return fMaxPhotons; }
inline void G4Cerenkov::SetStackPhotons(const G4bool stackingFlag)
{
fStackingFlag = stackingFlag;
}
inline G4bool G4Cerenkov::GetStackPhotons() const { return fStackingFlag; }
inline G4int G4Cerenkov::GetNumPhotons() const { return fNumPhotons; }
@@ -151,6 +151,8 @@ class G4ForwardXrayTR : public G4TransitionRadiation
G4double fGammaTkinCut; // Tkin cut of TR photon in current mat.
G4double fSigma1; // plasma energy Sq of matter1
G4double fSigma2; // plasma energy Sq of matter2
G4int secID = -1; // creator modelID
};
#endif // G4FORWARDXRAYTR_H
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
///////////////////////////////////////////////////////////////////////////
//
// Process describing a radiator of X-ray transition radiation.
// Regular radiator with thicknesses of plates and gas gaps are Gauss-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:
//
// 19.09.21 V. Grichine, first version
//
#ifndef G4GaussXTRadiator_h
#define G4GaussXTRadiator_h 1
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4VXTRenergyLoss.hh"
class G4GaussXTRadiator : public G4VXTRenergyLoss
{
public:
explicit G4GaussXTRadiator(
G4LogicalVolume* anEnvelope, G4double, G4double, G4Material*, G4Material*, G4double, G4double,
G4int, const G4String& processName = "GaussXTRadiator");
~G4GaussXTRadiator();
// reimplementation of base class function in analytical way
G4double SpectralXTRdEdx(G4double energy) override;
G4double GetStackFactor(G4double energy, G4double gamma,
G4double varAngle) override;
void ProcessDescription(std::ostream&) const override;
void DumpInfo() const override { ProcessDescription(G4cout); };
};
#endif
@@ -187,6 +187,9 @@ class G4Scintillation : public G4VRestDiscreteProcess
void DumpPhysicsTable() const;
// Prints the fast and slow scintillation integral tables.
void SetVerboseLevel(G4int);
// sets verbosity
private:
G4PhysicsTable* fIntegralTable1;
@@ -215,27 +218,19 @@ class G4Scintillation : public G4VRestDiscreteProcess
// emission time distribution when there is a finite rise time
G4double sample_time(G4double tau1, G4double tau2);
G4int secID = -1; // creator modelID
};
////////////////////
// Inline methods
////////////////////
inline void G4Scintillation::SetTrackSecondariesFirst(const G4bool state)
{
fTrackSecondariesFirst = state;
}
inline G4bool G4Scintillation::GetTrackSecondariesFirst() const
{
return fTrackSecondariesFirst;
}
inline void G4Scintillation::SetFiniteRiseTime(const G4bool state)
{
fFiniteRiseTime = state;
}
inline G4bool G4Scintillation::GetFiniteRiseTime() const
{
return fFiniteRiseTime;
@@ -273,21 +268,11 @@ inline G4bool G4Scintillation::GetScintillationByParticleType() const
return fScintillationByParticleType;
}
inline void G4Scintillation::SetScintillationTrackInfo(const G4bool trackType)
{
fScintillationTrackInfo = trackType;
}
inline G4bool G4Scintillation::GetScintillationTrackInfo() const
{
return fScintillationTrackInfo;
}
inline void G4Scintillation::SetStackPhotons(const G4bool stackingFlag)
{
fStackingFlag = stackingFlag;
}
inline G4bool G4Scintillation::GetStackPhotons() const { return fStackingFlag; }
inline G4int G4Scintillation::GetNumPhotons() const { return fNumPhotons; }
@@ -90,6 +90,8 @@ class G4SynchrotronRadiation : public G4VDiscreteProcess
G4bool FirstTime;
G4bool FirstTime1;
G4int secID = -1; // creator modelID
};
////////////////////////// INLINE METHODS /////////////////////////////
@@ -138,6 +138,8 @@ class G4SynchrotronRadiationInMat : public G4VDiscreteProcess
G4int fRootNumber;
G4int fVerboseLevel;
G4int secID = -1; // creator modelID
};
#endif // end of G4SynchrotronRadiationInMat.hh
@@ -30,11 +30,11 @@
// method
//
// History:
// 06.10.05 V. Grichine first step to discrete process
// 15.01.02 V. Grichine first version
// 06.10.05 V. Grichine first step to discrete process
// 15.01.02 V. Grichine first version
// 28.07.05, P.Gumplinger add G4ProcessType to constructor
// 28.09.07, V.Ivanchenko general cleanup without change of algorithms
//
// 19.09.21, V. Grichine, set/get functions for angle anf energy ranges and number of bins
#ifndef G4VXTRenergyLoss_h
#define G4VXTRenergyLoss_h 1
@@ -140,18 +140,53 @@ class G4VXTRenergyLoss : public G4VDiscreteProcess
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; };
// set/get methods for class fields
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; };
G4double GetGamma() { return fGamma; };
void SetEnergy(G4double energy) { fEnergy = energy; };
G4double GetEnergy() { return fEnergy; };
void SetVarAngle(G4double varAngle) { fVarAngle = varAngle; };
G4double GetVarAngle() { return fVarAngle; };
void SetCompton(G4bool pC) { fCompton = pC; };
G4bool GetCompton() { return fCompton; };
void SetAlphaGas(G4double ag){ fAlphaGas = ag;};
G4double GetAlphaGas() { return fAlphaGas; };
void SetAlphaPlate(G4double ap){ fAlphaPlate = ap;};
G4double GetAlphaPlate() { return fAlphaPlate; };
void SetTheMinEnergyTR(G4double minetr){ fTheMinEnergyTR = minetr;};
G4double GetTheMinEnergyTR() { return fTheMinEnergyTR; };
void SetTheMaxEnergyTR(G4double maxetr){ fTheMaxEnergyTR = maxetr;};
G4double GetTheMaxEnergyTR() { return fTheMaxEnergyTR; };
void SetMinEnergyTR(G4double minetr){ fMinEnergyTR = minetr;};
G4double GetMinEnergyTR() { return fMinEnergyTR; };
void SetMaxEnergyTR(G4double maxetr){ fMaxEnergyTR = maxetr;};
G4double GetMaxEnergyTR() { return fMaxEnergyTR; };
void SetTheMinAngle(G4double minang){ fTheMinAngle = minang;};
G4double GetTheMinAngle() { return fTheMinAngle; };
void SetTheMaxAngle(G4double maxang){ fTheMaxAngle = maxang;};
G4double GetTheMaxAngle() { return fTheMaxAngle; };
void SetMinThetaTR(G4double minatr){ fMinThetaTR = minatr;};
G4double GetMinThetaTR() { return fMinThetaTR; };
void SetMaxThetaTR(G4double maxatr){ fMaxThetaTR = maxatr;};
G4double GetMaxThetaTR() { return fMaxThetaTR; };
// modes of XTR angle distribution
void SetFastAngle(G4bool fatr){ fFastAngle = fatr;};
G4bool GetFastAngle() { return fFastAngle; };
void SetAngleRadDistr(G4bool fatr){ fAngleRadDistr = fatr;};
G4bool GetAngleRadDistr() { return fAngleRadDistr; };
G4PhysicsLogVector* GetProtonVector() { return fProtonEnergyVector; };
G4int GetTotBin() { return fTotBin; };
@@ -159,11 +194,14 @@ class G4VXTRenergyLoss : public G4VDiscreteProcess
protected:
// min TR energy
static constexpr G4double fTheMinEnergyTR = 1. * CLHEP::keV;
G4double fTheMinEnergyTR;
// 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
G4double fTheMaxEnergyTR;
G4double fTheMinAngle; // min theta of TR quanta
G4double fTheMaxAngle; // 1.e-4; // max theta of TR quanta
// static const members
// min Tkin of proton in tables
static constexpr G4double fMinProtonTkin = 100. * CLHEP::GeV;
// max Tkin of proton in tables
@@ -174,8 +212,8 @@ class G4VXTRenergyLoss : public G4VDiscreteProcess
CLHEP::hbarc / CLHEP::electron_mass_c2;
static constexpr G4double fCofTR = CLHEP::fine_structure_const / CLHEP::pi;
static constexpr G4int fBinTR = 200; // number of bins in TR vectors
static constexpr G4int fTotBin = 50; // number of bins in log scale
G4int fTotBin; // number of bins in log-gamma scale
G4int fBinTR; // number of bins in TR energy-angle vectors
G4ParticleDefinition* fPtrGamma; // pointer to TR photon
@@ -195,7 +233,7 @@ class G4VXTRenergyLoss : public G4VDiscreteProcess
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 fMinThetaTR, fMaxThetaTR; // min-max theta of TR quanta
G4double fTotalDist;
G4double fPlateThick;
G4double fGasThick;
@@ -203,7 +241,7 @@ class G4VXTRenergyLoss : public G4VDiscreteProcess
G4double fAlphaGas;
G4double fGamma; // current Lorentz factor
G4double fEnergy; // energy and
G4double fVarAngle; // angle squared
G4double fVarAngle; // angle squared!
G4double fLambda;
G4double fSigma1;
G4double fSigma2; // plasma energy Sq of matter1/2
@@ -213,8 +251,10 @@ class G4VXTRenergyLoss : public G4VDiscreteProcess
G4int fPlateNumber;
G4bool fExitFlux;
G4bool fAngleRadDistr;
G4bool fFastAngle, fAngleRadDistr;
G4bool fCompton;
G4int secID = -1; // creator modelID
};
#endif