70 fState(kMatStateUndefined),
74 fUserExtension(nullptr),
101 fState(kMatStateUndefined),
105 fUserExtension(nullptr),
106 fFWExtension(nullptr)
143 fState(kMatStateUndefined),
147 fUserExtension(nullptr),
148 fFWExtension(nullptr)
198 fUserExtension(nullptr),
199 fFWExtension(nullptr)
234 fState(kMatStateUndefined),
238 fUserExtension(nullptr),
239 fFWExtension(nullptr)
269 fDensity(
gm.fDensity),
272 fTemperature(
gm.fTemperature),
273 fPressure(
gm.fPressure),
276 fCerenkov(
gm.fCerenkov),
277 fElement(
gm.fElement),
278 fUserExtension(
gm.fUserExtension->Grab()),
279 fFWExtension(
gm.fFWExtension->Grab())
298 TAttFill::operator=(
gm);
359 return (
prop) ?
prop->GetTitle() :
nullptr;
387 return (
prop) ?
prop->GetTitle() :
nullptr;
433 Error(
"AddConstProperty",
"Constant property %s already added to material %s",
property,
GetName());
500 if (
fA < 0.9 ||
fZ < 0.9) {
502 Error(
"SetRadLen",
"Material %s: user values taken for vacuum: radlen=%g or intlen=%g - too small",
GetName(),
530 Fatal(
"SetRadLen",
"Element not found for material %s",
GetName());
566 if (
other->IsMixture())
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++) {
685 weight[i] =
el->Ratio()->Concentration(time) *
el->A();
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());
758 if (!
elem->IsRadioNuclide()) {
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 < 0
e0) {
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()) {
940 if (!
mat->IsMixture()) {
958 for (i = 0; i <
nelem; i++) {
996 Fatal(
"AddElement",
"Cannot add INVALID element to mixture %s",
GetName());
997 }
else if (weight < 0
e0) {
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()) {
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);
1155 if (
other->IsEqual(
this))
1157 if (!
other->IsMixture())
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++) {
1248 if (!
elem->IsRadioNuclide()) {
1253 weight[i] =
el->Ratio()->Concentration(time) *
el->A();
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 !");
1325 if (!
elem->IsRadioNuclide()) {
int Int_t
Signed integer 4 bytes (int)
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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.
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
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
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
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...
TGeoExtension * fFWExtension
Transient user-defined extension to materials.
void Print(const Option_t *option="") const override
print characteristics of this material
~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
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.
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.