71 fState(kMatStateUndefined),
75 fUserExtension(nullptr),
102 fState(kMatStateUndefined),
106 fUserExtension(nullptr),
107 fFWExtension(nullptr)
144 fState(kMatStateUndefined),
148 fUserExtension(nullptr),
149 fFWExtension(nullptr)
193 fTemperature(temperature),
199 fUserExtension(nullptr),
200 fFWExtension(nullptr)
235 fState(kMatStateUndefined),
239 fUserExtension(nullptr),
240 fFWExtension(nullptr)
270 fDensity(gm.fDensity),
273 fTemperature(gm.fTemperature),
274 fPressure(gm.fPressure),
277 fCerenkov(gm.fCerenkov),
278 fElement(gm.fElement),
279 fUserExtension(gm.fUserExtension->Grab()),
280 fFWExtension(gm.fFWExtension->Grab())
299 TAttFill::operator=(gm);
360 return (
prop) ?
prop->GetTitle() :
nullptr;
388 return (
prop) ?
prop->GetTitle() :
nullptr;
434 Error(
"AddConstProperty",
"Constant property %s already added to material %s",
property,
GetName());
501 if (
fA < 0.9 ||
fZ < 0.9) {
502 if (radlen < -1e5 || intlen < -1
e-5) {
503 Error(
"SetRadLen",
"Material %s: user values taken for vacuum: radlen=%g or intlen=%g - too small",
GetName(),
518 constexpr Double_t alr2av = 1.39621E-03;
531 Fatal(
"SetRadLen",
"Element not found for material %s",
GetName());
555 Double_t fp = (0.0083 * az4 + 0.20206 + 1. / (1. + az2)) * az2;
556 Double_t fm = (0.0020 * az4 + 0.0369) * az4;
599 out <<
"// Material: " <<
GetName() << std::endl;
600 out <<
" a = " <<
fA <<
";" << std::endl;
601 out <<
" z = " <<
fZ <<
";" << std::endl;
602 out <<
" density = " <<
fDensity <<
";" << std::endl;
603 out <<
" radl = " <<
fRadLen <<
";" << std::endl;
604 out <<
" absl = " <<
fIntLen <<
";" << std::endl;
606 out <<
" auto " <<
name <<
" = new TGeoMaterial(\"" <<
GetName() <<
"\", a, z, density, radl, absl);" << std::endl;
607 out <<
" " <<
name <<
"->SetIndex(" <<
GetIndex() <<
");" << std::endl;
684 for (i = 0; i < ncomp; i++) {
691 Int_t ncomp1 = ncomp;
692 for (i = 0; i < ncomp; i++) {
693 if ((weight[i] / amed) < precision) {
707 for (i = 0; i < ncomp; i++) {
709 if (weight[i] < precision)
745 Error(
"FillMaterialEvolution",
"Provide an empty array !");
756 Fatal(
"FillMaterialEvolution",
"Element not found for material %s",
GetName());
760 population->
Add(elem);
832 constexpr const Double_t alr2av = 1.39621E-03;
833 constexpr const Double_t al183 = 5.20948;
875 Fatal(
"AddElement",
"Cannot add element with negative weight %g to mixture %s", weight,
GetName());
876 }
else if (weight < std::numeric_limits<Double_t>::epsilon()) {
879 Fatal(
"AddElement",
"Cannot add element having Z=%d to mixture %s", (
Int_t)z,
GetName());
916 if (z -
Int_t(z) > 1E-3)
917 Warning(
"DefineElement",
"Mixture %s has element defined with fractional Z=%f",
GetName(), z);
935 Fatal(
"AddElement",
"Cannot add INVALID material to mixture %s",
GetName());
936 }
else if (weight < 0e0) {
937 Fatal(
"AddElement",
"Cannot add material %s with negative weight %g to mixture %s", mat->
GetName(), weight,
939 }
else if (weight < std::numeric_limits<Double_t>::epsilon()) {
960 for (i = 0; i < nelem; i++) {
980 wnew = weight * (mix->
GetWmixt())[i];
998 Fatal(
"AddElement",
"Cannot add INVALID element to mixture %s",
GetName());
999 }
else if (weight < 0e0) {
1000 Fatal(
"AddElement",
"Cannot add element %s with negative weight %g to mixture %s", elem->
GetName(), weight,
1002 }
else if (weight < std::numeric_limits<Double_t>::epsilon()) {
1013 if (elemold == elem) {
1042 else if (elemold != elem)
1044 if ((elem == elemold) ||
1064 Fatal(
"AddElement",
"Cannot add element by natoms in mixture %s after defining elements by weight",
GetName());
1113 Fatal(
"DefineElement",
"In mixture %s, element with Z=%i not found",
GetName(), z);
1192 printf(
"Mixture %s %s Aeff=%g Zeff=%g rho=%g radlen=%g intlen=%g index=%i\n",
GetName(),
GetTitle(),
fA,
fZ,
1217 out <<
"// Mixture: " <<
GetName() << std::endl;
1218 out <<
" nel = " <<
fNelements <<
";" << std::endl;
1219 out <<
" density = " <<
fDensity <<
";" << std::endl;
1220 out <<
" auto " <<
name <<
" = new TGeoMixture(\"" <<
GetName() <<
"\", nel, density);" << std::endl;
1224 << el->
GetName() << std::endl;
1225 out <<
" " <<
name <<
"->DefineElement(" << i <<
",a,z,w);" << std::endl;
1227 out <<
" " <<
name <<
"->SetIndex(" <<
GetIndex() <<
");" << std::endl;
1248 for (i = 0; i < ncomp; i++) {
1261 Int_t ncomp1 = ncomp;
1262 for (i = 0; i < ncomp; i++) {
1263 if ((weight[i] / amed) < precision) {
1277 for (i = 0; i < ncomp; i++) {
1279 if (weight[i] < precision)
1315 Error(
"FillMaterialEvolution",
"Provide an empty array !");
1328 population->
Add(elem);
1345 const Double_t al183 = 5.20948, al1440 = 7.27239;
1365 double sumweights = 0;
1371 Warning(
"ComputeDerivedQuantities",
"Mixture %s: sum of weights is: %g",
GetName(), sumweights);
1388 fRadLen = (radinv <= 0.0 ? DBL_MAX : 1.0 / radinv);
1399 const Double_t twothird = 2.0 / 3.0;
1411 fIntLen = (NILinv <= 0.0 ? DBL_MAX : 1.0 / NILinv);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h prop
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
R__EXTERN TGeoManager * gGeoManager
static const Double_t STP_temperature
static const Double_t STP_pressure
Fill Area Attributes class.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
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.
Class representing a radionuclidevoid TGeoManager::SetDefaultRootUnits() { if ( fgDefaultUnits == kRo...
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
virtual void Release() const =0
The manager class for any TGeo geometry.
static EDefaultUnits GetDefaultUnits()
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
static void SetDefaultUnits(EDefaultUnits new_value)
Int_t AddMaterial(const TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
Double_t GetProperty(const char *name, Bool_t *error=nullptr) const
Get a user-defined property.
TGDMLMatrix * GetGDMLMatrix(const char *name) const
Get GDML matrix with a given name;.
TList * GetListOfMaterials() const
Base class describing materials.
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
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
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 user-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()
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.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
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
Int_t IndexOf(const TObject *obj) const override
void AddAt(TObject *obj, Int_t idx) override
Add object at position ids.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
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).
R__ALWAYS_INLINE 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.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
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.