Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.0 1998/07/02 16:22:17 gunter Exp $
|
||||
# $Id: GNUmakefile,v 1.1 1999/01/07 16:11:34 gunter Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# GNUmakefile for hadronic management library. G.Folger 10-Dec-97
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.hh,v 2.0 1998/07/02 16:22:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4EnergyRangeManager.hh,v 1.1 1999/01/07 16:11:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronInelasticProcess.hh,v 2.1 1998/07/13 19:02:45 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HadronInelasticProcess.hh,v 1.1 1999/01/07 16:11:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Inelastic Process class
|
||||
// The specific particle inelastic processes derive from this class
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronicInteraction.hh,v 2.3 1998/08/24 11:47:22 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HadronicInteraction.hh,v 1.2 1999/03/29 09:35:31 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Interaction abstract base class
|
||||
// This class is the base class for the model classes.
|
||||
@@ -18,6 +18,7 @@
|
||||
// Added units to energy initialization: J.L. Chuma 04-Apr-97
|
||||
// Modified by J.L.Chuma, 05-May-97 to Initialize theBlockedCounter
|
||||
// Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes
|
||||
// Adding a registry for memory management of hadronic models, HPW 22-Mar-99
|
||||
|
||||
#ifndef G4HadronicInteraction_h
|
||||
#define G4HadronicInteraction_h 1
|
||||
@@ -28,7 +29,8 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4Track.hh"
|
||||
|
||||
#include "G4HadronicInteractionRegistry.hh"
|
||||
|
||||
class G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
@@ -38,7 +40,9 @@
|
||||
theBlockedCounter(0), theMinCounter(0), theMaxCounter(0),
|
||||
theMinCounterElements(0), theMaxCounterElements(0),
|
||||
theBlockedCounterElements(0)
|
||||
{ }
|
||||
{
|
||||
G4HadronicInteractionRegistry::RegisterMe(this);
|
||||
}
|
||||
|
||||
virtual ~G4HadronicInteraction()
|
||||
{ }
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef G4HadronicInteractionRegistry_h
|
||||
#define G4HadronicInteractionRegistry_h 1
|
||||
|
||||
#include <rw/tpvector.h>
|
||||
#include "globals.hh"
|
||||
class G4HadronicInteraction;
|
||||
|
||||
class G4HadronicInteractionRegistry
|
||||
{
|
||||
public:
|
||||
|
||||
~G4HadronicInteractionRegistry();
|
||||
|
||||
static void RegisterMe(G4HadronicInteraction * aModel);
|
||||
static void RemoveMe(G4HadronicInteraction * aModel){};
|
||||
|
||||
private:
|
||||
// !!! can not use "copy constructor" nor "default constructor" !!!!
|
||||
G4HadronicInteractionRegistry(const G4HadronicInteractionRegistry &right)
|
||||
{ nModels = right.nModels; }
|
||||
G4HadronicInteractionRegistry() {nModels = 0;}
|
||||
|
||||
// !!! Assignment operation is forbidden !!!
|
||||
const G4HadronicInteractionRegistry & operator=(const G4HadronicInteractionRegistry &right)
|
||||
{ return *this;}
|
||||
|
||||
void AddModel(G4HadronicInteraction * aModel);
|
||||
|
||||
G4int nModels;
|
||||
RWTPtrVector<G4HadronicInteraction> allModels;
|
||||
static G4HadronicInteractionRegistry theRegistry;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronicProcess.hh,v 2.0 1998/07/02 16:22:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HadronicProcess.hh,v 1.1 1999/01/07 16:11:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// This is the top level Hadronic Process class
|
||||
// The inelastic, elastic, capture, and fission processes
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4InelasticInteraction.hh,v 2.3 1998/07/13 19:03:32 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4InelasticInteraction.hh,v 1.1 1999/01/07 16:11:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Process: Inelastic Interaction
|
||||
// This class is an abstract base class, since the pure virtual
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.cc,v 2.3 1998/07/13 17:38:15 fjones Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4EnergyRangeManager.cc,v 1.2 1999/03/29 09:35:36 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
@@ -101,14 +101,14 @@
|
||||
if( emi1 < emi2 )
|
||||
{
|
||||
if( (ema1-kineticEnergy)/(ema1-emi2)<rand )
|
||||
m = memory;
|
||||
else
|
||||
m = memor2;
|
||||
else
|
||||
m = memory;
|
||||
} else {
|
||||
if( (ema2-kineticEnergy)/(ema2-emi1)<rand )
|
||||
m = memor2;
|
||||
else
|
||||
m = memory;
|
||||
else
|
||||
m = memor2;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronInelasticProcess.cc,v 2.1 1998/08/24 11:56:59 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HadronInelasticProcess.cc,v 1.1 1999/01/07 16:11:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Inelastic Process Class
|
||||
// J.L. Chuma, TRIUMF, 24-Mar-1997
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronicInteraction.cc,v 2.2 1998/07/13 17:22:13 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HadronicInteraction.cc,v 1.1 1999/01/07 16:11:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Hadronic Interaction base class
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "G4HadronicInteractionRegistry.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
|
||||
G4HadronicInteractionRegistry G4HadronicInteractionRegistry::
|
||||
theRegistry;
|
||||
|
||||
void G4HadronicInteractionRegistry::
|
||||
RegisterMe(G4HadronicInteraction * aModel)
|
||||
{
|
||||
theRegistry.AddModel(aModel);
|
||||
}
|
||||
|
||||
G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry()
|
||||
{
|
||||
for(G4int i=0; i<nModels; i++)
|
||||
{
|
||||
delete allModels[i];
|
||||
}
|
||||
}
|
||||
|
||||
void G4HadronicInteractionRegistry::
|
||||
AddModel(G4HadronicInteraction * aModel)
|
||||
{
|
||||
G4bool alreadyThere = false;
|
||||
for(G4int i=0; i<nModels; i++)
|
||||
{
|
||||
if(allModels(i)==aModel)
|
||||
{
|
||||
alreadyThere = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!alreadyThere)
|
||||
{
|
||||
nModels++;
|
||||
allModels.resize(nModels);
|
||||
allModels(nModels-1) = aModel;
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronicProcess.cc,v 2.0 1998/07/02 16:22:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HadronicProcess.cc,v 1.1 1999/01/07 16:11:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// HPW to implement the choosing of an element for scattering.
|
||||
#include "G4HadronicProcess.hh"
|
||||
|
||||
Reference in New Issue
Block a user