REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
A specific metadata class to generate and read gas files using Magboltz interface
This metadata class allows to define an arbitrary gas mixture. TRestDetectorGas provides access to different gas properties, such as drift velocity, diffusion, townsend coefficients, etc. TRestDetectorGas is a re-implementation of Garfield::MediumMagboltz allowing to generate or read gas Magboltz files, from which the gas properties are extracted.
This class defines metadata members that can be used to define a gas mixture of any number of components, the gas conditions, as pressure or temperature, and few other parameters required by Garfield to perform the gas properties calculation.
The following code shows an example of the implementation of the TRestDetectorGas section definition in an RML file.
All those parameters are required for the Magboltz calculation. Any number of gas components can be defined by adding new gasComponent lines to the TRestDetectorGas section, assuring first that the addition of the gas fractions equals 1. Any gas component defined at the gases table in the Garfield++ user guide can be used in REST. We use the same gas component name convention.
The calculation of the gas properties is computationally expensive and time consuming. In order to avoid this calculation, we keep some gas files containing the summary of the gas properties inside the directory inputdata/gasFiles. These files cover different conditions of gas and can be used if a new TRestDetectorGas object meets the condition among one of them. The TRestDetectorGas sections that were used to generate those gas files can be found at $REST_PATH/data/definitions/gases.rml.
Gas files will be searched by TRestDetectorGas in the paths that can be defined inside our main RML file through the section "searchPath" at the globals section (see TRestMetadata description for additional details).
If no gas files are found meets the current gas conditon, TRestDetectorGas will perform a single E calculation in the next Get() method, including GetDriftVelocity()/GetLongitudinalDiffusion(), etc. This usually takes several minutes. After the calculation, Get() methods can quickly return the result if input drift field doesn't change.
In the new verison, we save TRestDetectorGas together with the gas file(as a TString). So when retrieved from a root file, TRestDetectorGas is immediately ready after calling the method InitFromRootFile(). This makes "importMetadata" much easier in TRestRun. So we recommend to migrate gasFiles to root files.
The most common use of TRestDetectorGas starts by creating an instance of TRestDetectorGas giving as argument the RML configuration file and the name of the TRestDetectorGas section describing the gas we are willing to use in our event processing.
where GasName must be an existing TRestDetectorGas section with that name, GasName could be for example Xenon 10-10E3Vcm, found at gases.rml.
By default, the gas generation is disabled. So that we are warned by default of the inexistence of a pre-generated gas file. To force the generation of a gas file (requiring few hours of computation time), we can specify it at construction time as follows.
Once the gas file has been generated we can use it directly calling to the same RML gas section used to generate it.
we can then modify some gas conditions as, i.e. the pressure,
then we could get the gas mixture properties, as drift velocity, or diffusion coefficients, at 5 bar by using
RESTsoft - Software for Rare Event Searches with TPCs
History of developments:
jan 2006: first concept (as MagboltzGas) Igor G. Irastorza
jul 2006: minor improvements for inclusion in RESTSoft (renamed as TMagboltzGas) Igor G. Irastorza
jul 2007: added a 3-compounds gas mixture constructor A. Tomas
apr 2012: minimal modifications for inclusion in new RESTSoft scheme A. Tomas
jun 2014: change name to TRestDetectorGas and minimal modifications for inclusion in new RESTSoft scheme Igor G. Irastorza
aug 2015: Major revision to introduce into REST v2.0. MediumMagboltz from Garfield++ is used now
Definition at line 63 of file TRestDetectorGas.h.
#include <TRestDetectorGas.h>
Public Member Functions | |
void | CalcGarField (double Emin, double Emax, int n) |
ClassDefOverride (TRestDetectorGas, 3) | |
void | EnableGasGeneration () |
std::string | FindGasFile (std::string name) |
This method tries to find the gas filename given in the argument. More... | |
bool | GasFileGenerationEnabled () const |
Returns true if the file generation is enabled. False otherwise. | |
bool | GasFileLoaded () const |
Returns true if the gas file has been properly loaded. False otherwise. | |
Double_t | GetAttachmentCoefficient () override |
Double_t | GetDriftVelocity () override |
Returns the drift velocity in mm/us. | |
Double_t | GetGasComponentFraction (Int_t n) |
Returns the gas fraction in volume for component n. | |
TString | GetGasComponentName (Int_t n) |
Returns the gas component n. | |
MediumMagboltz * | GetGasMedium () const |
Return pointer to Garfield::MediumGas for gas properties. | |
TString | GetGasMixture () |
Returns a string defining the gas components and fractions. | |
void | GetGasWorkFunction () |
TString | GetGDMLMaterialRef () const |
Return reference name of the corresponding material in GDML file. | |
Double_t | GetLongitudinalDiffusion () override |
Returns the longitudinal diffusion in (cm)^1/2. | |
Double_t | GetMaxElectronEnergy () const |
Int_t | GetNofGases () const |
Returns the number of gas elements/compounds present in the gas mixture. | |
Double_t | GetTownsendCoefficient () override |
Double_t | GetTransversalDiffusion () override |
Returns the transversal diffusion in (cm)^1/2. | |
void | InitFromRootFile () override |
Method called after the object is retrieved from root file. | |
void | Initialize () override |
Defines the metadata section name and initalizes the TRestDetectorGas members. | |
void | LoadGasFile () |
It loads a pre-generated gas file corresponding to the gas defined using the RML TRestDetectorGas section. More... | |
void | PlotDriftVelocity (Double_t eMin, Double_t eMax, Int_t nSteps) |
It creates a TCanvas where it plots the drift velocity as a function of the electric field. More... | |
void | PlotLongitudinalDiffusion (Double_t eMin, Double_t eMax, Int_t nSteps) |
It creates a TCanvas where it plots the longitudinal diffusion as a function of the electric field. More... | |
void | PlotTownsendCoefficient (Double_t eMin, Double_t eMax, Int_t nSteps) |
It creates a TCanvas where it plots the townsend coefficient as a function of the electric field. More... | |
void | PlotTransversalDiffusion (Double_t eMin, Double_t eMax, Int_t nSteps) |
It creates a TCanvas where it plots the transversal diffusion as a function of the electric field. More... | |
void | PrintGasFileContent () |
void | PrintGasInfo () |
Prints the metadata information from the gas. | |
void | PrintMetadata () override |
Prints the metadata information from the gas. | |
void | SetMaxElectronEnergy (Double_t energy) |
Sets the maximum electron energy to be used in gas generation. | |
void | SetPressure (Double_t pressure) override |
Defines the pressure of the gas. More... | |
void | SetTemperature (Double_t temperature) override |
Defines the temperature of the gas. | |
TRestDetectorGas () | |
TRestDetectorGas default constructor. | |
TRestDetectorGas (const char *configFilename, std::string name="", bool gasGeneration=false, bool test=false) | |
TRestDetectorGas constructor loading data from a config file. More... | |
Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) override |
overwriting the write() method with fStore considered | |
~TRestDetectorGas () | |
TRestDetectorGas default destructor. | |
Public Member Functions inherited from TRestDetectorDriftVolume | |
ClassDefOverride (TRestDetectorDriftVolume, 1) | |
virtual Double_t | GetElectricField () const |
Returns the electric field in V/mm. | |
virtual Double_t | GetElectronLifeTime () |
virtual std::string | GetMaterial () const |
virtual Double_t | GetPressure () const |
virtual Double_t | GetTemperature () const |
virtual Double_t | GetW () const |
virtual Double_t | GetWvalue () const |
virtual void | SetAttachmentCoefficient (double value) |
virtual void | SetDriftVelocity (double value) |
virtual void | SetElectricField (double value) |
Sets the electric field. Must be given in V/mm. | |
virtual void | SetElectronLifeTime (double value) |
virtual void | SetLongitudinalDiffusion (double value) |
virtual void | SetMaterial (std::string value) |
virtual void | SetPressure (double value) |
virtual void | SetTemperature (double value) |
virtual void | SetTownsendCoefficient (double value) |
virtual void | SetTransversalDiffusion (double value) |
virtual void | SetW (double value) |
Sets the electric field of the drift volume. Given in V/mm. | |
TRestDetectorDriftVolume (const char *configFilename, std::string name="") | |
virtual void | UpdateCondition () |
Public Member Functions inherited from TRestMetadata | |
void | AddLog (std::string log="", bool print=true) |
Add logs to messageBuffer. | |
void | DoNotStore () |
If this method is called the metadata information will not be stored in disk. | |
TVector2 | Get2DVectorParameterWithUnits (std::string parName, TVector2 defaultValue=TVector2(-1, -1)) |
TVector3 | Get3DVectorParameterWithUnits (std::string parName, TVector3 defaultValue=TVector3(-1, -1, -1)) |
TString | GetCommit () |
Returns the REST commit value stored in fCommit. | |
std::string | GetConfigBuffer () |
Returns the config section of this class. | |
std::string | GetDataMemberValue (std::string memberName) |
Get the value of data member as string. More... | |
std::vector< std::string > | GetDataMemberValues (std::string memberName, Int_t precision=0) |
Get the value of datamember as a vector of strings. More... | |
TString | GetDataPath () |
Returns a std::string with the path used for data storage. | |
Double_t | GetDblParameterWithUnits (std::string parName, Double_t defaultValue=PARAMETER_NOT_FOUND_DBL) |
Gets the value of the parameter name parName, after applying unit conversion. More... | |
Bool_t | GetError () const |
It returns true if an error was identified by a derived metadata class. | |
TString | GetErrorMessage () |
Returns a std::string containing the error message. | |
TString | GetLibraryVersion () |
Returns the REST libraty version stored in fLibraryVersion. | |
TString | GetMainDataPath () |
Gets a std::string with the path used for data storage. | |
Int_t | GetNumberOfErrors () const |
Int_t | GetNumberOfWarnings () const |
std::string | GetParameter (std::string parName, TString defaultValue=PARAMETER_NOT_FOUND_STR) |
Returns corresponding REST Metadata parameter from multiple sources. More... | |
std::string | GetSectionName () |
Returns the section name of this class, defined at the beginning of fSectionName. | |
TRestStringOutput::REST_Verbose_Level | GetVerboseLevel () |
returns the verboselevel in type of REST_Verbose_Level enumerator | |
TString | GetVerboseLevelString () |
returns the verbose level in type of TString More... | |
TString | GetVersion () |
Returns the REST version stored in fVersion. | |
Int_t | GetVersionCode () |
UInt_t | GetVersionMajor () const |
UInt_t | GetVersionMinor () const |
UInt_t | GetVersionPatch () const |
Bool_t | GetWarning () const |
It returns true if an error was identified by a derived metadata class. | |
TString | GetWarningMessage () |
Returns a std::string containing the warning message. | |
TRestMetadata * | InstantiateChildMetadata (int index, std::string pattern="") |
This method will retrieve a new TRestMetadata instance of a child element of the present TRestMetadata instance based on the index given by argument, which defines the element order to be retrieved, 0 for first element found, 1 for the second element found, etc. More... | |
TRestMetadata * | InstantiateChildMetadata (std::string pattern="", std::string name="") |
This method will retrieve a new TRestMetadata instance of a child element of the present TRestMetadata instance based on the name given by argument. More... | |
Bool_t | isCleanState () const |
Bool_t | isOfficialRelease () const |
Int_t | LoadConfigFromBuffer () |
Initialize data from a string element buffer. More... | |
Int_t | LoadConfigFromElement (TiXmlElement *eSectional, TiXmlElement *eGlobal, std::map< std::string, std::string > envs={}) |
Main starter method. More... | |
Int_t | LoadConfigFromFile (const std::string &configFilename, const std::string §ionName="") |
Give the file name, find out the corresponding section. Then call the main starter. | |
virtual void | Merge (const TRestMetadata &) |
TRestMetadata & | operator= (const TRestMetadata &) |
void | Print () |
Implementing TObject::Print() method. | |
void | PrintConfigBuffer () |
Print the config xml section stored in the class. More... | |
void | PrintMessageBuffer () |
Print the buffered message. | |
void | PrintTimeStamp (Double_t timeStamp) |
Print the current time on local machine. More... | |
void | SetConfigFile (std::string configFilename) |
set config file path from external | |
void | SetError (std::string message="", bool print=true, int maxPrint=5) |
A metadata class may use this method to signal that something went wrong. | |
void | SetHostmgr (TRestManager *m) |
Set the host manager for this class. | |
void | SetSectionName (std::string sName) |
set the section name, clear the section content | |
void | SetVerboseLevel (TRestStringOutput::REST_Verbose_Level v) |
sets the verbose level | |
void | SetWarning (std::string message="", bool print=true, int maxPrint=5) |
A metadata class may use this method to signal that something went wrong. | |
void | Store () |
If this method is called the metadata information will be stored in disk. | |
TRestMetadata (const TRestMetadata &) | |
virtual void | UpdateMetadataMembers () |
Method to allow implementation of specific metadata members updates at inherited classes. | |
void | WriteConfigBuffer (std::string fName) |
Writes the config buffer to a file in append mode. | |
~TRestMetadata () | |
TRestMetadata default destructor. | |
Private Member Functions | |
void | AddGasComponent (std::string gasName, Double_t fraction) |
Adds a new element/compound to the gas. More... | |
std::string | ConstructFilename () |
Constructs the filename of the pre-generated gas file using the members defined in the RML file. More... | |
void | GenerateGasFile () |
Save a gas file with a structured file name. | |
Double_t | GetAttachmentCoefficient (Double_t E) |
It returns the attachment coefficient for a given electric field in V/cm. | |
Double_t | GetDriftVelocity (Double_t E) |
It returns the drift velocity in cm/us for a given electric field in V/cm. | |
Double_t | GetLongitudinalDiffusion (Double_t E) |
It returns the longitudinal diffusion in (cm)^1/2 for a given electric field in V/cm. | |
Double_t | GetTownsendCoefficient (Double_t E) |
It returns the townsend coefficient for a given electric field in V/cm. | |
Double_t | GetTransversalDiffusion (Double_t E) |
It returns the transversal diffusion in (cm)^1/2 for a given electric field in V/cm. | |
void | InitFromConfigFile () override |
Loads the gas parameters that define the gas calculation and properties. More... | |
void | UploadGasToServer (std::string gasFilename) |
Private Attributes | |
std::vector< Double_t > | fAngles |
std::vector< Double_t > | fBFields |
std::vector< Double_t > | fEFields |
Double_t | fEmax |
Double_t | fEmin |
Int_t | fEnodes |
std::vector< Double_t > | fGasComponentFraction |
std::vector< TString > | fGasComponentName |
TString | fGasFileContent |
TString | fGasFilename |
bool | fGasGeneration |
MediumMagboltz * | fGasMedium |
TString | fGasOutputPath |
TString | fGasServer |
TString | fGDMLMaterialRef |
Double_t | fMaxElectronEnergy |
Int_t | fNCollisions |
Int_t | fNofGases |
Int_t | fStatus |
Bool_t | fTest = false |
Additional Inherited Members | |
Protected Member Functions inherited from TRestMetadata | |
std::string | ElementToString (TiXmlElement *ele) |
Convert an TiXmlElement object to string. More... | |
TVector2 | Get2DVectorParameterWithUnits (std::string parName, TiXmlElement *e, TVector2 defaultValue=TVector2(-1, -1)) |
TVector3 | Get3DVectorParameterWithUnits (std::string parName, TiXmlElement *e, TVector3 defaultValue=TVector3(-1, -1, -1)) |
Double_t | GetDblParameterWithUnits (std::string parName, TiXmlElement *e, Double_t defaultVal=PARAMETER_NOT_FOUND_DBL) |
TiXmlElement * | GetElement (std::string eleDeclare, TiXmlElement *e=nullptr) |
Get an xml element from a given parent element, according to its declaration. | |
TiXmlElement * | GetElementFromFile (std::string configFilename, std::string NameOrDecalre="") |
Open an xml encoded file and find its element. More... | |
TiXmlElement * | GetElementWithName (std::string eleDeclare, std::string eleName) |
Get an xml element from the default location, according to its declaration and its field "name". | |
TiXmlElement * | GetElementWithName (std::string eleDeclare, std::string eleName, TiXmlElement *e) |
Get an xml element from a given parent element, according to its declaration and its field "name". | |
std::string | GetFieldValue (std::string fieldName, std::string definition, size_t fromPosition=0) |
Gets field value in an xml element string by parsing it as TiXmlElement. | |
std::string | GetFieldValue (std::string parName, TiXmlElement *e) |
Returns the field value of an xml element which has the specified name. More... | |
std::string | GetKEYDefinition (std::string keyName) |
Gets the first key definition for keyName found inside buffer starting at fromPosition. More... | |
std::string | GetKEYDefinition (std::string keyName, size_t &Position) |
std::string | GetKEYDefinition (std::string keyName, size_t &Position, std::string buffer) |
std::string | GetKEYDefinition (std::string keyName, std::string buffer) |
std::string | GetKEYStructure (std::string keyName) |
Gets the first key structure for keyName found inside buffer after fromPosition. More... | |
std::string | GetKEYStructure (std::string keyName, size_t &Position) |
std::string | GetKEYStructure (std::string keyName, size_t &Position, std::string buffer) |
std::string | GetKEYStructure (std::string keyName, size_t &Position, TiXmlElement *ele) |
std::string | GetKEYStructure (std::string keyName, std::string buffer) |
TiXmlElement * | GetNextElement (TiXmlElement *e) |
Get the next sibling xml element of this element, with same eleDeclare. | |
std::string | GetParameter (std::string parName, size_t &pos, std::string inputString) |
Returns the value for the parameter name parName found in inputString. More... | |
std::string | GetParameter (std::string parName, TiXmlElement *e, TString defaultValue=PARAMETER_NOT_FOUND_STR) |
Returns the value for the parameter named parName in the given section. More... | |
std::pair< std::string, std::string > | GetParameterAndUnits (std::string parname, TiXmlElement *e=nullptr) |
Returns the unit string of the given parameter of the given xml section. More... | |
std::map< std::string, std::string > | GetParametersList () |
It retrieves a map of all parameter:value found in the metadata class. | |
TString | GetSearchPath () |
virtual Int_t | LoadSectionMetadata () |
This method does some preparation of xml section. More... | |
void | ReadAllParameters () |
Reflection methods, Set value of a datamember in class according to TRestMetadata::fElement. More... | |
void | ReadParametersList (std::map< std::string, std::string > &list) |
It reads a parameter list and associates it to its corresponding metadata member. par0 --> fPar0. | |
std::string | ReplaceConstants (const std::string buffer) |
Identifies "constants" in the input buffer, and replace them with corresponding value. More... | |
std::string | ReplaceVariables (const std::string buffer) |
Identifies environmental variable replacing marks in the input buffer, and replace them with corresponding value. More... | |
void | ReSetVersion () |
Resets the version of TRestRun to REST_RELEASE. Only TRestRun is allowed to update version. | |
std::string | SearchFile (std::string filename) |
Search files in current directory and directories specified in "searchPath" section. More... | |
void | SetLibraryVersion (TString version) |
Set the library version of this metadata class. | |
TiXmlElement * | StringToElement (std::string definition) |
Parsing a string into TiXmlElement object. More... | |
TRestMetadata () | |
TRestMetadata default constructor. | |
TRestMetadata (const char *configFilename) | |
constructor | |
void | UnSetVersion () |
Resets the version of TRestRun to -1, in case the file is old REST file. Only TRestRun is allowed to update version. | |
Protected Attributes inherited from TRestDetectorDriftVolume | |
Double_t | fAttachmentCoefficient |
Double_t | fDriftVelocity |
Double_t | fElectricField |
Double_t | fElectronLifeTime |
Double_t | fLongitudinalDiffusion |
std::string | fMaterial |
Double_t | fPressureInAtm |
Double_t | fTemperatureInK |
Double_t | fTownsendCoefficient |
Double_t | fTransversalDiffusion |
Double_t | fW |
Protected Attributes inherited from TRestMetadata | |
std::string | configBuffer |
The buffer where the corresponding metadata section is stored. Filled only during Write() | |
std::string | fConfigFileName |
Full name of the rml file. More... | |
std::map< std::string, std::string > | fConstants |
Saving a list of rml constants. name-value std::pair. Constants are temporary for this class only. | |
TiXmlElement * | fElement |
Saving the sectional element together with global element. | |
TiXmlElement * | fElementGlobal |
Saving the global element, to be passed to the resident class, if necessary. | |
Bool_t | fError = false |
It can be used as a way to identify that something went wrong using SetError method. | |
TString | fErrorMessage = "" |
A std::string to store an optional error message through method SetError. | |
TRestManager * | fHostmgr |
All metadata classes can be initialized and managed by TRestManager. | |
Int_t | fNErrors = 0 |
It counts the number of errors notified. | |
Int_t | fNWarnings = 0 |
It counts the number of warnings notified. | |
std::string | fSectionName |
Section name given in the constructor of the derived metadata class. | |
Bool_t | fStore |
This variable is used to determine if the metadata structure should be stored in the ROOT file. | |
std::map< std::string, std::string > | fVariables |
Saving a list of rml variables. name-value std::pair. | |
TRestStringOutput::REST_Verbose_Level | fVerboseLevel |
Verbose level used to print debug info. | |
Bool_t | fWarning = false |
It can be used as a way to identify that something went wrong using SetWarning method. | |
TString | fWarningMessage = "" |
It can be used as a way to identify that something went wrong using SetWarning method. | |
std::string | messageBuffer |
The buffer to store the output message through TRestStringOutput in this class. | |
endl_t | RESTendl |
Termination flag object for TRestStringOutput. | |
TRestDetectorGas::TRestDetectorGas | ( | const char * | configFilename, |
std::string | name = "" , |
||
bool | gasGeneration = false , |
||
bool | test = false |
||
) |
TRestDetectorGas constructor loading data from a config file.
This constructor will load the gas with properties defined inside the corresponding TRestDetectorGas section in an RML file. A pre-generated gas file will be loaded if found in TRestMetadata::GetSearchPath() which can be defined as an input parameter in the globals metadata section.
configFilename | It defines the path to an RML file containing a TRestDetectorGas section. |
name | The name of the TRestDetectorGas section to be read. |
gasGeneration | Parameter allowing to activate the gas generation. |
Definition at line 249 of file src/TRestDetectorGas.cxx.
|
private |
Adds a new element/compound to the gas.
This method is private to make gas intialization possible only through an RML file. This might change if necessary.
gasName | A gas element/compound name valid in Garfield++. |
fraction | The element fraction in volume. |
Definition at line 441 of file src/TRestDetectorGas.cxx.
|
private |
Constructs the filename of the pre-generated gas file using the members defined in the RML file.
This method returns only the filename without including absolute or relative paths.
Definition at line 786 of file src/TRestDetectorGas.cxx.
|
inline |
This enables the generation of the gas file if a non existing gas file is found.
Definition at line 136 of file TRestDetectorGas.h.
string TRestDetectorGas::FindGasFile | ( | std::string | name | ) |
This method tries to find the gas filename given in the argument.
First, this method will try to retrieve the gasFile from fGasServer. If the file is not found in the server, then we will try to find it locally. If not found, the gas will be generated if fGasGeneration has been enabled.
The gasFiles are retrieved by default from the gasFile server. In order to avoid this, and use locally generated gasFiles you need to set the metadata parameter fGasServer to none.
Definition at line 733 of file src/TRestDetectorGas.cxx.
|
inline |
Returns the maximum electron energy used by Magboltz for the gas properties calculation
Definition at line 158 of file TRestDetectorGas.h.
|
overrideprivatevirtual |
Loads the gas parameters that define the gas calculation and properties.
These parameters will be used to define the pre-generated gas filename. The method TRestDetectorGas::ConstructFilename is used to define the filename format.
Reimplemented from TRestDetectorDriftVolume.
Definition at line 505 of file src/TRestDetectorGas.cxx.
void TRestDetectorGas::LoadGasFile | ( | ) |
It loads a pre-generated gas file corresponding to the gas defined using the RML TRestDetectorGas section.
If a pre-generated gas file is not found this method will launch the gas generation in case TRestDetectorGas::fGasGeneration is true. This must be activated using EnableGasGeneration() or at the class construction time.
Definition at line 327 of file src/TRestDetectorGas.cxx.
void TRestDetectorGas::PlotDriftVelocity | ( | Double_t | eMin, |
Double_t | eMax, | ||
Int_t | nSteps | ||
) |
It creates a TCanvas where it plots the drift velocity as a function of the electric field.
eMin | Minimum value of the electric field to be plotted in V/cm. |
eMax | Maximum value of the electric field to be plotted in V/cm. |
steps | Number of points to be given to be drawn |
Definition at line 907 of file src/TRestDetectorGas.cxx.
void TRestDetectorGas::PlotLongitudinalDiffusion | ( | Double_t | eMin, |
Double_t | eMax, | ||
Int_t | nSteps | ||
) |
It creates a TCanvas where it plots the longitudinal diffusion as a function of the electric field.
eMin | Minimum value of the electric field to be plotted in V/cm. |
eMax | Maximum value of the electric field to be plotted in V/cm. |
steps | Number of points to be given to be drawn |
Definition at line 940 of file src/TRestDetectorGas.cxx.
void TRestDetectorGas::PlotTownsendCoefficient | ( | Double_t | eMin, |
Double_t | eMax, | ||
Int_t | nSteps | ||
) |
It creates a TCanvas where it plots the townsend coefficient as a function of the electric field.
eMin | Minimum value of the electric field to be plotted in V/cm. |
eMax | Maximum value of the electric field to be plotted in V/cm. |
steps | Number of points to be given to be drawn |
Definition at line 1006 of file src/TRestDetectorGas.cxx.
void TRestDetectorGas::PlotTransversalDiffusion | ( | Double_t | eMin, |
Double_t | eMax, | ||
Int_t | nSteps | ||
) |
It creates a TCanvas where it plots the transversal diffusion as a function of the electric field.
eMin | Minimum value of the electric field to be plotted in V/cm. |
eMax | Maximum value of the electric field to be plotted in V/cm. |
steps | Number of points to be given to be drawn |
Definition at line 973 of file src/TRestDetectorGas.cxx.
|
override |
Defines the pressure of the gas.
The gas pressure is used during gas file generation to define the E over P range. Once the gas file has been loaded, the pressure might be changed at any time, the gas properties requested will be valid for the given pressure.
pressure | The new pressure of the gas in atm. |
Definition at line 878 of file src/TRestDetectorGas.cxx.
|
private |
The remote server from where we retrieve the gasFiles. If it is set to none local files will be used.
Definition at line 109 of file TRestDetectorGas.h.
|
private |
If true, and the pre-generated Magboltz gas file is not found, it will allow to launch the gas generation.
Definition at line 102 of file TRestDetectorGas.h.
|
private |
A std::string to store the output path where a new generated gas file will be written
Definition at line 105 of file TRestDetectorGas.h.
|
private |
Pointer to Garfield::MediumMagboltz class giving access to gas properties
Definition at line 68 of file TRestDetectorGas.h.