Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BosonConstructor.cc,v 1.2.4.1 2001/06/28 19:10:36 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4BosonConstructor.cc,v 1.3 2001/07/11 10:01:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ChargedGeantino.cc,v 1.4.2.1 2001/06/28 19:10:36 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ChargedGeantino.cc,v 1.10 2001/10/28 05:03:49 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -85,31 +85,19 @@ G4ChargedGeantino G4ChargedGeantino::theChargedGeantino(
|
||||
);
|
||||
|
||||
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantinoDefinition(){return &theChargedGeantino;}
|
||||
// initialization for static cut values
|
||||
G4double G4ChargedGeantino::theChargedGeantinoLengthCut = -1.0;
|
||||
G4double* G4ChargedGeantino::theChargedGeantinoKineticEnergyCuts = NULL;
|
||||
|
||||
// **********************************************************************
|
||||
// **************************** SetCuts *********************************
|
||||
// **********************************************************************
|
||||
|
||||
void G4ChargedGeantino::SetCuts(G4double aCut)
|
||||
void G4ChargedGeantino::CalcEnergyCuts( const G4Material* )
|
||||
{
|
||||
theCutInMaxInteractionLength = aCut;
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
// Create the vector of cuts in energy
|
||||
// corresponding to the stopping range cut
|
||||
if(theKineticEnergyCuts) delete theKineticEnergyCuts;
|
||||
theKineticEnergyCuts = new G4double [materialTable->length()];
|
||||
|
||||
// Build range vector for every material, convert cut into energy-cut,
|
||||
// fill theKineticEnergyCuts and delete the range vector
|
||||
for (size_t J=0; J<materialTable->length(); J++)
|
||||
{
|
||||
theKineticEnergyCuts[J] = 0.0*keV;
|
||||
}
|
||||
theChargedGeantinoLengthCut = theCutInMaxInteractionLength;
|
||||
theChargedGeantinoKineticEnergyCuts = theKineticEnergyCuts;
|
||||
// Rebuild the physics tables for every process for this particle type
|
||||
// Set Energy Cut values to zero for all materials
|
||||
SetEnergyCutValues( 0.0*keV);
|
||||
}
|
||||
|
||||
|
||||
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantino()
|
||||
{
|
||||
return &theChargedGeantino;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Gamma.cc,v 1.3.4.2 2001/06/28 20:18:55 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Gamma.cc,v 1.8 2001/10/20 01:36:37 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -96,9 +96,6 @@ G4Gamma G4Gamma::theGamma(
|
||||
true, 0.0, NULL
|
||||
);
|
||||
G4Gamma* G4Gamma::GammaDefinition() {return &theGamma;}
|
||||
// initialization for static cut values
|
||||
G4double G4Gamma::theGammaLengthCut = -1.0;
|
||||
G4double* G4Gamma::theGammaKineticEnergyCuts = NULL;
|
||||
|
||||
// ***********************************************************************
|
||||
// ******************* BuildAbsorptionLengthVector ***********************
|
||||
@@ -134,7 +131,7 @@ void G4Gamma::BuildAbsorptionLengthVector(
|
||||
for (G4int iel=0; iel<NumEl; iel++)
|
||||
{
|
||||
G4bool isOut;
|
||||
G4int IndEl = (*elementVector)(iel)->GetIndex();
|
||||
G4int IndEl = (*elementVector)[iel]->GetIndex();
|
||||
SIGMA += atomicNumDensityVector[iel]*
|
||||
(*aCrossSectionTable)[IndEl]->GetValue(lowEdgeEnergy,isOut);
|
||||
}
|
||||
@@ -142,7 +139,16 @@ void G4Gamma::BuildAbsorptionLengthVector(
|
||||
absorptionLengthVector->PutValue(ibin, 5./SIGMA);
|
||||
if (absorptionLengthMax < 5./SIGMA ) absorptionLengthMax = 5./SIGMA;
|
||||
}
|
||||
if ( theCutInMaxInteractionLength >= absorptionLengthMax ) {
|
||||
|
||||
//----- Get maximum cut in length
|
||||
G4int ii,siz = G4Material::GetNumberOfMaterials();
|
||||
G4double maxCut = 0;
|
||||
for( ii = 0; ii < siz; ii++ ){
|
||||
if( theCutInMaxInteractionLength[ii] > maxCut ) maxCut = theCutInMaxInteractionLength[ii]
|
||||
;
|
||||
}
|
||||
|
||||
if ( maxCut >= absorptionLengthMax ) {
|
||||
G4cout << "******** SetCuts for " << GetParticleName();
|
||||
G4cout << " ********************" << G4endl;
|
||||
G4cout << "The maximal meaningful cut is ";
|
||||
@@ -152,6 +158,7 @@ void G4Gamma::BuildAbsorptionLengthVector(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ***********************************************************************
|
||||
// ********************** ComputeCrossSection ****************************
|
||||
// ***********************************************************************
|
||||
@@ -214,8 +221,11 @@ G4double G4Gamma::ComputeCrossSection(G4double AtomicNumber,
|
||||
// ******************** ConvertCutToKineticEnergy ***********************
|
||||
// **********************************************************************
|
||||
|
||||
G4double G4Gamma::ConvertCutToKineticEnergy(
|
||||
G4RangeVector* absorptionLengthVector) const
|
||||
G4double
|
||||
G4Gamma::ConvertCutToKineticEnergy(
|
||||
G4RangeVector* absorptionLengthVector,
|
||||
size_t materialIndex
|
||||
) const
|
||||
{
|
||||
const G4double epsilon=0.01;
|
||||
const G4int NBIN=200;
|
||||
@@ -239,9 +249,9 @@ G4double G4Gamma::ConvertCutToKineticEnergy(
|
||||
}
|
||||
G4double T1 = LowestEnergy;
|
||||
G4double r1 = absorptionLengthVector->GetValue(T1,isOut);
|
||||
if ( theCutInMaxInteractionLength <= r1 ) {
|
||||
if ( theCutInMaxInteractionLength[materialIndex] <= r1 ) {
|
||||
return T1;
|
||||
} else if ( theCutInMaxInteractionLength >= rmax ) {
|
||||
} else if ( theCutInMaxInteractionLength[materialIndex] >= rmax ) {
|
||||
G4cout << "******** ConvertCutToKineticEnergy for " << GetParticleName();
|
||||
G4cout << " ********************" << G4endl;
|
||||
G4cout << "The cut energy is set " << DBL_MAX/GeV << "GeV " <<G4endl;
|
||||
@@ -250,8 +260,8 @@ G4double G4Gamma::ConvertCutToKineticEnergy(
|
||||
G4double T2 = Tmax;
|
||||
G4double T3 = sqrt(T1*T2);
|
||||
G4double r3 = absorptionLengthVector->GetValue(T3,isOut);
|
||||
while ( abs(1.-r3/theCutInMaxInteractionLength)>epsilon ) {
|
||||
if ( theCutInMaxInteractionLength <= r3 )
|
||||
while ( abs(1.-r3/theCutInMaxInteractionLength[materialIndex])>epsilon ) {
|
||||
if ( theCutInMaxInteractionLength[materialIndex] <= r3 )
|
||||
T2 = T3;
|
||||
else
|
||||
T1 = T3;
|
||||
@@ -261,3 +271,9 @@ G4double G4Gamma::ConvertCutToKineticEnergy(
|
||||
return T3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4Gamma* G4Gamma::Gamma()
|
||||
{
|
||||
return &theGamma;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Geantino.cc,v 1.4.2.1 2001/06/28 19:10:36 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Geantino.cc,v 1.10 2001/10/28 05:03:49 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -86,36 +86,18 @@ G4Geantino G4Geantino::theGeantino(
|
||||
);
|
||||
|
||||
G4Geantino* G4Geantino::GeantinoDefinition() {return &theGeantino;}
|
||||
// initialization for static cut values
|
||||
G4double G4Geantino::theGeantinoLengthCut = -1.0;
|
||||
G4double* G4Geantino::theGeantinoKineticEnergyCuts = NULL;
|
||||
|
||||
// **********************************************************************
|
||||
// **************************** SetCuts *********************************
|
||||
// **********************************************************************
|
||||
|
||||
void G4Geantino::SetCuts(G4double aCut)
|
||||
void G4Geantino::CalcEnergyCuts( const G4Material* )
|
||||
{
|
||||
theCutInMaxInteractionLength = aCut;
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
// Create the vector of cuts in energy
|
||||
// corresponding to the stopping range cut
|
||||
if(theKineticEnergyCuts) delete theKineticEnergyCuts;
|
||||
theKineticEnergyCuts = new G4double [materialTable->length()];
|
||||
|
||||
// Build range vector for every material, convert cut into energy-cut,
|
||||
// fill theKineticEnergyCuts and delete the range vector
|
||||
theGeantinoLengthCut = theCutInMaxInteractionLength;
|
||||
theGeantinoKineticEnergyCuts = theKineticEnergyCuts;
|
||||
for (size_t J=0; J<materialTable->length(); J++)
|
||||
{
|
||||
theKineticEnergyCuts[J] = 0.0*keV;
|
||||
}
|
||||
// Rebuild the physics tables for every process for this particle type
|
||||
|
||||
|
||||
// Set Energy Cut values to zero for all materials
|
||||
SetEnergyCutValues( 0.0*keV);
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4Geantino* G4Geantino::Geantino()
|
||||
{
|
||||
return &theGeantino;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpticalPhoton.cc,v 1.4.2.1 2001/06/28 19:10:36 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4OpticalPhoton.cc,v 1.8 2001/10/16 08:15:43 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -83,9 +83,6 @@ G4OpticalPhoton G4OpticalPhoton::theOpticalPhoton(
|
||||
"opticalphoton", 0, 0, 0,
|
||||
true, 0.0, NULL
|
||||
);
|
||||
// initialization for static cut values
|
||||
G4double G4OpticalPhoton::theOpticalPhotonLengthCut = -1.0;
|
||||
G4double* G4OpticalPhoton::theOpticalPhotonKineticEnergyCuts = NULL;
|
||||
|
||||
G4OpticalPhoton* G4OpticalPhoton::OpticalPhotonDefinition()
|
||||
{return &theOpticalPhoton;}
|
||||
@@ -97,22 +94,19 @@ G4OpticalPhoton* G4OpticalPhoton::OpticalPhotonDefinition()
|
||||
// theKineticEnergyCuts for all materials are set to Zero.
|
||||
void G4OpticalPhoton::SetCuts(G4double aCut)
|
||||
{
|
||||
theCutInMaxInteractionLength = aCut;
|
||||
SetCutInMaxInteractionLength( aCut );
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
// Create the vector of cuts in energy
|
||||
// corresponding to the stopping range cut
|
||||
if(theKineticEnergyCuts) delete theKineticEnergyCuts;
|
||||
theKineticEnergyCuts = new G4double [materialTable->length()];
|
||||
|
||||
// Build range vector for every material, convert cut into energy-cut,
|
||||
// fill theKineticEnergyCuts and delete the range vector
|
||||
for (size_t J=0; J<materialTable->length(); J++)
|
||||
{
|
||||
theKineticEnergyCuts[J] = 0.0;
|
||||
}
|
||||
theOpticalPhotonLengthCut = theCutInMaxInteractionLength;
|
||||
theOpticalPhotonKineticEnergyCuts = theKineticEnergyCuts;
|
||||
// Rebuild the physics tables for every process for this particle type
|
||||
|
||||
// Set Energy Cut values to zero for all materials
|
||||
SetEnergyCutValues( 0.0*keV);
|
||||
}
|
||||
|
||||
|
||||
G4OpticalPhoton* G4OpticalPhoton::OpticalPhoton()
|
||||
{
|
||||
return &theOpticalPhoton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VBoson.cc,v 1.2.4.2 2001/06/28 20:18:56 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VBoson.cc,v 1.3 2001/07/11 10:01:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user