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,52 @@
// G4LeptonHadronInteractionModel.hh
//
// M.Takahata (Makoto.Takahata@cern.ch)
#ifndef G4LeptonHadronInteractionModel_h
#define G4LeptonHadronInteractionModel_h 1
#include "globals.hh"
#include "G4Track.hh"
#include "G4Nucleus.hh"
#include "G4ParticleChange.hh"
class G4LeptonHadronInteractionModel
{
public:
G4LeptonHadronInteractionModel();
~G4LeptonHadronInteractionModel();
virtual void makePhysicsVector() = 0;
virtual G4VParticleChange* applyInteractionModel
(const G4Track &leptonTrack, G4Nucleus &targetNucleus) = 0;
virtual G4double computeMicroscopicCrossSection
(const G4Track &leptonTrack) = 0;
inline G4int operator==(
const G4LeptonHadronInteractionModel &right) const
{ return this == &right; }
inline G4int operator!=(
const G4LeptonHadronInteractionModel &right) const
{ return this != &right; }
protected:
G4ParticleChange aParticleChange;
private:
inline G4LeptonHadronInteractionModel
(const G4LeptonHadronInteractionModel &right) { }
inline G4LeptonHadronInteractionModel & operator=(
const G4LeptonHadronInteractionModel &right)
{ return *this; }
};
#endif
@@ -0,0 +1,43 @@
// G4LeptonHadronProcess.hh
//
// M.Takahata (Makoto.Takahata@cern.ch)
#ifndef G4LeptonHadronProcess_h
#define G4LeptonHadronProcess_h 1
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Nucleus.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4ParticleChange.hh"
#include "G4LeptonHadronInteractionModel.hh"
class G4LeptonHadronProcess : public G4VDiscreteProcess
{
public:
G4LeptonHadronProcess(const G4String &processName = "LeptonHadron");
~G4LeptonHadronProcess();
G4VParticleChange *PostStepDoIt( const G4Track &leptonTrack,
const G4Step &aStep )
{
return G4LeptonHadronProcess::GeneralPostStepDoIt(leptonTrack, aStep);
}
G4VParticleChange *GeneralPostStepDoIt( const G4Track &leptonTrack,
const G4Step &aStep );
virtual G4LeptonHadronInteractionModel *chooseInteractionModel() = 0;
protected:
G4LeptonHadronInteractionModel* theInteractionModel;
G4Nucleus targetNucleus;
};
#endif
@@ -0,0 +1,128 @@
// 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: G4MuNuclearInteraction.hh,v 1.1 1998/11/23 18:14:51 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// $Id:
// ------------------------------------------------------------
// GEANT 4 class header 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
// -------- G4MuNuclearInteraction physics process ---------
// by Laszlo Urban, May 1998
// ************************************************************
#ifndef G4MuNuclearInteraction_h
#define G4MuNuclearInteraction_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4MuonMinus.hh"
#include "G4MuonPlus.hh"
#include "G4PionZero.hh"
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4ElementTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4ParametrizedHadronicVertex.hh"
class G4MuNuclearInteraction : public G4VDiscreteProcess
{
public:
G4MuNuclearInteraction(const G4String& processName = "MuNucl");
~G4MuNuclearInteraction();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
void PrintInfoDefinition() ;
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
protected:
G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial);
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial);
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass);
virtual G4double ComputeDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double epsilon);
private:
G4MuNuclearInteraction & operator=(const G4MuNuclearInteraction &right);
G4MuNuclearInteraction(const G4MuNuclearInteraction&);
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
private:
G4PhysicsTable* theMeanFreePathTable;
G4PhysicsTable* theCrossSectionTable ;
G4OrderedTable PartialSumSigma;
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4int TotBin;
//cut from R.P. Kokoulin
const G4double CutFixed ;
// for the atomic weight conversion
G4double GramPerMole ;
const G4MuonMinus* theMuonMinus;
const G4MuonPlus* theMuonPlus;
const G4PionZero* thePionZero;
// tables for sampling ..............
static G4int nzdat,ntdat,NBIN ;
static G4double zdat[5],adat[5],tdat[8] ;
static G4double ya[1000],proba[5][8][1000] ;
// for the hadronic final state; use base cass * in next release
G4ParametrizedHadronicVertex theHadronicVertex;
};
#include "G4MuNuclearInteraction.icc"
#endif
@@ -0,0 +1,80 @@
// 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: G4MuNuclearInteraction.icc,v 1.1 1998/11/23 18:14:50 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// $Id:
// ---------------------------------------------------------------
// 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
// -------- G4MuNuclearInteraction physics process ---------
// by Laszlo Urban, May 1998
// ***************************************************************
inline G4double G4MuNuclearInteraction::GetMeanFreePath(
const G4Track& trackData,
G4double previousStepSize,
G4ForceCondition* condition)
{
const G4DynamicParticle* aDynamicParticle;
G4Material* aMaterial;
G4double MeanFreePath;
G4bool isOutRange ;
*condition = NotForced ;
aDynamicParticle = trackData.GetDynamicParticle();
aMaterial = trackData.GetMaterial();
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
if (KineticEnergy < LowestKineticEnergy)
MeanFreePath = DBL_MAX ;
else {
if (KineticEnergy > HighestKineticEnergy)
KineticEnergy = 0.99*HighestKineticEnergy ;
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue( KineticEnergy, isOutRange );
}
return MeanFreePath;
}
inline G4double G4MuNuclearInteraction::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial)
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* theAtomNumDensityVector =
aMaterial->GetAtomicNumDensityVector();
G4double SIGMA = 0 ;
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
{
SIGMA += theAtomNumDensityVector[i] *
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
(*theElementVector)(i)->GetZ(),
(*theElementVector)(i)->GetA()) ;
}
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
}
inline G4bool G4MuNuclearInteraction::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
) ;
}
@@ -0,0 +1,62 @@
// G4MuonNucleusInteractionModel.hh
//
// M.Takahata (Makoto.Takahata@cern.ch)
//
// -----------------------------------------------------------------------
// This class is the translation of Geant3/Gheisha routine GMUNU + GMUSIG
// , which calculate the final state of outgoing muon and force cascade
// through pion-Nucleus inelastic scattering.
// -----------------------------------------------------------------------
#ifndef G4MuonNucleusInteractionModel_h
#define G4MuonNucleusInteractionModel_h 1
#include "G4LeptonHadronInteractionModel.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleTypes.hh"
#include "G4PhysicsLogVector.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
class G4MuonNucleusInteractionModel : public G4LeptonHadronInteractionModel
{
public:
G4MuonNucleusInteractionModel();
~G4MuonNucleusInteractionModel();
void makePhysicsVector();
G4double computeMicroscopicCrossSection(const G4Track &muonTrack);
G4VParticleChange* applyInteractionModel(const G4Track &muonTrack,
G4Nucleus &targetNucleus);
private:
// member functions
void invokePionNucleus(const G4Track &pionTrack,
G4Nucleus &targetNucleus);
G4double computeDifferentialCrossSection
(G4double initialEnergy, G4double finalEnergy, G4double cosTheta);
// for physics vector
static G4double tetal[35], xeml[23];
G4PhysicsLogVector *theCoefficientVector;
G4int Nbin;
G4double kEmin, kEmax;
// kinematic
G4double cosTheta;
G4VParticleChange* pionChange;
// pi-N models
G4double cascadeModelMarginalEnergy;
G4LEPionPlusInelastic* LEPionPlusInelastic;
G4LEPionMinusInelastic* LEPionMinusInelastic;
G4HEPionPlusInelastic* HEPionPlusInelastic;
G4HEPionMinusInelastic* HEPionMinusInelastic;
};
#endif
@@ -0,0 +1,39 @@
// G4MuonNucleusProcess.hh
//
// M.Takahata (Makoto.Takahata@cern.ch)
#ifndef G4MuonNucleusProcess_h
#define G4MuonNucleusProcess_h 1
#include "globals.hh"
#include "G4LeptonHadronProcess.hh"
#include "G4MuonNucleusInteractionModel.hh"
class G4MuonNucleusProcess : public G4LeptonHadronProcess
{
public:
G4MuonNucleusProcess(const G4String& processName ="MuonNucleus");
~G4MuonNucleusProcess();
G4double GetMeanFreePath(const G4Track &muonTrack,
G4double previousStepSize,
G4ForceCondition *condition);
G4LeptonHadronInteractionModel *chooseInteractionModel();
G4VParticleChange *PostStepDoIt(const G4Track &muonTrack,
const G4Step &aStep)
{
return G4LeptonHadronProcess::GeneralPostStepDoIt(muonTrack, aStep);
}
private:
G4MuonNucleusProcess(const G4MuonNucleusProcess &right);
};
#endif
@@ -0,0 +1,27 @@
#ifndef G4ParametrizedHadronicVertex_h
#define G4ParametrizedHadronicVertex_h 1
#include "globals.hh"
#include "G4ParticleChange.hh"
#include "G4Nucleus.hh"
#include "G4ReactionProduct.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4Track.hh"
class G4ParametrizedHadronicVertex
{
public:
G4VParticleChange * ApplyYourself(const G4Nucleus & theTarget,
const G4Track &thePhoton);
private:
G4LEPionPlusInelastic theLowEPionPlus;
G4LEPionMinusInelastic theLowEPionMinus;
G4HEPionPlusInelastic theHighEPionPlus;
G4HEPionMinusInelastic theHighEPionMinus;
};
#endif