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,40 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:09:10 hpw Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
name := G4hadronic_HE_gen
ifndef G4INSTALL
G4INSTALL = ../../../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
G4TMPDIR = $(G4TMP)/$(G4SYSTEM)/$(name)
CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPNumerics/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/hadronic/management/include/ \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/processes/hadronic/processes/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/models/generator/management/include \
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/particles/shortlived/include \
-I$(G4BASE)/materials/include
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,76 @@
// 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: G4TheoFSGenerator.hh,v 1.1 1998/08/22 08:54:31 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4TheoFSGenerator_h
#define G4TheoFSGenerator_h 1
#include "G4VIntraNuclearTransportModel.hh"
#include "G4HadronicInteraction.hh"
#include "G4VHighEnergyGenerator.hh"
class G4TheoFSGenerator : public G4HadronicInteraction
{
public:
G4TheoFSGenerator();
~G4TheoFSGenerator();
private:
G4TheoFSGenerator(const G4TheoFSGenerator &right);
const G4TheoFSGenerator & operator=(const G4TheoFSGenerator &right);
int operator==(const G4TheoFSGenerator &right) const;
int operator!=(const G4TheoFSGenerator &right) const;
public:
G4VParticleChange * ApplyYourself(const G4Track & thePrimary, G4Nucleus & theNucleus);
void SetTransport(G4VIntraNuclearTransportModel *const value);
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value);
private:
const G4VIntraNuclearTransportModel * GetTransport() const;
const G4VHighEnergyGenerator * GetHighEnergyGenerator() const;
const G4ParticleChange * GetParticleChange() const;
private:
G4VIntraNuclearTransportModel *theTransport;
G4VHighEnergyGenerator *theHighEnergyGenerator;
G4ParticleChange *theParticleChange;
};
inline const G4VIntraNuclearTransportModel * G4TheoFSGenerator::GetTransport() const
{
return theTransport;
}
inline void G4TheoFSGenerator::SetTransport(G4VIntraNuclearTransportModel *const value)
{
theTransport = value;
}
inline const G4VHighEnergyGenerator * G4TheoFSGenerator::GetHighEnergyGenerator() const
{
return theHighEnergyGenerator;
}
inline void G4TheoFSGenerator::SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
{
theHighEnergyGenerator= value;
}
inline const G4ParticleChange * G4TheoFSGenerator::GetParticleChange() const
{
return theParticleChange;
}
#endif
@@ -0,0 +1,82 @@
// 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: G4TheoFSGenerator.cc,v 1.1 1998/08/22 08:54:35 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G4TheoFSGenerator
#include "G4DynamicParticle.hh"
#include "G4TheoFSGenerator.hh"
#include "G4ReactionProductVector.hh"
#include "G4ParticleVector.hh"
G4TheoFSGenerator::G4TheoFSGenerator()
{
theParticleChange = new G4ParticleChange;
}
G4TheoFSGenerator::G4TheoFSGenerator(const G4TheoFSGenerator &right)
{
}
G4TheoFSGenerator::~G4TheoFSGenerator()
{
delete theParticleChange;
}
const G4TheoFSGenerator & G4TheoFSGenerator::operator=(const G4TheoFSGenerator &right)
{
G4Exception("G4CrossSectionBase::operator= meant to not be accessable");
return *this;
}
int G4TheoFSGenerator::operator==(const G4TheoFSGenerator &right) const
{
return 0;
}
int G4TheoFSGenerator::operator!=(const G4TheoFSGenerator &right) const
{
return 1;
}
G4VParticleChange * G4TheoFSGenerator::ApplyYourself(const G4Track & thePrimary, G4Nucleus &theNucleus)
{
// init particle change
theParticleChange->Initialize(thePrimary);
theParticleChange->SetStatusChange(fStopAndKill);
// check if models have been registered, and use default, in case this is not true @@
// get result from high energy model
const G4DynamicParticle * aPart = thePrimary.GetDynamicParticle();
G4KineticTrackVector * theInitialResult =
theHighEnergyGenerator->Scatter(theNucleus, *aPart);
// Hand over to transport for intra-nuclear transport
G4ParticleVector * theTransportResult =
theTransport->Propagate(theInitialResult, theHighEnergyGenerator->GetWoundedNucleus());
// Fill particle change
int i;
theParticleChange->SetNumberOfSecondaries(theTransportResult->entries());
for(i=0; i<theTransportResult->entries(); i++)
{
theParticleChange->AddSecondary(theTransportResult->at(i));
}
// some garbage collection
delete theTransportResult;
// Done
return theParticleChange;
}