71 "Calculation of range and energy loss of charged particles in matter using VEDALOSS range tables")
77 Error(
"KVedaLoss",
"Problem reading range tables. Do not use.");
108 Info(
"init_materials",
"Initialising KVedaLoss...");
115 Error(
"init_materials()",
"Range tables file %s not found",
gEnv->
GetValue(
"KVedaLoss.RangeTables",
"kvloss.data"));
142 Char_t name[25], gtype[25], state[10];
151 if (!(fp = fopen(DataFilePath,
"r"))) {
152 Error(
"init_materials()",
"Range tables file %s cannot be opened", DataFilePath);
157 while (fgets(
line, 132, fp)) {
166 if (sscanf(
line,
"+ %s %s %s %f %f %f %f %f",
167 gtype, name, state, &Dens, &Zmat, &Amat,
170 Error(
"init_materials()",
"Problem reading file %s", DataFilePath);
219 if (yanez->GetMaterial(name)) {
KVIonRangeTableMaterial * M
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
static const Char_t * GetWORKDIRFilePath(const Char_t *namefile="")
const Char_t * GetType() const
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
Extended version of ROOT THashList.
Material for use in energy loss & range calculations.
virtual void Initialize()
void SetTemperatureAndPressure(Double_t T, Double_t P)
Abstract base class for calculation of range & energy loss of charged particles in matter.
KVIonRangeTableMaterial * GetMaterial(const Char_t *material) const
Returns pointer to material of given name or type.
static KVIonRangeTable * GetRangeTable(const Char_t *name)
Generates an instance of the KVIonRangeTable plugin class corresponding to given name.
virtual void SetOwner(Bool_t enable=kTRUE)
virtual TObject * FindObjectByType(const Char_t *) const
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Extension of ROOT TSystemDirectory class, handling browsing directories on disk.
virtual TList * GetListOfFiles() const
Extended ROOT TSystemFile with added info on file size etc.
const Char_t * GetFullPath() const
Description of material in the KVedaLoss range table.
static void SetNoLimits(Bool_t on=kTRUE)
Bool_t ReadRangeTable(FILE *fp)
static Bool_t CheckIon(Int_t Z)
Fit a range table using the VEDALOSS functional.
void SetMaterial(KVIonRangeTableMaterial *m)
Sets range table to fit. Also finds material with closest Z in VEDALOSS library.
void DoFits(TString output_file, Int_t Zmin=1, Int_t Zmax=100)
Perform fits to range tables for elements from Zmin to Zmax.
C++ implementation of VEDALOSS stopping power calculation.
KVIonRangeTableMaterial * AddCompoundMaterial(const Char_t *, const Char_t *, Int_t, Int_t *, Int_t *, Int_t *, Double_t=-1.0) const
Use the RANGE tables to generate a new compound material.
TObjArray * GetListOfMaterials()
Bool_t init_materials() const
KVIonRangeTableMaterial * GetMaterialWithNameOrType(const Char_t *material) const
Returns pointer to material of given name or type.
KVedaLoss()
Default constructor.
virtual ~KVedaLoss()
Destructor.
static KVHashList * fMaterials
static list of all known materials
KVIonRangeTableMaterial * AddElementalMaterial(Int_t Z, Int_t A=0) const
TString fLocalMaterialsDirectory
void AddMaterial(KVIonRangeTableMaterial *) const
Bool_t ReadMaterials(const Char_t *path) const
Read and add range tables for materials in file.
Bool_t CheckIon(Int_t Z, Int_t A) const
KVIonRangeTableMaterial * AddMixedMaterial(const Char_t *, const Char_t *, Int_t, Int_t *, Int_t *, Int_t *, Double_t *, Double_t=-1.0) const
Use the RANGE tables to generate a new mixed material.
Bool_t AddRANGEMaterial(const Char_t *name) const
If the given material is defined in the RANGE tables, import it into VEDALOSS.
static Bool_t fgNewRangeInversion
static flag for using new KVedaLossInverseRangeFunction
static void SetIgnoreEnergyLimits(Bool_t yes=kTRUE)
void Print(Option_t *="") const
Bool_t CheckMaterialsList() const
virtual void ls(Option_t *option="") const
void SetName(const char *name)
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
virtual const char * GetValue(const char *name, const char *dflt) const
virtual const char * GetName() const
virtual const char * GetTitle() const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
TString & ReplaceAll(const char *s1, const char *s2)
virtual int Chmod(const char *file, UInt_t mode)
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)