19#include "KVMaterial.h"
28#include "KVIonRangeTable.h"
30#include <KVValueRange.h>
153#if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
200 ::Error(
"KVMaterial::ChangeRangeTable",
"No plugin %s defined for KVIonRangeTable",
name);
251 if (sscanf(mat_type,
"nat%s",
type) != 1) {
252 if (sscanf(mat_type,
"%d%s", &iso_mass,
type) != 2) {
253 strcpy(
type, mat_type);
256 if (iso_mass)
SetMass(iso_mass);
260 "Called for material %s which is unknown in current range table %s. Energy loss & range calculations impossible.",
594 if (!
IsGas())
return;
631 if (!
IsGas())
return 0.0;
659 if (!
IsGas())
return;
745 cout <<
"KVMaterial: " <<
GetName() <<
" (" <<
GetType() <<
")" << endl;
747 cout <<
" Pressure " <<
GetPressure() <<
" torr" << endl;
750 cout <<
"-----------------------------------------------" << endl;
751 cout <<
" Z = " <<
GetZ() <<
" atomic mass = " <<
GetMass() << endl;
752 cout <<
" Density = " <<
GetDensity() <<
" g/cm**3" << endl;
753 cout <<
"-----------------------------------------------" << endl;
842 if (Z < 1)
return 0.;
879 if (Z < 1)
return 0.;
917 if (Z < 1)
return 0.;
973 if (Z < 1)
return 0.;
975 GetLinearDeltaEFromEResOfIon(
1127 if (Z < 1)
return 0.;
1185 if (Z < 1)
return 0.;
1230 cout <<
"detectparticle in material " <<
GetType() <<
" of thickness "
1254#if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
1268 ((
KVMaterial&) obj).SetPressure(GetPressure());
1269 ((
KVMaterial&) obj).SetTemperature(GetTemperature());
1270 ((
KVMaterial&) obj).SetThickness(GetThickness());
1286 if (Z < 1)
return 0.;
1304 if (Z < 1)
return 0.;
1332 if (Z < 1)
return 0.;
1378 if (strcmp(med_name,
"")) {
1380 if (gmed)
return gmed;
1381 else if (!strcmp(med_name,
"Vacuum")) {
1405 if (gmed)
return gmed;
1420 static Int_t numed = 1;
1446 for (
int i = 0; i < npts; ++i) {
1447 auto E =
R.ValueIofN(i, npts);
winID h TVirtualViewer3D TVirtualGLPainter p
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 g
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 type
R__EXTERN TGeoManager * gGeoManager
Base class for KaliVeda framework.
virtual void SetType(const Char_t *str)
virtual void Copy(TObject &) const
Make a copy of this object.
virtual const Char_t * GetType() const
Abstract base class for calculation of range & energy loss of charged particles in matter.
virtual Bool_t IsMaterialGas(const Char_t *)
Return kTRUE if material is gaseous.
virtual Double_t GetLinearEIncFromDeltaEOfIon(const Char_t *mat, Int_t Z, Int_t A, Double_t DeltaE, Double_t e, enum SolType type=kEmax, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual const Char_t * GetMaterialName(const Char_t *)
Return name of material of given type or name if it is in range tables.
virtual Double_t GetAtomicMass(const Char_t *)
Returns atomic mass of a material in the range tables.
virtual Double_t GetRangeOfIon(const Char_t *mat, Int_t Z, Int_t A, Double_t E, Double_t Amat=0., Double_t T=-1., Double_t P=-1.)
virtual Double_t GetEResOfIon(const Char_t *mat, Int_t Z, Int_t A, Double_t E, Double_t r, Double_t Amat=0., Double_t T=-1., Double_t P=-1.)
static KVIonRangeTable * GetRangeTable(const Char_t *name)
Generates an instance of the KVIonRangeTable plugin class corresponding to given name.
virtual TGeoMaterial * GetTGeoMaterial(const Char_t *material)
Create and return pointer to TGeoMaterial/Mixture corresponding to material.
virtual Double_t GetZ(const Char_t *)
Returns atomic number of a material in the range tables.
virtual Double_t GetEmaxValid(const Char_t *material, Int_t Z, Int_t A)
virtual Double_t GetLinearPunchThroughEnergy(const Char_t *mat, Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual Bool_t IsMaterialKnown(const Char_t *)
Return kTRUE if material is in range tables.
virtual Double_t GetLinearDeltaEOfIon(const Char_t *mat, Int_t Z, Int_t A, Double_t E, Double_t d, Double_t Amat=0., Double_t T=-1., Double_t P=-1.)
virtual void SetTemperatureAndPressure(const Char_t *, Double_t temperature, Double_t pressure)
virtual Double_t GetDensity(const Char_t *)
Returns density (g/cm**3) of a material in the range tables.
virtual Double_t GetLinearRangeOfIon(const Char_t *mat, Int_t Z, Int_t A, Double_t E, Double_t Amat=0., Double_t T=-1., Double_t P=-1.)
Description of physical materials used to construct detectors & targets; interface to range tables.
virtual Double_t GetPressure() const
virtual void SetPressure(Double_t)
virtual void Copy(TObject &obj) const
Make a copy of this material object.
virtual void SetTemperature(Double_t)
Double_t GetEffectiveAreaDensity(TVector3 &norm, TVector3 &direction)
virtual void SetThickness(Double_t thick)
virtual Double_t GetThickness() const
Double_t GetDensity() const
Double_t fThick
area density of absorber in g/cm**2
virtual KVMaterial * GetActiveLayer() const
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
static KVIonRangeTable * GetRangeTable()
virtual Double_t GetEnergyLoss() const
virtual void Print(Option_t *option="") const
Show information on this material.
Int_t fAmasr
isotopic mass of element
Double_t GetEmaxValid(Int_t Z, Int_t A)
TGeoVolume * fAbsorberVolume
pointer to corresponding volume in ROOT geometry
virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
Double_t fELoss
total of energy lost by all particles traversing absorber
virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A)
virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A)
virtual Double_t GetEResFromDeltaE(Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A)
static KVIonRangeTable * ChangeRangeTable(const Char_t *name)
void SetAreaDensity(Double_t dens)
Double_t GetAreaDensity() const
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=nullptr)
Double_t fTemp
gas temperature in degrees celsius
virtual TGraph * GetGraphOfDeltaEVsE(const KVNucleus &nuc, Int_t npts, Double_t Emin, Double_t Emax)
Double_t fPressure
gas pressure in torr
virtual void DetectParticle(KVNucleus *, TVector3 *norm=nullptr)
virtual Double_t GetTemperature() const
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
virtual void SetMaterial(const Char_t *type)
virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres)
static KVIonRangeTable * fIonRangeTable
pointer to class used to calculate charged particle ranges & energy losses
virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc)
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=nullptr)
virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc)
virtual void Clear(Option_t *opt="")
Reset absorber - set stored energy lost by particles in absorber to zero.
virtual ~KVMaterial()
Destructor.
virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc)
Bool_t IsIsotopic() const
Double_t GetEffectiveThickness(TVector3 &norm, TVector3 &direction)
virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc)
Description of properties and kinematics of atomic nuclei.
Int_t GetZ() const
Return the number of proton / atomic number.
TVector3 * GetPInitial() const
TVector3 GetMomentum() const
void SetKE(Double_t ecin)
void SetE0(TVector3 *e=0)
Range of values specified by minimum, maximum.
virtual const char * GetValue(const char *name, const char *dflt) const
TGeoMedium * GetMedium(const char *medium) const
TGeoMaterial * GetMaterial(const char *matname) const
void SetPressure(Double_t pressure)
void SetTransparency(Char_t transparency=0)
void SetTemperature(Double_t temperature)
virtual void SetTitle(const char *title="")
const char * GetName() const override
virtual void SetName(const char *name)
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
void Form(const char *fmt,...)
Type GetType(const std::string &Name)
Double_t Max(Double_t a, Double_t b)