Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MaterialPropertiesTable.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//
27//
28//
29////////////////////////////////////////////////////////////////////////
30// G4MaterialPropertiesTable Implementation
31////////////////////////////////////////////////////////////////////////
32//
33// File: G4MaterialPropertiesTable.cc
34// Version: 1.0
35// Created: 1996-02-08
36// Author: Juliet Armstrong
37// Updated: 2005-05-12 add SetGROUPVEL(), courtesy of
38// Horton-Smith (bug report #741), by P. Gumplinger
39// 2002-11-05 add named material constants by P. Gumplinger
40// 1999-11-05 Migration from G4RWTPtrHashDictionary to STL
41// by John Allison
42// 1997-03-26 by Peter Gumplinger
43// > cosmetics (only)
44//
45////////////////////////////////////////////////////////////////////////
46
48
49#include "globals.hh"
50#include "G4Log.hh"
53
54#include <algorithm>
55#include <cassert>
56
57#ifdef G4MULTITHREADED
58# include "G4AutoLock.hh"
59namespace
60{
61 G4Mutex materialPropertyTableMutex = G4MUTEX_INITIALIZER;
62}
63#endif
64
66{
67 // elements of these 2 vectors must be in same order as
68 // the corresponding enums in G4MaterialPropertiesIndex.hh
69 fMatPropNames.emplace_back("RINDEX");
70 fMatPropNames.emplace_back("REFLECTIVITY");
71 fMatPropNames.emplace_back("REALRINDEX");
72 fMatPropNames.emplace_back("IMAGINARYRINDEX");
73 fMatPropNames.emplace_back("EFFICIENCY");
74 fMatPropNames.emplace_back("TRANSMITTANCE");
75 fMatPropNames.emplace_back("SPECULARLOBECONSTANT");
76 fMatPropNames.emplace_back("SPECULARSPIKECONSTANT");
77 fMatPropNames.emplace_back("BACKSCATTERCONSTANT");
78 fMatPropNames.emplace_back("GROUPVEL");
79 fMatPropNames.emplace_back("MIEHG");
80 fMatPropNames.emplace_back("RAYLEIGH");
81 fMatPropNames.emplace_back("WLSCOMPONENT");
82 fMatPropNames.emplace_back("WLSABSLENGTH");
83 fMatPropNames.emplace_back("WLSCOMPONENT2");
84 fMatPropNames.emplace_back("WLSABSLENGTH2");
85 fMatPropNames.emplace_back("ABSLENGTH");
86 fMatPropNames.emplace_back("PROTONSCINTILLATIONYIELD");
87 fMatPropNames.emplace_back("DEUTERONSCINTILLATIONYIELD");
88 fMatPropNames.emplace_back("TRITONSCINTILLATIONYIELD");
89 fMatPropNames.emplace_back("ALPHASCINTILLATIONYIELD");
90 fMatPropNames.emplace_back("IONSCINTILLATIONYIELD");
91 fMatPropNames.emplace_back("ELECTRONSCINTILLATIONYIELD");
92 fMatPropNames.emplace_back("SCINTILLATIONCOMPONENT1");
93 fMatPropNames.emplace_back("SCINTILLATIONCOMPONENT2");
94 fMatPropNames.emplace_back("SCINTILLATIONCOMPONENT3");
95 fMatPropNames.emplace_back("COATEDRINDEX");
96
97 assert(fMatPropNames.size() == kNumberOfPropertyIndex);
98
99 fMP.assign(kNumberOfPropertyIndex, nullptr);
100
101 fMatConstPropNames.emplace_back("SURFACEROUGHNESS");
102 fMatConstPropNames.emplace_back("ISOTHERMAL_COMPRESSIBILITY");
103 fMatConstPropNames.emplace_back("RS_SCALE_FACTOR");
104 fMatConstPropNames.emplace_back("WLSMEANNUMBERPHOTONS");
105 fMatConstPropNames.emplace_back("WLSTIMECONSTANT");
106 fMatConstPropNames.emplace_back("WLSMEANNUMBERPHOTONS2");
107 fMatConstPropNames.emplace_back("WLSTIMECONSTANT2");
108 fMatConstPropNames.emplace_back("MIEHG_FORWARD");
109 fMatConstPropNames.emplace_back("MIEHG_BACKWARD");
110 fMatConstPropNames.emplace_back("MIEHG_FORWARD_RATIO");
111 fMatConstPropNames.emplace_back("SCINTILLATIONYIELD");
112 fMatConstPropNames.emplace_back("RESOLUTIONSCALE");
113 fMatConstPropNames.emplace_back("FERMIPOT");
114 fMatConstPropNames.emplace_back("DIFFUSION");
115 fMatConstPropNames.emplace_back("SPINFLIP");
116 fMatConstPropNames.emplace_back("LOSS");
117 fMatConstPropNames.emplace_back("LOSSCS");
118 fMatConstPropNames.emplace_back("ABSCS");
119 fMatConstPropNames.emplace_back("SCATCS");
120 fMatConstPropNames.emplace_back("MR_NBTHETA");
121 fMatConstPropNames.emplace_back("MR_NBE");
122 fMatConstPropNames.emplace_back("MR_RRMS");
123 fMatConstPropNames.emplace_back("MR_CORRLEN");
124 fMatConstPropNames.emplace_back("MR_THETAMIN");
125 fMatConstPropNames.emplace_back("MR_THETAMAX");
126 fMatConstPropNames.emplace_back("MR_EMIN");
127 fMatConstPropNames.emplace_back("MR_EMAX");
128 fMatConstPropNames.emplace_back("MR_ANGNOTHETA");
129 fMatConstPropNames.emplace_back("MR_ANGNOPHI");
130 fMatConstPropNames.emplace_back("MR_ANGCUT");
131 fMatConstPropNames.emplace_back("SCINTILLATIONTIMECONSTANT1");
132 fMatConstPropNames.emplace_back("SCINTILLATIONTIMECONSTANT2");
133 fMatConstPropNames.emplace_back("SCINTILLATIONTIMECONSTANT3");
134 fMatConstPropNames.emplace_back("SCINTILLATIONRISETIME1");
135 fMatConstPropNames.emplace_back("SCINTILLATIONRISETIME2");
136 fMatConstPropNames.emplace_back("SCINTILLATIONRISETIME3");
137 fMatConstPropNames.emplace_back("SCINTILLATIONYIELD1");
138 fMatConstPropNames.emplace_back("SCINTILLATIONYIELD2");
139 fMatConstPropNames.emplace_back("SCINTILLATIONYIELD3");
140 fMatConstPropNames.emplace_back("PROTONSCINTILLATIONYIELD1");
141 fMatConstPropNames.emplace_back("PROTONSCINTILLATIONYIELD2");
142 fMatConstPropNames.emplace_back("PROTONSCINTILLATIONYIELD3");
143 fMatConstPropNames.emplace_back("DEUTERONSCINTILLATIONYIELD1");
144 fMatConstPropNames.emplace_back("DEUTERONSCINTILLATIONYIELD2");
145 fMatConstPropNames.emplace_back("DEUTERONSCINTILLATIONYIELD3");
146 fMatConstPropNames.emplace_back("TRITONSCINTILLATIONYIELD1");
147 fMatConstPropNames.emplace_back("TRITONSCINTILLATIONYIELD2");
148 fMatConstPropNames.emplace_back("TRITONSCINTILLATIONYIELD3");
149 fMatConstPropNames.emplace_back("ALPHASCINTILLATIONYIELD1");
150 fMatConstPropNames.emplace_back("ALPHASCINTILLATIONYIELD2");
151 fMatConstPropNames.emplace_back("ALPHASCINTILLATIONYIELD3");
152 fMatConstPropNames.emplace_back("IONSCINTILLATIONYIELD1");
153 fMatConstPropNames.emplace_back("IONSCINTILLATIONYIELD2");
154 fMatConstPropNames.emplace_back("IONSCINTILLATIONYIELD3");
155 fMatConstPropNames.emplace_back("ELECTRONSCINTILLATIONYIELD1");
156 fMatConstPropNames.emplace_back("ELECTRONSCINTILLATIONYIELD2");
157 fMatConstPropNames.emplace_back("ELECTRONSCINTILLATIONYIELD3");
158 fMatConstPropNames.emplace_back("COATEDTHICKNESS");
159 fMatConstPropNames.emplace_back("COATEDFRUSTRATEDTRANSMISSION");
160
161 assert(fMatConstPropNames.size() == kNumberOfConstPropertyIndex);
162
163 fMCP.assign(kNumberOfConstPropertyIndex, { 0., false });
164}
165
167{
168 for(auto prop : fMP)
169 {
170 delete(prop);
171 }
172}
173
175 const G4String& key) const
176{
177 // Returns the constant material property index corresponding to a key
178
179 std::size_t index = std::distance(
180 fMatConstPropNames.cbegin(),
181 std::find(fMatConstPropNames.cbegin(), fMatConstPropNames.cend(), key));
182 if(index < fMatConstPropNames.size())
183 {
184 return (G4int)index;
185 }
186
188 ed << "Constant Material Property Index for key " << key << " not found.";
189 G4Exception("G4MaterialPropertiesTable::GetConstPropertyIndex()", "mat200",
190 FatalException, ed);
191 return 0;
192}
193
195{
196 // Returns the material property index corresponding to a key
197 std::size_t index =
198 std::distance(fMatPropNames.cbegin(),
199 std::find(fMatPropNames.cbegin(), fMatPropNames.cend(), key));
200 if(index < fMatPropNames.size())
201 {
202 return (G4int)index;
203 }
205 ed << "Material Property Index for key " << key << " not found.";
206 G4Exception("G4MaterialPropertiesTable::GetPropertyIndex()", "mat201",
207 FatalException, ed);
208 return 0;
209}
210
212{
213 // Returns the constant material property corresponding to an index
214 // fatal exception if property not found
215
216 if(index < (G4int) fMCP.size() && fMCP[index].second)
217 {
218 return fMCP[index].first;
219 }
221 ed << "Constant Material Property Index " << index << " not found.";
222 G4Exception("G4MaterialPropertiesTable::GetConstProperty()", "mat202",
223 FatalException, ed);
224 return 0.;
225}
226
228{
229 // Returns the constant material property corresponding to a key
230 // fatal exception if property not found
231
233}
234
236{
238}
239
241{
242 // Returns true if a const property corresponding to 'index' exists
243
244 return index >= 0 && index < (G4int) fMCP.size() && fMCP[index].second;
245}
246
248{
249 // Returns true if a const property 'key' exists
250 std::size_t index = std::distance(
251 fMatConstPropNames.cbegin(),
252 std::find(fMatConstPropNames.cbegin(), fMatConstPropNames.cend(), key));
253 if(index < fMatConstPropNames.size())
254 { // index is type std::size_t so >= 0
255 return ConstPropertyExists((G4int)index);
256 }
257 return false;
258}
259
261{
262 std::size_t index = std::distance(
263 fMatConstPropNames.cbegin(),
264 std::find(fMatConstPropNames.cbegin(), fMatConstPropNames.cend(), key));
265 if(index < fMatConstPropNames.size())
266 { // index is type std::size_t so >= 0
267 return ConstPropertyExists((G4int)index);
268 }
269 return false;
270}
271
273 const G4String& key) const
274{
275 // Returns a Material Property Vector corresponding to a key
276 if(std::find(fMatPropNames.cbegin(), fMatPropNames.cend(), key) !=
277 fMatPropNames.cend())
278 {
279 const G4int index = GetPropertyIndex(G4String(key));
280 return GetProperty(index);
281 }
282 return nullptr;
283}
284
286 const char* key) const
287{
288 if(std::find(fMatPropNames.cbegin(), fMatPropNames.cend(), key) !=
289 fMatPropNames.cend())
290 {
291 const G4int index = GetPropertyIndex(G4String(key));
292 return GetProperty(index);
293 }
294 return nullptr;
295}
296
298 const G4int index) const
299{
300 // Returns a Material Property Vector corresponding to an index
301 // returns nullptr if the property has not been defined by user
302 if(index >= 0 && index < (G4int) fMP.size())
303 {
304 return fMP[index];
305 }
306 return nullptr;
307}
308
310 const G4String& key, const std::vector<G4double>& photonEnergies,
311 const std::vector<G4double>& propertyValues, G4bool createNewKey,
312 G4bool spline)
313{
314 if(photonEnergies.size() != propertyValues.size())
315 {
317 ed << "AddProperty error!";
318 G4Exception("G4MaterialPropertiesTable::AddProperty()", "mat204",
319 FatalException, ed);
320 }
321
322 // G4PhysicsVector assumes energies are in increasing order
323 for (std::size_t i = 0; i < photonEnergies.size() - 1; ++i)
324 {
325 if(photonEnergies.at(i+1) < photonEnergies.at(i))
326 {
328 ed << "Energies in material property table must be in increasing "
329 << "order. Key: " << key << " Energy: " << photonEnergies.at(i+1);
330 G4Exception("G4MaterialPropertiesTable::AddProperty()", "mat215",
331 FatalException, ed);
332 }
333 }
334
335 // if the key doesn't exist, add it if requested
336 if(std::find(fMatPropNames.cbegin(), fMatPropNames.cend(), key) ==
337 fMatPropNames.cend())
338 {
339 if(createNewKey)
340 {
341 fMatPropNames.push_back(key);
342 fMP.push_back(nullptr);
343 }
344 else
345 {
347 ed << "Attempting to create a new material property key " << key
348 << " without setting\n"
349 << "createNewKey parameter of AddProperty to true.";
350 G4Exception("G4MaterialPropertiesTable::AddProperty()", "mat205",
351 FatalException, ed);
352 }
353 }
354
355 auto* mpv =
356 new G4MaterialPropertyVector(photonEnergies, propertyValues, spline);
357 mpv->SetVerboseLevel(1);
358 if(spline)
359 {
360 mpv->FillSecondDerivatives();
361 }
362 G4int index = GetPropertyIndex(key);
363 fMP[index] = mpv;
364
365 // if key is RINDEX, we calculate GROUPVEL -
366 // contribution from Tao Lin (IHEP, the JUNO experiment)
367 if(key == "RINDEX")
368 {
369 CalculateGROUPVEL();
370 }
371
372 return mpv;
373}
374
376 const char* key, G4double* photonEnergies, G4double* propertyValues,
377 G4int numEntries, G4bool createNewKey, G4bool spline)
378{
379
380 // Provides a way of adding a property to the Material Properties
381 // Table given a pair of arrays and a key
382 G4String k(key);
383
384 std::vector<G4double> energies(photonEnergies, photonEnergies + numEntries);
385 std::vector<G4double> values(propertyValues, propertyValues + numEntries);
386 return AddProperty(k, energies, values, createNewKey, spline);
387}
388
391 G4bool createNewKey)
392{
393 // Provides a way of adding a property to the Material Properties
394 // Table given an G4MaterialPropertyVector Reference and a key
395
396 // G4PhysicsVector assumes energies are in increasing order
397 // An MPV with size==0 or 1 is also ok
398 if (mpv->GetVectorLength() > 1) {
399 for (std::size_t i = 0; i < mpv->GetVectorLength() - 1; ++i)
400 {
401 if(mpv->Energy(i+1) < mpv->Energy(i))
402 {
404 ed << "Energies in material property vector must be in increasing "
405 << "order. Key: " << key << " Energy: " << mpv->Energy(i+1);
406 G4Exception("G4MaterialPropertiesTable::AddProperty()", "mat216",
407 FatalException, ed);
408 }
409 }
410 }
411
412 // if the key doesn't exist, add it
413 if(std::find(fMatPropNames.cbegin(), fMatPropNames.cend(), key) ==
414 fMatPropNames.cend())
415 {
416 if(createNewKey)
417 {
418 fMatPropNames.push_back(key);
419 fMP.push_back(nullptr);
420 }
421 else
422 {
424 ed << "Attempting to create a new material property key " << key
425 << " without setting\n"
426 << "createNewKey parameter of AddProperty to true.";
427 G4Exception("G4MaterialPropertiesTable::AddProperty()", "mat206",
428 FatalException, ed);
429 }
430 }
431 G4int index = GetPropertyIndex(key);
432 fMP[index] = mpv;
433
434 // if key is RINDEX, we calculate GROUPVEL -
435 // contribution from Tao Lin (IHEP, the JUNO experiment)
436 if(key == "RINDEX")
437 {
438 CalculateGROUPVEL();
439 }
440}
441
444 G4bool createNewKey)
445{
446 AddProperty(G4String(key), mpv, createNewKey);
447}
448
450 const G4String& mat)
451{
452 // load a material property vector defined in Geant4 source
455 AddProperty(key, v);
456}
457
459 G4double propertyValue,
460 G4bool createNewKey)
461{
462 // Provides a way of adding a constant property to the Material Properties
463 // Table given a key
464 if(std::find(fMatConstPropNames.cbegin(), fMatConstPropNames.cend(), key) ==
465 fMatConstPropNames.cend())
466 {
467 if(createNewKey)
468 {
469 fMatConstPropNames.push_back(key);
470 fMCP.emplace_back(0., true);
471 }
472 else
473 {
475 ed << "Attempting to create a new material constant property key " << key
476 << " without setting"
477 << " createNewKey parameter of AddProperty to true.";
478 G4Exception("G4MaterialPropertiesTable::AddProperty()", "mat207",
479 FatalException, ed);
480 }
481 }
482 G4int index = GetConstPropertyIndex(key);
483
484 fMCP[index] = std::pair<G4double, G4bool>{ propertyValue, true };
485}
486
488 G4double propertyValue,
489 G4bool createNewKey)
490{
491 // Provides a way of adding a constant property to the Material Properties
492 // Table given a key
493 AddConstProperty(G4String(key), propertyValue, createNewKey);
494}
495
497{
498 G4int index = GetConstPropertyIndex(key);
499 if(index < (G4int) fMCP.size())
500 {
501 fMCP[index] = std::pair<G4double, G4bool>{ 0., false };
502 }
503}
504
506{
508}
509
511{
512 G4int index = GetPropertyIndex(key);
513 delete fMP[index];
514 fMP[index] = nullptr;
515}
516
518{
520}
521
523 G4double aPhotonEnergy,
524 G4double aPropertyValue)
525{
526 // Allows to add an entry pair directly to the Material Property Vector
527 // given a key.
528 if(std::find(fMatPropNames.cbegin(), fMatPropNames.cend(), key) ==
529 fMatPropNames.cend())
530 {
531 G4Exception("G4MaterialPropertiesTable::AddEntry()", "mat214",
532 FatalException, "Material Property Vector not found.");
533 }
534 G4int index = GetPropertyIndex(key);
535
536 G4MaterialPropertyVector* targetVector = fMP[index];
537 if(targetVector != nullptr)
538 {
539 // do not allow duplicate energies
540 for (std::size_t i = 0; i < targetVector->GetVectorLength(); ++i)
541 {
542 if(aPhotonEnergy == targetVector->Energy(i))
543 {
545 ed << "Energy values in material property vector must be unique. "
546 << "Key: " << key;
547 G4Exception("G4MaterialPropertiesTable::AddEntry()", "mat217",
548 FatalException, ed);
549 }
550 }
551
552 targetVector->InsertValues(aPhotonEnergy, aPropertyValue);
553 }
554 else
555 {
556 G4Exception("G4MaterialPropertiesTable::AddEntry()", "mat208",
557 FatalException, "Material Property Vector not found.");
558 }
559 if(key == "RINDEX")
560 {
561 CalculateGROUPVEL();
562 }
563}
564
566 G4double aPhotonEnergy,
567 G4double aPropertyValue)
568{
569 AddEntry(G4String(key), aPhotonEnergy, aPropertyValue);
570}
571
573{
574 // material properties
575 G4int j = 0;
576 for(const auto& prop : fMP)
577 {
578 if(prop != nullptr)
579 {
580 G4cout << j << ": " << fMatPropNames[j] << G4endl;
581 prop->DumpValues();
582 }
583 ++j;
584 }
585 // material constant properties
586 j = 0;
587 for(const auto& cprop : fMCP)
588 {
589 if(cprop.second)
590 {
591 G4cout << j << ": " << fMatConstPropNames[j] << " " << cprop.first
592 << G4endl;
593 }
594 ++j;
595 }
596}
597
598G4MaterialPropertyVector* G4MaterialPropertiesTable::CalculateGROUPVEL()
599{
600#ifdef G4MULTITHREADED
601 G4AutoLock mptm(&materialPropertyTableMutex);
602#endif
603
604 // check if "GROUPVEL" already exists. If so, remove it.
605 if(fMP[kGROUPVEL] != nullptr)
606 {
607 this->RemoveProperty("GROUPVEL");
608 }
609
610 // fetch RINDEX data, give up if unavailable
612 if(rindex == nullptr)
613 {
614 return nullptr;
615 }
616
617 // RINDEX exists but has no entries, give up
618 if(rindex->GetVectorLength() == 0)
619 {
620 return nullptr;
621 }
622
623 // add GROUPVEL vector
624 auto* groupvel = new G4MaterialPropertyVector();
625 groupvel->SetVerboseLevel(1);
626
627 // fill GROUPVEL vector using RINDEX values
628 // rindex built-in "iterator" was advanced to first entry above
629 G4double E0 = rindex->Energy(0);
630 G4double n0 = (*rindex)[0];
631
632 if(E0 <= 0.)
633 {
634 G4Exception("G4MaterialPropertiesTable::CalculateGROUPVEL()", "mat211",
635 FatalException, "Optical Photon Energy <= 0");
636 }
637
638 if(rindex->GetVectorLength() >= 2)
639 {
640 // good, we have at least two entries in RINDEX
641 // get next energy/value pair
642
643 G4double E1 = rindex->Energy(1);
644 G4double n1 = (*rindex)[1];
645
646 if(E1 <= 0.)
647 {
648 G4Exception("G4MaterialPropertiesTable::CalculateGROUPVEL()", "mat212",
649 FatalException, "Optical Photon Energy <= 0");
650 }
651
652 G4double vg;
653
654 // add entry at first photon energy
655 vg = c_light / (n0 + (n1 - n0) / G4Log(E1 / E0));
656
657 // allow only for 'normal dispersion' -> dn/d(logE) > 0
658 if((vg < 0) || (vg > c_light / n0))
659 {
660 vg = c_light / n0;
661 }
662
663 groupvel->InsertValues(E0, vg);
664
665 // add entries at midpoints between remaining photon energies
666 for(std::size_t i = 2; i < rindex->GetVectorLength(); ++i)
667 {
668 vg = c_light / (0.5 * (n0 + n1) + (n1 - n0) / G4Log(E1 / E0));
669
670 // allow only for 'normal dispersion' -> dn/d(logE) > 0
671 if((vg < 0) || (vg > c_light / (0.5 * (n0 + n1))))
672 {
673 vg = c_light / (0.5 * (n0 + n1));
674 }
675 groupvel->InsertValues(0.5 * (E0 + E1), vg);
676
677 // get next energy/value pair, or exit loop
678 E0 = E1;
679 n0 = n1;
680 E1 = rindex->Energy(i);
681 n1 = (*rindex)[i];
682
683 if(E1 <= 0.)
684 {
685 G4Exception("G4MaterialPropertiesTable::CalculateGROUPVEL()", "mat213",
686 FatalException, "Optical Photon Energy <= 0");
687 }
688 }
689
690 // add entry at last photon energy
691 vg = c_light / (n1 + (n1 - n0) / G4Log(E1 / E0));
692
693 // allow only for 'normal dispersion' -> dn/d(logE) > 0
694 if((vg < 0) || (vg > c_light / n1))
695 {
696 vg = c_light / n1;
697 }
698 groupvel->InsertValues(E1, vg);
699 }
700 else // only one entry in RINDEX -- weird!
701 {
702 groupvel->InsertValues(E0, c_light / n0);
703 }
704
705 this->AddProperty("GROUPVEL", groupvel);
706
707 return groupvel;
708}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
G4double G4Log(G4double x)
Definition: G4Log.hh:227
@ kNumberOfPropertyIndex
@ kNumberOfConstPropertyIndex
G4PhysicsFreeVector G4MaterialPropertyVector
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:85
std::mutex G4Mutex
Definition: G4Threading.hh:81
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4int GetConstPropertyIndex(const G4String &key) const
void AddConstProperty(const G4String &key, G4double propertyValue, G4bool createNewKey=false)
G4bool ConstPropertyExists(const G4String &key) const
void RemoveProperty(const G4String &key)
G4int GetPropertyIndex(const G4String &key) const
G4double GetConstProperty(const G4String &key) const
void AddEntry(const G4String &key, G4double aPhotonEnergy, G4double aPropertyValue)
G4MaterialPropertyVector * AddProperty(const G4String &key, const std::vector< G4double > &photonEnergies, const std::vector< G4double > &propertyValues, G4bool createNewKey=false, G4bool spline=false)
G4MaterialPropertyVector * GetProperty(const char *key) const
void RemoveConstProperty(const G4String &key)
void InsertValues(const G4double energy, const G4double value)
G4double Energy(const std::size_t index) const
std::size_t GetVectorLength() const
G4MaterialPropertyVector * GetProperty(const G4String &key, const G4String &mat)