Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4Material.cc
이 파일의 문서화 페이지로 가기
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 106243 2017-09-26 01:56:43Z 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 #ifdef G4MULTITHREADED
87  G4Mutex G4Material::materialMutex = G4MUTEX_INITIALIZER;
88 #endif
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
92 // Constructor to create a material from scratch
93 
95  G4double a, G4double density,
96  G4State state, G4double temp, G4double pressure)
97  : fName(name)
98 {
100 
101  if (density < universe_mean_density)
102  {
103  G4cout << " G4Material WARNING:"
104  << " define a material with density=0 is not allowed. \n"
105  << " The material " << name << " will be constructed with the"
106  << " default minimal density: " << universe_mean_density/(g/cm3)
107  << "g/cm3" << G4endl;
108  density = universe_mean_density;
109  }
110 
111  fDensity = density;
112  fState = state;
113  fTemp = temp;
114  fPressure = pressure;
115 
116  // Initialize theElementVector allocating one
117  // element corresponding to this material
121 
122  const std::vector<G4String> elmnames =
124  G4String enam, snam;
125  G4int iz = G4lrint(z);
126  if(iz < (G4int)elmnames.size()) {
127  snam = elmnames[iz];
128  enam = snam;
129  } else {
130  enam = "ELM_" + name;
131  snam = name;
132  }
133  theElementVector->push_back(new G4Element(enam, snam, z, a));
134 
135  fMassFractionVector = new G4double[1];
136  fMassFractionVector[0] = 1. ;
138 
139  if (fState == kStateUndefined)
140  {
142  else { fState = kStateGas; }
143  }
144 
146 }
147 
148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
149 
150 // Constructor to create a material from a List of constituents
151 // (elements and/or materials) added with AddElement or AddMaterial
152 
154  G4int nComponents,
155  G4State state, G4double temp, G4double pressure)
156  : fName(name)
157 {
159 
160  if (density < universe_mean_density)
161  {
162  G4cout << "--- Warning from G4Material::G4Material()"
163  << " define a material with density=0 is not allowed. \n"
164  << " The material " << name << " will be constructed with the"
165  << " default minimal density: " << universe_mean_density/(g/cm3)
166  << "g/cm3" << G4endl;
167  density = universe_mean_density;
168  }
169 
170  fDensity = density;
171  fState = state;
172  fTemp = temp;
173  fPressure = pressure;
174 
175  maxNbComponents = nComponents;
180 
181  if (fState == kStateUndefined)
182  {
184  else { fState = kStateGas; }
185  }
186 }
187 
188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
189 
190 // Constructor to create a material from base material
191 
193  const G4Material* bmat,
194  G4State state, G4double temp, G4double pressure)
195  : fName(name)
196 {
198 
199  if (density < universe_mean_density)
200  {
201  G4cout << "--- Warning from G4Material::G4Material()"
202  << " define a material with density=0 is not allowed. \n"
203  << " The material " << name << " will be constructed with the"
204  << " default minimal density: " << universe_mean_density/(g/cm3)
205  << "g/cm3" << G4endl;
206  density = universe_mean_density;
207  }
208 
209  fDensity = density;
210  fState = state;
211  fTemp = temp;
212  fPressure = pressure;
213 
214  fBaseMaterial = bmat;
217 
221 
223 }
224 
225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
226 
227 // Fake default constructor - sets only member data and allocates memory
228 // for usage restricted to object persistency
229 
231  : fName("")
232 {
234 }
235 
236 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
237 
239 {
240  // G4cout << "### Destruction of material " << fName << " started" <<G4endl;
241  if(fBaseMaterial == nullptr) {
242  delete theElementVector;
243  delete fSandiaTable;
244  //delete fMaterialPropertiesTable;
245  delete [] fMassFractionVector;
246  delete [] fAtomsVector;
247  }
248  delete fIonisation;
249  delete [] VecNbOfAtomsPerVolume;
250 
251  // Remove this material from theMaterialTable.
252  //
253  theMaterialTable[fIndexInTable] = nullptr;
254 }
255 
256 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
257 
259 {
260  theElementVector = nullptr;
261  fMassFractionVector = nullptr;
262  fAtomsVector = nullptr;
263  fMaterialPropertiesTable = nullptr;
264 
265  VecNbOfAtomsPerVolume = nullptr;
266  fBaseMaterial = nullptr;
267 
268  fChemicalFormula = "";
269 
270  // initilized data members
271  fDensity = 0.0;
273  fTemp = 0.0;
274  fPressure = 0.0;
275  maxNbComponents = 0;
276  fArrayLength = 0;
278  fNumberOfElements = 0;
279  TotNbOfAtomsPerVolume = 0.0;
280  TotNbOfElectPerVolume = 0.0;
281  fRadlen = 0.0;
282  fNuclInterLen = 0.0;
283  fMassOfMolecule = 0.0;
284 
285  fIonisation = nullptr;
286  fSandiaTable = nullptr;
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 
339 
343  const_cast<G4double*>(fBaseMaterial->GetFractionVector());
344  fAtomsVector = const_cast<G4int*>(fBaseMaterial->GetAtomsVector());
345 
347  if (VecNbOfAtomsPerVolume) { delete [] VecNbOfAtomsPerVolume; }
349  for (G4int i=0; i<fNumberOfElements; ++i) {
350  VecNbOfAtomsPerVolume[i] = factor*v[i];
351  }
352  fRadlen = fBaseMaterial->GetRadlen()/factor;
354 
355  if (fIonisation) { delete fIonisation; }
356  fIonisation = new G4IonisParamMat(this);
357 
360 
362 }
363 
364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
365 
366 // AddElement -- composition by atom count
367 
368 void G4Material::AddElement(G4Element* element, G4int nAtoms)
369 {
370  // initialization
371  if ( fNumberOfElements == 0 ) {
374  }
375 
376  // filling ...
378  theElementVector->push_back(element);
381  } else {
382  G4cout << "G4Material::AddElement ERROR for " << fName << " nElement= "
384  G4Exception ("G4Material::AddElement()", "mat031", FatalException,
385  "Attempt to add more than the declared number of elements.");
386  }
387  // filled.
389  // compute proportion by mass
390  G4int i=0;
391  G4double Amol = 0.;
392  for (i=0; i<fNumberOfElements; ++i) {
393  G4double w = fAtomsVector[i]*(*theElementVector)[i]->GetA();
394  Amol += w;
395  fMassFractionVector[i] = w;
396  }
397  for (i=0; i<fNumberOfElements; ++i) {
398  fMassFractionVector[i] /= Amol;
399  }
400 
401  fMassOfMolecule = Amol/Avogadro;
403  }
404 }
405 
406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
407 
408 // AddElement -- composition by fraction of mass
409 
410 void G4Material::AddElement(G4Element* element, G4double fraction)
411 {
412  if(fraction < 0.0 || fraction > 1.0) {
413  G4cout << "G4Material::AddElement ERROR for " << fName << " and "
414  << element->GetName() << " mass fraction= " << fraction
415  << " is wrong " << G4endl;
416  G4Exception ("G4Material::AddElement()", "mat032", FatalException,
417  "Attempt to add element with wrong mass fraction");
418  }
419  // initialization
420  if (fNumberOfComponents == 0) {
423  }
424  // filling ...
426  G4int el = 0;
427  // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
428  while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) { ++el; }
429  if (el<fNumberOfElements) fMassFractionVector[el] += fraction;
430  else {
431  theElementVector->push_back(element);
432  fMassFractionVector[el] = fraction;
434  }
436  } else {
437  G4cout << "G4Material::AddElement ERROR for " << fName << " nElement= "
439  G4Exception ("G4Material::AddElement()", "mat033", FatalException,
440  "Attempt to add more than the declared number of elements.");
441  }
442 
443  // filled.
445 
446  G4int i=0;
447  G4double Zmol(0.), Amol(0.);
448  // check sum of weights -- OK?
449  G4double wtSum(0.0);
450  for (i=0; i<fNumberOfElements; ++i) {
451  wtSum += fMassFractionVector[i];
452  Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
453  Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
454  }
455  if (std::fabs(1.-wtSum) > perThousand) {
456  G4cerr << "WARNING !! for " << fName << " sum of fractional masses "
457  << wtSum << " is not 1 - results may be wrong"
458  << G4endl;
459  }
460  for (i=0; i<fNumberOfElements; ++i) {
461  fAtomsVector[i] =
463  }
464 
466  }
467 }
468 
469 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
470 
471 // AddMaterial -- composition by fraction of mass
472 
473 void G4Material::AddMaterial(G4Material* material, G4double fraction)
474 {
475  if(fraction < 0.0 || fraction > 1.0) {
476  G4cout << "G4Material::AddMaterial ERROR for " << fName << " and "
477  << material->GetName() << " mass fraction= " << fraction
478  << " is wrong ";
479  G4Exception ("G4Material::AddMaterial()", "mat034", FatalException,
480  "Attempt to add material with wrong mass fraction");
481  }
482  // initialization
483  if (fNumberOfComponents == 0) {
486  }
487 
488  G4int nelm = material->GetNumberOfElements();
489 
490  // arrays should be extended
491  if(nelm > 1) {
492  G4int nold = fArrayLength;
493  fArrayLength += nelm - 1;
494  G4double* v1 = new G4double[fArrayLength];
495  G4int* i1 = new G4int[fArrayLength];
496  for(G4int i=0; i<nold; ++i) {
497  v1[i] = fMassFractionVector[i];
498  i1[i] = fAtomsVector[i];
499  }
500  delete [] fAtomsVector;
501  delete [] fMassFractionVector;
502  fMassFractionVector = v1;
503  fAtomsVector = i1;
504  }
505 
506  // filling ...
508  for (G4int elm=0; elm<nelm; ++elm)
509  {
510  G4Element* element = (*(material->GetElementVector()))[elm];
511  G4int el = 0;
512  // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
513  while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) el++;
514  if (el < fNumberOfElements) fMassFractionVector[el] += fraction
515  *(material->GetFractionVector())[elm];
516  else {
517  theElementVector->push_back(element);
518  fMassFractionVector[el] = fraction
519  *(material->GetFractionVector())[elm];
521  }
522  }
525  fMatComponents[material] = fraction;
526 
527  } else {
528  G4cout << "G4Material::AddMaterial ERROR for " << fName << " nElement= "
530  G4Exception ("G4Material::AddMaterial()", "mat035", FatalException,
531  "Attempt to add more than the declared number of components.");
532  }
533 
534  // filled.
536  G4int i=0;
537  G4double Zmol(0.), Amol(0.);
538  // check sum of weights -- OK?
539  G4double wtSum(0.0);
540  for (i=0; i<fNumberOfElements; ++i) {
541  wtSum += fMassFractionVector[i];
542  Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
543  Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
544  }
545  if (std::fabs(1.-wtSum) > perThousand) {
546  G4cout << "G4Material::AddMaterial WARNING !! for " << fName
547  << " sum of fractional masses "
548  << wtSum << " is not 1 - results may be wrong"
549  << G4endl;
550  }
551  for (i=0; i<fNumberOfElements; ++i) {
552  fAtomsVector[i] =
554  }
555 
557  }
558 }
559 
560 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
561 
563 {
564  G4double radinv = 0.0 ;
565  for (G4int i=0;i<fNumberOfElements;++i) {
566  radinv += VecNbOfAtomsPerVolume[i]*((*theElementVector)[i]->GetfRadTsai());
567  }
568  fRadlen = (radinv <= 0.0 ? DBL_MAX : 1./radinv);
569 }
570 
571 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
572 
574 {
575  static const G4double lambda0 = 35*CLHEP::g/CLHEP::cm2;
576  static const G4double twothird = 2.0/3.0;
577  G4double NILinv = 0.0;
578  for (G4int i=0; i<fNumberOfElements; ++i) {
579  G4int Z = G4lrint( (*theElementVector)[i]->GetZ());
580  G4double A = (*theElementVector)[i]->GetN();
581  if(1 == Z) {
582  NILinv += VecNbOfAtomsPerVolume[i]*A;
583  } else {
584  NILinv += VecNbOfAtomsPerVolume[i]*G4Exp(twothird*G4Log(A));
585  }
586  }
587  NILinv *= amu/lambda0;
588  fNuclInterLen = (NILinv <= 0.0 ? DBL_MAX : 1./NILinv);
589 }
590 
591 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
592 
594 {
595  return &theMaterialTable;
596 }
597 
598 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
599 
601 {
602  return theMaterialTable.size();
603 }
604 
605 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
606 
607 G4Material*
608 G4Material::GetMaterial(const G4String& materialName, G4bool warning)
609 {
610  // search the material by its name
611  for (size_t J=0 ; J<theMaterialTable.size() ; ++J)
612  {
613  if (theMaterialTable[J]->GetName() == materialName)
614  { return theMaterialTable[J]; }
615  }
616 
617  // the material does not exist in the table
618  if (warning) {
619  G4cout << "G4Material::GetMaterial() WARNING: The material: "
620  << materialName
621  << " does not exist in the table. Return NULL pointer."
622  << G4endl;
623  }
624  return nullptr;
625 }
626 
627 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
628 
630 {
631  if (fNumberOfElements > 1) {
632  G4cout << "G4Material ERROR in GetZ. The material: " << fName
633  << " is a mixture.";
634  G4Exception ("G4Material::GetZ()", "mat036", FatalException,
635  "the Atomic number is not well defined." );
636  }
637  return (*theElementVector)[0]->GetZ();
638 }
639 
640 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
641 
643 {
644  if (fNumberOfElements > 1) {
645  G4cout << "G4Material ERROR in GetA. The material: " << fName
646  << " is a mixture.";
647  G4Exception ("G4Material::GetA()", "mat037", FatalException,
648  "the Atomic mass is not well defined." );
649  }
650  return (*theElementVector)[0]->GetA();
651 }
652 
653 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
654 #include "G4ExtendedMaterial.hh"
655 
656 std::ostream& operator<<(std::ostream& flux, const G4Material* material)
657 {
658  std::ios::fmtflags mode = flux.flags();
659  flux.setf(std::ios::fixed,std::ios::floatfield);
660  G4long prec = flux.precision(3);
661 
662  flux
663  << " Material: " << std::setw(8) << material->fName
664  << " " << material->fChemicalFormula << " "
665  << " density: " << std::setw(6) << std::setprecision(3)
666  << G4BestUnit(material->fDensity,"Volumic Mass")
667  << " RadL: " << std::setw(7) << std::setprecision(3)
668  << G4BestUnit(material->fRadlen,"Length")
669  << " Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
670  << G4BestUnit(material->fNuclInterLen,"Length")
671  << "\n" << std::setw(30)
672  << " Imean: " << std::setw(7) << std::setprecision(3)
674  "Energy")
675  << " temperature: " << std::setw(6) << std::setprecision(2)
676  << (material->fTemp)/kelvin << " K"
677  << " pressure: " << std::setw(6) << std::setprecision(2)
678  << (material->fPressure)/atmosphere << " atm" << "\n";
679 
680  for (G4int i=0; i<material->fNumberOfElements; i++) {
681  flux
682  << "\n ---> " << (*(material->theElementVector))[i]
683  << "\n ElmMassFraction: "
684  << std::setw(6)<< std::setprecision(2)
685  << (material->fMassFractionVector[i])/perCent << " %"
686  << " ElmAbundance " << std::setw(6)<< std::setprecision(2)
687  << 100*(material->VecNbOfAtomsPerVolume[i])
688  /(material->TotNbOfAtomsPerVolume)
689  << " % \n";
690  }
691  flux.precision(prec);
692  flux.setf(mode,std::ios::floatfield);
693 
694  if(material->IsExtended())
695  { static_cast<const G4ExtendedMaterial*>(material)->Print(flux); }
696 
697  return flux;
698 }
699 
700 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
701 
702 std::ostream& operator<<(std::ostream& flux, const G4Material& material)
703 {
704  flux << &material;
705  return flux;
706 }
707 
708 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
709 
710 std::ostream& operator<<(std::ostream& flux, G4MaterialTable MaterialTable)
711 {
712  //Dump info for all known materials
713  flux << "\n***** Table : Nb of materials = " << MaterialTable.size()
714  << " *****\n" << G4endl;
715 
716  for (size_t i=0; i<MaterialTable.size(); ++i) {
717  flux << MaterialTable[i] << G4endl << G4endl;
718  }
719 
720  return flux;
721 }
722 
723 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
724 
726 { return false; }
727 
728 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
729 
731 {
732  if(anMPT && fMaterialPropertiesTable != anMPT) {
733 #ifdef G4MULTITHREADED
734  G4MUTEXLOCK(&materialMutex);
735 #endif
737  fMaterialPropertiesTable = anMPT;
738 #ifdef G4MULTITHREADED
739  G4MUTEXUNLOCK(&materialMutex);
740 #endif
741  }
742 }
743 
744 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static constexpr double kelvin
Definition: G4SIunits.hh:281
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
const XML_Char * name
Definition: expat.h:151
static G4MaterialTable theMaterialTable
Definition: G4Material.hh:331
static const double prec
Definition: RanecuEngine.cc:58
static constexpr double atmosphere
Definition: G4SIunits.hh:237
G4double TotNbOfElectPerVolume
Definition: G4Material.hh:341
G4int * fAtomsVector
Definition: G4Material.hh:326
const G4double * GetFractionVector() const
Definition: G4Material.hh:195
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
static size_t GetNumberOfMaterials()
Definition: G4Material.cc:600
void InitializePointers()
Definition: G4Material.cc:258
G4State fState
Definition: G4Material.hh:314
G4double fNuclInterLen
Definition: G4Material.hh:343
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:593
G4double * fMassFractionVector
Definition: G4Material.hh:325
const G4String & GetName() const
Definition: G4Element.hh:127
static constexpr double g
std::map< G4Material *, G4double > fMatComponents
Definition: G4Material.hh:352
#define G4endl
Definition: G4ios.hh:61
G4double fPressure
Definition: G4Material.hh:317
G4double GetRadlen() const
Definition: G4Material.hh:221
Double_t z
static constexpr double perCent
Definition: G4SIunits.hh:332
virtual ~G4Material()
Definition: G4Material.cc:238
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:191
void SetMeanExcitationEnergy(G4double value)
G4double fRadlen
Definition: G4Material.hh:342
virtual G4bool IsExtended() const
Definition: G4Material.cc:725
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:207
G4SandiaTable * fSandiaTable
Definition: G4Material.hh:346
const G4int * GetAtomsVector() const
Definition: G4Material.hh:199
static constexpr double universe_mean_density
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:608
G4String fName
Definition: G4Material.hh:310
G4double G4Log(G4double x)
Definition: G4Log.hh:230
const G4String & GetName() const
Definition: G4Material.hh:179
Float_t Z
G4double GetTotNbOfElectPerVolume() const
Definition: G4Material.hh:213
G4double GetA() const
Definition: G4Material.cc:642
static constexpr double g
Definition: G4SIunits.hh:183
const std::vector< G4String > & GetNistElementNames() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:88
static constexpr double Avogadro
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.cc:730
const G4Material * fBaseMaterial
Definition: G4Material.hh:350
void ComputeNuclearInterLength()
Definition: G4Material.cc:573
const G4String & GetChemicalFormula() const
Definition: G4Material.hh:180
G4State GetState() const
Definition: G4Material.hh:182
long G4long
Definition: G4Types.hh:80
G4String fChemicalFormula
Definition: G4Material.hh:311
G4double fTemp
Definition: G4Material.hh:316
G4IonisParamMat * fIonisation
Definition: G4Material.hh:345
double A(double temperature)
G4double GetZ() const
Definition: G4Material.cc:629
size_t fIndexInTable
Definition: G4Material.hh:332
G4String fName
Definition: G4AttUtils.hh:55
G4double GetMeanExcitationEnergy() const
void Print(G4Element &ele)
Definition: pyG4Element.cc:56
G4GLOB_DLL std::ostream G4cerr
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:234
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4Material * > G4MaterialTable
static constexpr double cm2
G4double TotNbOfAtomsPerVolume
Definition: G4Material.hh:340
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
int G4lrint(double ad)
Definition: templates.hh:151
std::vector< G4Element * > G4ElementVector
int G4int
Definition: G4Types.hh:78
static constexpr double kGasThreshold
G4double fMassOfMolecule
Definition: G4Material.hh:351
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:368
void ComputeRadiationLength()
Definition: G4Material.cc:562
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:227
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:233
G4GLOB_DLL std::ostream G4cout
G4int fNumberOfComponents
Definition: G4Material.hh:321
G4SandiaTable * GetSandiaTable() const
Definition: G4Material.hh:230
G4double * VecNbOfAtomsPerVolume
Definition: G4Material.hh:339
G4ElementVector * theElementVector
Definition: G4Material.hh:324
G4int fNumberOfElements
Definition: G4Material.hh:323
G4double fDensity
Definition: G4Material.hh:312
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:94
G4State
Definition: G4Material.hh:115
static constexpr double amu
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:210
void ComputeDerivedQuantities()
Definition: G4Material.cc:302
G4MaterialPropertiesTable * fMaterialPropertiesTable
Definition: G4Material.hh:328
void AddMaterial(G4Material *material, G4double fraction)
Definition: G4Material.cc:473
#define DBL_MAX
Definition: templates.hh:83
static constexpr double cm3
Definition: G4SIunits.hh:121
G4double GetNuclearInterLength() const
Definition: G4Material.hh:224
static constexpr double perThousand
Definition: G4SIunits.hh:333
G4int maxNbComponents
Definition: G4Material.hh:319
void CopyPointersOfBaseMaterial()
Definition: G4Material.cc:332
G4double GetMassOfMolecule() const
Definition: G4Material.hh:243
size_t GetNumberOfElements() const
Definition: G4Material.hh:187
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
Definition: G4Material.hh:252
G4int fArrayLength
Definition: G4Material.hh:320
static G4NistManager * Instance()
G4double GetDensity() const
Definition: G4Material.hh:181
std::mutex G4Mutex
Definition: G4Threading.hh:84