Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FastSimulationManager.hh,v 1.3.2.1.2.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FastSimulationManager.hh,v 1.6 2000/05/30 08:30:31 mora Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -25,9 +25,8 @@
#ifndef G4FastSimulationManager_h
#define G4FastSimulationManager_h 1
#include "g4rw/tpordvec.h"
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4ParticleTable.hh"
@@ -39,6 +38,7 @@
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4FastSimulationVector.hh"
#include "G4ios.hh"
@@ -155,7 +155,7 @@ public: // without description
const G4Navigator* a = 0);
G4VParticleChange* InvokeAtRestDoIt();
// For RW management
// For management
G4bool operator == ( const G4FastSimulationManager&) const;
private:
@@ -163,18 +163,18 @@ private:
G4FastTrack fFastTrack;
G4FastStep fFastStep;
G4VFastSimulationModel* fTriggedFastSimulationModel;
G4RWTPtrOrderedVector<G4VFastSimulationModel> ModelList;
G4RWTPtrOrderedVector<G4VFastSimulationModel> fInactivatedModels;
G4RWTPtrOrderedVector<G4Transform3D> GhostPlacements;
G4FastSimulationVector <G4VFastSimulationModel> ModelList;
G4FastSimulationVector <G4VFastSimulationModel> fInactivatedModels;
G4FastSimulationVector <G4Transform3D> GhostPlacements;
G4ParticleDefinition* fLastCrossedParticle;
G4RWTPtrOrderedVector<G4VFastSimulationModel> fApplicableModelList;
G4FastSimulationVector <G4VFastSimulationModel> fApplicableModelList;
};
inline void
G4FastSimulationManager::AddFastSimulationModel(G4VFastSimulationModel* fsm)
{
ModelList.insert(fsm);
ModelList.push_back(fsm);
// forces the fApplicableModelList to be rebuild
fLastCrossedParticle = 0;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FastSimulationManagerProcess.hh,v 1.4.2.1.2.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FastSimulationManagerProcess.hh,v 1.7 2000/05/30 08:30:32 mora Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -30,8 +30,6 @@
#ifndef G4FastSimulationManagerProcess_h
#define G4FastSimulationManagerProcess_h 1
#include "g4rw/tpordvec.h"
#include "globals.hh"
#include "G4VProcess.hh"
#include "G4FastSimulationManager.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FastSimulationMessenger.hh,v 1.2.8.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FastSimulationMessenger.hh,v 1.3 1999/12/15 14:53:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// GEANT 4 class header file
@@ -0,0 +1,49 @@
// This code implementation is the intellectual property of
// the 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:
// GEANT4 tag $Name:
//
//
//---------------------------------------------------------------
//
// G4FastSimulationVector.hh
//
// Description:
// Extends the STL vector to replace RW.
//
// History:
// May 00: Verderi && MoraDeFreitas - First Implementation.
//
//---------------------------------------------------------------
#ifndef G4FastSimulationVector_h
#define G4FastSimulationVector_h 1
#include "g4std/vector"
template<class T>
class G4FastSimulationVector : public G4std::vector<T*>
{
typedef G4std::vector<T*> std_pvector;
typedef typename std_pvector::iterator iterator;
typedef typename std_pvector::const_iterator const_iterator;
public:
G4FastSimulationVector(){};
// G4FastSimulationVector(const G4FastSimulationVector<T>&){};
virtual ~G4FastSimulationVector(){};
T* remove (const T*);
T* removeAt (G4int);
void clearAndDestroy ();
};
#include "G4FastSimulationVector.icc"
#endif
@@ -0,0 +1,61 @@
// This code implementation is the intellectual property of
// the 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:
// GEANT4 tag $Name:
//
//
//---------------------------------------------------------------
//
// G4FastSimulationVector.hh
//
// Description:
// Extends the STL vector to replace RW.
//
// History:
// May 00: Verderi && MoraDeFreitas - First Implementation.
//
//---------------------------------------------------------------
template<class T>
T* G4FastSimulationVector<T>::remove (const T* a)
{
for (iterator it = std_pvector::begin();it<std_pvector::end(); it++)
{
if (**it==*a)
{
T* tmp=*it;
erase(it);
return tmp;
}
}
return 0;
}
template<class T>
T* G4FastSimulationVector<T>::removeAt (G4int i)
{
iterator it=std_pvector::begin();
int j;
for(j=0;j<i;j++) it++;
if(it!=std_pvector::end())
{
T* tmp = std_pvector::operator[](i);
erase(it);
return tmp;
}
else
return 0;
}
template<class T>
void G4FastSimulationVector<T>::clearAndDestroy ()
{
for (iterator it = std_pvector::begin();it<std_pvector::end(); it++)
if(*it) delete *it;
std_pvector::clear();
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FastStep.hh,v 1.4.4.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FastStep.hh,v 1.5 1999/12/15 14:53:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FastStep.icc,v 1.1.10.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FastStep.icc,v 1.2 1999/12/15 14:53:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $id: G4ParticleChange.icc,v 1.6 1998/04/14 02:25:54 kurasige Exp $
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FastTrack.hh,v 1.3.4.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FastTrack.hh,v 1.4 1999/12/15 14:53:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
//---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FlavoredParallelWorld.hh,v 1.3.8.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FlavoredParallelWorld.hh,v 1.4 1999/12/15 14:53:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -0,0 +1,47 @@
// 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: G4FoamXrayTRmodel.hh,v 1.1 2000/05/16 13:45:19 grichine Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
///////////////////////////////////////////////////////////////////////////
//
// Rough model describing a radiator of X-ray transition radiation.
// Thicknesses of plates and gas gaps are exponentially distributed.
// We suppose that:
// formation zone ~ mean thickness << absorption length
// for each material and in the range 1-100 keV. This allows us to simplify
// interference effects in radiator stack (GetStackFactor method).
//
//
// History:
// 09.02.00 V. Grichine, first version
//
#ifndef G4FoamXrayTRmodel_h
#define G4FoamXrayTRmodel_h 1
#include "G4VFastSimulationModel.hh"
// #include "G4ForwardXrayTR.hh"
#include "G4VXrayTRmodel.hh"
class G4FoamXrayTRmodel : public G4VXrayTRmodel
{
public:
G4FoamXrayTRmodel (G4LogicalVolume *anEnvelope,G4double,G4double);
~G4FoamXrayTRmodel ();
// Pure virtual function from base class
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
};
#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: G4GamDistrXrayTRmodel.hh,v 1.1 2000/05/16 13:45:31 grichine Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
///////////////////////////////////////////////////////////////////////////
//
// Rough model describing a radiator of X-ray transition radiation.
// Thicknesses of plates and gas gaps are distributed according to gamma
// distribution. x are thicknesses of plates or gas gaps:
//
// p(x) = (alpha/<x>)^alpha * x^(alpha-1) * exp(-alpha*x/<x>) / G(alpha)
//
// G(alpha) is Euler's gamma function.
// Plates have mean <x> = fPlateThick > 0 and power alpha = fAlphaPlate > 0 :
// Gas gaps have mean <x> = fGasThick > 0 and power alpha = fAlphaGas > 0 :
// We suppose that:
// formation zone ~ mean thickness << absorption length
// for each material and in the range 1-100 keV. This allows us to simplify
// interference effects in radiator stack (GetStackFactor method).
//
//
// History:
// 11.02.00 V. Grichine, first version
//
#ifndef G4GamDistrXrayTRmodel_h
#define G4GamDistrXrayTRmodel_h 1
#include "G4VFastSimulationModel.hh"
// #include "G4ForwardXrayTR.hh"
#include "G4VXrayTRmodel.hh"
class G4GamDistrXrayTRmodel : public G4VXrayTRmodel
{
public:
G4GamDistrXrayTRmodel (G4LogicalVolume *anEnvelope,
G4double,G4double,
G4double,G4double );
~G4GamDistrXrayTRmodel ();
// Pure virtual function from base class
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
private:
G4double fAlphaPlate, fAlphaGas ;
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4GlobalFastSimulationManager.hh,v 1.4.2.1.2.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4GlobalFastSimulationManager.hh,v 1.7 2000/05/30 08:30:35 mora Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -29,7 +29,8 @@
#ifndef G4GlobalFastSimulationManager_hh
#define G4GlobalFastSimulationManager_hh
#include "g4rw/tpordvec.h"
#include "globals.hh"
#include "G4FastSimulationVector.hh"
#include "G4VGlobalFastSimulationManager.hh"
#include "G4FastSimulationManager.hh"
@@ -121,14 +122,14 @@ private:
G4FastSimulationMessenger* fTheFastSimulationMessenger;
// List of G4FastSimulationManagers
G4RWTPtrOrderedVector<G4FastSimulationManager> ManagedManagers;
G4FastSimulationVector <G4FastSimulationManager> ManagedManagers;
// fClosed flags if the NeededFlavoredWorlds List was Build.
G4bool fClosed;
// List of needed ParallelWorlds after close
G4RWTPtrOrderedVector<G4FlavoredParallelWorld> NeededFlavoredWorlds;
G4FastSimulationVector <G4FlavoredParallelWorld> NeededFlavoredWorlds;
// Internal fonction to Build world volume clones.
G4VPhysicalVolume* GiveMeAWorldVolumeClone();
};
@@ -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.
//
// $Id: G4IrregularXrayTRmodel.hh,v 1.1 2000/05/16 13:45:44 grichine Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
///////////////////////////////////////////////////////////////////////////
//
// Very rough model describing a radiator of X-ray transition radiation.
// Thicknesses of plates and gas gaps are exponentially distributed.
// We suppose that:
// formation zone << mean thickness << absorption length
// for each material and in the range 1-100 keV. This allows us to simplify
// essentially interference effects in radiator stack (GetStackFactor method).
// The price is decreasing of X-ray TR photon yield.
//
// History:
// 23.01.00 V. Grichine first version based on ExN05PiModel class
// 08.02.00 V. Grichine, DoIt was placed in base class
//
#ifndef G4IrregularXrayTRmodel_h
#define G4IrregularXrayTRmodel_h 1
#include "G4VFastSimulationModel.hh"
// #include "G4ForwardXrayTR.hh"
#include "G4VXrayTRmodel.hh"
class G4IrregularXrayTRmodel : public G4VXrayTRmodel
{
public:
G4IrregularXrayTRmodel (G4LogicalVolume *anEnvelope,G4double,G4double);
~G4IrregularXrayTRmodel ();
// Pure virtual function from base class
// void DoIt(const G4FastTrack&, G4FastStep&);
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
};
#endif
@@ -0,0 +1,47 @@
// 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: G4PlateIrrGasXrayTRmodel.hh,v 1.1 2000/05/16 13:46:04 grichine Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
///////////////////////////////////////////////////////////////////////////
//
// Model describing a radiator of X-ray transition radiation.
// Thicknesses of plates is fixed while gas gaps are fully irregular.
// We suppose that:
// formation zone ~ mean thickness << absorption length
// for each material and in the range 1-100 keV. This allows us to simplify
// interference effects in radiator stack (GetStackFactor method).
//
//
// History:
// 10.02.00 V. Grichine, first version
//
#ifndef G4PlateIrrGasXrayTRmodel_h
#define G4PlateIrrGasXrayTRmodel_h 1
#include "G4VFastSimulationModel.hh"
// #include "G4ForwardXrayTR.hh"
#include "G4VXrayTRmodel.hh"
class G4PlateIrrGasXrayTRmodel : public G4VXrayTRmodel
{
public:
G4PlateIrrGasXrayTRmodel (G4LogicalVolume *anEnvelope,G4double,G4double);
~G4PlateIrrGasXrayTRmodel ();
// Pure virtual function from base class
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
};
#endif
@@ -0,0 +1,47 @@
// 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: G4RegularXrayTRmodel.hh,v 1.1 2000/05/16 13:46:16 grichine Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
///////////////////////////////////////////////////////////////////////////
//
// Model describing a radiator of X-ray transition radiation.
// Thicknesses of plates and gas gaps are fixed.
// We suppose that:
// formation zone ~ mean thickness << absorption length
// for each material and in the range 1-100 keV. This allows us to simplify
// interference effects in radiator stack (GetStackFactor method).
//
//
// History:
// 10.02.00 V. Grichine, first version
//
#ifndef G4RegularXrayTRmodel_h
#define G4RegularXrayTRmodel_h 1
#include "G4VFastSimulationModel.hh"
// #include "G4ForwardXrayTR.hh"
#include "G4VXrayTRmodel.hh"
class G4RegularXrayTRmodel : public G4VXrayTRmodel
{
public:
G4RegularXrayTRmodel (G4LogicalVolume *anEnvelope,G4double,G4double);
~G4RegularXrayTRmodel ();
// Pure virtual function from base class
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VFastSimulationModel.hh,v 1.2.4.1 1999/12/07 20:52:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VFastSimulationModel.hh,v 1.3 1999/12/15 14:53:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -0,0 +1,144 @@
// 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: G4VXrayTRmodel.hh,v 1.2 2000/06/15 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
///////////////////////////////////////////////////////////////////////////
//
// base class for 'fast' parametrisation model describing X-ray transition
// created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
// method
//
// History:
// 23.01.00 V. Grichine first version
// 09.02.00 V. Grichine, DoIt was transformed from virtual
//
#ifndef G4VXrayTRmodel_h
#define G4VXrayTRmodel_h 1
#include "globals.hh"
#include "templates.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4Gamma.hh"
#include "G4VFastSimulationModel.hh"
// #include "G4ForwardXrayTR.hh"
class G4VXrayTRmodel : public G4VFastSimulationModel
// , public G4ForwardXrayTR
{
public:
G4VXrayTRmodel (G4LogicalVolume *anEnvelope,G4double,G4double);
virtual ~G4VXrayTRmodel ();
// Pure virtual functions from base class
G4bool IsApplicable(const G4ParticleDefinition&);
G4bool ModelTrigger(const G4FastTrack &);
// Pure virtuals must be implemented in inherited particular TR radiators
void DoIt(const G4FastTrack&, G4FastStep&) ;
virtual G4double GetStackFactor( G4double energy, G4double gamma,
G4double varAngle ) = 0 ;
G4double OneBoundaryXTRNdensity( G4double energy,
G4double gamma,
G4double varAngle ) const ;
void BuildTable() ;
void BuildEnergyTable() ;
void BuildAngleTable() ;
// for photon energy distribution tables
G4double XTRNSpectralAngleDensity(G4double varAngle) ;
G4double XTRNSpectralDensity(G4double energy) ;
// for photon angle distribution tables
G4double XTRNAngleSpectralDensity(G4double energy) ;
G4double XTRNAngleDensity(G4double varAngle) ;
void GetNumberOfPhotons() ;
void ExampleDoIt(const G4FastTrack&, G4FastStep&) ;
// Auxiliary functions for plate/gas material parameters
G4double GetPlateFormationZone(G4double,G4double,G4double) ;
void ComputePlatePhotoAbsCof() ;
G4double GetPlateLinearPhotoAbs(G4double) ;
void GetPlateZmuProduct() ;
G4double GetPlateZmuProduct(G4double,G4double,G4double) ;
G4double GetGasFormationZone(G4double,G4double,G4double) ;
void ComputeGasPhotoAbsCof() ;
G4double GetGasLinearPhotoAbs(G4double) ;
void GetGasZmuProduct() ;
G4double GetGasZmuProduct(G4double,G4double,G4double) ;
protected:
G4Gamma* fPtrGamma ; // pointer to TR photon
G4double* fGammaCutInKineticEnergy ; // TR photon cut in energy array
G4double fGammaTkinCut ; // Tkin cut of TR photon in current mat.
G4PhysicsTable* fAngleDistrTable ;
G4PhysicsTable* fEnergyDistrTable ;
static G4PhysicsLogVector* fProtonEnergyVector ;
static G4double fTheMinEnergyTR ; // static min TR energy
static G4double fTheMaxEnergyTR ; // static max TR energy
G4double fMinEnergyTR ; // min TR energy in material
G4double fMaxEnergyTR ; // max TR energy in material
static G4double fTheMaxAngle ; // max theta of TR quanta
static G4double fTheMinAngle ; // max theta of TR quanta
G4double fMaxThetaTR ; // max theta of TR quanta
static G4int fBinTR ; // number of bins in TR vectors
static G4double fMinProtonTkin ; // min Tkin of proton in tables
static G4double fMaxProtonTkin ; // max Tkin of proton in tables
static G4int fTotBin ; // number of bins in log scale
G4double fGamma ; // current Lorentz factor
G4double fEnergy ; // energy and
G4double fVarAngle ; // angle squared
static G4double fPlasmaCof ; // physical consts for plasma energy
static G4double fCofTR ;
G4double fSigma1, fSigma2 ; // plasma energy Sq of matter1/2
G4int fMatIndex1, fMatIndex2 ;
G4int fPlateNumber ;
G4double** fPlatePhotoAbsCof ;
G4int fPlateIntervalNumber ;
G4double fPlateThick ;
G4double** fGasPhotoAbsCof ;
G4int fGasIntervalNumber ;
G4double fGasThick ;
};
#endif