Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
// 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: G4CrossSectionDataStore.hh,v 2.0 1998/07/02 16:21:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4CrossSectionDataStore -- header file
|
||||
// F.W. Jones, TRIUMF, 19-NOV-97
|
||||
//
|
||||
|
||||
#ifndef G4CrossSectionDataStore_h
|
||||
#define G4CrossSectionDataStore_h 1
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
|
||||
|
||||
class G4CrossSectionDataStore
|
||||
{
|
||||
public:
|
||||
|
||||
G4CrossSectionDataStore() :
|
||||
NDataSetList(0), verboseLevel(0)
|
||||
{
|
||||
}
|
||||
|
||||
~G4CrossSectionDataStore()
|
||||
{
|
||||
}
|
||||
|
||||
G4double GetCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*);
|
||||
|
||||
void AddDataSet(G4VCrossSectionDataSet*);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&);
|
||||
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&);
|
||||
|
||||
void SetVerboseLevel(G4int value)
|
||||
{
|
||||
verboseLevel = value;
|
||||
}
|
||||
|
||||
G4int GetVerboseLevel(G4int value)
|
||||
{
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
enum { NDataSetMax = 100 };
|
||||
G4VCrossSectionDataSet* DataSetList[NDataSetMax];
|
||||
G4int NDataSetList;
|
||||
G4int verboseLevel;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
// 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: G4HadronCaptureDataSet.hh,v 2.0 1998/07/02 16:21:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4HadronCaptureDataSet -- header file
|
||||
// F.W. Jones, TRIUMF, 19-MAY-98
|
||||
//
|
||||
|
||||
#ifndef G4HadronCaptureDataSet_h
|
||||
#define G4HadronCaptureDataSet_h 1
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "G4HadronCrossSections.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
|
||||
class G4HadronCaptureDataSet : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronCaptureDataSet()
|
||||
{
|
||||
theHadronCrossSections = G4HadronCrossSections::Instance();
|
||||
}
|
||||
|
||||
~G4HadronCaptureDataSet()
|
||||
{
|
||||
}
|
||||
|
||||
G4bool IsApplicable(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->IsApplicable(aParticle, anElement);
|
||||
}
|
||||
|
||||
G4double GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->GetCaptureCrossSection(aParticle,
|
||||
anElement);
|
||||
}
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4HadronCrossSections* theHadronCrossSections;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,191 @@
|
||||
// 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: G4HadronCrossSections.hh,v 2.1 1998/11/07 03:27:24 fjones Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Hadron physics class -- header file
|
||||
// F.W. Jones, TRIUMF, 03-DEC-96
|
||||
//
|
||||
// This class encapsulates cross section data and interpolations
|
||||
// from the Geant3/Gheisha routine GHESIG.
|
||||
// For further comments see G4HadronCrossSections.cc.
|
||||
//
|
||||
// Note: this is implemented as a SINGLETON class
|
||||
//
|
||||
// 27-MAR-97 FWJ: first version for Alpha release
|
||||
// 14-APR-97 FWJ: class name changed from G4LCrossSectionData
|
||||
// to G4HadronicCrossSections
|
||||
// 14-APR-98 FWJ: rewritten as class G4HadronCrossSections
|
||||
// and adapted to G4CrossSectionDataSet/DataStore class design.
|
||||
// 26-JUN-98 FWJ: added elastic/inelastic caching to improve performance.
|
||||
// 06-NOV-98 FWJ: added first-order correction for low-energy
|
||||
// inelastic cross sections
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4HadronCrossSections_h
|
||||
#define G4HadronCrossSections_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
//#include "G4ParticleTypes.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonZeroShort.hh"
|
||||
#include "G4KaonZeroLong.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4AntiNeutron.hh"
|
||||
#include "G4Lambda.hh"
|
||||
#include "G4AntiLambda.hh"
|
||||
#include "G4SigmaPlus.hh"
|
||||
#include "G4SigmaZero.hh"
|
||||
#include "G4SigmaMinus.hh"
|
||||
#include "G4AntiSigmaPlus.hh"
|
||||
#include "G4AntiSigmaZero.hh"
|
||||
#include "G4AntiSigmaMinus.hh"
|
||||
#include "G4XiZero.hh"
|
||||
#include "G4XiMinus.hh"
|
||||
#include "G4AntiXiZero.hh"
|
||||
#include "G4AntiXiMinus.hh"
|
||||
#include "G4OmegaMinus.hh"
|
||||
#include "G4AntiOmegaMinus.hh"
|
||||
//#include "G4LPhysicsFreeVector.hh"
|
||||
|
||||
|
||||
enum { TSIZE=41, PSIZE=35, NELAB=17, NCNLW=15, NFISS=21 };
|
||||
|
||||
class G4HadronCrossSections
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronCrossSections() : verboseLevel(0)
|
||||
{
|
||||
}
|
||||
|
||||
~G4HadronCrossSections()
|
||||
{
|
||||
}
|
||||
|
||||
static G4HadronCrossSections* Instance()
|
||||
{
|
||||
if (!theInstance) theInstance = new G4HadronCrossSections();
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
G4bool IsApplicable(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return (GetParticleCode(aParticle) > 0);
|
||||
}
|
||||
|
||||
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
if (aParticle->GetDefinition() != prevParticleDefinition ||
|
||||
anElement != prevElement ||
|
||||
aParticle->GetKineticEnergy() != prevKineticEnergy)
|
||||
CalcScatteringCrossSections(aParticle, anElement);
|
||||
return sigelastic;
|
||||
}
|
||||
|
||||
G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
if (aParticle->GetDefinition() != prevParticleDefinition ||
|
||||
anElement != prevElement ||
|
||||
aParticle->GetKineticEnergy() != prevKineticEnergy)
|
||||
CalcScatteringCrossSections(aParticle, anElement);
|
||||
return siginelastic;
|
||||
}
|
||||
|
||||
G4double GetCaptureCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*);
|
||||
|
||||
G4double GetFissionCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*);
|
||||
|
||||
static void SetCorrectInelasticNearZero(G4bool value)
|
||||
{
|
||||
correctInelasticNearZero = value;
|
||||
}
|
||||
|
||||
static G4bool GetCorrectInelasticNearZero()
|
||||
{
|
||||
return correctInelasticNearZero;
|
||||
}
|
||||
|
||||
void SetVerboseLevel(G4int value)
|
||||
{
|
||||
verboseLevel = value;
|
||||
}
|
||||
|
||||
G4int GetVerboseLevel()
|
||||
{
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4int GetParticleCode(const G4DynamicParticle*);
|
||||
|
||||
void CalcScatteringCrossSections(const G4DynamicParticle*,
|
||||
const G4Element*);
|
||||
|
||||
static G4HadronCrossSections* theInstance;
|
||||
|
||||
G4double sigelastic, siginelastic;
|
||||
G4ParticleDefinition* prevParticleDefinition;
|
||||
G4Element* prevElement;
|
||||
G4double prevKineticEnergy;
|
||||
|
||||
static G4bool correctInelasticNearZero;
|
||||
|
||||
G4int verboseLevel;
|
||||
|
||||
// The following arrays are declared static to allow the use of initializers.
|
||||
// They are initialized in G4HadronCrossSections.cc, thus providing some
|
||||
// data hiding.
|
||||
|
||||
static G4float plab[TSIZE];
|
||||
static G4float csel[PSIZE][TSIZE];
|
||||
static G4float csin[PSIZE][TSIZE];
|
||||
|
||||
|
||||
static G4float cspiel[3][TSIZE];
|
||||
static G4float cspiin[3][TSIZE];
|
||||
|
||||
static G4float cspnel[3][TSIZE];
|
||||
static G4float cspnin[3][TSIZE];
|
||||
|
||||
static G4float elab[NELAB];
|
||||
static G4float cnlwat[NCNLW], cnlwel[NCNLW][NELAB], cnlwin[NCNLW][NELAB];
|
||||
|
||||
static G4float cscap[100];
|
||||
|
||||
static G4float ekfiss[NFISS], csfiss[4][NFISS];
|
||||
|
||||
static G4float alpha[PSIZE], alphac[TSIZE];
|
||||
|
||||
static G4float partel[35], partin[35];
|
||||
static G4int icorr[35], intrc[35];
|
||||
|
||||
static G4float csa[4];
|
||||
static G4int ipart2[7];
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
// 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: G4HadronElasticDataSet.hh,v 2.0 1998/07/02 16:21:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4HadronElasticDataSet -- header file
|
||||
// F.W. Jones, TRIUMF, 28-JAN-97
|
||||
//
|
||||
|
||||
#ifndef G4HadronElasticDataSet_h
|
||||
#define G4HadronElasticDataSet_h 1
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "G4HadronCrossSections.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
|
||||
class G4HadronElasticDataSet : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronElasticDataSet()
|
||||
{
|
||||
theHadronCrossSections = G4HadronCrossSections::Instance();
|
||||
}
|
||||
|
||||
~G4HadronElasticDataSet()
|
||||
{
|
||||
}
|
||||
|
||||
G4bool IsApplicable(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->IsApplicable(aParticle, anElement);
|
||||
}
|
||||
|
||||
G4double GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->GetElasticCrossSection(aParticle,
|
||||
anElement);
|
||||
}
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4HadronCrossSections* theHadronCrossSections;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
// 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: G4HadronFissionDataSet.hh,v 2.0 1998/07/02 16:21:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4HadronFissionDataSet -- header file
|
||||
// F.W. Jones, TRIUMF, 19-MAY-98
|
||||
//
|
||||
|
||||
#ifndef G4HadronFissionDataSet_h
|
||||
#define G4HadronFissionDataSet_h 1
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "G4HadronCrossSections.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
|
||||
class G4HadronFissionDataSet : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronFissionDataSet()
|
||||
{
|
||||
theHadronCrossSections = G4HadronCrossSections::Instance();
|
||||
}
|
||||
|
||||
~G4HadronFissionDataSet()
|
||||
{
|
||||
}
|
||||
|
||||
G4bool IsApplicable(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->IsApplicable(aParticle, anElement);
|
||||
}
|
||||
|
||||
G4double GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->GetFissionCrossSection(aParticle,
|
||||
anElement);
|
||||
}
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4HadronCrossSections* theHadronCrossSections;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
// 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: G4HadronInelasticDataSet.hh,v 2.0 1998/07/02 16:21:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4HadronInelasticDataSet -- header file
|
||||
// F.W. Jones, TRIUMF, 19-MAY-98
|
||||
//
|
||||
|
||||
#ifndef G4HadronInelasticDataSet_h
|
||||
#define G4HadronInelasticDataSet_h 1
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "G4HadronCrossSections.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
|
||||
class G4HadronInelasticDataSet : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronInelasticDataSet()
|
||||
{
|
||||
theHadronCrossSections = G4HadronCrossSections::Instance();
|
||||
}
|
||||
|
||||
~G4HadronInelasticDataSet()
|
||||
{
|
||||
}
|
||||
|
||||
G4bool IsApplicable(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->IsApplicable(aParticle, anElement);
|
||||
}
|
||||
|
||||
G4double GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement)
|
||||
{
|
||||
return theHadronCrossSections->GetInelasticCrossSection(aParticle,
|
||||
anElement);
|
||||
}
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4HadronCrossSections* theHadronCrossSections;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
// by JPW, working, but to be cleaned up. @@@@
|
||||
|
||||
#ifndef G4ProtonInelasticCrossSection_h
|
||||
#define G4ProtonInelasticCrossSection_h
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
|
||||
class G4ProtonInelasticCrossSection : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*)
|
||||
{
|
||||
G4bool result = false;
|
||||
if(( aPart->GetDefinition()==G4Proton::Proton()) &&
|
||||
( aPart->GetKineticEnergy()<20*GeV) ) result = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual
|
||||
G4double GetCrossSection(const G4DynamicParticle*, const G4Element*);
|
||||
|
||||
virtual
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{}
|
||||
|
||||
virtual
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{G4cout << "G4ProtonInelasticCrossSection: uses formula"<<endl;}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
// 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: G4VCrossSectionDataSet.hh,v 2.1 1998/07/13 19:06:01 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics abstract class: G4VCrossSectionData -- header file
|
||||
// F.W. Jones, TRIUMF, 20-JAN-97
|
||||
//
|
||||
|
||||
#ifndef G4VCrossSectionDataSet_h
|
||||
#define G4VCrossSectionDataSet_h 1
|
||||
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
|
||||
class G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4VCrossSectionDataSet() :
|
||||
verboseLevel(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~G4VCrossSectionDataSet()
|
||||
{
|
||||
}
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
|
||||
|
||||
virtual
|
||||
G4double GetCrossSection(const G4DynamicParticle*, const G4Element*) = 0;
|
||||
|
||||
virtual
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&) = 0;
|
||||
|
||||
virtual
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&) = 0;
|
||||
|
||||
void SetVerboseLevel(G4int value)
|
||||
{
|
||||
verboseLevel = value;
|
||||
}
|
||||
|
||||
G4int GetVerboseLevel(G4int value)
|
||||
{
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
G4int verboseLevel;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user