Geant4  10.02.p02
G4Material.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4Material.cc 94016 2015-11-05 10:14:49Z gcosmo $
27 //
28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
29 //
30 // 26-06-96, Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban
31 // 10-07-96, new data members added by L.Urban
32 // 12-12-96, new data members added by L.Urban
33 // 20-01-97, aesthetic rearrangement. RadLength calculation modified.
34 // Data members Zeff and Aeff REMOVED (i.e. passed to the Elements).
35 // (local definition of Zeff in DensityEffect and FluctModel...)
36 // Vacuum defined as a G4State. Mixture flag removed, M.Maire.
37 // 29-01-97, State=Vacuum automatically set density=0 in the contructors.
38 // Subsequent protections have been put in the calculation of
39 // MeanExcEnergy, ShellCorrectionVector, DensityEffect, M.Maire.
40 // 11-02-97, ComputeDensityEffect() rearranged, M.Maire.
41 // 20-03-97, corrected initialization of pointers, M.Maire.
42 // 28-05-98, the kState=kVacuum has been removed.
43 // automatic check for a minimal density, M.Maire
44 // 12-06-98, new method AddMaterial() allowing mixture of materials, M.Maire
45 // 09-07-98, ionisation parameters removed from the class, M.Maire
46 // 05-10-98, change names: NumDensity -> NbOfAtomsPerVolume
47 // 18-11-98, new interface to SandiaTable
48 // 19-01-99 enlarge tolerance on test of coherence of gas conditions
49 // 19-07-99, Constructors with chemicalFormula added by V.Ivanchenko
50 // 16-01-01, Nuclear interaction length, M.Maire
51 // 12-03-01, G4bool fImplicitElement;
52 // copy constructor and assignement operator revised (mma)
53 // 03-05-01, flux.precision(prec) at begin/end of operator<<
54 // 17-07-01, migration to STL. M. Verderi.
55 // 14-09-01, Suppression of the data member fIndexInTable
56 // 26-02-02, fIndexInTable renewed
57 // 16-04-02, G4Exception put in constructor with chemical formula
58 // 06-05-02, remove the check of the ideal gas state equation
59 // 06-08-02, remove constructors with chemical formula (mma)
60 // 22-01-04, proper STL handling of theElementVector (Hisaya)
61 // 30-03-05, warning in GetMaterial(materialName)
62 // 09-03-06, minor change of printout (V.Ivanchenko)
63 // 10-01-07, compute fAtomVector in the case of mass fraction (V.Ivanchenko)
64 // 27-07-07, improve destructor (V.Ivanchenko)
65 // 18-10-07, move definition of material index to InitialisePointers (V.Ivanchenko)
66 // 13-08-08, do not use fixed size arrays (V.Ivanchenko)
67 // 26-10-11, new scheme for G4Exception (mma)
68 // 13-04-12, map<G4Material*,G4double> fMatComponents, filled in AddMaterial()
69 // 21-04-12, fMassOfMolecule, computed for AtomsCount (mma)
70 //
71 //
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
74 #include <iomanip>
75 
76 #include "G4Material.hh"
77 #include "G4NistManager.hh"
78 #include "G4UnitsTable.hh"
79 #include "G4PhysicalConstants.hh"
80 #include "G4SystemOfUnits.hh"
81 #include "G4Exp.hh"
82 #include "G4Log.hh"
83 
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
88 // Constructor to create a material from scratch
89 
92  G4State state, G4double temp, G4double pressure)
93  : fName(name)
94 {
96 
97  if (density < universe_mean_density)
98  {
99  G4cout << " G4Material WARNING:"
100  << " define a material with density=0 is not allowed. \n"
101  << " The material " << name << " will be constructed with the"
102  << " default minimal density: " << universe_mean_density/(g/cm3)
103  << "g/cm3" << G4endl;
104  density = universe_mean_density;
105  }
106 
107  fDensity = density;
108  fState = state;
109  fTemp = temp;
110  fPressure = pressure;
111 
112  // Initialize theElementVector allocating one
113  // element corresponding to this material
117 
118  const std::vector<G4String> elmnames =
120  G4String enam, snam;
121  G4int iz = G4lrint(z);
122  if(iz < (G4int)elmnames.size()) {
123  snam = elmnames[iz];
124  enam = snam;
125  } else {
126  enam = "ELM_" + name;
127  snam = name;
128  }
129  theElementVector->push_back(new G4Element(enam, snam, z, a));
130 
131  fMassFractionVector = new G4double[1];
132  fMassFractionVector[0] = 1. ;
133  fMassOfMolecule = a/Avogadro;
134 
135  if (fState == kStateUndefined)
136  {
137  if (fDensity > kGasThreshold) { fState = kStateSolid; }
138  else { fState = kStateGas; }
139  }
140 
142 }
143 
144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145 
146 // Constructor to create a material from a List of constituents
147 // (elements and/or materials) added with AddElement or AddMaterial
148 
151  G4State state, G4double temp, G4double pressure)
152  : fName(name)
153 {
155 
156  if (density < universe_mean_density)
157  {
158  G4cout << "--- Warning from G4Material::G4Material()"
159  << " define a material with density=0 is not allowed. \n"
160  << " The material " << name << " will be constructed with the"
161  << " default minimal density: " << universe_mean_density/(g/cm3)
162  << "g/cm3" << G4endl;
163  density = universe_mean_density;
164  }
165 
166  fDensity = density;
167  fState = state;
168  fTemp = temp;
169  fPressure = pressure;
170 
176 
177  if (fState == kStateUndefined)
178  {
179  if (fDensity > kGasThreshold) { fState = kStateSolid; }
180  else { fState = kStateGas; }
181  }
182 }
183 
184 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
185 
186 // Constructor to create a material from base material
187 
189  const G4Material* bmat,
190  G4State state, G4double temp, G4double pressure)
191  : fName(name)
192 {
194 
195  if (density < universe_mean_density)
196  {
197  G4cout << "--- Warning from G4Material::G4Material()"
198  << " define a material with density=0 is not allowed. \n"
199  << " The material " << name << " will be constructed with the"
200  << " default minimal density: " << universe_mean_density/(g/cm3)
201  << "g/cm3" << G4endl;
202  density = universe_mean_density;
203  }
204 
205  fDensity = density;
206  fState = state;
207  fTemp = temp;
208  fPressure = pressure;
209 
210  fBaseMaterial = bmat;
213 
217 
219 
221 }
222 
223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224 
225 // Fake default constructor - sets only member data and allocates memory
226 // for usage restricted to object persistency
227 
229  : fChemicalFormula(""), fDensity(0.0), fState(kStateUndefined), fTemp(0.0),
230  fPressure(0.0), maxNbComponents(0), fArrayLength(0),
231  fNumberOfComponents(0), fNumberOfElements(0), theElementVector(0),
232  fMassFractionVector(0), fAtomsVector(0), fMaterialPropertiesTable(0),
233  fIndexInTable(0), VecNbOfAtomsPerVolume(0), TotNbOfAtomsPerVolume(0),
234  TotNbOfElectPerVolume(0), fRadlen(0.0), fNuclInterLen(0.0), fIonisation(0),
235  fSandiaTable(0), fBaseMaterial(0), fMassOfMolecule(0.0)
236 {
237 }
238 
239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
240 
242 {
243  // G4cout << "### Destruction of material " << fName << " started" <<G4endl;
244  if(!fBaseMaterial) {
245  if (theElementVector) { delete theElementVector; }
246  if (fMassFractionVector) { delete [] fMassFractionVector; }
247  if (fAtomsVector) { delete [] fAtomsVector; }
248  if (fSandiaTable) { delete fSandiaTable; }
249  }
250  if (fIonisation) { delete fIonisation; }
251  if (VecNbOfAtomsPerVolume) { delete [] VecNbOfAtomsPerVolume; }
252 
253  // Remove this material from theMaterialTable.
254  //
256 }
257 
258 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
259 
261 {
262  theElementVector = 0;
264  fAtomsVector = 0;
266 
268  fBaseMaterial = 0;
269 
270  fChemicalFormula = "";
271 
272  // initilized data members
273  fDensity = 0.0;
275  fTemp = 0.0;
276  fPressure = 0.0;
277  maxNbComponents = 0;
278  fArrayLength = 0;
281  fRadlen = 0.0;
282  fNuclInterLen = 0.0;
283  fMassOfMolecule = 0.0;
284 
285  fIonisation = 0;
286  fSandiaTable = 0;
287 
288  // Store in the static Table of Materials
290  for(size_t i=0; i<fIndexInTable; ++i) {
291  if(theMaterialTable[i]->GetName() == fName) {
292  G4cout << "G4Material WARNING: duplicate name of material "
293  << fName << G4endl;
294  break;
295  }
296  }
297  theMaterialTable.push_back(this);
298 }
299 
300 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
301 
303 {
304  // Header routine to compute various properties of material.
305  //
306 
307  // Number of atoms per volume (per element), total nb of electrons per volume
308  G4double Zi, Ai;
310  if (VecNbOfAtomsPerVolume) { delete [] VecNbOfAtomsPerVolume; }
313  for (G4int i=0; i<fNumberOfElements; ++i) {
314  Zi = (*theElementVector)[i]->GetZ();
315  Ai = (*theElementVector)[i]->GetA();
319  }
320 
323 
324  if (fIonisation) { delete fIonisation; }
325  fIonisation = new G4IonisParamMat(this);
326  if (fSandiaTable) { delete fSandiaTable; }
327  fSandiaTable = new G4SandiaTable(this);
328 }
329 
330 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
331 
333 {
337 
341  const_cast<G4double*>(fBaseMaterial->GetFractionVector());
342  fAtomsVector = const_cast<G4int*>(fBaseMaterial->GetAtomsVector());
343 
345  if (VecNbOfAtomsPerVolume) { delete [] VecNbOfAtomsPerVolume; }
347  for (G4int i=0; i<fNumberOfElements; ++i) {
348  VecNbOfAtomsPerVolume[i] = factor*v[i];
349  }
352 
353  if (fIonisation) { delete fIonisation; }
354  fIonisation = new G4IonisParamMat(this);
355 
358 }
359 
360 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
361 
362 // AddElement -- composition by atom count
363 
364 void G4Material::AddElement(G4Element* element, G4int nAtoms)
365 {
366  // initialization
367  if ( fNumberOfElements == 0 ) {
370  }
371 
372  // filling ...
374  theElementVector->push_back(element);
377  } else {
378  G4cout << "G4Material::AddElement ERROR for " << fName << " nElement= "
380  G4Exception ("G4Material::AddElement()", "mat031", FatalException,
381  "Attempt to add more than the declared number of elements.");
382  }
383  // filled.
385  // compute proportion by mass
386  G4int i=0;
387  G4double Amol = 0.;
388  for (i=0; i<fNumberOfElements; ++i) {
389  G4double w = fAtomsVector[i]*(*theElementVector)[i]->GetA();
390  Amol += w;
391  fMassFractionVector[i] = w;
392  }
393  for (i=0; i<fNumberOfElements; ++i) {
394  fMassFractionVector[i] /= Amol;
395  }
396 
397  fMassOfMolecule = Amol/Avogadro;
399  }
400 }
401 
402 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
403 
404 // AddElement -- composition by fraction of mass
405 
406 void G4Material::AddElement(G4Element* element, G4double fraction)
407 {
408  if(fraction < 0.0 || fraction > 1.0) {
409  G4cout << "G4Material::AddElement ERROR for " << fName << " and "
410  << element->GetName() << " mass fraction= " << fraction
411  << " is wrong " << G4endl;
412  G4Exception ("G4Material::AddElement()", "mat032", FatalException,
413  "Attempt to add element with wrong mass fraction");
414  }
415  // initialization
416  if (fNumberOfComponents == 0) {
419  }
420  // filling ...
422  G4int el = 0;
423  // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
424  while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) { ++el; }
425  if (el<fNumberOfElements) fMassFractionVector[el] += fraction;
426  else {
427  theElementVector->push_back(element);
428  fMassFractionVector[el] = fraction;
430  }
432  } else {
433  G4cout << "G4Material::AddElement ERROR for " << fName << " nElement= "
435  G4Exception ("G4Material::AddElement()", "mat033", FatalException,
436  "Attempt to add more than the declared number of elements.");
437  }
438 
439  // filled.
441 
442  G4int i=0;
443  G4double Zmol(0.), Amol(0.);
444  // check sum of weights -- OK?
445  G4double wtSum(0.0);
446  for (i=0; i<fNumberOfElements; ++i) {
447  wtSum += fMassFractionVector[i];
448  Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
449  Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
450  }
451  if (std::fabs(1.-wtSum) > perThousand) {
452  G4cerr << "WARNING !! for " << fName << " sum of fractional masses "
453  << wtSum << " is not 1 - results may be wrong"
454  << G4endl;
455  }
456  for (i=0; i<fNumberOfElements; ++i) {
457  fAtomsVector[i] =
459  }
460 
462  }
463 }
464 
465 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
466 
467 // AddMaterial -- composition by fraction of mass
468 
469 void G4Material::AddMaterial(G4Material* material, G4double fraction)
470 {
471  if(fraction < 0.0 || fraction > 1.0) {
472  G4cout << "G4Material::AddMaterial ERROR for " << fName << " and "
473  << material->GetName() << " mass fraction= " << fraction
474  << " is wrong ";
475  G4Exception ("G4Material::AddMaterial()", "mat034", FatalException,
476  "Attempt to add material with wrong mass fraction");
477  }
478  // initialization
479  if (fNumberOfComponents == 0) {
482  }
483 
484  G4int nelm = material->GetNumberOfElements();
485 
486  // arrays should be extended
487  if(nelm > 1) {
488  G4int nold = fArrayLength;
489  fArrayLength += nelm - 1;
490  G4double* v1 = new G4double[fArrayLength];
491  G4int* i1 = new G4int[fArrayLength];
492  for(G4int i=0; i<nold; ++i) {
493  v1[i] = fMassFractionVector[i];
494  i1[i] = fAtomsVector[i];
495  }
496  delete [] fAtomsVector;
497  delete [] fMassFractionVector;
498  fMassFractionVector = v1;
499  fAtomsVector = i1;
500  }
501 
502  // filling ...
504  for (G4int elm=0; elm<nelm; ++elm)
505  {
506  G4Element* element = (*(material->GetElementVector()))[elm];
507  G4int el = 0;
508  // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
509  while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) el++;
510  if (el < fNumberOfElements) fMassFractionVector[el] += fraction
511  *(material->GetFractionVector())[elm];
512  else {
513  theElementVector->push_back(element);
514  fMassFractionVector[el] = fraction
515  *(material->GetFractionVector())[elm];
517  }
518  }
521  fMatComponents[material] = fraction;
522 
523  } else {
524  G4cout << "G4Material::AddMaterial ERROR for " << fName << " nElement= "
526  G4Exception ("G4Material::AddMaterial()", "mat035", FatalException,
527  "Attempt to add more than the declared number of components.");
528  }
529 
530  // filled.
532  G4int i=0;
533  G4double Zmol(0.), Amol(0.);
534  // check sum of weights -- OK?
535  G4double wtSum(0.0);
536  for (i=0; i<fNumberOfElements; ++i) {
537  wtSum += fMassFractionVector[i];
538  Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
539  Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
540  }
541  if (std::fabs(1.-wtSum) > perThousand) {
542  G4cout << "G4Material::AddMaterial WARNING !! for " << fName
543  << " sum of fractional masses "
544  << wtSum << " is not 1 - results may be wrong"
545  << G4endl;
546  }
547  for (i=0; i<fNumberOfElements; ++i) {
548  fAtomsVector[i] =
550  }
551 
553  }
554 }
555 
556 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
557 
559 {
560  G4double radinv = 0.0 ;
561  for (G4int i=0;i<fNumberOfElements;++i) {
562  radinv += VecNbOfAtomsPerVolume[i]*((*theElementVector)[i]->GetfRadTsai());
563  }
564  fRadlen = (radinv <= 0.0 ? DBL_MAX : 1./radinv);
565 }
566 
567 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
568 
570 {
571  static const G4double lambda0 = 35*CLHEP::g/CLHEP::cm2;
572  static const G4double twothird = 2.0/3.0;
573  G4double NILinv = 0.0;
574  for (G4int i=0; i<fNumberOfElements; ++i) {
575  G4int Z = G4lrint( (*theElementVector)[i]->GetZ());
576  G4double A = (*theElementVector)[i]->GetN();
577  if(1 == Z) {
578  NILinv += VecNbOfAtomsPerVolume[i]*A;
579  } else {
580  NILinv += VecNbOfAtomsPerVolume[i]*G4Exp(twothird*G4Log(A));
581  }
582  }
583  NILinv *= amu/lambda0;
584  fNuclInterLen = (NILinv <= 0.0 ? DBL_MAX : 1./NILinv);
585 }
586 
587 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
588 
590 {
591  return &theMaterialTable;
592 }
593 
594 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
595 
597 {
598  return theMaterialTable.size();
599 }
600 
601 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
602 
603 G4Material*
604 G4Material::GetMaterial(const G4String& materialName, G4bool warning)
605 {
606  // search the material by its name
607  for (size_t J=0 ; J<theMaterialTable.size() ; ++J)
608  {
609  if (theMaterialTable[J]->GetName() == materialName)
610  { return theMaterialTable[J]; }
611  }
612 
613  // the material does not exist in the table
614  if (warning) {
615  G4cout << "G4Material::GetMaterial() WARNING: The material: "
616  << materialName
617  << " does not exist in the table. Return NULL pointer."
618  << G4endl;
619  }
620  return 0;
621 }
622 
623 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
624 
626 {
627  if (fNumberOfElements > 1) {
628  G4cout << "G4Material ERROR in GetZ. The material: " << fName
629  << " is a mixture.";
630  G4Exception ("G4Material::GetZ()", "mat036", FatalException,
631  "the Atomic number is not well defined." );
632  }
633  return (*theElementVector)[0]->GetZ();
634 }
635 
636 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
637 
639 {
640  if (fNumberOfElements > 1) {
641  G4cout << "G4Material ERROR in GetA. The material: " << fName
642  << " is a mixture.";
643  G4Exception ("G4Material::GetA()", "mat037", FatalException,
644  "the Atomic mass is not well defined." );
645  }
646  return (*theElementVector)[0]->GetA();
647 }
648 
649 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
650 
652 {
653  return (this == (G4Material *) &right);
654 }
655 
656 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
657 
659 {
660  return (this != (G4Material *) &right);
661 }
662 
663 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
664 
665 std::ostream& operator<<(std::ostream& flux, const G4Material* material)
666 {
667  std::ios::fmtflags mode = flux.flags();
668  flux.setf(std::ios::fixed,std::ios::floatfield);
669  G4long prec = flux.precision(3);
670 
671  flux
672  << " Material: " << std::setw(8) << material->fName
673  << " " << material->fChemicalFormula << " "
674  << " density: " << std::setw(6) << std::setprecision(3)
675  << G4BestUnit(material->fDensity,"Volumic Mass")
676  << " RadL: " << std::setw(7) << std::setprecision(3)
677  << G4BestUnit(material->fRadlen,"Length")
678  << " Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
679  << G4BestUnit(material->fNuclInterLen,"Length")
680  << "\n" << std::setw(30)
681  << " Imean: " << std::setw(7) << std::setprecision(3)
683  "Energy");
684 
685  if(material->fState == kStateGas) {
686  flux
687  << " temperature: " << std::setw(6) << std::setprecision(2)
688  << (material->fTemp)/kelvin << " K"
689  << " pressure: " << std::setw(6) << std::setprecision(2)
690  << (material->fPressure)/atmosphere << " atm";
691  }
692  flux << "\n";
693 
694  for (G4int i=0; i<material->fNumberOfElements; i++) {
695  flux
696  << "\n ---> " << (*(material->theElementVector))[i]
697  << "\n ElmMassFraction: "
698  << std::setw(6)<< std::setprecision(2)
699  << (material->fMassFractionVector[i])/perCent << " %"
700  << " ElmAbundance " << std::setw(6)<< std::setprecision(2)
701  << 100*(material->VecNbOfAtomsPerVolume[i])
702  /(material->TotNbOfAtomsPerVolume)
703  << " % \n";
704  }
705  flux.precision(prec);
706  flux.setf(mode,std::ios::floatfield);
707 
708  return flux;
709 }
710 
711 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
712 
713 std::ostream& operator<<(std::ostream& flux, const G4Material& material)
714 {
715  flux << &material;
716  return flux;
717 }
718 
719 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
720 
721 std::ostream& operator<<(std::ostream& flux, G4MaterialTable MaterialTable)
722 {
723  //Dump info for all known materials
724  flux << "\n***** Table : Nb of materials = " << MaterialTable.size()
725  << " *****\n" << G4endl;
726 
727  for (size_t i=0; i<MaterialTable.size(); ++i) {
728  flux << MaterialTable[i] << G4endl << G4endl;
729  }
730 
731  return flux;
732 }
733 
734 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static G4MaterialTable theMaterialTable
Definition: G4Material.hh:330
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
void InitializePointers()
Definition: G4Material.cc:260
G4double GetZ() const
Definition: G4Material.cc:625
G4int operator==(const G4Material &) const
Definition: G4Material.cc:651
static const double cm2
Definition: G4SIunits.hh:119
G4double GetTotNbOfElectPerVolume() const
Definition: G4Material.hh:212
std::vector< G4Element * > G4ElementVector
G4String fName
Definition: G4AttUtils.hh:55
void CopyPointersOfBaseMaterial()
Definition: G4Material.cc:332
G4int fNumberOfElements
Definition: G4Material.hh:322
const G4Material * fBaseMaterial
Definition: G4Material.hh:349
void AddMaterial(G4Material *material, G4double fraction)
Definition: G4Material.cc:469
G4State
Definition: G4Material.hh:114
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
G4double z
Definition: TRTMaterials.hh:39
const G4String & GetChemicalFormula() const
Definition: G4Material.hh:179
G4double fMassOfMolecule
Definition: G4Material.hh:350
void SetMeanExcitationEnergy(G4double value)
G4String name
Definition: TRTMaterials.hh:40
const G4String & GetName() const
Definition: G4Material.hh:178
G4ElementVector * theElementVector
Definition: G4Material.hh:323
size_t fIndexInTable
Definition: G4Material.hh:331
const std::vector< G4String > & GetNistElementNames() const
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
std::vector< G4Material * > G4MaterialTable
G4double GetDensity() const
Definition: G4Material.hh:180
long G4long
Definition: G4Types.hh:80
const G4double w[NPOINTSGL]
G4int fNumberOfComponents
Definition: G4Material.hh:320
G4double a
Definition: TRTMaterials.hh:39
static const double perThousand
Definition: G4SIunits.hh:330
G4double fDensity
Definition: G4Material.hh:311
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4IonisParamMat * fIonisation
Definition: G4Material.hh:344
G4int nComponents
Definition: TRTMaterials.hh:41
void ComputeDerivedQuantities()
Definition: G4Material.cc:302
G4double * fMassFractionVector
Definition: G4Material.hh:324
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4int maxNbComponents
Definition: G4Material.hh:318
G4SandiaTable * GetSandiaTable() const
Definition: G4Material.hh:229
G4SandiaTable * fSandiaTable
Definition: G4Material.hh:345
G4double density
Definition: TRTMaterials.hh:39
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
static const double prec
Definition: RanecuEngine.cc:58
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4double TotNbOfAtomsPerVolume
Definition: G4Material.hh:339
bool G4bool
Definition: G4Types.hh:79
G4double iz
Definition: TRTMaterials.hh:39
G4MaterialPropertiesTable * fMaterialPropertiesTable
Definition: G4Material.hh:327
G4int * fAtomsVector
Definition: G4Material.hh:325
static const double cm3
Definition: G4SIunits.hh:120
G4double fRadlen
Definition: G4Material.hh:341
static const double perCent
Definition: G4SIunits.hh:329
G4double fNuclInterLen
Definition: G4Material.hh:342
static size_t GetNumberOfMaterials()
Definition: G4Material.cc:596
G4double GetRadlen() const
Definition: G4Material.hh:220
G4Material(const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
Definition: G4Material.cc:90
G4int fArrayLength
Definition: G4Material.hh:319
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const double kelvin
Definition: G4SIunits.hh:278
G4double GetA() const
Definition: G4Material.cc:638
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
G4String fChemicalFormula
Definition: G4Material.hh:310
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:209
std::ostream & operator<<(std::ostream &flux, const G4Material *material)
Definition: G4Material.cc:665
static const G4double factor
int G4lrint(double ad)
Definition: templates.hh:163
G4int operator!=(const G4Material &) const
Definition: G4Material.cc:658
void ComputeNuclearInterLength()
Definition: G4Material.cc:569
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
Definition: G4Material.hh:252
G4double GetMassOfMolecule() const
Definition: G4Material.hh:242
static const double g
Definition: G4SIunits.hh:180
G4double TotNbOfElectPerVolume
Definition: G4Material.hh:340
static const double atmosphere
Definition: G4SIunits.hh:234
G4State fState
Definition: G4Material.hh:313
const G4int * GetAtomsVector() const
Definition: G4Material.hh:198
G4double GetMeanExcitationEnergy() const
#define G4endl
Definition: G4ios.hh:61
G4double fTemp
Definition: G4Material.hh:315
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
void ComputeRadiationLength()
Definition: G4Material.cc:558
double G4double
Definition: G4Types.hh:76
const G4String & GetName() const
Definition: G4Element.hh:127
G4double fPressure
Definition: G4Material.hh:316
std::map< G4Material *, G4double > fMatComponents
Definition: G4Material.hh:351
const G4double * GetFractionVector() const
Definition: G4Material.hh:194
#define DBL_MAX
Definition: templates.hh:83
virtual ~G4Material()
Definition: G4Material.cc:241
G4double * VecNbOfAtomsPerVolume
Definition: G4Material.hh:338
G4double GetNuclearInterLength() const
Definition: G4Material.hh:223
G4String fName
Definition: G4Material.hh:309
G4GLOB_DLL std::ostream G4cerr