Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Cerenkov.cc,v 1.9.4.1 2001/06/28 19:12:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Cerenkov.cc,v 1.12 2001/11/07 17:07:40 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
////////////////////////////////////////////////////////////////////////
// Cerenkov Radiation Class Implementation
@@ -33,7 +33,8 @@
// Version: 2.1
// Created: 1996-02-21
// Author: Juliet Armstrong
// Updated: 2000-11-12 by Peter Gumplinger
// Updated: 2001-09-17, migration of Materials to pure STL (mma)
// 2000-11-12 by Peter Gumplinger
// > add check on CerenkovAngleIntegrals->IsFilledVectorExist()
// in method GetAverageNumberOfPhotons
// > and a test for MeanNumPhotons <= 0.0 in DoIt
@@ -289,7 +290,7 @@ G4Cerenkov::AlongStepDoIt(const G4Track& aTrack, const G4Step& aStep)
G4Track* aSecondaryTrack =
new G4Track(aCerenkovPhoton,aSecondaryTime,aSecondaryPosition);
aSecondaryTrack->SetTouchable(0);
aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0);
aSecondaryTrack->SetParentID(aTrack.GetTrackID());
@@ -314,7 +315,7 @@ void G4Cerenkov::BuildThePhysicsTable()
const G4MaterialTable* theMaterialTable=
G4Material::GetMaterialTable();
G4int numOfMaterials = theMaterialTable->length();
G4int numOfMaterials = G4Material::GetNumberOfMaterials();
// create new physics table
@@ -330,7 +331,7 @@ void G4Cerenkov::BuildThePhysicsTable()
// Retrieve vector of refraction indices for the material
// from the material's optical properties table
G4Material* aMaterial = (*theMaterialTable)(i);
G4Material* aMaterial = (*theMaterialTable)[i];
G4MaterialPropertiesTable* aMaterialPropertiesTable =
aMaterial->GetMaterialPropertiesTable();
@@ -467,7 +468,7 @@ G4Cerenkov::GetAverageNumberOfPhotons(const G4DynamicParticle* aParticle,
// - Refraction Indices for the current material
// - new G4PhysicsOrderedFreeVector allocated to hold CAI's
G4int materialIndex = G4Material::GetMaterialTable()->index(aMaterial);
G4int materialIndex = aMaterial->GetIndex();
// Retrieve the Cerenkov Angle Integrals for this material
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ForwardXrayTR.cc,v 1.4.4.1 2001/06/28 19:12:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ForwardXrayTR.cc,v 1.7 2001/10/24 16:40:54 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// G4ForwardXrayTR class -- implementation file
@@ -34,6 +34,7 @@
// History:
// 1st version 11.09.97 V. Grichine (Vladimir.Grichine@cern.ch )
// 2nd version 17.12.97 V. Grichine
// 17-09-01, migration of Materials to pure STL (mma)
#include <math.h>
@@ -44,7 +45,6 @@
#include "G4ForwardXrayTR.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "globals.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsVector.hh"
@@ -100,10 +100,10 @@ G4ForwardXrayTR::G4ForwardXrayTR()
{
G4int iMat, jMat, iTkin, iTR, iPlace ;
static
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ;
G4int numOfMat = theMaterialTable->length() ;
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4int numOfMat = G4Material::GetNumberOfMaterials();
fGammaCutInKineticEnergy = new G4double[numOfMat] ;
fGammaCutInKineticEnergy = fPtrGamma->GetCutsInEnergy() ;
fGammaCutInKineticEnergy = fPtrGamma->GetEnergyCuts() ;
fMatIndex1 = -1 ;
fMatIndex2 = -1 ;
fAngleDistrTable = new G4PhysicsTable(numOfMat*(numOfMat - 1)*fTotBin) ;
@@ -221,11 +221,11 @@ G4ForwardXrayTR( const G4String& matName1, // G4Material* pMat1,
{
// fMatIndex1 = pMat1->GetIndex() ;
// fMatIndex2 = pMat2->GetIndex() ;
G4int iMat, jMat ;
G4int iMat;
static
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ;
G4int numOfMat = theMaterialTable->length() ;
G4int numOfMat = G4Material::GetNumberOfMaterials();
for(iMat=0;iMat<numOfMat;iMat++) // check first material name
{
@@ -288,10 +288,10 @@ void G4ForwardXrayTR::BuildXrayTRtables()
static
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ;
G4int numOfMat = theMaterialTable->length() ;
G4int numOfMat = G4Material::GetNumberOfMaterials() ;
fGammaCutInKineticEnergy = new G4double[numOfMat] ;
fGammaCutInKineticEnergy = fPtrGamma->GetCutsInEnergy() ;
fGammaCutInKineticEnergy = fPtrGamma->GetEnergyCuts() ;
fAngleDistrTable = new G4PhysicsTable(2*fTotBin) ;
fEnergyDistrTable = new G4PhysicsTable(2*fTotBin) ;
@@ -570,7 +570,7 @@ G4VParticleChange* G4ForwardXrayTR::PostStepDoIt(const G4Track& aTrack,
G4double W, W1, W2, E1, E2 ;
static
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ;
numOfMat = theMaterialTable->length() ;
numOfMat = G4Material::GetNumberOfMaterials() ;
G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
G4StepPoint* pPostStepPoint = aStep.GetPostStepPoint();
@@ -599,14 +599,14 @@ G4VParticleChange* G4ForwardXrayTR::PostStepDoIt(const G4Track& aTrack,
&& ( iMat != fMatIndex1 && iMat != fMatIndex2 )
&& ( jMat != fMatIndex1 && jMat != fMatIndex2 ) )
|| (*theMaterialTable)(iMat)->GetState() ==
(*theMaterialTable)(jMat)->GetState()
|| (*theMaterialTable)[iMat]->GetState() ==
(*theMaterialTable)[jMat]->GetState()
||( (*theMaterialTable)(iMat)->GetState() == kStateSolid
&& (*theMaterialTable)(jMat)->GetState() == kStateLiquid )
||( (*theMaterialTable)[iMat]->GetState() == kStateSolid
&& (*theMaterialTable)[jMat]->GetState() == kStateLiquid )
||( (*theMaterialTable)(iMat)->GetState() == kStateLiquid
&& (*theMaterialTable)(jMat)->GetState() == kStateSolid ) )
||( (*theMaterialTable)[iMat]->GetState() == kStateLiquid
&& (*theMaterialTable)[jMat]->GetState() == kStateSolid ) )
{
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep) ;
}
@@ -796,11 +796,11 @@ G4ForwardXrayTR::GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const
G4int iPlace, numOfMat, numOfTR, iTR, iTransfer ;
G4double energyTR = 0.0 ; // return this value for no TR photons
G4double energyPos ;
G4double W1, W2, E1, E2 ;
G4double W1, W2;
static
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ;
numOfMat = theMaterialTable->length() ;
numOfMat = G4Material::GetNumberOfMaterials() ;
// The case of equal or approximate (in terms of plasma energy) materials
@@ -809,14 +809,14 @@ G4ForwardXrayTR::GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const
if ( iMat == jMat
|| (*theMaterialTable)(iMat)->GetState() ==
(*theMaterialTable)(jMat)->GetState()
|| (*theMaterialTable)[iMat]->GetState() ==
(*theMaterialTable)[jMat]->GetState()
||( (*theMaterialTable)(iMat)->GetState() == kStateSolid
&& (*theMaterialTable)(jMat)->GetState() == kStateLiquid )
||( (*theMaterialTable)[iMat]->GetState() == kStateSolid
&& (*theMaterialTable)[jMat]->GetState() == kStateLiquid )
||( (*theMaterialTable)(iMat)->GetState() == kStateLiquid
&& (*theMaterialTable)(jMat)->GetState() == kStateSolid ) )
||( (*theMaterialTable)[iMat]->GetState() == kStateLiquid
&& (*theMaterialTable)[jMat]->GetState() == kStateSolid ) )
{
return energyTR ;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Scintillation.cc,v 1.5.4.1 2001/06/28 19:12:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Scintillation.cc,v 1.8 2001/11/07 17:07:41 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
////////////////////////////////////////////////////////////////////////
// Scintillation Light Class Implementation
@@ -36,6 +36,7 @@
// Updated: 2000-09-18 by Peter Gumplinger
// > change: aSecondaryPosition=x0+rand*aStep.GetDeltaPosition();
// aSecondaryTrack->SetTouchable(0);
// 2001-09-17, migration of Materials to pure STL (mma)
//
// mail: gum@triumf.ca
//
@@ -156,11 +157,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
////////////////////////////////////////////////////////////////
G4double Pmin = Intensity->GetMinPhotonMomentum();
G4double Pmax = Intensity->GetMaxPhotonMomentum();
G4double dp = Pmax - Pmin;
G4int materialIndex = G4Material::GetMaterialTable()->index(aMaterial);
G4int materialIndex = aMaterial->GetIndex();
// Retrieve the Scintillation Integral for this material
// new G4PhysicsOrderedFreeVector allocated to hold CII's
@@ -252,7 +249,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
G4Track* aSecondaryTrack =
new G4Track(aScintillationPhoton,aSecondaryTime,aSecondaryPosition);
aSecondaryTrack->SetTouchable(0);
aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0);
aSecondaryTrack->SetParentID(aTrack.GetTrackID());
@@ -278,7 +275,7 @@ void G4Scintillation::BuildThePhysicsTable()
const G4MaterialTable* theMaterialTable =
G4Material::GetMaterialTable();
G4int numOfMaterials = theMaterialTable->length();
G4int numOfMaterials = G4Material::GetNumberOfMaterials();
// create new physics table
@@ -295,7 +292,7 @@ void G4Scintillation::BuildThePhysicsTable()
// for the material from the material's optical
// properties table
G4Material* aMaterial = (*theMaterialTable)(i);
G4Material* aMaterial = (*theMaterialTable)[i];
G4MaterialPropertiesTable* aMaterialPropertiesTable =
aMaterial->GetMaterialPropertiesTable();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TransitionRadiation.cc,v 1.2.4.1 2001/06/28 19:12:51 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TransitionRadiation.cc,v 1.3 2001/07/11 10:03:42 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// G4TransitionRadiation class -- implementation file