![]() |
Project
|
#include <MaterialManager.h>
Public Types | |
enum class | ESpecial : bool { kTRUE = true , kFALSE = false } |
scoped enum to decide whether settings are done globally or for a certain medium More... | |
Public Member Functions | |
void | Material (const char *modname, Int_t imat, const char *name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl, Float_t *buf=nullptr, Int_t nwbuf=0) |
void | Mixture (const char *modname, Int_t imat, const char *name, Float_t *a, Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat) |
void | Medium (const char *modname, Int_t numed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin, Float_t *ubuf=nullptr, Int_t nbuf=0) |
void | DefaultProcesses (const std::initializer_list< std::pair< EProc, int > > &parIDValMap) |
void | SpecialProcesses (const char *modname, int localindex, const std::initializer_list< std::pair< EProc, int > > &parIDValMap) |
void | DefaultProcess (EProc parID, int val) |
set default process | |
void | SpecialProcess (const char *modname, int localindex, EProc parID, int val) |
Custom setting of process or cut given parameter name and value. | |
void | DefaultCuts (const std::initializer_list< std::pair< ECut, Float_t > > &parIDValMap) |
void | SpecialCuts (const char *modname, int localindex, const std::initializer_list< std::pair< ECut, Float_t > > &parIDValMap) |
void | DefaultCut (ECut parID, Float_t val) |
set default cut | |
void | SpecialCut (const char *modname, int localindex, ECut parID, Float_t val) |
Custom setting of process or cut given parameter name and value. | |
void | SetLowEnergyNeutronTransport (bool flag) |
Set flag fro low energy neutron transport. | |
void | loadCutsAndProcessesFromFile (const char *modname, const char *filename) |
load cuts and process flags from a data file (like AliRoot did) | |
void | loadCutsAndProcessesFromJSON (ESpecial special=ESpecial::kFALSE, std::string const &filename="") |
void | writeCutsAndProcessesToJSON (std::string const &filename="") |
void | enableSpecialProcesses (bool val=true) |
Set flags whether to use special cuts and process settings. | |
bool | specialProcessesEnabled () const |
void | enableSpecialCuts (bool val=true) |
bool | specialCutsEnabled () const |
int | getMaterialID (const char *modname, int imat) const |
int | getMediumID (const char *modname, int imed) const |
TGeoMedium * | getTGeoMedium (const std::string &modname, int localid) |
TGeoMedium * | getTGeoMedium (const char *mediumname) |
void | getMediumIDMappingAsVector (const char *modname, std::vector< int > &mapping) const |
const char * | getProcessName (EProc process) const |
Get the names of processes and cuts providing an respective enum member. | |
const char * | getCutName (ECut cut) const |
const char * | getModuleFromMediumID (int globalindex) const |
Get module name which has medium of a certain global medium ID. | |
const char * | getMediumNameFromMediumID (int globalindex) const |
Get medium name from global medium ID. | |
void | getMediaWithSpecialProcess (EProc process, std::vector< int > &mediumProcessVector) const |
get global medium IDs where special process is set along with process value | |
void | getMediaWithSpecialCut (ECut cut, std::vector< Float_t > &mediumCutVector) const |
get global medium IDs where special cut is set along with cut value | |
void | getDefaultProcesses (std::vector< std::pair< EProc, int > > &processVector) |
Fill vector with default processes. | |
void | getDefaultCuts (std::vector< std::pair< ECut, Float_t > > &cutVector) |
Fill vector with default cuts. | |
void | getSpecialProcesses (int globalindex, std::vector< std::pair< EProc, int > > &processVector) |
Get special processes for global medium ID. | |
void | getSpecialProcesses (const char *modname, int localindex, std::vector< std::pair< EProc, int > > &processVector) |
Interface for module name and local medium ID. | |
void | getSpecialCuts (int globalindex, std::vector< std::pair< ECut, Float_t > > &cutVector) |
Get special cuts for global medium ID. | |
void | getSpecialCuts (const char *modname, int localindex, std::vector< std::pair< ECut, Float_t > > &cutVector) |
Interface for module name and local medium ID. | |
void | printProcesses (std::ostream &stream) const |
Print all processes for all media as well as defaults. | |
void | printCuts (std::ostream &stream) const |
Print all cuts for all media as well as defaults. | |
void | printMaterials () const |
void | printMedia () const |
ClassDefNV (MaterialManager, 0) | |
Static Public Member Functions | |
static MaterialManager & | Instance () |
static void | printContainingMedia (std::string const &volumename) |
Definition at line 65 of file MaterialManager.h.
|
strong |
scoped enum to decide whether settings are done globally or for a certain medium
In Geant3/4 there is the possibility to set custom production cuts and to enable/disable certain processes. This can be done globally as well as for each medium separately. Hence, for both cases there is one method to set default processes and cuts and another 2 methods to set cuts and processes per medium. In any case, the respective cut/process setting method is a wrapper around a private, more general, method. Global settings of processes.
Enumerator | |
---|---|
kTRUE | |
kFALSE |
Definition at line 92 of file MaterialManager.h.
o2::base::MaterialManager::ClassDefNV | ( | MaterialManager | , |
0 | |||
) |
set default cut
Definition at line 129 of file MaterialManager.h.
|
inline |
Global settings of cuts. To ignore a certain cut to be set, just set it to o2::base::MaterialManager::NOPROCESS
Definition at line 117 of file MaterialManager.h.
set default process
Definition at line 110 of file MaterialManager.h.
|
inline |
Definition at line 94 of file MaterialManager.h.
|
inline |
Definition at line 145 of file MaterialManager.h.
|
inline |
Set flags whether to use special cuts and process settings.
Definition at line 143 of file MaterialManager.h.
Definition at line 286 of file MaterialManager.h.
Fill vector with default cuts.
Definition at line 813 of file MaterialManager.cxx.
Fill vector with default processes.
Definition at line 805 of file MaterialManager.cxx.
Definition at line 712 of file MaterialManager.cxx.
void MaterialManager::getMediaWithSpecialCut | ( | ECut | cut, |
std::vector< Float_t > & | mediumCutVector | ||
) | const |
get global medium IDs where special cut is set along with cut value
Definition at line 784 of file MaterialManager.cxx.
void MaterialManager::getMediaWithSpecialProcess | ( | EProc | process, |
std::vector< int > & | mediumProcessVector | ||
) | const |
get global medium IDs where special process is set along with process value
Definition at line 764 of file MaterialManager.cxx.
Definition at line 727 of file MaterialManager.cxx.
void MaterialManager::getMediumIDMappingAsVector | ( | const char * | modname, |
std::vector< int > & | mapping | ||
) | const |
fill the medium index mapping into a standard vector the vector gets sized properly and will be overridden
Definition at line 744 of file MaterialManager.cxx.
Get medium name from global medium ID.
Definition at line 875 of file MaterialManager.cxx.
Get module name which has medium of a certain global medium ID.
Definition at line 857 of file MaterialManager.cxx.
Get the names of processes and cuts providing an respective enum member.
Definition at line 277 of file MaterialManager.h.
void MaterialManager::getSpecialCuts | ( | const char * | modname, |
int | localindex, | ||
std::vector< std::pair< ECut, Float_t > > & | cutVector | ||
) |
Interface for module name and local medium ID.
Definition at line 849 of file MaterialManager.cxx.
void MaterialManager::getSpecialCuts | ( | int | globalindex, |
std::vector< std::pair< ECut, Float_t > > & | cutVector | ||
) |
Get special cuts for global medium ID.
Definition at line 839 of file MaterialManager.cxx.
void MaterialManager::getSpecialProcesses | ( | const char * | modname, |
int | localindex, | ||
std::vector< std::pair< EProc, int > > & | processVector | ||
) |
Interface for module name and local medium ID.
Definition at line 831 of file MaterialManager.cxx.
void MaterialManager::getSpecialProcesses | ( | int | globalindex, |
std::vector< std::pair< EProc, int > > & | processVector | ||
) |
Get special processes for global medium ID.
Definition at line 821 of file MaterialManager.cxx.
TGeoMedium * MaterialManager::getTGeoMedium | ( | const char * | mediumname | ) |
Definition at line 417 of file MaterialManager.cxx.
TGeoMedium * MaterialManager::getTGeoMedium | ( | const std::string & | modname, |
int | localid | ||
) |
Definition at line 404 of file MaterialManager.cxx.
|
inlinestatic |
Definition at line 68 of file MaterialManager.h.
load cuts and process flags from a data file (like AliRoot did)
list of cut enumerated in ascending column mode as written in file
list of process flags enumerated in ascending column mode as written in file
Definition at line 587 of file MaterialManager.cxx.
void MaterialManager::loadCutsAndProcessesFromJSON | ( | ESpecial | special = ESpecial::kFALSE , |
std::string const & | filename = "" |
||
) |
Definition at line 424 of file MaterialManager.cxx.
void MaterialManager::Material | ( | const char * | modname, |
Int_t | imat, | ||
const char * | name, | ||
Float_t | a, | ||
Float_t | z, | ||
Float_t | dens, | ||
Float_t | radl, | ||
Float_t | absl, | ||
Float_t * | buf = nullptr , |
||
Int_t | nwbuf = 0 |
||
) |
Definition at line 137 of file MaterialManager.cxx.
void MaterialManager::Medium | ( | const char * | modname, |
Int_t | numed, | ||
const char * | name, | ||
Int_t | nmat, | ||
Int_t | isvol, | ||
Int_t | ifield, | ||
Float_t | fieldm, | ||
Float_t | tmaxfd, | ||
Float_t | stemax, | ||
Float_t | deemax, | ||
Float_t | epsil, | ||
Float_t | stmin, | ||
Float_t * | ubuf = nullptr , |
||
Int_t | nbuf = 0 |
||
) |
Definition at line 208 of file MaterialManager.cxx.
void MaterialManager::Mixture | ( | const char * | modname, |
Int_t | imat, | ||
const char * | name, | ||
Float_t * | a, | ||
Float_t * | z, | ||
Float_t | dens, | ||
Int_t | nlmat, | ||
Float_t * | wmat | ||
) |
Define a mixture or a compound
imat | local (to detector/module) mixture identifier |
a,z,wmat | arrays of size abs(nlmat) defining the materials |
nlmat | indicates what wmat array represents |
If nlmat > 0 then wmat contains the proportion by weights of each basic material in the mixture.
If nlmat < 0 then wmat contains the number of atoms of a given kind into the molecule of the compound. In this case, wmat in output is changed to relative weights.
Definition at line 172 of file MaterialManager.cxx.
|
static |
print all tracking media inside a logical volume (specified by name) and all of its daughters
Definition at line 891 of file MaterialManager.cxx.
void MaterialManager::printCuts | ( | std::ostream & | stream | ) | const |
Print all cuts for all media as well as defaults.
Definition at line 354 of file MaterialManager.cxx.
void MaterialManager::printMaterials | ( | ) | const |
Definition at line 305 of file MaterialManager.cxx.
void MaterialManager::printMedia | ( | ) | const |
Definition at line 316 of file MaterialManager.cxx.
void MaterialManager::printProcesses | ( | std::ostream & | stream | ) | const |
Print all processes for all media as well as defaults.
Definition at line 329 of file MaterialManager.cxx.
|
inline |
Set flag fro low energy neutron transport.
Definition at line 135 of file MaterialManager.h.
Custom setting of process or cut given parameter name and value.
Definition at line 691 of file MaterialManager.cxx.
void MaterialManager::SpecialCuts | ( | const char * | modname, |
int | localindex, | ||
const std::initializer_list< std::pair< ECut, Float_t > > & | parIDValMap | ||
) |
Set cuts per medium providing the module name and the local ID of the medium. To ignore a certain cut to be set explicitly (default or Geant settings will be used in that case) use o2::base::MaterialManager::NOPROCESS
Definition at line 682 of file MaterialManager.cxx.
|
inline |
Definition at line 146 of file MaterialManager.h.
Custom setting of process or cut given parameter name and value.
Definition at line 702 of file MaterialManager.cxx.
|
inline |
Set processes per medium providing the module name and the local ID of the medium. To ignore a certain process to be set explicitly (default or Geant settings will be used in that case) use o2::base::MaterialManager::NOPROCESS
Definition at line 101 of file MaterialManager.h.
|
inline |
Definition at line 144 of file MaterialManager.h.
void MaterialManager::writeCutsAndProcessesToJSON | ( | std::string const & | filename = "" | ) |
Definition at line 511 of file MaterialManager.cxx.