Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
@@ -0,0 +1,167 @@
// This code implementation is the intellectual property of
// the RD44 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: G4Cerenkov.hh,v 2.2 1998/08/25 22:05:48 gum Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
////////////////////////////////////////////////////////////////////////
// Cerenkov Radiation Class Definition
////////////////////////////////////////////////////////////////////////
//
// File: G4Cerenkov.hh
// Description: Continuous Process -- Generation of Cerenkov Photons
// Version: 2.0
// Created: 1996-02-21
// Author: Juliet Armstrong
// Updated: 1997-04-09 by Peter Gumplinger
// > G4MaterialPropertiesTable; new physics/tracking scheme
// mail: gum@triumf.ca
//
////////////////////////////////////////////////////////////////////////
#ifndef G4Cerenkov_h
#define G4Cerenkov_h 1
/////////////
// Includes
/////////////
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Step.hh"
#include "G4VContinuousProcess.hh"
#include "G4OpticalPhoton.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4PhysicsTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
/////////////////////
// Class Definition
/////////////////////
class G4Cerenkov : public G4VContinuousProcess
{
private:
//////////////
// Operators
//////////////
// G4Cerenkov& operator=(const G4Cerenkov &right);
public:
////////////////////////////////
// Constructors and Destructor
////////////////////////////////
G4Cerenkov(const G4String& processName = "Cerenkov");
// G4Cerenkov(const G4Cerenkov &right);
~G4Cerenkov();
////////////
// Methods
////////////
G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
G4double GetContinuousStepLimit(const G4Track& aTrack,
G4double ,
G4double ,
G4double& );
G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
void SetTrackSecondariesFirst(const G4bool state);
void SetMaxNumPhotonsPerStep(const G4int NumPhotons);
G4PhysicsTable* GetPhysicsTable() const;
// Returns the address of the physics table.
void DumpPhysicsTable() const;
private:
void BuildThePhysicsTable();
/////////////////////
// Helper Functions
/////////////////////
G4double GetAverageNumberOfPhotons(const G4DynamicParticle *aParticle,
const G4Material *aMaterial,
const G4MaterialPropertyVector* Rindex) const;
///////////////////////
// Class Data Members
///////////////////////
protected:
G4PhysicsTable* thePhysicsTable;
// A Physics Table can be either a cross-sections table or
// an energy table (or can be used for other specific
// purposes).
private:
G4bool fTrackSecondariesFirst;
G4int fMaxPhotons;
};
////////////////////
// Inline methods
////////////////////
inline
G4bool G4Cerenkov::IsApplicable(const G4ParticleDefinition& aParticleType)
{
return (aParticleType.GetPDGCharge() != 0);
}
inline
void G4Cerenkov::SetTrackSecondariesFirst(const G4bool state)
{
fTrackSecondariesFirst = state;
}
inline
void G4Cerenkov::SetMaxNumPhotonsPerStep(const G4int NumPhotons)
{
fMaxPhotons = NumPhotons;
}
inline
void G4Cerenkov::DumpPhysicsTable() const
{
G4int PhysicsTableSize = thePhysicsTable->entries();
G4PhysicsOrderedFreeVector *v;
for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
{
v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i];
v->DumpValues();
}
}
inline G4PhysicsTable* G4Cerenkov::GetPhysicsTable() const
{
return thePhysicsTable;
}
#endif /* G4Cerenkov_h */
@@ -0,0 +1,168 @@
// This code implementation is the intellectual property of
// the RD44 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: G4ForwardXrayTR.hh,v 2.1 1998/11/27 13:34:54 grichine Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G4ForwardXrayTR -- header file
//
// Class for description of forward X-ray transition radiation generated
// by relativistic charged particle crossed interface between material 1
// and material 2 (1 -> 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:
// 22.09.97, V. Grichine (Vladimir.Grichine@cern.ch)
#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 "G4TransitionRadiation.hh"
#include "G4PhysicsTable.hh"
#include "G4Gamma.hh"
class G4ForwardXrayTR : public G4TransitionRadiation
{
public:
// Constructors
G4ForwardXrayTR() ;
G4ForwardXrayTR( G4Material* pMat1,
G4Material* pMat2,
const G4String& processName="XrayTR" ) ;
// G4ForwardXrayTR(const G4ForwardXrayTR& right) ;
// Destructor
~G4ForwardXrayTR() ;
// Operators
// G4ForwardXrayTR& operator=(const G4ForwardXrayTR& right) ;
// G4int operator==(const G4ForwardXrayTR& right)const ;
// G4int operator!=(const G4ForwardXrayTR& right)const ;
/////////////////////// Methods /////////////////////////////////
//
G4VParticleChange* PostStepDoIt( const G4Track& aTrack,
const G4Step& aStep ) ;
G4double GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const ;
G4double GetThetaTR(G4int iMat, G4int jMat, G4int iTkin) const ;
///////////////////// Angle distribution /////////////////////////////
//
G4double SpectralAngleTRdensity( G4double energy,
G4double varAngle ) const;
G4double AngleDensity( G4double energy,
G4double varAngle ) const ;
G4double EnergyInterval( G4double energy1,
G4double energy2,
G4double varAngle ) const ;
G4double AngleSum( G4double varAngle1,
G4double varAngle2 ) const ;
///////////////////////// Energy distribution ///////////////////////////////
G4double SpectralDensity( G4double energy,
G4double x ) const ;
G4double AngleInterval( G4double energy,
G4double varAngle1,
G4double varAngle2 ) const ;
G4double EnergySum( G4double energy1,
G4double energy2 ) const ;
/////////////////////////// Access functions ////////////////////////////
static G4PhysicsTable* GetAngleDistrTable() { return fAngleDistrTable ; } ;
static G4PhysicsTable* GetEnergyDistrTable() { return fEnergyDistrTable ; } ;
static G4int GetSympsonNumber() { return fSympsonNumber ; } ;
static G4int GetBinTR() { return fBinTR ; } ;
static G4double GetMinProtonTkin() { return fMinProtonTkin ; } ;
static G4double GetMaxProtonTkin() { return fMaxProtonTkin ; } ;
static G4int GetTotBin() { return fTotBin ; } ;
protected :
private : /////////////// Data members ///////////////////////////
G4Gamma* fPtrGamma ; // pointer to TR photon
G4double* fGammaCutInKineticEnergy ; // TR photon cut in energy array
G4double fGammaTkinCut ; // Tkin cut of TR photon in current mat.
static G4PhysicsTable* fAngleDistrTable ;
static G4PhysicsTable* fEnergyDistrTable ;
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
} ; // end of G4ForwardXrayTR class ---------------------------
#endif // G4FORWARDXRAYTR_H
@@ -0,0 +1,207 @@
// This code implementation is the intellectual property of
// the RD44 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: G4Scintillation.hh,v 2.1 1998/11/10 01:06:55 gum Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
////////////////////////////////////////////////////////////////////////
// Scintillation Light Class Definition
////////////////////////////////////////////////////////////////////////
//
// File: G4Scintillation.hh
// Description: Discrete Process - Generation of Scintillation Photons
// Version: 1.0
// Created: 1998-11-07
// Author: Peter Gumplinger
// Updated:
//
// mail: gum@triumf.ca
//
////////////////////////////////////////////////////////////////////////
#ifndef G4Scintillation_h
#define G4Scintillation_h 1
/////////////
// Includes
/////////////
#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4OpticalPhoton.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4PhysicsTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4PhysicsOrderedFreeVector.hh"
/////////////////////
// Class Definition
/////////////////////
class G4Scintillation : public G4VDiscreteProcess
{
private:
//////////////
// Operators
//////////////
// G4Scintillation& operator=(const G4Scintillation &right);
public:
////////////////////////////////
// Constructors and Destructor
////////////////////////////////
G4Scintillation(const G4String& processName = "Scintillation");
// G4Scintillation(const G4Scintillation &right);
~G4Scintillation();
////////////
// Methods
////////////
G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
G4double GetMeanFreePath(const G4Track& aTrack,
G4double ,
G4ForceCondition* );
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
void SetTrackSecondariesFirst(const G4bool state);
G4bool GetTrackSecondariesFirst() const;
void SetScintillationYield(const G4double yield);
G4double GetScintillationYield() const;
void SetResolutionScale(const G4double scale);
G4double GetResolutionScale() const;
void SetScintillationTime(const G4double time);
G4double GetScintillationTime() const;
G4PhysicsTable* GetPhysicsTable() const;
// Returns the address of the physics table.
void DumpPhysicsTable() const;
private:
void BuildThePhysicsTable();
///////////////////////
// Class Data Members
///////////////////////
protected:
G4PhysicsTable* thePhysicsTable;
// A Physics Table can be either a cross-sections table or
// an energy table (or can be used for other specific
// purposes).
private:
G4bool fTrackSecondariesFirst;
G4double ScintillationYield;
G4double ScintillationTime;
G4double ResolutionScale;
};
////////////////////
// Inline methods
////////////////////
inline
G4bool G4Scintillation::IsApplicable(const G4ParticleDefinition& aParticleType)
{
return true;
}
inline
void G4Scintillation::SetTrackSecondariesFirst(const G4bool state)
{
fTrackSecondariesFirst = state;
}
inline
G4bool G4Scintillation::GetTrackSecondariesFirst() const
{
return fTrackSecondariesFirst;
}
inline
void G4Scintillation::SetScintillationYield(const G4double yield)
{
ScintillationYield = yield;
}
inline
G4double G4Scintillation::GetScintillationYield() const
{
return ScintillationYield;
}
inline
void G4Scintillation::SetResolutionScale(const G4double scale)
{
ResolutionScale = scale;
}
inline
G4double G4Scintillation::GetResolutionScale() const
{
return ResolutionScale;
}
inline
void G4Scintillation::SetScintillationTime(const G4double time)
{
ScintillationTime = time;
}
inline
G4double G4Scintillation::GetScintillationTime() const
{
return ScintillationTime;
}
inline
G4PhysicsTable* G4Scintillation::GetPhysicsTable() const
{
return thePhysicsTable;
}
inline
void G4Scintillation::DumpPhysicsTable() const
{
G4int PhysicsTableSize = thePhysicsTable->entries();
G4PhysicsOrderedFreeVector *v;
for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
{
v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i];
v->DumpValues();
}
}
#endif /* G4Scintillation_h */
@@ -0,0 +1,129 @@
// This code implementation is the intellectual property of
// the RD44 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: G4TransitionRadiation.hh,v 2.1 1998/11/27 13:35:12 grichine Exp $
// GEANT4 tag $Name: geant4-00 $
//
// 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:
// - optical back
// - optical forward
// - 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)
#ifndef G4TransitionRadiation_h
#define G4TransitionRadiation_h
#include "G4VDiscreteProcess.hh"
#include "G4Material.hh"
class G4TransitionRadiation : public G4VDiscreteProcess
{
public:
// Constructors
G4TransitionRadiation( const G4String& processName = "TR") ;
// G4TransitionRadiation(const G4TransitionRadiation& right) ;
// Destructor
~G4TransitionRadiation() ;
// Operators
// G4TransitionRadiation& operator=(const G4TransitionRadiation& right) ;
// G4int operator==(const G4TransitionRadiation& right)const ;
// G4int operator!=(const G4TransitionRadiation& right)const ;
// Methods
G4bool IsApplicable(const G4ParticleDefinition& aParticleType)
{
return ( aParticleType.GetPDGCharge() != 0.0 );
}
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition)
{
*condition = Forced;
return DBL_MAX; // so TR doesn't limit mean free path
}
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep)
{
ClearNumberOfInteractionLengthLeft();
return &aParticleChange;
}
virtual
G4double SpectralAngleTRdensity( G4double energy,
G4double varAngle ) const = 0 ;
G4double IntegralOverEnergy( G4double energy1,
G4double energy2,
G4double varAngle ) const ;
G4double IntegralOverAngle( G4double energy,
G4double varAngle1,
G4double varAngle2 ) 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 ;
// Local constants
static const G4int fSympsonNumber ; // Accuracy of Sympson integration 10
static const G4int fGammaNumber ; // = 15
static const G4int fPointNumber ; // = 100
G4double fMinEnergy ; // min TR energy
G4double fMaxEnergy ; // max TR energy
G4double fMaxTheta ; // max theta of TR quanta
G4double fSigma1 ; // plasma energy Sq of matter1
G4double fSigma2 ; // plasma energy Sq of matter2
} ;
#endif // G4TransitionRadiation_h