#include <G4IonStoppingData.hh>
 | 
|   | G4IonStoppingData (const G4String &leDirectory) | 
|   | 
| virtual  | ~G4IonStoppingData () | 
|   | 
| G4bool  | IsApplicable (G4int atomicNumberIon, G4int atomicNumberElem) | 
|   | 
| G4bool  | IsApplicable (G4int atomicNumberIon, const G4String &matIdentifier) | 
|   | 
| G4bool  | BuildPhysicsVector (G4int ionZ, const G4String &matName) | 
|   | 
| G4bool  | BuildPhysicsVector (G4int ionZ, G4int matZ) | 
|   | 
| G4PhysicsVector *  | GetPhysicsVector (G4int atomicNumberIon, G4int atomicNumberElem) | 
|   | 
| G4PhysicsVector *  | GetPhysicsVector (G4int atomicNumberIon, const G4String &matIdenfier) | 
|   | 
| G4double  | GetDEDX (G4double kinEnergyPerNucleon, G4int atomicNumberIon, G4int atomicNumberElem) | 
|   | 
| G4double  | GetDEDX (G4double kinEnergyPerNucleon, G4int atomicNumberIon, const G4String &matIdentifier) | 
|   | 
| G4bool  | AddPhysicsVector (G4PhysicsVector *physicsVector, G4int atomicNumberIon, const G4String &matIdentifier) | 
|   | 
| G4bool  | AddPhysicsVector (G4PhysicsVector *physicsVector, G4int atomicNumberIon, G4int atomicNumberElem) | 
|   | 
| G4bool  | RemovePhysicsVector (G4int atomicNumberIon, const G4String &matIdentifier) | 
|   | 
| G4bool  | RemovePhysicsVector (G4int atomicNumberIon, G4int atomicNumberElem) | 
|   | 
| void  | ClearTable () | 
|   | 
| void  | DumpMap () | 
|   | 
|   | G4VIonDEDXTable () | 
|   | 
| virtual  | ~G4VIonDEDXTable () | 
|   | 
Definition at line 60 of file G4IonStoppingData.hh.
 
      
        
          | G4IonStoppingData::G4IonStoppingData  | 
          ( | 
          const G4String &  | 
          leDirectory | ) | 
           | 
        
      
 
 
  
  
      
        
          | G4IonStoppingData::~G4IonStoppingData  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
