KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVMaterial Class Reference

Detailed Description

Description of physical materials used to construct detectors & targets; interface to range tables.

KVMaterial is a class for describing the properties of physical materials with which charged nuclear species may interact in the course of heavy-ion reactions. It is the base class for all detector and target classes. It provides an easy-to-use interface to range tables and energy loss calculations for charged particles.

The list of available material types depends on the underlying range table: this list can be obtained or visualised like so:

KVMaterial::GetRangeTable()->Print(); // print infos on range table
KVMaterial::GetRangeTable()->GetListOfMaterials()->ls(); // retrieve pointer to list
OBJ: TObjArray TObjArray An array of objects : 0
OBJ: TNamed Silicon Si : 0 at: 0x55a63a979390
OBJ: TNamed Mylar Myl : 0 at: 0x55a63d6a95f0
OBJ: TNamed Plastic NE102 : 0 at: 0x55a63d64ea90
OBJ: TNamed Nickel Ni : 0 at: 0x55a63d6afb90
OBJ: TNamed Octofluoropropane C3F8 : 0 at: 0x55a63a9f8e00
etc. etc.
virtual TObjArray * GetListOfMaterials()=0
virtual void Print(Option_t *="") const
static KVIonRangeTable * GetRangeTable()
void ls(Option_t *option="") const override

Materials can be created in a variety of ways, using either the full name or symbolic name from the previous list:

KVMaterial si("Silicon", 300*KVUnits::um); // 300 microns of silicon
KVMaterial gas("C3F8", 5*KVUnits::cm, 30*KVUnits::mbar); // 5cm of C3F8 at 30mbar pressure
KVMaterial ni_target(350*KVUnits::ug, "Ni") // Nickel with area density 350ug/cm**2
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition KVMaterial.h:94
const long double um
Definition KVUnits.h:68
const long double ug
Definition KVUnits.h:75
const long double cm
Definition KVUnits.h:66
const long double mbar
Definition KVUnits.h:81

Once defined, energy loss calculations can be easily performed:

si.GetDeltaE(2, 4, 50.0); // energy loss of 50MeV alpha particle in 300um of Silicon
ni_target.GetPunchThroughEnergy(6,12); // punch through for 12C ions in 350ug/cm**2 of Nickel

Several methods are also provided in order to deduce either incident energy, \(E_{inc}\), energy loss \(\Delta E\), or residual energy, \(E_{res}=E_{inc}-\Delta E\), from one of the others. All such methods are summarized in the following table:

calculate \(E_{inc}\) calculate \(\Delta E\) calculate \(E_{res}\)
from \(E_{inc}\) - GetDeltaE() GetERes()
GetELostByParticle()
from \(\Delta E\) GetIncidentEnergy() - GetEResFromDeltaE()
from \(E_{res}\) GetIncidentEnergyFromERes() GetDeltaEFromERes() -
GetParticleEIncFromERes()

For more details on the underlying range tables, see Energy Loss & Range Calculations

Definition at line 94 of file KVMaterial.h.

#include <KVMaterial.h>

Inheritance diagram for KVMaterial:

Public Types

enum  SolType { kEmax , kEmin }
 
- Public Types inherited from KVBase
enum  EKaliVedaBits { kIsKaliVedaObject = BIT(23) }
 
- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 

Public Member Functions

 KVMaterial ()
 default ctor
 
 KVMaterial (const Char_t *gas, const Double_t thick, const Double_t pressure, const Double_t temperature=19.0)
 
 KVMaterial (const Char_t *type, const Double_t thick=0.0)
 Create material with given type and linear thickness in cm.
 
 KVMaterial (const KVMaterial &)
 Copy ctor.
 
 KVMaterial (Double_t area_density, const Char_t *type)
 Create material with given area density in \(g/cm^{2}\) and given type.
 
virtual ~KVMaterial ()
 Destructor.
 
virtual void Clear (Option_t *opt="")
 Reset absorber - set stored energy lost by particles in absorber to zero.
 
virtual void Copy (TObject &obj) const
 Make a copy of this material object.
 
virtual void DetectParticle (KVNucleus *, TVector3 *norm=nullptr)
 
virtual TGeoVolumeGetAbsGeoVolume () const
 
virtual KVMaterialGetActiveLayer () const
 
Double_t GetAreaDensity () const
 
