Import Geant4 0.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:09:25 +02:00
parent b97f8d0df7
commit aaa409b6ee
2922 changed files with 55107 additions and 81674 deletions
@@ -0,0 +1,49 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4Data.hh
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 1 Giugno 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4DATA_HH
#define G4DATA_HH
#include "G4DataVector.hh"
class G4Data : public G4DataVector{
public:
~G4Data();
G4bool operator == (const G4Data& ) const;
G4bool operator < (const G4Data&) const;
};
#endif
@@ -0,0 +1,69 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4Epdl89File
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 2 February 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4Epdl89File_hh
#define G4Epdl89File_hh
// Other Class Headers
#include "globals.hh"
#include "G4VDataFile.hh"
#include "G4Data.hh"
// C++ Headers
#include <fstream.h>
// Class Declarations
class G4Epdl89File: public G4VDataFile{
public:
// Constructors
G4Epdl89File(const G4String&, G4int*);
// Destructor
~G4Epdl89File();
virtual G4bool FindTheProcess();
virtual G4bool FindTheElement(G4int);
virtual G4bool FindOneElemProc(G4int&);
protected:
// Member Functions
void GetDataValues(G4Data& valList);
G4double GetOneData(const char*);
private:
G4int* _flags; // data flags
};
#endif // G4Epdl89File
@@ -0,0 +1,68 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4Epdl97File.hh
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 2 February 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4Epdl97File_hh
#define G4Epdl97File_hh
// Other Class Headers
#include "globals.hh"
#include "G4VDataFile.hh"
#include "G4Data.hh"
// C++ Headers
#include <fstream.h>
// Class Declarations
class G4Epdl97File: public G4VDataFile{
public:
// Constructors
G4Epdl97File(const G4String&, G4int*);
// Destructor
~G4Epdl97File();
virtual G4bool FindTheProcess();
virtual G4bool FindTheElement(G4int);
virtual G4bool FindOneElemProc(G4int&);
G4int* GetTheProcFlags();
protected:
// Member Functions
void GetDataValues(G4Data& valList);
G4double GetOneData(const char*);
private:
G4int* _flags; // data flags
};
#endif // G4Epdl97File
@@ -0,0 +1,89 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4EpdlTables
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 2 February 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4EpdlTables_hh
#define G4EpdlTables_hh
// Base Class Header
#include "G4VTables.hh"
// Other Class Headers
#include "globals.hh"
#include "G4PhysicsTable.hh"
#include "G4Data.hh"
#include "G4FirstLevel.hh"
#include "G4SecondLevel.hh"
// C++ Headers
// Class Declarations
class G4VDataFile;
class G4EpdlTables: public G4VTables{
public:
// Constructors
G4EpdlTables(G4VDataFile& DFile);
// Destructor
~G4EpdlTables();
// Member Functions
// search the data table in the file
void FillDataTable();
G4SecondLevel* FillTheTable(G4int nemEl = 0);
// inline member functions
inline G4PhysicsTable* GetFstDataTable(){return theDataTable1;};
inline G4PhysicsTable* GetSndDataTable(){return theDataTable2;};
inline G4PhysicsTable* GetTrdDataTable(){return theDataTable3;};
//G4SecondLevel* GetGlobalList();
protected:
private:
G4PhysicsTable* theDataTable1;
G4PhysicsTable* theDataTable2;
G4PhysicsTable* theDataTable3;
// G4SecondLevel* allElementList;
G4VDataFile& datfile;
};
#endif // G4EpdlTables
@@ -0,0 +1,53 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4FirstLevel.hh
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 1 Giugno 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4FIRSTLEVEL_HH
#define G4FIRSTLEVEL_HH
#include "G4Data.hh"
#include <rw/tpordvec.h>
class G4FirstLevel : public RWTPtrOrderedVector< G4Data >{
public:
// G4FirstLevel( G4FirstLevel& )
~G4FirstLevel();
G4bool operator == (const G4FirstLevel& ) const;
G4bool operator < (const G4FirstLevel&) const;
};
#endif
@@ -0,0 +1,138 @@
// 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: G4LowEnergyBremsstrahlung.hh,v 1.7 1999/07/01 17:37:26 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyBremsstrahlung physics process ------
// by Michel Maire, 24 July 1996
// ************************************************************
// 1-10-96 : new type G4OrderedTable; ComputePartialSumSigma()
// 20/03/97: new energy loss+ionisation+brems scheme, L.Urban
// 01-09-98, new methods SetBining() and PrintInfo()
// ------------------------------------------------------------
#ifndef G4LowEnergyBremsstrahlung_h
#define G4LowEnergyBremsstrahlung_h 1
// Base Class Headers
//#include "G4VDiscreteProcess.hh"
#include "G4eEnergyLoss.hh"
// Contained Variables Headers
#include "G4LowEnergyUtilities.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
class G4LowEnergyBremsstrahlung : public G4eEnergyLoss{
public:
G4LowEnergyBremsstrahlung(const G4String& processName = "LowEnBrem");
~G4LowEnergyBremsstrahlung();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetCutForLowEnSecPhotons(G4double);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void PrintInfoDefinition();
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
void BuildLossTable(const G4ParticleDefinition& ParticleType);
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& step);
G4double GetLambda(G4double KineticEnergy,G4Material* material);
protected:
void BuildCrossSectionTable();
void BuildMeanFreePathTable();
void BuildATable();
void BuildBTable();
void BuildZVec();
void ComputePartialSumSigma(G4double KineticEnergy,
const G4Material* aMaterial);
private:
G4double ComputeA(G4int Z, G4double ElectKinEnergy); // interpolation
G4double ComputeB(G4int Z, G4double ElectKinEnergy); // parametrized formula
G4double ComputeBremLoss(G4double Z, G4double natom, G4double T,
G4double Cut, G4double x);
G4double ComputeXYPolynomial(G4double x,G4double y,G4int xSize,
G4int ySize,const G4double coeff[]);
G4double ComputePositronCorrFactorLoss(G4double AtomicNumber,
G4double KineticEnergy,
G4double GammaEnergyCut);
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
G4LowEnergyBremsstrahlung & operator=(const G4LowEnergyBremsstrahlung &right);
G4LowEnergyBremsstrahlung(const G4LowEnergyBremsstrahlung&);
private:
G4SecondLevel* theCrossSectionTable ;
G4PhysicsTable* theMeanFreePathTable ;
G4SecondLevel* ATable;
G4FirstLevel* BTable;
G4Data* ZNumVec;
G4LowEnergyUtilities util;
// partial sum of total crosssection
G4OrderedTable PartialSumSigma;
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4double lowEnergyCut; // lower limit of the energy sampling formula
G4int TotBin; // number of bins in the tables
G4double CutForLowEnergySecondaryPhotons;
};
#include "G4LowEnergyBremsstrahlung.icc"
#endif
@@ -0,0 +1,111 @@
// 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: G4LowEnergyBremsstrahlung.icc,v 1.9 1999/07/06 14:36:18 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyBremsstrahlung physics process ---------
// by Michel Maire, 27 July 1996
// ***************************************************************
// 13-12-96 : Sign corrected in the ScreenFunctions, L.Urban
// 20/03/97 : new energy loss+ionisation+brems scheme, L.Urban
// ***************************************************************
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4LowEnergyBremsstrahlung::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == G4Electron::Electron())
||(&particle == G4Positron::Positron()) );
}
inline G4double G4LowEnergyBremsstrahlung::GetMeanFreePath(const G4Track& track,
G4double,
G4ForceCondition*)
// gives the MeanFreePath in GEANT4 internal units
{
const G4DynamicParticle* aDynamicParticle = track.GetDynamicParticle();
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
G4Material* aMaterial = track.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange ;
if (KineticEnergy < LowestKineticEnergy)
MeanFreePath = DBL_MIN;
else {
if (KineticEnergy > HighestKineticEnergy) KineticEnergy = 0.99*HighestKineticEnergy ;
MeanFreePath = util.DataLogInterpolation(KineticEnergy, aMaterial->GetIndex(), theMeanFreePathTable);
}
return MeanFreePath;
}
inline G4double G4LowEnergyBremsstrahlung::ComputeA(G4int AtomicNumber, G4double ElectronKinEnergy){
G4double aVal;
G4FirstLevel* oneAtomCoeff = (*ATable)[AtomicNumber-1];
G4Data* ElectEnVec = (*oneAtomCoeff)[0];
G4Data* AValueVec = (*oneAtomCoeff)[1];
aVal = util.DataLogInterpolation(ElectronKinEnergy, (*ElectEnVec), (*AValueVec));
if(AtomicNumber > 99){
aVal = 0;
}
return aVal;
}
inline G4double G4LowEnergyBremsstrahlung::ComputeB(G4int AtomicNumber, G4double ElectronKinEnergy){
G4double bVal;
G4double constTerm = (*(*BTable)[0])[AtomicNumber-1];
G4double linearTerm = (*(*BTable)[1])[AtomicNumber-1];
G4double logElectEn = log10(ElectronKinEnergy);
if(logElectEn > -5 && logElectEn < (-constTerm/linearTerm)){
bVal = linearTerm*logElectEn+constTerm;
}
else{
bVal = 0;
}
if(AtomicNumber > 99){
bVal = 0;
}
return bVal;
}
@@ -0,0 +1,100 @@
// 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: G4LowEnergyCompton.hh,v 1.3 1999/06/28 15:47:03 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1995
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyCompton physics process ------
// by Michel Maire, April 1996
// ************************************************************
// 01-02-96, First implementation A.Forti
// 21-06-96, SetCuts implementation, M.Maire
// 06-01-97, crossection table + meanfreepath table, M.Maire
// 17-02-97, New Physics scheme
// 25-02-97, GetMeanFreePath() now is public function
// 12-03-97, new physics scheme again
// ------------------------------------------------------------
#ifndef G4LowEnergyCompton_h
#define G4LowEnergyCompton_h
// Base Class Headers
#include "G4VDiscreteProcess.hh"
// Contained Variables Headers
#include "G4LowEnergyUtilities.hh"
#include "G4Gamma.hh"
class G4LowEnergyCompton : public G4VDiscreteProcess{
private:
// hide assignment operator as private
G4LowEnergyCompton& operator=(const G4LowEnergyCompton &right);
G4LowEnergyCompton(const G4LowEnergyCompton& );
public:
G4LowEnergyCompton(const G4String& processName ="LowEnCompton");
~G4LowEnergyCompton();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
protected:
void BuildScatteringFunctionTable();
void BuildCrossSectionTable();
void BuildMeanFreePathTable();
void BuildZVec();
private:
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
G4SecondLevel* theCrossSectionTable;
G4SecondLevel* theScatteringFunctionTable;
G4PhysicsTable* theMeanFreePathTable;
G4Data* ZNumVec;
G4LowEnergyUtilities util;
G4double LowestEnergyLimit; // low energy limit of the crosssection data
G4double HighestEnergyLimit; // high energy limit of the crosssection data
G4int NumbBinTable; // number of bins in the data tables
G4double MeanFreePath; // actual Mean Free Path (current medium)
};
#include "G4LowEnergyCompton.icc"
#endif
@@ -0,0 +1,60 @@
// 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: G4LowEnergyCompton.icc,v 1.8 1999/07/06 15:03:19 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyCompton physics process ---------
// by Michel Maire, April 1996
// ***************************************************************
inline G4bool
G4LowEnergyCompton::IsApplicable(const G4ParticleDefinition& particle){
return ( &particle == G4Gamma::Gamma() );
}
inline G4double
G4LowEnergyCompton::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
// returns the gamma mean free path in GEANT4 internal units
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4bool isOutRange ;
if (GammaEnergy > HighestEnergyLimit){
MeanFreePath = DBL_MAX;
}
else if(GammaEnergy < LowestEnergyLimit){
MeanFreePath = DBL_MIN;
}
else {
MeanFreePath = util.DataLogInterpolation(GammaEnergy,
aMaterial->GetIndex(),
theMeanFreePathTable);
}
return MeanFreePath;
}
@@ -0,0 +1,103 @@
// 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: G4LowEnergyGammaConversion.hh,v 1.2 1999/06/28 15:47:03 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyGammaConversion physics process ------
// by Michel Maire, 24 May 1996
// ************************************************************
// 11-06-96, Added GetRandomAtom() method and new data member
// for cumulative total cross section, by M.Maire
// 21-06-96, SetCuts inplementation, M.Maire
// 16-09-96, Dynamical array PartialSumSigma, M.Maire
// 14-01-97, crossection table + meanfreepath table.
// PartialSumSigma removed, M.Maire
// 14-03-97, new physics scheme for geant4alpha, M.Maire
// ------------------------------------------------------------
#ifndef G4LowEnergyGammaConversion_h
#define G4LowEnergyGammaConversion_h 1
// Base Class Headers
#include "G4VDiscreteProcess.hh"
// Contained Variables Headers
#include "G4LowEnergyUtilities.hh"
#include "G4Gamma.hh"
class G4LowEnergyGammaConversion : public G4VDiscreteProcess
{
private:
// hide assignment operator as private
G4LowEnergyGammaConversion& operator=(const G4LowEnergyGammaConversion &right);
G4LowEnergyGammaConversion(const G4LowEnergyGammaConversion& );
public:
G4LowEnergyGammaConversion(const G4String& processName ="LowEnConversion");
~G4LowEnergyGammaConversion();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
protected:
void BuildCrossSectionTable();
void BuildMeanFreePathTable();
void BuildZVec();
private:
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
static G4double ScreenFunction1(G4double ScreenVariable);
static G4double ScreenFunction2(G4double ScreenVariable);
private:
G4SecondLevel* theCrossSectionTable;
G4PhysicsTable* theMeanFreePathTable;
G4LowEnergyUtilities util;
G4double LowestEnergyLimit;
G4double HighestEnergyLimit;
G4int NumbBinTable;
G4Data* ZNumVec;
G4double MeanFreePath; // actual Mean Free Path (current medium)
};
#include "G4LowEnergyGammaConversion.icc"
#endif
@@ -0,0 +1,90 @@
// 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: G4LowEnergyGammaConversion.icc,v 1.6 1999/06/28 15:47:35 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyGammaConversion physics process ---------
// by Michel Maire, 24 May 1996
// ***************************************************************
// 11-06-96, in GetMeanFreePath() the partial sum is stored, by M.Maire
// 16-09-96, dynamical array PartialSumSigma, by M.Maire
// 13-12-96, Sign corrected in the ScreenFunctions, by L.Urban
// 14-01-97, crossection table + meanfreepath table.
// PartialSumSigma removed, by M.Maire
// 14-01-97, new physics scheme for geant4alpha, M.Maire
// ---------------------------------------------------------------
inline G4bool G4LowEnergyGammaConversion::IsApplicable(const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
inline G4double
G4LowEnergyGammaConversion::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
// returns the gamma mean free path in GEANT4 internal units
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4bool isOutRange ;
if (GammaEnergy < LowestEnergyLimit){
MeanFreePath = DBL_MAX;
}
else {
if(GammaEnergy > HighestEnergyLimit) GammaEnergy = 0.99*HighestEnergyLimit;
MeanFreePath = util.DataLogInterpolation(GammaEnergy, aMaterial->GetIndex(), theMeanFreePathTable);
}
return MeanFreePath;
}
inline G4double
G4LowEnergyGammaConversion::ScreenFunction1(G4double ScreenVariable)
// compute the value of the screening function 3*PHI1 - PHI2
{
G4double screenVal;
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 42.392 - ScreenVariable* (7.796 - 1.961*ScreenVariable);
return screenVal;
}
inline G4double
G4LowEnergyGammaConversion::ScreenFunction2(G4double ScreenVariable)
// compute the value of the screening function 1.5*PHI1 - 0.5*PHI2
{
G4double screenVal;
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 41.405 - ScreenVariable* (5.828 - 0.8945*ScreenVariable);
return screenVal;
}
@@ -0,0 +1,142 @@
// 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: G4LowEnergyIonisation.hh,v 1.9 1999/07/06 13:21:02 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4LowEnergyIonisation physics process -----------
// by Laszlo Urban, 20 March 1997
// ************************************************************
// It is the first implementation of the NEW IONISATION
// PROCESS. ( delta rays + continuous energy loss)
// It calculates the ionisation for e+/e-.
// ************************************************************
//
// 04-09-98: new methods SetBining() PrintInfo(), MMa
// ------------------------------------------------------------
#ifndef G4LowEnergyIonisation_h
#define G4LowEnergyIonisation_h 1
// Base Class Headers
#include "G4VDiscreteProcess.hh"
#include "G4eEnergyLoss.hh"
// Contained Variables Headers
#include "G4LowEnergyUtilities.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include <fstream.h>
typedef G4FirstLevel oneShellTable;
typedef G4SecondLevel oneAtomTable;
typedef G4ThirdLevel allAtomTable;
class G4LowEnergyIonisation : public G4eEnergyLoss{
public:
G4LowEnergyIonisation(const G4String& processName = "LowEnergyIoni");
~G4LowEnergyIonisation();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetCutForLowEnSecPhotons(G4double);
void SetCutForLowEnSecElectrons(G4double);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
inline G4double GetTransitionShell(G4int k){return(thePrimShVec(k));};
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
void Print();
protected:
virtual G4double ComputeCrossSection(const G4double AtomicNumber,
const G4double IncEnergy);
void BuildLossTable(const G4ParticleDefinition& aParticleType);
void BuildShellCrossSectionTable();
void BuildBindingEnergyTable();
void BuildFluorTransitionTable();
void BuildSamplingCoeffTable();
void BuildZVec();
private:
// hide assignment operator
G4LowEnergyIonisation & operator=(const G4LowEnergyIonisation &right);
G4LowEnergyIonisation(const G4LowEnergyIonisation&);
private:
G4int SelectRandomShell(const G4int AtomIndex, const G4double IncEnergy);
G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicPhoton,
G4Material* aMaterial);
G4bool SelectRandomTransition(G4int, G4double*,
const oneAtomTable*);
G4double EnergySampling(const G4int, const G4int,const G4double);
allAtomTable* allAtomShellCrossSec;
allAtomTable* theFluorTransitionTable;
allAtomTable* theSamplingCoeffTable;
G4SecondLevel* theBindingEnergyTable;
G4DataVector thePrimShVec;
G4Data* ZNumVec;
G4Data* ZNumVecFluor;
G4LowEnergyUtilities util;
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4int TotBin;
G4double CutForLowEnergySecondaryPhotons;
G4double CutForLowEnergySecondaryElectrons;
G4double MeanFreePath;
};
#include "G4LowEnergyIonisation.icc"
#endif
@@ -0,0 +1,83 @@
// 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: G4LowEnergyIonisation.icc,v 1.6 1999/07/06 13:21:19 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ------------ G4LowEnergyIonisation physics process ------------
// by Laszlo Urban, 20 March 1997
// ***************************************************************
// It is the first implementation of the NEW IONISATION PROCESS.
// It calculates the ionisation of e+/e-.
// ***************************************************************
//
// 24-11-97: correction on MeanFreePath for KinEnergy > HighestLimit
//
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4LowEnergyIonisation::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == G4Electron::Electron())
||(&particle == G4Positron::Positron()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4LowEnergyIonisation::GetMeanFreePath(
const G4Track& track,
G4double,
G4ForceCondition*){
const G4DynamicParticle* aParticle = track.GetDynamicParticle();
G4double KineticEnergy = aParticle->GetKineticEnergy();
const G4Material* aMaterial = track.GetMaterial();
G4bool isOutRange ;
if( KineticEnergy < LowestKineticEnergy )
MeanFreePath = DBL_MIN;
else {
if (KineticEnergy > HighestKineticEnergy) KineticEnergy = HighestKineticEnergy;
const
G4ElementVector* theElementVector = aMaterial->GetElementVector();
const
G4double* theAtomicNumDensityVector = aMaterial->GetAtomicNumDensityVector();
const
G4int NumberOfElements = aMaterial->GetNumberOfElements() ;
G4double SIGMA = 0;
for(G4int iel=0; iel<NumberOfElements; iel++ ){
G4double Cs = ComputeCrossSection((*theElementVector)(iel)->GetZ(), KineticEnergy)*barn;
SIGMA += theAtomicNumDensityVector[iel]*Cs;
}
// mean free path = 1./macroscopic cross section
MeanFreePath = SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
return MeanFreePath ;
}
@@ -0,0 +1,125 @@
// 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: G4LowEnergyPhotoElectric.hh,v 1.9 1999/06/28 15:47:04 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyPhotoElectric physics process ------
// by Michel Maire, April 1996
// ************************************************************
// 12-06-96, Added SelectRandomAtom() method and new data member
// for cumulative total cross section, by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 17-09-96, Dynamic array PartialSumSigma
// split ComputeBindingEnergy(), M.Maire
// 08-01-97, crossection table + meanfreepath table, M.Maire
// 13-03-97, adapted for the new physics scheme, M.Maire
// ------------------------------------------------------------
#ifndef G4LowEnergyPhotoElectric_h
#define G4LowEnergyPhotoElectric_h 1
// Base Class Headers
#include "G4VDiscreteProcess.hh"
// Contained Variables Headers
#include "G4LowEnergyUtilities.hh"
#include "G4Gamma.hh"
typedef G4FirstLevel oneShellTable;
typedef G4SecondLevel oneAtomTable;
typedef G4ThirdLevel allAtomTable;
class G4LowEnergyPhotoElectric : public G4VDiscreteProcess{
private:
// hide assignment operator as private
G4LowEnergyPhotoElectric& operator=(const G4LowEnergyPhotoElectric &right);
G4LowEnergyPhotoElectric(const G4LowEnergyPhotoElectric& );
public:
G4LowEnergyPhotoElectric(const G4String& processName ="LowEnPhotoElec");
~G4LowEnergyPhotoElectric();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetCutForLowEnSecPhotons(G4double);
// void SetCutForLowEnSecElectrons(G4double);
void BuildPhysicsTable(const G4ParticleDefinition& PhotonType);
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
G4double GetCrossSection(G4DynamicParticle* aDynamicGamma,
G4Element* anElement);
inline G4double GetTransitionShell(G4int k){return(thePrimShVec(k));};
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
protected:
virtual G4double ComputeCrossSection(const G4double AtomicNumber,
const G4double IncEnergy);
void BuildCrossSectionTable();
void BuildShellCrossSectionTable();
void BuildBindingEnergyTable();
void BuildFluorTransitionTable();
void BuildMeanFreePathTable();
void BuildZVec();
private:
G4int SelectRandomShell(const G4int AtomIndex, const G4double IncEnergy);
G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicPhoton,
G4Material* aMaterial);
G4bool SelectRandomTransition(G4int, G4double*, const oneAtomTable*);
G4SecondLevel* theCrossSectionTable;
G4PhysicsTable* theMeanFreePathTable;
allAtomTable* allAtomShellCrossSec;
allAtomTable* theFluorTransitionTable;
G4SecondLevel* theBindingEnergyTable;
G4DataVector thePrimShVec;
G4Data* ZNumVec;
G4Data* ZNumVecFluor;
G4LowEnergyUtilities util;
G4double LowestEnergyLimit;
G4double HighestEnergyLimit;
G4int NumbBinTable;
G4double CutForLowEnergySecondaryPhotons;
G4double MeanFreePath;
};
#include "G4LowEnergyPhotoElectric.icc"
#endif
@@ -0,0 +1,87 @@
// 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: G4LowEnergyPhotoElectric.icc,v 1.10 1999/07/06 15:03:20 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyPhotoElectric physics process ---------
// by Michel Maire, April 1996
// ***************************************************************
// 12-06-96, update by M.Maire
// 17-09-96, PartialSumSigma(i)
// split ComputeBinbingEnergy(), M.Maire
// 08-01-97, crossection table + meanfreepath table , M.Maire
// 13-03-97, adapted for the new physics scheme, M.Maire
// 20-11-97, change for lowest energy limit default action
// ---------------------------------------------------------------
inline G4bool G4LowEnergyPhotoElectric::IsApplicable(const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
inline G4double
G4LowEnergyPhotoElectric::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
// returns the gamma mean free path in GEANT4 internal units
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4bool isOutRange ;
if (GammaEnergy > HighestEnergyLimit){
MeanFreePath = DBL_MAX;
}
else if(GammaEnergy < LowestEnergyLimit){
MeanFreePath = DBL_MIN;
}
else {
MeanFreePath = util.DataLogInterpolation(GammaEnergy,
aMaterial->GetIndex(),
theMeanFreePathTable);
}
return MeanFreePath;
}
inline G4double G4LowEnergyPhotoElectric::GetCrossSection(G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
{
G4double crossSection;
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4bool isOutRange ;
if (GammaEnergy < LowestEnergyLimit || GammaEnergy > HighestEnergyLimit)
crossSection = 0.;
else{
G4int elemZ = (G4int) anElement->GetZ();
const G4FirstLevel* oneAtomCS
= (*theCrossSectionTable)[ZNumVec->index(elemZ)];
crossSection = util.DataLogInterpolation(GammaEnergy, (*(*oneAtomCS)[0]), (*(*oneAtomCS)[1]));
}
return crossSection*barn;
}
@@ -0,0 +1,108 @@
// 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: G4LowEnergyRayleigh.hh,v 1.3 1999/06/28 15:47:04 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1995
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyRayleigh physics process ------
// by Michel Maire, April 1996
// ************************************************************
// 10-06-96, updated by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 06-01-97, crossection table + meanfreepath table, M.Maire
// 17-02-97, New Physics scheme
// 25-02-97, GetMeanFreePath() now is public function
// 12-03-97, new physics scheme again
// ------------------------------------------------------------
#ifndef G4LowEnergyRayleigh_h
#define G4LowEnergyRayleigh_h
// Base Class Headers
#include "G4VDiscreteProcess.hh"
// Contained Variables Headers
#include "G4LowEnergyUtilities.hh"
#include "G4Gamma.hh"
class G4LowEnergyRayleigh : public G4VDiscreteProcess {
private:
// hide assignment operator as private
G4LowEnergyRayleigh& operator=(const G4LowEnergyRayleigh &right);
G4LowEnergyRayleigh(const G4LowEnergyRayleigh& );
public:
G4LowEnergyRayleigh(const G4String& processName ="LowEnRayleigh");
~G4LowEnergyRayleigh();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& aStep);
protected:
void BuildFormFactorTable();
void BuildCrossSectionTable();
void BuildMeanFreePathTable();
void BuildZVec();
private:
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
G4SecondLevel* theCrossSectionTable;
G4SecondLevel* theFormFactorTable;
G4PhysicsTable* theMeanFreePathTable;
G4Data* ZNumVec;
G4LowEnergyUtilities util;
G4double LowestEnergyLimit; // low energy limit of the crosssection formula
G4double HighestEnergyLimit; // high energy limit of the crosssection formula
G4int NumbBinTable; // number of bins in the crossection table
G4double MeanFreePath; // actual Mean Free Path (current medium)
};
#include "G4LowEnergyRayleigh.icc"
#endif
@@ -0,0 +1,61 @@
// 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: G4LowEnergyRayleigh.icc,v 1.7 1999/07/06 15:03:20 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyRayleigh physics process ---------
// by Michel Maire, April 1996
// ***************************************************************
// 10-06-96, updated by M.Maire
// 06-01-97, crossection table + meanfreepath table, M.Maire
// 12-03-97, new Physics scheme
// 21-11-97, change for lowest energy limit default action
// ---------------------------------------------------------------
inline G4bool G4LowEnergyRayleigh::IsApplicable(const G4ParticleDefinition& particle){
return ( &particle == G4Gamma::Gamma() );
}
inline G4double G4LowEnergyRayleigh::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
// returns the gamma mean free path in GEANT4 internal units
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4bool isOutRange ;
if (GammaEnergy > HighestEnergyLimit){
MeanFreePath = DBL_MAX;
}
else if(GammaEnergy < LowestEnergyLimit){
MeanFreePath = DBL_MIN;
}
else {
MeanFreePath = util.DataLogInterpolation(GammaEnergy,
aMaterial->GetIndex(),
theMeanFreePathTable);
}
return MeanFreePath;
}
@@ -0,0 +1,198 @@
// 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: G4LowEnergyUtilities.hh,v 1.1 1999/06/28 15:47:05 aforti Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4LowEnergyPhotoElectric physics process ------
// by Michel Maire, April 1996
// ************************************************************
// 12-06-96, Added SelectRandomAtom() method and new data member
// for cumulative total cross section, by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 17-09-96, Dynamic array PartialSumSigma
// split ComputeBindingEnergy(), M.Maire
// 08-01-97, crossection table + meanfreepath table, M.Maire
// 13-03-97, adapted for the new physics scheme, M.Maire
// ------------------------------------------------------------
#ifndef G4LowEnergyUtilities_h
#define G4LowEnergyUtilities_h 1
//#include "G4FirstLevel.hh"
//#include "G4SecondLevel.hh"
#include "G4ThirdLevel.hh"
#include "G4PhysicsVector.hh"
#include "G4PhysicsTable.hh"
typedef G4FirstLevel oneShellTable;
typedef G4SecondLevel oneAtomTable;
typedef G4ThirdLevel allAtomTable;
class G4LowEnergyUtilities
{
public:
G4LowEnergyUtilities();
~G4LowEnergyUtilities();
G4FirstLevel* BuildFirstLevelTables(const G4int, const G4int, const char*);
G4SecondLevel* BuildSecondLevelTables(const G4int, const G4int, const char*);
//inline functions
G4int FindBinLocation(const G4double BinValue, const G4Data& arg);
G4int FindBinLocation(const G4double, const G4PhysicsVector*);
G4double DataLogInterpolation(const G4double,
const G4Data&,
const G4Data&);
G4double DataLogInterpolation(const G4double Argument,
const G4double AtomicNumber,
const G4PhysicsTable* Table);
G4double DataSemiLogInterpolation(const G4double,
const G4Data&,
const G4Data&);
};
inline G4int G4LowEnergyUtilities::FindBinLocation(const G4double arg, const G4Data& vec){
G4int numberOfBin = vec.length();
G4int lowerBound = 0;
G4int upperBound = numberOfBin-1;
do {
G4int midBin = (lowerBound + upperBound)/2;
if( arg < vec[midBin] )
upperBound = midBin-1;
else
lowerBound = midBin+1;
} while (lowerBound <= upperBound);
return upperBound;
};
inline G4double G4LowEnergyUtilities::DataLogInterpolation(const G4double Argument,
const G4Data& argVec,
const G4Data& valVec){
G4int theLoc = FindBinLocation(Argument, argVec);
if(theLoc == argVec.length()-1){
return valVec[theLoc];
}
G4double val1 = valVec[theLoc], val2 = valVec[theLoc+1];
G4double arg1 = argVec[theLoc], arg2 = argVec[theLoc+1];
if(arg1 == 0.0) arg1 = 1e-17; if(val1 == 0.0) val1 = 1e-17;
G4double theVal = (log10(val1)*log10(arg2/Argument)
+log10(val2)*log10(Argument/arg1))/log10(arg2/arg1);
theVal = pow(10,theVal);
return theVal;
};
inline G4int G4LowEnergyUtilities::FindBinLocation(const G4double arg,
const G4PhysicsVector* vec){
if(!vec){
G4Exception("G4LowEnergy: FindBinLocation: Vector Empty "
"probably the program hasn't found data files or data files are empty");
}
G4int numberOfBin = vec->GetVectorLength();
G4int lowerBound = 0;
G4int upperBound = numberOfBin-1;
do {
G4int midBin = (lowerBound + upperBound)/2;
if( arg < vec->GetLowEdgeEnergy(midBin) )
upperBound = midBin-1;
else
lowerBound = midBin+1;
} while (lowerBound <= upperBound);
return upperBound;
}
inline G4double G4LowEnergyUtilities::DataLogInterpolation(const G4double Argument,
const G4double TableIndex,
const G4PhysicsTable* Table){
G4PhysicsVector* theVec = 0;
theVec = (*Table)(TableIndex);
G4int theLoc = FindBinLocation(Argument, theVec);
G4double val1 = (*theVec)(theLoc), val2 = (*theVec)(theLoc+1);
G4double arg1 = theVec->GetLowEdgeEnergy(theLoc), arg2 = theVec->GetLowEdgeEnergy(theLoc+1);
G4double theVal = (log10(val1)*log10(arg2/Argument)
+log10(val2)*log10(Argument/arg1))/log10(arg2/arg1);
theVal = pow(10,theVal);
return theVal;
}
inline G4double G4LowEnergyUtilities::DataSemiLogInterpolation(const G4double Argument,
const G4Data& argVec,
const G4Data& valVec){
G4int theLoc = FindBinLocation(Argument, argVec);
if(theLoc == argVec.length()-1){
return valVec[theLoc];
}
G4double val1 = valVec[theLoc], val2 = valVec[theLoc+1];
G4double arg1 = argVec[theLoc], arg2 = argVec[theLoc+1];
G4double theVal = (val1*log10(arg2/Argument)
+val2*log10(Argument/arg1))/log10(arg2/arg1);
return theVal;
}
#endif
@@ -0,0 +1,50 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4SecondLevel.hh
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 1 Giugno 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4SECONDLEVEL_HH
#define G4SECONDLEVEL_HH
#include "G4FirstLevel.hh"
#include <rw/tpordvec.h>
class G4SecondLevel : public RWTPtrOrderedVector< G4FirstLevel >{
public:
~G4SecondLevel();
G4bool operator == (const G4SecondLevel& ) const;
G4bool operator < (const G4SecondLevel&) const;
};
#endif
@@ -0,0 +1,50 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4ThirdLevel.hh
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 1 Giugno 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4THIRDLEVEL_HH
#define G4THIRDLEVEL_HH
#include "G4SecondLevel.hh"
#include <rw/tpordvec.h>
class G4ThirdLevel : public RWTPtrOrderedVector< G4SecondLevel >{
public:
virtual ~G4ThirdLevel();
G4bool operator == (const G4ThirdLevel& ) const;
G4bool operator < (const G4ThirdLevel&) const;
};
#endif
@@ -0,0 +1,95 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4VDataFile
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 2 February 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4VDataFile_hh
#define G4VDataFile_hh
// Other Class Headers
#include "globals.hh"
#include "G4Data.hh"
// C++ Headers
#include <fstream.h>
class G4VDataFile{
public:
// Constructors
G4VDataFile(const G4String& file);
// Destructor
~G4VDataFile();
// Member Functions
void OpenFile();
void CloseFile();
void Eof();
G4bool IsOpen();
void SeekPos(streampos);
streampos TellPos();
void GetLine();
G4int LineLength();
char* GetBuf();
virtual G4bool FindTheProcess() = 0;
virtual G4bool FindTheElement(G4int) = 0;
virtual G4bool FindOneElemProc(G4int& subsh) = 0;
virtual void GetDataValues(G4Data& valList) = 0;
protected:
// Member Functions
void SetBufferSize(G4int);
private:
const G4String& _filename; // data file name
ifstream _istr;
G4int _bufSize;
char* buf;
};
#endif // G4VDataFile
@@ -0,0 +1,61 @@
// 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.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4VTables
//
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
//
// Creation date: 2 February 1999
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4VTables_hh
#define G4VTables_hh
#include "globals.hh"
#include "G4SecondLevel.hh"
class G4VTables{
public:
// Constructors
G4VTables();
// Destructor
~G4VTables();
// Member Functions
// search the data table in the file
virtual void FillDataTable() = 0;
virtual G4SecondLevel* FillTheTable(G4int nemEl = 0) = 0;
protected:
private:
};
#endif // G4VTables