287 while ((property = (
TNamed *)next()))
298 TAttFill::operator=(gm);
316 while ((property = (
TNamed *)next()))
359 return (prop) ? prop->
GetTitle() :
nullptr;
387 return (prop) ? prop->
GetTitle() :
nullptr;
421 Error(
"AddProperty",
"Property %s already added to material %s", property,
GetName());
433 Error(
"AddConstProperty",
"Constant property %s already added to material %s", property,
GetName());
500 if (
fA < 0.9 ||
fZ < 0.9) {
501 if (radlen < -1e5 || intlen < -1
e-5) {
502 Error(
"SetRadLen",
"Material %s: user values taken for vacuum: radlen=%g or intlen=%g - too small",
GetName(),
517 constexpr Double_t alr2av = 1.39621E-03;
530 Fatal(
"SetRadLen",
"Element not found for material %s",
GetName());
554 Double_t fp = (0.0083 * az4 + 0.20206 + 1. / (1. + az2)) * az2;
555 Double_t fm = (0.0020 * az4 + 0.0369) * az4;
598 out <<
"// Material: " <<
GetName() << std::endl;
599 out <<
" a = " <<
fA <<
";" << std::endl;
600 out <<
" z = " <<
fZ <<
";" << std::endl;
601 out <<
" density = " <<
fDensity <<
";" << std::endl;
602 out <<
" radl = " <<
fRadLen <<
";" << std::endl;
603 out <<
" absl = " <<
fIntLen <<
";" << std::endl;
605 out <<
" auto " <<
name <<
" = new TGeoMaterial(\"" <<
GetName() <<
"\", a, z, density, radl, absl);" << std::endl;
606 out <<
" " <<
name <<
"->SetIndex(" <<
GetIndex() <<
");" << std::endl;
683 for (i = 0; i < ncomp; i++) {
690 Int_t ncomp1 = ncomp;
691 for (i = 0; i < ncomp; i++) {
692 if ((weight[i] / amed) < precision) {
706 for (i = 0; i < ncomp; i++) {
708 if (weight[i] < precision)
744 Error(
"FillMaterialEvolution",
"Provide an empty array !");
755 Fatal(
"FillMaterialEvolution",
"Element not found for material %s",
GetName());
759 population->
Add(elem);
830 constexpr const Double_t alr2av = 1.39621E-03;
831 constexpr const Double_t al183 = 5.20948;
873 Fatal(
"AddElement",
"Cannot add element with negative weight %g to mixture %s", weight,
GetName());
874 }
else if (weight < std::numeric_limits<Double_t>::epsilon()) {
877 Fatal(
"AddElement",
"Cannot add element having Z=%d to mixture %s", (
Int_t)z,
GetName());
914 if (z -
Int_t(z) > 1E-3)
915 Warning(
"DefineElement",
"Mixture %s has element defined with fractional Z=%f",
GetName(), z);
933 Fatal(
"AddElement",
"Cannot add INVALID material to mixture %s",
GetName());
934 }
else if (weight < 0e0) {
935 Fatal(
"AddElement",
"Cannot add material %s with negative weight %g to mixture %s", mat->
GetName(), weight,
937 }
else if (weight < std::numeric_limits<Double_t>::epsilon()) {
958 for (i = 0; i < nelem; i++) {
978 wnew = weight * (mix->
GetWmixt())[i];
996 Fatal(
"AddElement",
"Cannot add INVALID element to mixture %s",
GetName());
997 }
else if (weight < 0e0) {
998 Fatal(
"AddElement",
"Cannot add element %s with negative weight %g to mixture %s", elem->
GetName(), weight,
1000 }
else if (weight < std::numeric_limits<Double_t>::epsilon()) {
1011 if (elemold == elem) {
1040 else if (elemold != elem)
1042 if ((elem == elemold) ||
1062 Fatal(
"AddElement",
"Cannot add element by natoms in mixture %s after defining elements by weight",
GetName());
1111 Fatal(
"DefineElement",
"In mixture %s, element with Z=%i not found",
GetName(), z);
1190 printf(
"Mixture %s %s Aeff=%g Zeff=%g rho=%g radlen=%g intlen=%g index=%i\n",
GetName(),
GetTitle(),
fA,
fZ,
1215 out <<
"// Mixture: " <<
GetName() << std::endl;
1216 out <<
" nel = " <<
fNelements <<
";" << std::endl;
1217 out <<
" density = " <<
fDensity <<
";" << std::endl;
1218 out <<
" auto " <<
name <<
" = new TGeoMixture(\"" <<
GetName() <<
"\", nel, density);" << std::endl;
1222 << el->
GetName() << std::endl;
1223 out <<
" " <<
name <<
"->DefineElement(" << i <<
",a,z,w);" << std::endl;
1225 out <<
" " <<
name <<
"->SetIndex(" <<
GetIndex() <<
");" << std::endl;
1246 for (i = 0; i < ncomp; i++) {
1259 Int_t ncomp1 = ncomp;
1260 for (i = 0; i < ncomp; i++) {
1261 if ((weight[i] / amed) < precision) {
1275 for (i = 0; i < ncomp; i++) {
1277 if (weight[i] < precision)
1313 Error(
"FillMaterialEvolution",
"Provide an empty array !");
1326 population->
Add(elem);
1343 const Double_t al183 = 5.20948, al1440 = 7.27239;
1363 double sumweights = 0;
1369 Warning(
"ComputeDerivedQuantities",
"Mixture %s: sum of weights is: %g",
GetName(), sumweights);
1386 fRadLen = (radinv <= 0.0 ? DBL_MAX : 1.0 / radinv);
1397 const Double_t twothird = 2.0 / 3.0;
1409 fIntLen = (NILinv <= 0.0 ? DBL_MAX : 1.0 / NILinv);
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
externTGeoManager * gGeoManager
static const Double_t STP_temperature
static const Double_t STP_pressure
This class is used in the process of reading and writing the GDML "matrix" tag.
Double_t Concentration(Double_t time) const
Find concentration of the element at a given time.
void FillPopulation(TObjArray *population, Double_t precision=0.001, Double_t factor=1.)
Fills the input array with the set of RN elements resulting from the decay of this one.
TGeoBatemanSol * Ratio() const
void ResetRatio()
Clears the existing ratio.
TGeoElement * GetElement(Int_t z)
TObjArray * GetElementsRN() const
Int_t GetNelements() const
Base class for chemical elements.
virtual Double_t GetSpecificActivity() const
void SetDefined(Bool_t flag=kTRUE)
virtual Bool_t IsRadioNuclide() const
Double_t Neff() const
Returns effective number of nucleons.
void SetUsed(Bool_t flag=kTRUE)
ABC for user objects attached to TGeoVolume or TGeoNode.
virtual TGeoExtension * Grab()=0
The manager class for any TGeo geometry.
static EDefaultUnits GetDefaultUnits()
static void SetDefaultUnits(EDefaultUnits new_value)
Double_t GetConstProperty(const char *property, Bool_t *error=nullptr) const
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the material.
virtual TObject * GetCerenkovProperties() const
const char * GetPointerName() const
Provide a pointer name containing uid.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
static Double_t ScreenFactor(Double_t z)
static function Compute screening factor for pair production and Bremsstrahlung REFERENCE : EGS MANUA...
const char * GetConstPropertyRef(const char *property) const
TGeoMaterial(const TGeoMaterial &)
virtual Bool_t IsMixture() const
void SetFWExtension(TGeoExtension *ext)
Connect framework defined extension to the material.
bool AddConstProperty(const char *property, const char *ref)
virtual void GetElementProp(Double_t &a, Double_t &z, Double_t &w, Int_t i=0)
Single interface to get element properties.
virtual TGeoMaterial * DecayMaterial(Double_t time, Double_t precision=0.001)
Create the material representing the decay product of this material at a given time.
bool AddProperty(const char *property, const char *ref)
void SetRadLen(Double_t radlen, Double_t intlen=0.)
Set radiation/absorption lengths.
TGeoElement * GetElement() const
Get a pointer to the element this material is made of.
virtual Bool_t IsEq(const TGeoMaterial *other) const
return true if the other material has the same physical properties
TGeoElement * GetBaseElement() const
const char * GetPropertyRef(const char *property) const
TGDMLMatrix * GetProperty(const char *name) const
void SetUsed(Bool_t flag=kTRUE)
virtual void FillMaterialEvolution(TObjArray *population, Double_t precision=0.001)
Fills a user array with all the elements deriving from the possible decay of the top element composin...
Int_t GetIndex()
Retrieve material index in the list of materials.
TGeoExtension * fUserExtension
! Transient user-defined extension to materials
TGeoMaterial & operator=(const TGeoMaterial &)
assignment operator
TGeoExtension * GrabUserExtension() const
Get a copy of the user extension pointer.
TGeoExtension * GrabFWExtension() const
Get a copy of the framework extension pointer.
virtual Int_t GetDefaultColor() const
Get some default color related to this material.
TGeoMaterial()
Default constructor.
static Double_t Coulomb(Double_t z)
static function Compute Coulomb correction for pair production and Brem REFERENCE : EGS MANUAL SLAC 2...
virtual Double_t GetA() const
TGeoExtension * fFWExtension
! Transient framework-defined extension to materials
void Print(const Option_t *option="") const override
print characteristics of this material
virtual Double_t GetDensity() const
virtual Double_t GetZ() const
~TGeoMaterial() override
Destructor.
void ComputeNuclearInterLength()
Compute Nuclear Interaction Length based on Geant4 formula.
~TGeoMixture() override
Destructor.
Double_t * GetZmixt() const
Bool_t IsEq(const TGeoMaterial *other) const override
Return true if the other material has the same physical properties.
void AddElement(Double_t a, Double_t z, Double_t weight)
add an element to the mixture using fraction by weight Check if the element is already defined
TGeoMixture(const TGeoMixture &)=delete
TGeoMixture()
Default constructor.
void ComputeDerivedQuantities()
Compute Derived Quantities as in Geant4.
Int_t GetNelements() const override
TGeoMaterial * DecayMaterial(Double_t time, Double_t precision=0.001) override
Create the mixture representing the decay product of this material at a given time.
void ComputeRadiationLength()
Compute Radiation Length based on Geant4 formula.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Double_t * fVecNbOfAtomsPerVolume
void FillMaterialEvolution(TObjArray *population, Double_t precision=0.001) override
Fills a user array with all the elements deriving from the possible decay of the top elements composi...
void AverageProperties()
Compute effective A/Z and radiation length.
void Print(const Option_t *option="") const override
print characteristics of this material
Double_t * GetWmixt() const
Double_t GetSpecificActivity(Int_t i=-1) const override
Get specific activity (in Bq/gram) for the whole mixture (no argument) or for a given component.
void DefineElement(Int_t iel, Double_t a, Double_t z, Double_t weight)
Double_t * GetAmixt() const
TGeoElement * GetElement(Int_t i=0) const override
Retrieve the pointer to the element corresponding to component I.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const override
void Add(TObject *obj) override
virtual Bool_t IsEqual(const TObject *obj) const
Default equal comparison (objects are equal if they have the same address in memory).
Bool_t TestBit(UInt_t f) const
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
static constexpr double fine_structure_const
static constexpr double cm2
static constexpr double Avogadro
static constexpr double cm
static constexpr double amu
static constexpr double cm
static constexpr double fine_structure_const
static constexpr double cm2
static constexpr double Avogadro
static constexpr double g
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.