virtual Double_t GetDeltaE (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetDeltaEFromERes (Int_t Z, Int_t A, Double_t Eres)
 
Double_t GetDensity () const
 
Double_t GetEffectiveAreaDensity (TVector3 &norm, TVector3 &direction)
 
Double_t GetEffectiveThickness (TVector3 &norm, TVector3 &direction)
 
virtual Double_t GetEIncOfMaxDeltaE (Int_t Z, Int_t A)
 
virtual Double_t GetELostByParticle (KVNucleus *, TVector3 *norm=nullptr)
 
Double_t GetEmaxValid (Int_t Z, Int_t A)
 
virtual Double_t GetEnergyLoss () const
 
virtual Double_t GetERes (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetEResFromDeltaE (Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
 
virtual TGeoMediumGetGeoMedium (const Char_t *="")
 
virtual TGraphGetGraphOfDeltaEVsE (const KVNucleus &nuc, Int_t npts, Double_t Emin, Double_t Emax)
 
virtual Double_t GetIncidentEnergy (Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
 
virtual Double_t GetIncidentEnergyFromERes (Int_t Z, Int_t A, Double_t Eres)
 
virtual Double_t GetLinearRange (Int_t Z, Int_t A, Double_t Einc)
 
Double_t GetMass () const
 
virtual Double_t GetMaxDeltaE (Int_t Z, Int_t A)
 
virtual Double_t GetParticleEIncFromERes (KVNucleus *, TVector3 *norm=nullptr)
 
virtual Double_t GetPressure () const
 
virtual Double_t GetPunchThroughEnergy (Int_t Z, Int_t A)
 
virtual Double_t GetRange (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetTemperature () const
 
virtual Double_t GetThickness () const
 
Double_t GetZ () const
 
void init ()
 
Bool_t IsGas () const
 
Bool_t IsIsotopic () const
 
Bool_t IsNat () const
 
virtual void Print (Option_t *option="") const
 Show information on this material.
 
virtual void SetAbsGeoVolume (TGeoVolume *v)
 
void SetAreaDensity (Double_t dens)
 
virtual void SetEnergyLoss (Double_t e) const
 
void SetMass (Int_t a)
 
virtual void SetMaterial (const Char_t *type)
 
virtual void SetPressure (Double_t)
 
virtual void SetTemperature (Double_t)
 
virtual void SetThickness (Double_t thick)
 
- Public Member Functions inherited from KVBase
 KVBase ()
 Default constructor.
 
 KVBase (const Char_t *name, const Char_t *title="")
 Ctor for object with given name and type.
 
 KVBase (const KVBase &)
 copy ctor
 
virtual ~KVBase ()
 
const Char_tGetLabel () const
 
UInt_t GetNumber () const
 
UInt_t GetNumberOfObjects () const
 
virtual TObjectGetObject () const
 
virtual const Char_tGetType () const
 
Bool_t HasLabel () const
 
virtual Bool_t IsCalled (const Char_t *name) const
 
Bool_t IsLabelled (const Char_t *l) const
 
virtual Bool_t IsType (const Char_t *typ) const
 
virtual void List ()
 
KVBaseoperator= (const KVBase &)
 copy assignment operator
 
Double_t ProtectedGetX (const TF1 *func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) const
 
void SetLabel (const Char_t *lab)
 
virtual void SetNumber (UInt_t num)
 
virtual void SetType (const Char_t *str)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
void Clear (Option_t *option="") override
 
TObjectClone (const char *newname="") const override
 
Int_t Compare (const TObject *obj) const override
 
void Copy (TObject &named) const override
 
virtual void FillBuffer (char *&buffer)
 
const char * GetName () const override
 
const char * GetTitle () const override
 
ULong_t Hash () const override
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 
TNamedoperator= (const TNamed &rhs)
 
void Print (Option_t *option="") const override
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *vp)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, void *vp)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static KVIonRangeTableChangeRangeTable (const Char_t *name)
 
static KVIonRangeTableGetRangeTable ()
 
- Static Public Member Functions inherited from KVBase
static Bool_t AreEqual (Double_t x, Double_t y, Long64_t maxdif=1)
 Comparison between two 64-bit floating-point values.
 
static void BackupFileWithDate (const Char_t *path)
 
static void CombineFiles (const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE)
 
static void Deprecated (const char *method, const char *advice)
 
static Bool_t FindClassSourceFiles (const Char_t *class_name, KVString &imp_file, KVString &dec_file, const Char_t *dir_name=".")
 
static Bool_t FindExecutable (TString &exec, const Char_t *path="$(PATH)")
 
static const Char_tFindFile (const Char_t *search, TString &wfil)
 
static const Char_tGetBINDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetDATABASEFilePath ()
 
static const Char_tGetDATADIRFilePath (const Char_t *namefile="")
 
static Bool_t GetDataSetEnv (const Char_t *dataset, const Char_t *type, Bool_t defval)
 
static const Char_tGetDataSetEnv (const Char_t *dataset, const Char_t *type, const Char_t *defval)
 
static Double_t GetDataSetEnv (const Char_t *dataset, const Char_t *type, Double_t defval)
 
static const Char_tGetETCDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetExampleFilePath (const Char_t *library, const Char_t *namefile)
 Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.)
 
static const Char_tGetINCDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetKVBuildDate ()
 Returns KaliVeda build date.
 
static const Char_tGetKVBuildDir ()
 Returns top-level directory used for build.
 
static const Char_tGetKVBuildTime ()
 Returns KaliVeda build time.
 
static const Char_tGetKVBuildType ()
 Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...)
 
static const Char_tGetKVBuildUser ()
 Returns username of person who performed build.
 
static const Char_tGetKVSourceDir ()
 Returns top-level directory of source tree used for build.
 
static const Char_tGetKVVersion ()
 Returns KaliVeda version string.
 
static const Char_tGetLIBDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetListOfPlugins (const Char_t *base)
 
static const Char_tGetListOfPluginURIs (const Char_t *base)
 
static const Char_tGetPluginURI (const Char_t *base, const Char_t *plugin)
 
static void GetTempFileName (TString &base)
 
static const Char_tGetTEMPLATEDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetWORKDIRFilePath (const Char_t *namefile="")
 
static const Char_tgitBranch ()
 Returns git branch of sources.
 
static const Char_tgitCommit ()
 Returns last git commit of sources.
 
static void InitEnvironment ()
 
static bool is_gnuinstall ()
 
static Bool_t IsThisAPlugin (const TString &uri, TString &base)
 
static TPluginHandlerLoadPlugin (const Char_t *base, const Char_t *uri="0")
 
static Bool_t OpenContextMenu (const char *method, TObject *obj, const char *alt_method_name="")
 
static void OpenTempFile (TString &base, std::ofstream &fp)
 
static void PrintSplashScreen ()
 Prints welcome message and infos on version etc.
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, KVSQLite::database &dbfile, const Char_t *kvsubdir="")
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, std::ifstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0)
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, std::ofstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0)
 