Definition at line 166 of file G4IonStoppingData.cc.
  172   if(physicsVector == 
nullptr) {
 
  173     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material", 
 
  175          "Pointer to vector is null-pointer.");
 
  179   if(matIdentifier.empty()) {
 
  180     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material", 
 
  185   if(atomicNumberIon <= 0) {
 
  186     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material", 
 
  191   G4IonDEDXKeyMat mkey = std::make_pair(atomicNumberIon, matIdentifier);
 
  193   if(dedxMapMaterials.count(mkey) == 1) {
 
  195     ed << 
"Vector with Z1 = " << atomicNumberIon << 
", mat = "  
  197        << 
"already exists. Remove first before replacing.";
 
  198     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for material", 
 
  203   dedxMapMaterials[mkey] = physicsVector;
 
std::ostringstream G4ExceptionDescription
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
 
 
 
Definition at line 210 of file G4IonStoppingData.cc.
  216   if(physicsVector == 
nullptr) {
 
  217     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element", 
"mat037", 
 
  222   if(atomicNumberIon <= 0) {
 
  223     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element", 
"mat038", 
 
  228   if(atomicNumberElem <= 0) {
 
  229     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element", 
"mat039", 
 
  234   G4IonDEDXKeyElem key = std::make_pair(atomicNumberIon, atomicNumberElem);
 
  236   if(dedxMapElements.count(key) == 1) {
 
  238     ed << 
"Vector with Z1 = " << atomicNumberIon << 
", Z= "  
  240        << 
"already exists. Remove first before replacing.";
 
  241     G4Exception (
"G4IonStoppingData::AddPhysicsVector() for element", 
"mat040", 
 
  246   dedxMapElements[key] = physicsVector;
 
std::ostringstream G4ExceptionDescription
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
 
 
 
Implements G4VIonDEDXTable.
Definition at line 308 of file G4IonStoppingData.cc.
  313   if( 
IsApplicable(atomicNumberIon, matIdentifier) ) 
return true;
 
  315   char* path = getenv(
"G4LEDATA");
 
  317     G4Exception(
"G4IonStoppingData::BuildPhysicsVector()", 
"mat521",
 
  322   std::ostringstream file;
 
  324   file << path << 
"/" << subDir << 
"/z"  
  325        << atomicNumberIon << 
"_" << matIdentifier 
 
  330   std::ifstream ifilestream( fileName );
 
  332   if ( !ifilestream.is_open() ) 
return false;
 
  336   if( !physicsVector -> Retrieve(ifilestream, 
true) ) {
 
  342   physicsVector -> ScaleVector( 
MeV, 
MeV * 
cm2 /( 0.001 * 
g) ); 
 
  343   physicsVector -> SetSpline( 
true );
 
  344   physicsVector -> FillSecondDerivatives();
 
  348      delete physicsVector;
 
static constexpr double cm2
 
static constexpr double g
 
G4bool AddPhysicsVector(G4PhysicsVector *physicsVector, G4int atomicNumberIon, const G4String &matIdentifier)
 
G4bool IsApplicable(G4int atomicNumberIon, G4int atomicNumberElem)
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static constexpr double MeV
 
 
 
 
Implements G4VIonDEDXTable.
Definition at line 359 of file G4IonStoppingData.cc.
  364   if( 
IsApplicable(atomicNumberIon, atomicNumberElem) ) 
return true;
 
  366   char* path = getenv(
"G4LEDATA");
 
  368     G4Exception(
"G4IonStoppingData::BuildPhysicsVector()", 
"mat522",
 
  372   std::ostringstream file;
 
  374   file << path << 
"/" << subDir << 
"/z"  
  375        << atomicNumberIon << 
"_" << atomicNumberElem
 
  380   std::ifstream ifilestream( fileName );
 
  382   if ( !ifilestream.is_open() ) 
return false;
 
  386   if( !physicsVector -> Retrieve(ifilestream, 
true) ) {
 
  392   physicsVector -> ScaleVector( 
MeV, 
MeV * 
cm2 /( 0.001 * 
g) ); 
 
  393   physicsVector -> SetSpline( 
true );
 
  394   physicsVector -> FillSecondDerivatives();
 
  398      delete physicsVector;
 
static constexpr double cm2
 
static constexpr double g
 
G4bool AddPhysicsVector(G4PhysicsVector *physicsVector, G4int atomicNumberIon, const G4String &matIdentifier)
 
G4bool IsApplicable(G4int atomicNumberIon, G4int atomicNumberElem)
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static constexpr double MeV
 
 
 
 
      
        
          | void G4IonStoppingData::ClearTable  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 409 of file G4IonStoppingData.cc.
  411   G4IonDEDXMapMat::iterator iterMat = dedxMapMaterials.begin();
 
  412   G4IonDEDXMapMat::iterator iterMat_end = dedxMapMaterials.end();
 
  414   for(;iterMat != iterMat_end; iterMat++) { 
 
  418     if(vec != 0) 
delete vec;
 
  421   dedxMapMaterials.clear();
 
  423   G4IonDEDXMapElem::iterator iterElem = dedxMapElements.begin();
 
  424   G4IonDEDXMapElem::iterator iterElem_end = dedxMapElements.end();
 
  426   for(;iterElem != iterElem_end; iterElem++) { 
 
  430     if(vec != 0) 
delete vec;
 
  433   dedxMapElements.clear();
 
static constexpr double second
 
 
 
 
      
        
          | void G4IonStoppingData::DumpMap  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 438 of file G4IonStoppingData.cc.
  440   G4IonDEDXMapMat::iterator iterMat = dedxMapMaterials.begin();
 
  441   G4IonDEDXMapMat::iterator iterMat_end = dedxMapMaterials.end();
 
  443   G4cout << std::setw(15) << std::right
 
  445          << std::setw(25) << std::right
 
  449   for(;iterMat != iterMat_end; iterMat++) {
 
  450       G4IonDEDXKeyMat key = iterMat -> 
first;
 
  453       G4int atomicNumberIon = key.first;
 
  454       G4String matIdentifier = key.second;
 
  456       if(physicsVector != 0) {
 
  457          G4cout << std::setw(15) << std::right
 
  459                 << std::setw(25) << std::right
 
  465   G4IonDEDXMapElem::iterator iterElem = dedxMapElements.begin();
 
  466   G4IonDEDXMapElem::iterator iterElem_end = dedxMapElements.end();
 
  468   G4cout << std::setw(15) << std::right
 
  470          << std::setw(25) << std::right
 
  471          << 
"Atomic nmb material" 
  474   for(;iterElem != iterElem_end; iterElem++) { 
 
  475       G4IonDEDXKeyElem key = iterElem -> 
first;
 
  478       G4int atomicNumberIon = key.first;
 
  479       G4int atomicNumberElem = key.second;
 
  481       if(physicsVector != 0) {
 
  482          G4cout << std::setw(15) << std::right
 
  484                 << std::setw(25) << std::right
 
static constexpr double second
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
Definition at line 134 of file G4IonStoppingData.cc.
  140   G4IonDEDXKeyElem key = std::make_pair(atomicNumberIon, atomicNumberElem);
 
  142   G4IonDEDXMapElem::iterator iter = dedxMapElements.find(key);
 
  144   return ( iter != dedxMapElements.end()) ?
 
  145     (iter->second)->Value( kinEnergyPerNucleon) : 0.0;
 
 
 
 
Definition at line 150 of file G4IonStoppingData.cc.
  156   G4IonDEDXKeyMat key = std::make_pair(atomicNumberIon, matIdentifier);
 
  158   G4IonDEDXMapMat::iterator iter = dedxMapMaterials.find(key);
 
  160   return (iter != dedxMapMaterials.end()) ?
 
  161     (iter->second)->Value(kinEnergyPerNucleon) : 0.0;
 
 
 
 
Implements G4VIonDEDXTable.
Definition at line 106 of file G4IonStoppingData.cc.
  111   G4IonDEDXKeyElem key = std::make_pair(atomicNumberIon, atomicNumberElem);
 
  113   G4IonDEDXMapElem::iterator iter = dedxMapElements.find(key);
 
  115   return (iter != dedxMapElements.end()) ? iter->second : 
nullptr; 
 
 
 
 
Implements G4VIonDEDXTable.
Definition at line 120 of file G4IonStoppingData.cc.
  125   G4IonDEDXKeyMat key = std::make_pair(atomicNumberIon, matIdentifier);
 
  127   G4IonDEDXMapMat::iterator iter = dedxMapMaterials.find(key);
 
  129   return (iter != dedxMapMaterials.end()) ? iter->second : 
nullptr; 
 
 
 
 
  
  
      
        
          | G4bool G4IonStoppingData::IsApplicable  | 
          ( | 
          G4int  | 
          atomicNumberIon,  | 
         
        
           | 
           | 
          G4int  | 
          atomicNumberElem  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
Implements G4VIonDEDXTable.
Definition at line 78 of file G4IonStoppingData.cc.
   83   G4IonDEDXKeyElem key = std::make_pair(atomicNumberIon, atomicNumberElem);
 
   85   G4IonDEDXMapElem::iterator iter = dedxMapElements.find(key);
 
   87   return (iter == dedxMapElements.end()) ? 
false : 
true; 
 
 
 
 
  
  
      
        
          | G4bool G4IonStoppingData::IsApplicable  | 
          ( | 
          G4int  | 
          atomicNumberIon,  | 
         
        
           | 
           | 
          const G4String &  | 
          matIdentifier  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
Implements G4VIonDEDXTable.
Definition at line 92 of file G4IonStoppingData.cc.
   97   G4IonDEDXKeyMat key = std::make_pair(atomicNumberIon, matIdentifier);
 
   99   G4IonDEDXMapMat::iterator iter = dedxMapMaterials.find(key);
 
  101   return (iter == dedxMapMaterials.end()) ? 
false : 
true; 
 
 
 
 
      
        
          | G4bool G4IonStoppingData::RemovePhysicsVector  | 
          ( | 
          G4int  | 
          atomicNumberIon,  | 
        
        
           | 
           | 
          const G4String &  | 
          matIdentifier  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 253 of file G4IonStoppingData.cc.
  258   G4IonDEDXKeyMat key = std::make_pair(atomicNumberIon, matIdentifier);
 
  260   G4IonDEDXMapMat::iterator iter = dedxMapMaterials.find(key);
 
  262   if(iter == dedxMapMaterials.end()) {
 
  263     G4Exception (
"G4IonStoppingData::RemovePhysicsVector() for material", 
 
  271   dedxMapMaterials.erase(key);
 
  274   delete physicsVector;
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
 
 
 
      
        
          | G4bool G4IonStoppingData::RemovePhysicsVector  | 
          ( | 
          G4int  | 
          atomicNumberIon,  | 
        
        
           | 
           | 
          G4int  | 
          atomicNumberElem  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 281 of file G4IonStoppingData.cc.
  285   G4IonDEDXKeyElem key = std::make_pair(atomicNumberIon, atomicNumberElem);
 
  287   G4IonDEDXMapElem::iterator iter = dedxMapElements.find(key);
 
  289   if(iter == dedxMapElements.end()) {
 
  290     G4Exception (
"G4IonStoppingData::RemovePhysicsVector() for element", 
 
  298   dedxMapElements.erase(key);
 
  301   delete physicsVector;
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
 
 
 
The documentation for this class was generated from the following files: