45 fState(kMatStateUndefined),
56 fState = kMatStateUndefined;
72 fState(kMatStateUndefined),
106 fState(kMatStateUndefined),
144 fTemperature(temperature),
179 fState(kMatStateUndefined),
212 fDensity(gm.fDensity),
215 fTemperature(gm.fTemperature),
216 fPressure(gm.fPressure),
219 fCerenkov(gm.fCerenkov),
220 fElement(gm.fElement),
221 fUserExtension(gm.fUserExtension->Grab()),
222 fFWExtension(gm.fFWExtension->Grab())
324 return (
char*)name.
Data();
336 if (
fA<0.9 ||
fZ<0.9) {
337 if (radlen<-1e5 || intlen<-1e-5) {
338 Error(
"SetRadLen",
"Material %s: user values taken for vacuum: radlen=%g or intlen=%g - too small",
GetName(),
fRadLen,
fIntLen);
342 if (radlen>=0)
fRadLen = 1.E30;
343 if (intlen>=0)
fIntLen = 1.E30;
349 const Double_t alr2av=1.39621E-03, al183=5.20948;
357 const Double_t amu = 1.03642688246781065e-02;
358 const Double_t lambda0 = 35.*g/(cm*cm);
362 Fatal(
"SetRadLen",
"Element not found for material %s",
GetName());
367 nilinv *= amu/lambda0;
385 Double_t fp = ( 0.0083*az4 + 0.20206 + 1./(1.+az2) ) * az2;
386 Double_t fm = ( 0.0020*az4 + 0.0369 ) * az4;
395 if (other==
this)
return kTRUE;
422 out <<
"// Material: " <<
GetName() << std::endl;
423 out <<
" a = " <<
fA <<
";" << std::endl;
424 out <<
" z = " <<
fZ <<
";" << std::endl;
425 out <<
" density = " <<
fDensity <<
";" << std::endl;
426 out <<
" radl = " <<
fRadLen <<
";" << std::endl;
427 out <<
" absl = " <<
fIntLen <<
";" << std::endl;
429 out <<
" " << name <<
" = new TGeoMaterial(\"" <<
GetName() <<
"\", a,z,density,radl,absl);" << std::endl;
430 out <<
" " << name <<
"->SetIndex(" <<
GetIndex() <<
");" << std::endl;
484 if (!ncomp)
return this;
489 for (i=0; i<ncomp; i++) {
496 Int_t ncomp1 = ncomp;
497 for (i=0; i<ncomp; i++) {
498 if ((weight[i]/amed)<precision) {
511 for (i=0; i<ncomp; i++) {
513 if (weight[i]<precision)
continue;
542 Error(
"FillMaterialEvolution",
"Provide an empty array !");
552 Fatal(
"FillMaterialEvolution",
"Element not found for material %s",
GetName());
556 population->
Add(elem);
604 fNelements(gm.fNelements),
605 fZmixture(gm.fZmixture),
606 fAmixture(gm.fAmixture),
609 fElements(gm.fElements)
647 const Double_t alr2av = 1.39621E-03 , al183 =5.20948;
650 const Double_t amu = 1.03642688246781065e-02;
651 const Double_t lambda0 = 35.*g/(cm*cm);
670 if (radinv > 0)
fRadLen = 1/radinv;
672 nilinv *= amu/lambda0;
684 Fatal(
"AddElement",
"Cannot add element having Z=%d to mixture %s", (
Int_t)
z,
GetName());
698 Int_t nelements = fNelements+1;
721 Warning(
"DefineElement",
"Mixture %s has element defined with fractional Z=%f",
GetName(), z);
754 for (i=0; i<nelem; i++) {
757 if (!elnew)
continue;
769 if (elfound)
continue;
771 wnew = weight * (mix->
GetWmixt())[i];
789 if (elemold == elem) exist =
kTRUE;
809 else if (elemold != elem)
continue;
810 if ((elem==elemold) ||
828 Fatal(
"AddElement",
"Cannot add element by natoms in mixture %s after defining elements by weight",
832 Int_t nelements = fNelements+1;
853 Int_t iel = fNelements-1;
876 Fatal(
"DefineElement",
"In mixture %s, element with Z=%i not found",
GetName(),z);
893 if (elem)
return elem;
958 out <<
"// Mixture: " <<
GetName() << std::endl;
959 out <<
" nel = " <<
fNelements <<
";" << std::endl;
960 out <<
" density = " <<
fDensity <<
";" << std::endl;
961 out <<
" " << name <<
" = new TGeoMixture(\"" <<
GetName() <<
"\", nel,density);" << std::endl;
965 out <<
" " << name <<
"->DefineElement(" << i <<
",a,z,w);" << std::endl;
967 out <<
" " << name <<
"->SetIndex(" <<
GetIndex() <<
");" << std::endl;
981 if (!ncomp)
return this;
987 for (i=0; i<ncomp; i++) {
1000 Int_t ncomp1 = ncomp;
1001 for (i=0; i<ncomp; i++) {
1002 if ((weight[i]/amed)<precision) {
1015 for (i=0; i<ncomp; i++) {
1017 if (weight[i]<precision)
continue;
1046 Error(
"FillMaterialEvolution",
"Provide an empty array !");
1058 population->
Add(elem);
1075 const Double_t al183= 5.20948 , al1440 = 7.27239;
virtual const char * GetTitle() const
Returns title of object.
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...
TList * GetListOfMaterials() const
void DefineElement(Int_t iel, Double_t a, Double_t z, Double_t weight)
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
TGeoExtension * fFWExtension
Transient user-defined extension to materials.
Double_t Concentration(Double_t time) const
Find concentration of the element at a given time.
Double_t * GetZmixt() const
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
void SetRadLen(Double_t radlen, Double_t intlen=0.)
Set radiation/absorbtion lengths.
virtual Int_t GetDefaultColor() const
Get some default color related to this material.
virtual ~TGeoMaterial()
Destructor.
Int_t GetEntriesFast() const
virtual Bool_t IsEqual(const TObject *obj) const
Default equal comparison (objects are equal if they have the same address in memory).
void AverageProperties()
Compute effective A/Z and radiation length.
static const Double_t STP_pressure
virtual TGeoElement * GetElement(Int_t i=0) const
Get a pointer to the element this material is made of.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
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 elements composi...
const char * Data() const
virtual Double_t GetSpecificActivity(Int_t i=-1) const
Get specific activity (in Bq/gram) for the whole mixture (no argument) or for a given component...
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Fill Area Attributes class.
TGeoBatemanSol * Ratio() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Double_t * GetWmixt() const
The TNamed class is the base class for all named ROOT classes.
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the material.
ClassImp(TGeoMaterial) TGeoMaterial
Default constructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t IsMixture() const
Double_t Neff() const
Returns effective number of nucleons.
virtual TGeoElement * GetElement(Int_t i=0) const
Retreive the pointer to the element corresponding to component I.
TGeoElement * GetBaseElement() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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...
virtual Double_t GetSpecificActivity() const
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
Int_t GetIndex()
Retreive material index in the list of materials.
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 ...
virtual Int_t GetNelements() const
virtual Bool_t IsEq(const TGeoMaterial *other) const
Return true if the other material has the same physical properties.
virtual void Release() const =0
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Int_t IndexOf(const TObject *obj) const
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
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.
char * GetPointerName() const
Provide a pointer name containing uid.
TGeoMixture & operator=(const TGeoMixture &)
assignment operator
TGeoExtension * GrabUserExtension() const
Get a copy of the user extension pointer.
Bool_t TestBit(UInt_t f) const
void SetFWExtension(TGeoExtension *ext)
Connect framework defined extension to the material.
virtual const char * GetName() const
Returns name of object.
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
static const Double_t STP_temperature
virtual TObject * GetCerenkovProperties() const
TObjArray * GetElementsRN() const
static Double_t ScreenFactor(Double_t z)
static function Compute screening factor for pair production and Bremstrahlung REFERENCE : EGS MANUAL...
void SetUsed(Bool_t flag=kTRUE)
virtual ~TGeoMixture()
Destructor.
R__EXTERN TGeoManager * gGeoManager
virtual Bool_t IsRadioNuclide() const
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void Print(const Option_t *option="") const
print characteristics of this material
virtual void GetElementProp(Double_t &a, Double_t &z, Double_t &w, Int_t i=0)
Single interface to get element properties.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
void SetDefined(Bool_t flag=kTRUE)
Double_t * GetAmixt() const
virtual UInt_t GetUniqueID() const
Return the unique object id.
Binding & operator=(OUT(*fun)(void))
virtual Double_t GetZ() const
virtual TGeoExtension * Grab()=0
virtual Double_t GetDensity() const
void SetUsed(Bool_t flag=kTRUE)
TGeoExtension * fUserExtension
Int_t AddMaterial(const TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
std::vector< Double_t > fWeights
TGeoMaterial & operator=(const TGeoMaterial &)
assignment operator
Int_t GetNelements() const
virtual TGeoMaterial * DecayMaterial(Double_t time, Double_t precision=0.001)
Create the mixture representing the decay product of this material at a given time.
TGeoElement * GetElement(Int_t z)
virtual Int_t IndexOf(const TObject *obj) const
TObject * At(Int_t idx) const
virtual void Print(const Option_t *option="") const
print characteristics of this material
virtual Bool_t IsEq(const TGeoMaterial *other) const
return true if the other material has the same physical properties
TGeoExtension * GrabFWExtension() const
Get a copy of the framework extension pointer.
void ResetRatio()
Clears the existing ratio.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.