static Bool_t SearchKVFile (const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
 
static const Char_tWorkingDirectory ()
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

Private Attributes

TGeoVolumefAbsorberVolume
 pointer to corresponding volume in ROOT geometry
 
Int_t fAmasr
 isotopic mass of element
 
Double_t fELoss
 total of energy lost by all particles traversing absorber
 
Double_t fPressure
 gas pressure in torr
 
Double_t fTemp
 gas temperature in degrees celsius
 
Double_t fThick
 area density of absorber in g/cm**2
 

Static Private Attributes

static KVIonRangeTablefIonRangeTable = 0x0
 pointer to class used to calculate charged particle ranges & energy losses
 

Additional Inherited Members

- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Member Enumeration Documentation

◆ SolType

Enumerator
kEmax 
kEmin 

Definition at line 111 of file KVMaterial.h.

Constructor & Destructor Documentation

◆ KVMaterial() [1/5]

KVMaterial::KVMaterial ( )

default ctor

Definition at line 77 of file KVMaterial.cpp.

◆ KVMaterial() [2/5]

KVMaterial::KVMaterial ( const Char_t type,
const Double_t  thick = 0.0 
)

Create material with given type and linear thickness in cm.

Definition at line 88 of file KVMaterial.cpp.

◆ KVMaterial() [3/5]

KVMaterial::KVMaterial ( const Char_t gas,
const Double_t  thick,
const Double_t  pressure,
const Double_t  temperature = 19.0 
)

Create gaseous material with given type, linear thickness in cm, pressure in Torr, and temperature in degrees C (default value 19°C).

Examples

KVMaterial("CF4", 15*KVUnits::cm, 1*KVUnits::atm); // 15cm of CF4 gas at 1atm and 19°C
KVMaterial("C3F8", 50*KVUnits::mm, 30*KVUnits::mbar, 25); // 50mm of C3F8 at 30mbar and 25°C
KVMaterial()
default ctor
const long double atm
Definition KVUnits.h:79
const long double mm
Definition KVUnits.h:69

Definition at line 124 of file KVMaterial.cpp.

◆ KVMaterial() [4/5]

KVMaterial::KVMaterial ( Double_t  area_density,
const Char_t type 
)

Create material with given area density in \(g/cm^{2}\) and given type.

Definition at line 102 of file KVMaterial.cpp.

◆ KVMaterial() [5/5]

KVMaterial::KVMaterial ( const KVMaterial obj)

Copy ctor.

Definition at line 149 of file KVMaterial.cpp.

◆ ~KVMaterial()

KVMaterial::~KVMaterial ( )
virtual

Destructor.

Definition at line 273 of file KVMaterial.cpp.

Member Function Documentation

◆ ChangeRangeTable()

KVIonRangeTable * KVMaterial::ChangeRangeTable ( const Char_t name)
static

Changes the default range table used for energy loss calculations.

The name must correspond to a Plugin defined for class KVIonRangeTable - see list given by

KVBase::GetListOfPlugins("KVIonRangeTable")
static const Char_t * GetListOfPlugins(const Char_t *base)
Definition KVBase.cpp:1260

Definition at line 187 of file KVMaterial.cpp.

◆ Clear()

void KVMaterial::Clear ( Option_t opt = "")
virtual

Reset absorber - set stored energy lost by particles in absorber to zero.

Reimplemented from KVBase.

Reimplemented in KVFAZIADetector, KVDetector, and KVTarget.

Definition at line 1247 of file KVMaterial.cpp.

◆ Copy()

void KVMaterial::Copy ( TObject obj) const
virtual

Make a copy of this material object.

Reimplemented from KVBase.

Reimplemented in KVFAZIADetector, KVDetector, and KVTarget.

Definition at line 1259 of file KVMaterial.cpp.

◆ DetectParticle()

void KVMaterial::DetectParticle ( KVNucleus kvp,
TVector3 norm = nullptr 
)
virtual
Parameters
[in]kvppointer to a KVNucleus object describing a charged ion
[in]norm[optional] vector normal to the material, oriented from the origin towards the material

The energy loss \(\Delta E\) of a charged particle traversing the absorber is calculated, and the particle is slowed down by a corresponding amount (the kinetic energy of the KVNucleus object passed as argument will be reduced by \(\Delta E\), possibly to zero).

If the unit normal vector is given, the effective thickness of the material 'seen' by the particle depending on the orientation of its direction of motion with respect to the absorber is used for the calculation, rather than the nominal thickness corresponding to ions impinging perpendicularly.

Reimplemented in KVDetector, and KVTarget.

Definition at line 1210 of file KVMaterial.cpp.

◆ GetAbsGeoVolume()

virtual TGeoVolume * KVMaterial::GetAbsGeoVolume ( ) const
inlinevirtual

Returns pointer to volume representing this absorber in a ROOT geometry.

Definition at line 208 of file KVMaterial.h.

◆ GetActiveLayer()

virtual KVMaterial * KVMaterial::GetActiveLayer ( ) const
inlinevirtual
Returns
nullptr (see overrides in derived classes)

Reimplemented in KVDetector.

Definition at line 185 of file KVMaterial.h.

◆ GetAreaDensity()

Double_t KVMaterial::GetAreaDensity ( ) const

Return area density of material in \(g/cm^{2}\)

auto dens_mgcm2 = mat.GetAreaDensity()/KVUnits::mg; // in mg/cm2
const long double mg
Definition KVUnits.h:74

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 556 of file KVMaterial.cpp.

◆ GetDeltaE()

Double_t KVMaterial::GetDeltaE ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual
Parameters
[in]Zatomic number of incident ion
[in]Amass number of incident ion
[in]Einckinetic energy of incident ion
Returns
Energy lost \(\Delta E\) [MeV] by an ion \(Z, A\) impinging on the absorber with kinetic energy \(E_{inc}\) [MeV]

Reimplemented in KVSilicon, and KVDetector.

Definition at line 835 of file KVMaterial.cpp.

◆ GetDeltaEFromERes()

Double_t KVMaterial::GetDeltaEFromERes ( Int_t  Z,
Int_t  A,
Double_t  Eres 
)
virtual
Parameters
[in]Zatomic number of incident ion
[in]Amass number of incident ion
[in]Eresresidual kinetic energy of ion after impinging on the absorber
Returns
Incident kinetic energy \(E_{inc}\) of an ion \(Z, A\) with given \(E_{res}=E_{inc}-\Delta E\) residual energy

Example of use:

KVMaterial si("Si", 300*KVUnits::um); // 300um silicon absorber
KVNucleus alpha("4He",30); // 30MeV/u alpha particle
si.DetectParticle(&alpha); // particle is slowed by silicon
si.GetEnergyLoss();
(double) 4.1371801 // energy lost by particle in silicon
alpha.GetEnergy();
(double) 115.86282 // residual energy of alpha after silicon
si.GetDeltaEFromERes(2,4,115.86282);
(double) 4.1371801 // energy loss calculated from residual energy
Description of properties and kinematics of atomic nuclei.
Definition KVNucleus.h:126

Reimplemented in KVDetector.

Definition at line 949 of file KVMaterial.cpp.

◆ GetDensity()

Double_t KVMaterial::GetDensity ( ) const

Returns density of material in \(g/cm^{3}\).

auto dens = mat.GetDensity()/(KVUnits::kg/KVUnits::litre); // in kg/litre
const long double litre
Definition KVUnits.h:84
const long double kg
Definition KVUnits.h:73

For a gas, density is calculated from current pressure & temperature according to ideal gas law

\[ \rho = \frac{pM}{RT} \]

with \(M\) the mass of one mole of the gas, and \(R\) the ideal gas constant.

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 421 of file KVMaterial.cpp.

◆ GetEffectiveAreaDensity()

Double_t KVMaterial::GetEffectiveAreaDensity ( TVector3 norm,
TVector3 direction 
)
Parameters
[in]normvector normal to the material, oriented from the origin towards the material
[in]directiondirection of motion of an ion
Returns
effective area density of absorber in \(g/cm^{2}\) as 'seen' in the given direction, taking into account the arbitrary orientation of the normal to the material's surface

Definition at line 723 of file KVMaterial.cpp.

◆ GetEffectiveThickness()

Double_t KVMaterial::GetEffectiveThickness ( TVector3 norm,
TVector3 direction 
)
Parameters
[in]normvector normal to the material, oriented from the origin towards the material
[in]directiondirection of motion of an ion
Returns
effective linear thickness of absorber (in cm) as 'seen' in given direction, taking into account the arbitrary orientation of the normal to the material's surface

Definition at line 700 of file KVMaterial.cpp.

◆ GetEIncOfMaxDeltaE()

Double_t KVMaterial::GetEIncOfMaxDeltaE ( Int_t  Z,
Int_t  A 
)
virtual
Parameters
[in]Z,Aatomic and mass number of impinging ion
Returns
incident energy in MeV for which the \(\Delta E\)- \(E\) curve has a maximum

Reimplemented in KVDetector.

Definition at line 1299 of file KVMaterial.cpp.

◆ GetELostByParticle()

Double_t KVMaterial::GetELostByParticle ( KVNucleus kvn,
TVector3 norm = nullptr 
)
virtual
Parameters
[in]kvppointer to a KVNucleus object describing a charged ion
[in]norm[optional] vector normal to the material, oriented from the origin towards the material
Returns
The energy loss \(\Delta E\) in MeV of a charged particle impinging on the absorber

If the unit normal vector is given, the effective thickness of the material 'seen' by the particle depending on the orientation of its direction of motion with respect to the absorber is used for the calculation, rather than the nominal thickness corresponding to ions impinging perpendicularly.

Reimplemented in KVDetector, and KVTarget.

Definition at line 769 of file KVMaterial.cpp.

◆ GetEmaxValid()

Double_t KVMaterial::GetEmaxValid ( Int_t  Z,
Int_t  A 
)
Parameters
[in]Z,Aatomic & mass numbers of ion
Returns
maximum incident energy [MeV] for which range tables are valid for this material and ion with \(Z,A\).
Note
For detectors, the limit of validity for the material composing the active layer is returned (see KVDetector).

Definition at line 1462 of file KVMaterial.cpp.

◆ GetEnergyLoss()

virtual Double_t KVMaterial::GetEnergyLoss ( ) const
inlinevirtual

Returns total energy loss [MeV] of charged particles in the absorber, which may be defined either by a call to SetEnergyLoss(), either by repeated calls to DetectParticle(). In the latter case, if DetectParticle() is called several times for different charged particles, this method returns the sum of all energy losses for all charged particles.

The total energy loss is set to zero by calling method Clear().

Reimplemented in KVDetector.

Definition at line 144 of file KVMaterial.h.

◆ GetERes()

Double_t KVMaterial::GetERes ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual
Parameters
[in]Zatomic number of incident ion
[in]Amass number of incident ion
[in]Einckinetic energy of incident ion
Returns
Residual energy \(E_{res}=E_{inc}-\Delta E\) in MeV of an ion \(Z, A\) after impinging on the absorber with kinetic energy \(E_{inc}\)

Example of use:

KVMaterial si("Si", 300*KVUnits::um); // 300um silicon absorber
KVNucleus alpha("4He",30); // 30MeV/u alpha particle
si.DetectParticle(&alpha); // particle is slowed by silicon
si.GetEnergyLoss();
(double) 4.1371801 // energy lost by particle in silicon
alpha.GetEnergy();
(double) 115.86282 // residual energy of alpha after silicon
si.GetERes(2,4,120.0);
(double) 115.86282 // residual energy calculated from incident energy

Reimplemented in KVDetector.

Definition at line 1161 of file KVMaterial.cpp.

◆ GetEResFromDeltaE()

Double_t KVMaterial::GetEResFromDeltaE ( Int_t  Z,
Int_t  A,
Double_t  dE = -1.0,
enum SolType  type = kEmax 
)
virtual
Returns
Calculated residual kinetic energy \(E_{res}\) [MeV] of a nucleus \(Z,A\) after the absorber from the energy loss \(\Delta E\) in the absorber. If dE is given, it is used instead of the current energy loss.
Parameters
[in]Z,Aatomic and mass number of nucleus
[in]dE[optional] energy loss of nucleus in absorber
[in]typeDetermine the type of solution to use. Possible values are:
  • SolType::kEmax [default]: solution corresponding to the highest incident energy is returned. This is the solution found for \(E_{inc}\) above that of the maximum of the \(\Delta E(E_{inc})\) curve.
  • SolType::kEmin : low energy solution ( \(E_{inc}\) below maximum of the \(\Delta E(E_{inc})\) curve).

Example of use:

KVMaterial si("Si", 300*KVUnits::um); // 300um silicon absorber
KVNucleus alpha("4He",30); // 30MeV/u alpha particle
si.DetectParticle(&alpha); // particle is slowed by silicon
si.GetEnergyLoss();
(double) 4.1371801 // energy lost by particle in silicon
alpha.GetEnergy();
(double) 115.86282 // residual energy of alpha after silicon
si.GetEResFromDeltaE(2,4);
(double) 115.86282 // residual energy calculated from energy loss
Note
If the energy loss in the absorber is greater than the maximum theoretical \(\Delta E\) - given by GetMaxDeltaE() - then we return the residual energy corresponding to the maximum - given by GetEIncOfMaxDeltaE().
For detectors (see KVDetector), dE is the energy loss \(\Delta E\) only in the active layer, not the total energy lost by the particle crossing the detector; because for detectors with inactive layers \(E_{inc}\geq \Delta E + E_{res}\).

Definition at line 1019 of file KVMaterial.cpp.

◆ GetGeoMedium()

TGeoMedium * KVMaterial::GetGeoMedium ( const Char_t med_name = "")
virtual

By default, return pointer to TGeoMedium corresponding to this KVMaterial.

Parameters
[in]med_name[optional] if it corresponds to the name of an already existing medium, we return a pointer to this medium, or a nullptr if it does not exist.

med_name = "Vacuum" is a special case: if the "Vacuum" does not exist, we create it.

Instance of geometry manager class TGeoManager must be created before calling this method, otherwise nullptr will be returned.

If the required TGeoMedium is not already available in the TGeoManager, we create a new TGeoMedium corresponding to the properties of this KVMaterial. The name of the TGeoMedium (and associated TGeoMaterial) is the name of the KVMaterial.

Note
For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 1358 of file KVMaterial.cpp.

◆ GetGraphOfDeltaEVsE()

TGraph * KVMaterial::GetGraphOfDeltaEVsE ( const KVNucleus nuc,
Int_t  npts,
Double_t  Emin,
Double_t  Emax 
)
virtual
Parameters
[in]nucdefinition of charged particle
[in]nptsnumber of points to use
[in]Eminminimum incident energy \(E\)
[in]Emaxmaximum incident energy \(E\)
Returns
TGraph with the \(\Delta E\)- \(E\) curve for this material for a given charged particle

Definition at line 1436 of file KVMaterial.cpp.

◆ GetIncidentEnergy()

Double_t KVMaterial::GetIncidentEnergy ( Int_t  Z,
Int_t  A,
Double_t  delta_e = -1.0,
enum SolType  type = kEmax 
)
virtual
Returns
Calculated incident energy [MeV] of nucleus \(Z,A\) corresponding to energy loss \(\Delta E\) in this absorber. If delta_e is given, it is used instead of the current energy loss in this absorber.
Parameters
[in]Z,Aatomic and mass number of nucleus
[in]delta_e[optional] energy loss of nucleus in absorber \(\Delta E\) [MeV]
[in]typeDetermine the type of solution to use. Possible values are:
  • SolType::kEmax [default]: solution corresponding to the highest incident energy is returned. This is the solution found for \(E_{inc}\) above that of the maximum of the \(\Delta E(E_{inc})\) curve.
  • SolType::kEmin : low energy solution ( \(E_{inc}\) below maximum of the \(\Delta E(E_{inc})\) curve).

Example of use:

KVMaterial si("Si", 300*KVUnits::um); // 300um silicon absorber
KVNucleus alpha("4He",30); // 30MeV/u alpha particle
si.DetectParticle(&alpha); // particle is slowed by silicon
si.GetEnergyLoss();
(double) 4.1371801 // energy lost by particle in silicon
si.GetIncidentEnergy(2,4);
(double) 120.00000 // incident energy of alpha calculated from energy loss
Note
If the energy loss in the absorber is greater than the maximum theoretical \(\Delta E\) - given by GetMaxDeltaE() - then we return the incident energy corresponding to the maximum - given by GetEIncOfMaxDeltaE().

Reimplemented in KVDetector.

Definition at line 1095 of file KVMaterial.cpp.

◆ GetIncidentEnergyFromERes()

Double_t KVMaterial::GetIncidentEnergyFromERes ( Int_t  Z,
Int_t  A,
Double_t  Eres 
)
virtual
Parameters
[in]Z,Aatomic & mass numbers of incident ion
[in]Eresresidual energy of ion after absorber
Returns
incident energy of ion \(E_{inc}\) [MeV] deduced from residual energy \(E_{res}=E_{inc}-\Delta E\).

Reimplemented in KVDetector, and KVTarget.

Definition at line 1281 of file KVMaterial.cpp.

◆ GetLinearRange()

Double_t KVMaterial::GetLinearRange ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual
Parameters
[in]Zatomic number of incident ion
[in]Amass number of incident ion
[in]Einckinetic energy of incident ion
Returns
linear range in [cm] in absorber for incident nucleus \(Z,A\) with kinetic energy \(E_{inc}\) [MeV]

Different units can be used with KVUnits:

KVMaterial si("Si");
si.GetLinearRange(2,4,13)/KVUnits::um;
(long double) 108.11164L // range in silicon in microns of 13 MeV 4He particles

Reimplemented in KVDetector.

Definition at line 902 of file KVMaterial.cpp.

◆ GetMass()

Double_t KVMaterial::GetMass ( ) const

Returns atomic mass of material.

For detectors, this is the mass of the material composing the active layer (see KVDetector).

Definition at line 305 of file KVMaterial.cpp.

◆ GetMaxDeltaE()

Double_t KVMaterial::GetMaxDeltaE ( Int_t  Z,
Int_t  A 
)
virtual
Returns
The maximum possible energy loss \(\Delta E\) of a nucleus in the absorber
Parameters
[in]Z,Aatomic and mass number of the nucleus
See also
GetEIncOfMaxDeltaE()
Note
For detectors, this is the maximum energy loss in the active layer.

Reimplemented in KVDetector.

Definition at line 1321 of file KVMaterial.cpp.

◆ GetParticleEIncFromERes()

Double_t KVMaterial::GetParticleEIncFromERes ( KVNucleus kvn,
TVector3 norm = nullptr 
)
virtual
Parameters
[in]kvnKVNucleus describing properties of incident ion ( \(Z,A\) and with kinetic energy \(E_{res}\))
[in]norm[optional] vector normal to the material, oriented from the origin towards the material.
Returns
incident energy of ion \(E_{inc}\) [MeV] deduced from residual energy \(E_{res}=E_{inc}-\Delta E\).

If norm is given, the effective thickness of the material 'seen' by the particle depending on its direction of motion is used for the calculation.

Reimplemented in KVDetector, and KVTarget.

Definition at line 804 of file KVMaterial.cpp.

◆ GetPressure()

Double_t KVMaterial::GetPressure ( ) const
virtual

Returns the pressure of a gas (in torr). If the material is not a gas - see IsGas() - value is zero.

auto press_mbar = mat.GetPressure()/KVUnits::mbar; // pressure in mbar

For detectors, the material in question is that of the active layer (see KVDetector).

Reimplemented in KVChIo.

Definition at line 620 of file KVMaterial.cpp.

◆ GetPunchThroughEnergy()

Double_t KVMaterial::GetPunchThroughEnergy ( Int_t  Z,
Int_t  A 
)
virtual
Parameters
[in]Z,Aatomic & mass numbers of ion
Returns
incident energy \(E_{inc}\) [MeV] for which ion \(Z,A\) has a range equal to the thickness of this absorber (see GetRange(), GetLinearRange()).

Reimplemented in KVDetector.

Definition at line 1480 of file KVMaterial.cpp.

◆ GetRange()

Double_t KVMaterial::GetRange ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual
Parameters
[in]Zatomic number of incident ion
[in]Amass number of incident ion
[in]Einckinetic energy of incident ion
Returns
range in [ \(g/cm^2\)] in absorber for incident nucleus \(Z,A\) with kinetic energy \(E_{inc}\) [MeV]

Different units can be used with KVUnits:

KVMaterial si("Si");
si.GetRange(2,4,13)/KVUnits::mg;
(long double) 25.190011L // range in silicon in mg/cm2 of 13 MeV 4He particles

Reimplemented in KVDetector.

Definition at line 865 of file KVMaterial.cpp.

◆ GetRangeTable()

KVIonRangeTable * KVMaterial::GetRangeTable ( )
static

Static method

Returns
pointer to currently used range table

Definition at line 166 of file KVMaterial.cpp.

◆ GetTemperature()

Double_t KVMaterial::GetTemperature ( ) const
virtual

Returns temperature of material in degrees celsius (only gaseous materials).

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 680 of file KVMaterial.cpp.

◆ GetThickness()

Double_t KVMaterial::GetThickness ( ) const
virtual

Returns the linear thickness of the material in cm. Use KVUnits to translate from one unit to another, e.g.

auto micro_thick = mat.GetThickness()/KVUnits::um; thickness in microns

For detectors, the material in question is that of the active layer (see KVDetector).

Reimplemented in KVSilicon, and KVTarget.

Definition at line 487 of file KVMaterial.cpp.

◆ GetZ()

Double_t KVMaterial::GetZ ( ) const

Returns atomic number of material.

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 393 of file KVMaterial.cpp.

◆ init()

void KVMaterial::init ( void  )

Default initialisations.

No properties are set for the material (except standard temperature (19°C) and pressure (1 atm)).

Default range table is generated if not already done. By default it is the VEDALOSS table implemented in KVedaLoss. You can change this by changing the value of environment variable KVMaterial.IonRangeTable or by calling static method ChangeRangeTable() before creating any materials.

Definition at line 50 of file KVMaterial.cpp.

◆ IsGas()

Bool_t KVMaterial::IsGas ( ) const

Returns kTRUE for gaseous material.

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 374 of file KVMaterial.cpp.

◆ IsIsotopic()

Bool_t KVMaterial::IsIsotopic ( ) const

Returns kTRUE if a specific isotope has been chosen for the material using SetMass(), e.g.

  • for \({}^{119}Sn\) this method returns kTRUE
  • for \({}^{nat}Sn\) this method returns kFALSE

For detectors, the material in question is that of the active layer (see KVDetector).

See also
IsNat()

Definition at line 327 of file KVMaterial.cpp.

◆ IsNat()

Bool_t KVMaterial::IsNat ( ) const

Returns kFALSE if a specific isotope has been chosen for the material using SetMass() e.g.

  • for \({}^{119}Sn\) this method returns kFALSE
  • for \({}^{nat}Sn\) this method returns kTRUE

For detectors, the material in question is that of the active layer (see KVDetector).

See also
IsIsotopic()

Definition at line 352 of file KVMaterial.cpp.

◆ Print()

void KVMaterial::Print ( Option_t option = "") const
virtual

Show information on this material.

Reimplemented from KVBase.

Reimplemented in KVTarget, and KVDetector.

Definition at line 742 of file KVMaterial.cpp.

◆ SetAbsGeoVolume()

virtual void KVMaterial::SetAbsGeoVolume ( TGeoVolume v)
inlinevirtual

Link this material to a volume in a ROOT geometry

Definition at line 203 of file KVMaterial.h.

◆ SetAreaDensity()

void KVMaterial::SetAreaDensity ( Double_t  dens)

Set area density in \(g/cm^{2}\).

For solids, area density can only be changed by changing the thickness of the material.

For gases, the density depends on temperature and pressure - see GetDensity(). This method leaves temperature and pressure unchanged, therefore for gases also this method will effectively modify the linear dimension of the gas cell.

mat.SetAreaDensity(500*KVUnits::ug); // set density in microgram/cm2

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 523 of file KVMaterial.cpp.

◆ SetEnergyLoss()

virtual void KVMaterial::SetEnergyLoss ( Double_t  e) const
inlinevirtual

Define the total energy loss [MeV] of charged particles in the absorber

See also
GetEnergyLoss()

Reimplemented in KVDetector.

Definition at line 154 of file KVMaterial.h.

◆ SetMass()

void KVMaterial::SetMass ( Int_t  a)

Define a specific isotopic mass for the material, e.g. for isotopically pure targets.

For detectors, this changes the mass of the material composing the active layer (see KVDetector).

Definition at line 285 of file KVMaterial.cpp.

◆ SetMaterial()

void KVMaterial::SetMaterial ( const Char_t mat_type)
virtual

Intialise material of a given type, which must exist in the currently used range table.

The list of available material types depends on the underlying range table: this list can be obtained or visualised like so:

KVMaterial::GetRangeTable()->Print(); // print infos on range table
KVMaterial::GetRangeTable()->GetListOfMaterials()->ls(); // retrieve pointer to list
OBJ: TObjArray TObjArray An array of objects : 0
OBJ: TNamed Silicon Si : 0 at: 0x55a63a979390
OBJ: TNamed Mylar Myl : 0 at: 0x55a63d6a95f0
OBJ: TNamed Plastic NE102 : 0 at: 0x55a63d64ea90
OBJ: TNamed Nickel Ni : 0 at: 0x55a63d6afb90
OBJ: TNamed Octofluoropropane C3F8 : 0 at: 0x55a63a9f8e00
etc. etc.

For materials which are elements of the periodic table you can specify the isotope such as "64Ni", "13C", "natSn", etc. etc.

Reimplemented in KVDetector, and KVTarget.

Definition at line 225 of file KVMaterial.cpp.

◆ SetPressure()

void KVMaterial::SetPressure ( Double_t  p)
virtual

Set the pressure of a gaseous material (in torr). The linear dimension (thickness) is kept constant, the area density changes.

mat.SetPressure(50*KVUnits::mbar); // set pressure to 50mbar

For detectors, the material in question is that of the active layer (see KVDetector).

Reimplemented in KVChIo.

Definition at line 583 of file KVMaterial.cpp.

◆ SetTemperature()

void KVMaterial::SetTemperature ( Double_t  t)
virtual

Set temperature of material in degrees celsius.

This only has an effect on gaseous materials, where the resulting change in density changes the area density of the absorber (for fixed linear dimension).

See also
GetDensity()

For detectors, the material in question is that of the active layer (see KVDetector).

Definition at line 649 of file KVMaterial.cpp.

◆ SetThickness()

void KVMaterial::SetThickness ( Double_t  t)
virtual

Set the linear thickness of the material in cm, e.g.

SetThickness( 30.*KVUnits::um ); set thickness to 30 microns
virtual void SetThickness(Double_t thick)

For detectors, the material in question is that of the active layer (see KVDetector).

Reimplemented in KVINDRADetector, KVSilicon, and KVDetector.

Definition at line 454 of file KVMaterial.cpp.

Member Data Documentation

◆ fAbsorberVolume

TGeoVolume* KVMaterial::fAbsorberVolume
private

pointer to corresponding volume in ROOT geometry

Definition at line 99 of file KVMaterial.h.

◆ fAmasr

Int_t KVMaterial::fAmasr
private

isotopic mass of element

Definition at line 104 of file KVMaterial.h.

◆ fELoss

Double_t KVMaterial::fELoss
mutableprivate

total of energy lost by all particles traversing absorber

Definition at line 108 of file KVMaterial.h.

◆ fIonRangeTable

KVIonRangeTable * KVMaterial::fIonRangeTable = 0x0
staticprivate

pointer to class used to calculate charged particle ranges & energy losses

Definition at line 97 of file KVMaterial.h.

◆ fPressure

Double_t KVMaterial::fPressure
private

gas pressure in torr

Definition at line 106 of file KVMaterial.h.

◆ fTemp

Double_t KVMaterial::fTemp
private

gas temperature in degrees celsius

Definition at line 107 of file KVMaterial.h.

◆ fThick

Double_t KVMaterial::fThick
private

area density of absorber in g/cm**2

Definition at line 105 of file KVMaterial.h.