Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
+23 -7
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4AtomicShells.cc,v 1.2 1999/12/15 14:50:50 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4AtomicShells.cc,v 1.2.4.1 2001/06/28 19:10:30 gunter Exp $
// GEANT4 tag $Name: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
+52 -28
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4Element.cc,v 1.4 2001/03/12 17:48:48 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4Element.cc,v 1.7.2.1 2001/06/28 19:10:30 gunter Exp $
// GEANT4 tag $Name: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
@@ -23,6 +39,8 @@
// 09-07-98: Ionisation parameters removed from the class, M.Maire
// 16-11-98: name Subshell -> Shell; GetBindingEnergy() (mma)
// 09-03-01: assignement operator revised (mma)
// 02-05-01: check identical Z in AddIsotope (marc)
// 03-05-01, flux.precision(prec) at begin/end of operator<<
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
@@ -39,16 +57,16 @@ G4Element::G4Element(const G4String& name, const G4String& symbol,
G4double zeff, G4double aeff)
:fName(name),fSymbol(symbol)
{
if (zeff<1.) G4Exception
(" ERROR! It is not allowed to create an Element with Z < 1" );
if (zeff<1.) G4Exception (" ERROR from G4Element::G4Element !"
" It is not allowed to create an Element with Z < 1" );
if (aeff/(g/mole)<zeff) G4Exception
(" ERROR! Attempt to create an Element with N < Z !!!" );
if (aeff/(g/mole)<zeff) G4Exception (" ERROR from G4Element::G4Element !"
" Attempt to create an Element with N < Z !!!" );
if ((zeff-G4int(zeff)) > perMillion)
G4cerr << name <<
" : WARNING ! Trying to define an element as a mixture directly via effective Z."
<< G4endl;
G4cerr << name << " : WARNING from G4Element::G4Element !"
" Trying to define an element as a mixture directly via effective Z."
<< G4endl;
InitializePointers();
@@ -96,27 +114,31 @@ G4Element::G4Element(const G4String& name, const G4String& symbol, G4int nIsotop
void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance)
{
if (theIsotopeVector == NULL)
G4Exception("ERROR!!! - Trying to add an Isotope before contructing the element.");
G4Exception ("ERROR from G4Element::AddIsotope!"
" Trying to add an Isotope before contructing the element.");
// filling ...
if ( fNumberOfIsotopes < theIsotopeVector->length() ) {
// check same Z
if (fNumberOfIsotopes==0) fZeff = G4double(isotope->GetZ());
else if (G4double(isotope->GetZ()) != fZeff)
G4Exception ("ERROR from G4Element::AddIsotope!"
" Try to add isotopes with different Z");
//Z ok
fRelativeAbundanceVector[fNumberOfIsotopes] = abundance;
(*theIsotopeVector)(fNumberOfIsotopes) = isotope;
fNumberOfIsotopes ++;
++fNumberOfIsotopes;
}
else
G4Exception
("ERROR!!! - Attempt to add more than the declared number of constituent isotopes.");
else G4Exception ("ERROR from G4Element::AddIsotope!"
" Attempt to add more than the declared number of isotopes.");
// filled.
if ( fNumberOfIsotopes == theIsotopeVector->length() ) {
// Compute Zeff, Neff, Aeff
G4int i;
// Compute Neff, Aeff
G4double wtSum=0.0;
fZeff = G4double( (*theIsotopeVector)(0)->GetZ() );
fNeff = fAeff = 0.0;
for (i=0;i<fNumberOfIsotopes;i++) {
for (size_t i=0;i<fNumberOfIsotopes;i++) {
fNeff += fRelativeAbundanceVector[i]*(*theIsotopeVector)(i)->GetN();
fAeff += fRelativeAbundanceVector[i]*(*theIsotopeVector)(i)->GetA();
wtSum += fRelativeAbundanceVector[i];
@@ -126,8 +148,8 @@ void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance)
fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells((G4int)fZeff);
fAtomicShells = new G4double[fNbOfAtomicShells];
for (i=0;i<fNbOfAtomicShells;i++)
fAtomicShells[i] = G4AtomicShells::GetBindingEnergy((G4int)fZeff,i);
for (G4int j=0;j<fNbOfAtomicShells;j++)
fAtomicShells[j] = G4AtomicShells::GetBindingEnergy((G4int)fZeff,j);
ComputeDerivedQuantities();
@@ -255,7 +277,7 @@ const G4Element& G4Element::operator=(const G4Element& right)
{
theIsotopeVector = new G4IsotopeVector(fNumberOfIsotopes);
fRelativeAbundanceVector = new G4double[fNumberOfIsotopes];
for (G4int i=0;i<fNumberOfIsotopes;i++)
for (size_t i=0;i<fNumberOfIsotopes;i++)
{
(*theIsotopeVector)[i] = (*right.theIsotopeVector)[i];
fRelativeAbundanceVector[i] = right.fRelativeAbundanceVector[i];
@@ -286,6 +308,7 @@ G4int G4Element::operator!=(const G4Element& right) const
G4std::ostream& operator<<(G4std::ostream& flux, G4Element* element)
{
long mode = flux.setf(G4std::ios::fixed,G4std::ios::floatfield);
long prec = flux.precision(3);
flux
<< " Element: " << G4std::setw(8) << element->fName << G4std::setw(3) << element->fSymbol
@@ -294,12 +317,13 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4Element* element)
<< " A = " << G4std::setw(6) << G4std::setprecision(2) << (element->fAeff)/(g/mole)
<< " g/mole";
for (G4int i=0; i<element->fNumberOfIsotopes; i++)
for (size_t i=0; i<element->fNumberOfIsotopes; i++)
flux
<< "\n ---> " << (*(element->theIsotopeVector))[i]
<< " abundance: " << G4std::setw(6) << G4std::setprecision(2)
<< (element->fRelativeAbundanceVector[i])/perCent << " %";
flux.precision(prec);
flux.setf(mode,G4std::ios::floatfield);
return flux;
}
@@ -320,7 +344,7 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4ElementTable ElementTable)
flux << "\n***** Table : Nb of elements = " << ElementTable.length()
<< " *****\n" << G4endl;
for (G4int i=0; i<ElementTable.length(); i++) flux << ElementTable[i]
for (size_t i=0; i<ElementTable.length(); i++) flux << ElementTable[i]
<< G4endl << G4endl;
return flux;
+23 -7
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4IonisParamElm.cc,v 1.6 2001/03/12 17:48:48 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4IonisParamElm.cc,v 1.6.2.1 2001/06/28 19:10:30 gunter Exp $
// GEANT4 tag $Name: $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
+26 -10
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4IonisParamMat.cc,v 1.6 2001/03/12 17:48:48 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4IonisParamMat.cc,v 1.7.2.1 2001/06/28 19:10:30 gunter Exp $
// GEANT4 tag $Name: $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
@@ -40,7 +56,7 @@ void G4IonisParamMat::ComputeMeanParameters()
fTaul = (*(fMaterial->GetElementVector()))[0]->GetIonisation()->GetTaul();
fLogMeanExcEnergy = 0.;
for (G4int i=0; i < fMaterial->GetNumberOfElements(); i++)
for (size_t i=0; i < fMaterial->GetNumberOfElements(); i++)
fLogMeanExcEnergy += (fMaterial->GetVecNbOfAtomsPerVolume())[i]
*((*(fMaterial->GetElementVector()))[i]->GetZ())
*log((*(fMaterial->GetElementVector()))[i]->GetIonisation()
@@ -54,7 +70,7 @@ void G4IonisParamMat::ComputeMeanParameters()
{
fShellCorrectionVector[j] = 0.;
for (G4int k=0; k<fMaterial->GetNumberOfElements(); k++)
for (size_t k=0; k<fMaterial->GetNumberOfElements(); k++)
fShellCorrectionVector[j] += (fMaterial->GetVecNbOfAtomsPerVolume())[k]
*((*(fMaterial->GetElementVector()))[k]->GetIonisation()
->GetShellCorrectionVector()[j]);
@@ -157,7 +173,7 @@ void G4IonisParamMat::ComputeFluctModel()
// need an 'effective Z' ?????
G4double Zeff = 0.;
for (G4int i=0;i<fMaterial->GetNumberOfElements();i++)
for (size_t i=0;i<fMaterial->GetNumberOfElements();i++)
Zeff += (fMaterial->GetFractionVector())[i]
*((*(fMaterial->GetElementVector()))[i]->GetZ());
+30 -10
View File
@@ -1,15 +1,32 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4Isotope.cc,v 1.3 2001/03/12 17:48:49 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4Isotope.cc,v 1.5.2.1 2001/06/28 19:10:30 gunter Exp $
// GEANT4 tag $Name: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
// 03-05-01, flux.precision(prec) at begin/end of operator<<
// 29-01-97: Forbidden to create Isotope with Z<1 or N<Z, M.Maire
// 26-06-96: Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban
@@ -85,14 +102,16 @@ G4int G4Isotope::operator!=(const G4Isotope &right) const
G4std::ostream& operator<<(G4std::ostream& flux, G4Isotope* isotope)
{
long mode = flux.setf(G4std::ios::fixed,G4std::ios::floatfield);
long prec = flux.precision(3);
flux
<< " Isotope: " << G4std::setw(5) << isotope->fName
<< " Z = " << G4std::setw(2) << isotope->fZ
<< " N = " << G4std::setw(3) << isotope->fN
<< " A = " << G4std::setw(6) << G4std::setprecision(2)
<< (isotope->fA)/(g/mole) << " g/mole";
flux.precision(prec);
flux.setf(mode,G4std::ios::floatfield);
return flux;
}
@@ -114,7 +133,8 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4IsotopeTable IsotopeTable)
<< "\n***** Table : Nb of isotopes = " << IsotopeTable.length()
<< " *****\n" << G4endl;
for (G4int i=0; i<IsotopeTable.length(); i++) flux << IsotopeTable[i] << G4endl;
for (size_t i=0; i<IsotopeTable.length(); i++)
flux << IsotopeTable[i] << G4endl;
return flux;
}
+23 -7
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4MPVEntry.cc,v 1.5 1999/12/15 14:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4MPVEntry.cc,v 1.5.4.1 2001/06/28 19:10:31 gunter Exp $
// GEANT4 tag $Name: $
//
//
////////////////////////////////////////////////////////////////////////
+45 -27
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4Material.cc,v 1.8 2001/03/12 17:48:49 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4Material.cc,v 1.10.2.1 2001/06/28 19:10:31 gunter Exp $
// GEANT4 tag $Name: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
//
@@ -33,6 +49,7 @@
// 16-01-01, Nuclear interaction length, M.Maire
// 12-03-01, G4bool fImplicitElement;
// copy constructor and assignement operator revised (mma)
// 03-05-01, flux.precision(prec) at begin/end of operator<<
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
@@ -230,7 +247,7 @@ void G4Material::AddElement(G4Element* element, G4int nAtoms)
}
// filling ...
if ( fNumberOfElements < maxNbComponents ) {
if ( G4int(fNumberOfElements) < maxNbComponents ) {
(*theElementVector)[fNumberOfElements] = element;
fAtomsVector [fNumberOfElements] = nAtoms;
fNumberOfComponents = ++fNumberOfElements;
@@ -240,9 +257,9 @@ void G4Material::AddElement(G4Element* element, G4int nAtoms)
("ERROR!!! - Attempt to add more than the declared number of elements.");
// filled.
if ( fNumberOfElements == maxNbComponents ) {
if ( G4int(fNumberOfElements) == maxNbComponents ) {
// compute proportion by mass
G4int i=0;
size_t i=0;
G4double Zmol(0.), Amol(0.);
for (i=0;i<fNumberOfElements;i++) {
Zmol += fAtomsVector[i]*(*theElementVector)[i]->GetZ();
@@ -279,7 +296,7 @@ void G4Material::AddElement(G4Element* element, G4double fraction)
}
// filling ...
if (fNumberOfComponents < maxNbComponents) {
if (G4int(fNumberOfComponents) < maxNbComponents) {
size_t el = 0;
while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) el++;
if (el<fNumberOfElements) fMassFractionVector[el] += fraction;
@@ -296,11 +313,10 @@ void G4Material::AddElement(G4Element* element, G4double fraction)
("ERROR!!! - Attempt to add more than the declared number of components.");
// filled.
if (fNumberOfComponents == maxNbComponents) {
if (G4int(fNumberOfComponents) == maxNbComponents) {
// check sum of weights -- OK?
G4int i;
G4double wtSum(0.0);
for (i=0;i<fNumberOfElements;i++) { wtSum += fMassFractionVector[i]; }
for (size_t i=0;i<fNumberOfElements;i++) { wtSum += fMassFractionVector[i]; }
if (abs(1.-wtSum) > perThousand) {
G4cerr << "WARNING !! - Fractional masses do not sum to 1 :the Delta is > 0.001"
<< "( the weights are NOT renormalized; the results may be wrong)"
@@ -333,8 +349,8 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
}
// filling ...
if (fNumberOfComponents < maxNbComponents) {
for (G4int elm=0; elm < material->GetNumberOfElements(); elm++)
if (G4int(fNumberOfComponents) < maxNbComponents) {
for (size_t elm=0; elm < material->GetNumberOfElements(); elm++)
{ G4Element* element = (*(material->GetElementVector()))[elm];
size_t el = 0;
while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) el++;
@@ -354,11 +370,11 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
("ERROR!!! - Attempt to add more than the declared number of components.");
// filled.
if (fNumberOfComponents == maxNbComponents) {
if (G4int(fNumberOfComponents) == maxNbComponents) {
// check sum of weights -- OK?
G4int i;
G4double wtSum(0.0);
for (i=0;i<fNumberOfElements;i++) { wtSum += fMassFractionVector[i]; }
for (size_t i=0;i<fNumberOfElements;i++)
{ wtSum += fMassFractionVector[i]; }
if (abs(1.-wtSum) > perThousand) {
G4cerr << "WARNING !! - Fractional masses do not sum to 1 :the Delta is > 0.001"
<< "( the weights are NOT renormalized; the results may be wrong)"
@@ -386,7 +402,7 @@ void G4Material::ComputeDerivedQuantities()
if (VecNbOfAtomsPerVolume) delete [] VecNbOfAtomsPerVolume;
VecNbOfAtomsPerVolume = new G4double[fNumberOfElements];
TotNbOfElectPerVolume = 0.;
for (G4int i=0;i<fNumberOfElements;i++) {
for (size_t i=0;i<fNumberOfElements;i++) {
Zi = (*theElementVector)[i]->GetZ();
Ai = (*theElementVector)[i]->GetA();
VecNbOfAtomsPerVolume[i] = Avogadro*fDensity*fMassFractionVector[i]/Ai;
@@ -423,7 +439,7 @@ void G4Material::ComputeDerivedQuantities()
void G4Material::ComputeRadiationLength()
{
G4double radinv = 0.0 ;
for (G4int i=0;i<fNumberOfElements;i++) {
for (size_t i=0;i<fNumberOfElements;i++) {
radinv += VecNbOfAtomsPerVolume[i]*((*theElementVector)[i]->GetfRadTsai());
}
fRadlen = (radinv <= 0.0 ? DBL_MAX : 1./radinv);
@@ -435,7 +451,7 @@ void G4Material::ComputeNuclearInterLength()
{
const G4double lambda0 = 35*g/cm2;
G4double NILinv = 0.0;
for (G4int i=0;i<fNumberOfElements;i++) {
for (size_t i=0;i<fNumberOfElements;i++) {
NILinv +=
VecNbOfAtomsPerVolume[i]*pow(((*theElementVector)[i]->GetN()),2./3.);
}
@@ -515,7 +531,7 @@ const G4Material& G4Material::operator=(const G4Material& right)
} else {
theElementVector = new G4ElementVector(fNumberOfElements);
fMassFractionVector = new G4double[fNumberOfElements];
for (G4int i=0; i<fNumberOfElements; i++) {
for (size_t i=0; i<fNumberOfElements; i++) {
(*theElementVector)[i]= (*right.theElementVector)[i];
fMassFractionVector[i]= right.fMassFractionVector[i];
}
@@ -523,7 +539,7 @@ const G4Material& G4Material::operator=(const G4Material& right)
if (right.fAtomsVector) {
fAtomsVector = new G4int[fNumberOfElements];
for (G4int i=0; i<fNumberOfElements; i++)
for (size_t i=0; i<fNumberOfElements; i++)
fAtomsVector[i] = right.fAtomsVector[i];
}
@@ -555,6 +571,7 @@ G4int G4Material::operator!=(const G4Material& right) const
G4std::ostream& operator<<(G4std::ostream& flux, G4Material* material)
{
long mode = flux.setf(G4std::ios::fixed,G4std::ios::floatfield);
long prec = flux.precision(3);
flux
<< " Material: " << G4std::setw(8) << material->fName
@@ -568,7 +585,7 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4Material* material)
<< " RadLength: " << G4std::setw(7) << G4std::setprecision(3)
<< G4BestUnit(material->fRadlen,"Length");
for (G4int i=0; i<material->fNumberOfElements; i++)
for (size_t i=0; i<material->fNumberOfElements; i++)
flux
<< "\n ---> " << (*(material->theElementVector))[i]
<< " fractionMass: " << G4std::setw(6)<< G4std::setprecision(2)
@@ -577,7 +594,8 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4Material* material)
<< 100*(material->VecNbOfAtomsPerVolume[i])/
(material->TotNbOfAtomsPerVolume)
<< " %";
flux.precision(prec);
flux.setf(mode,G4std::ios::floatfield);
return flux;
@@ -599,7 +617,7 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4MaterialTable MaterialTable)
flux << "\n***** Table : Nb of materials = " << MaterialTable.length()
<< " *****\n" << G4endl;
for (G4int i=0; i<MaterialTable.length(); i++) flux << MaterialTable[i]
for (size_t i=0; i<MaterialTable.length(); i++) flux << MaterialTable[i]
<< G4endl << G4endl;
return flux;
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4MaterialPropertiesTable.cc,v 1.9 2000/03/03 10:21:02 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4MaterialPropertiesTable.cc,v 1.9.4.1 2001/06/28 19:10:31 gunter Exp $
// GEANT4 tag $Name: $
//
//
////////////////////////////////////////////////////////////////////////
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4MaterialPropertyVector.cc,v 1.5 1999/12/15 14:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4MaterialPropertyVector.cc,v 1.5.4.1 2001/06/28 19:10:31 gunter Exp $
// GEANT4 tag $Name: $
//
//
////////////////////////////////////////////////////////////////////////
+26 -10
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4OpticalSurface.cc,v 1.4 1999/12/15 14:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpticalSurface.cc,v 1.5.2.1 2001/06/28 19:10:31 gunter Exp $
// GEANT4 tag $Name: $
//
//
////////////////////////////////////////////////////////////////////////
@@ -105,9 +121,9 @@ void G4OpticalSurface::DumpInfo() const
// Dump info for surface
G4cout <<
" Surface type = " << theType << G4endl <<
" Surface finish = " << theFinish << G4endl <<
" Surface model = " << theModel << G4endl;
" Surface type = " << G4int(theType) << G4endl <<
" Surface finish = " << G4int(theFinish) << G4endl <<
" Surface model = " << G4int(theModel) << G4endl;
G4cout << G4endl;
+24 -8
View File
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4SandiaTable.cc,v 1.10 2001/04/03 12:32:54 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4SandiaTable.cc,v 1.11.2.1 2001/06/28 19:10:31 gunter Exp $
// GEANT4 tag $Name: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
//
@@ -122,7 +138,7 @@ void G4SandiaTable::ComputeMatSandiaMatrix()
fMatSandiaMatrix = new G4OrderedTable();
G4int interval;
for (interval=0; interval<interval2; interval++)
fMatSandiaMatrix->push_back(new G4DataVector(5));
fMatSandiaMatrix->push_back(new G4DataVector(5,0.));
//
//ready to compute the Sandia coefs for the material