Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/materials/src/G4IonisParamMat.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /materials/src/G4IonisParamMat.cc (Version 11.3.0) and /materials/src/G4IonisParamMat.cc (Version 10.1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
                                                   >>  25 //
                                                   >>  26 // $Id: G4IonisParamMat.cc 83992 2014-09-26 09:26:06Z gcosmo $
                                                   >>  27 //
                                                   >>  28 // 
                                                   >>  29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
 25                                                    30 
 26 // 09-07-98, data moved from G4Material, M.Mai     31 // 09-07-98, data moved from G4Material, M.Maire
 27 // 18-07-98, bug corrected in ComputeDensityEf     32 // 18-07-98, bug corrected in ComputeDensityEffect() for gas
 28 // 16-01-01, bug corrected in ComputeDensityEf     33 // 16-01-01, bug corrected in ComputeDensityEffect() E100eV (L.Urban)
 29 // 08-02-01, fShellCorrectionVector correctly      34 // 08-02-01, fShellCorrectionVector correctly handled (mma)
 30 // 28-10-02, add setMeanExcitationEnergy (V.Iv     35 // 28-10-02, add setMeanExcitationEnergy (V.Ivanchenko)
 31 // 06-09-04, factor 2 to shell correction term <<  36 // 06-09-04, factor 2 to shell correction term (V.Ivanchenko) 
 32 // 10-05-05, add a missing coma in FindMeanExc     37 // 10-05-05, add a missing coma in FindMeanExcitationEnergy() - Bug#746 (mma)
 33 // 27-09-07, add computation of parameters for     38 // 27-09-07, add computation of parameters for ions (V.Ivanchenko)
 34 // 04-03-08, remove reference to G4NistManager     39 // 04-03-08, remove reference to G4NistManager. Add fBirks constant (mma)
 35 // 30-10-09, add G4DensityEffectData class and     40 // 30-10-09, add G4DensityEffectData class and density effect computation (VI)
 36                                                    41 
 37 #include "G4IonisParamMat.hh"                  <<  42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
 38                                                    43 
 39 #include "G4AtomicShells.hh"                   <<  44 #include "G4IonisParamMat.hh"
 40 #include "G4AutoLock.hh"                       << 
 41 #include "G4DensityEffectData.hh"              << 
 42 #include "G4Exp.hh"                            << 
 43 #include "G4Log.hh"                            << 
 44 #include "G4Material.hh"                           45 #include "G4Material.hh"
                                                   >>  46 #include "G4DensityEffectData.hh"
 45 #include "G4NistManager.hh"                        47 #include "G4NistManager.hh"
 46 #include "G4PhysicalConstants.hh"              << 
 47 #include "G4Pow.hh"                                48 #include "G4Pow.hh"
                                                   >>  49 #include "G4PhysicalConstants.hh"
 48 #include "G4SystemOfUnits.hh"                      50 #include "G4SystemOfUnits.hh"
                                                   >>  51 #include "G4Log.hh"
                                                   >>  52 #include "G4Exp.hh"
 49                                                    53 
 50 G4DensityEffectData* G4IonisParamMat::fDensity <<  54 G4DensityEffectData* G4IonisParamMat::fDensityData = 0;
 51                                                << 
 52 namespace                                      << 
 53 {                                              << 
 54   G4Mutex ionisMutex = G4MUTEX_INITIALIZER;    << 
 55 }                                              << 
 56                                                    55 
 57 //....oooOO0OOooo........oooOO0OOooo........oo     56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
 58                                                    57 
 59 G4IonisParamMat::G4IonisParamMat(const G4Mater <<  58 G4IonisParamMat::G4IonisParamMat(G4Material* material)
                                                   >>  59   : fMaterial(material)
 60 {                                                  60 {
 61   fBirks = 0.;                                     61   fBirks = 0.;
 62   fMeanEnergyPerIon = 0.0;                         62   fMeanEnergyPerIon = 0.0;
 63   twoln10 = 2. * G4Pow::GetInstance()->logZ(10 <<  63   twoln10 = 2.*G4Pow::GetInstance()->logZ(10);
 64                                                    64 
 65   // minimal set of default parameters for den     65   // minimal set of default parameters for density effect
 66   fCdensity = 0.0;                                 66   fCdensity = 0.0;
 67   fD0density = 0.0;                                67   fD0density = 0.0;
 68   fAdjustmentFactor = 1.0;                         68   fAdjustmentFactor = 1.0;
 69   if (fDensityData == nullptr) {               <<  69   if(!fDensityData) { fDensityData = new G4DensityEffectData(); }
 70     fDensityData = new G4DensityEffectData();  << 
 71   }                                            << 
 72   fDensityEffectCalc = nullptr;                << 
 73                                                    70 
 74   // compute parameters                            71   // compute parameters
 75   ComputeMeanParameters();                         72   ComputeMeanParameters();
 76   ComputeDensityEffectParameters();            <<  73   ComputeDensityEffect();
 77   ComputeFluctModel();                             74   ComputeFluctModel();
 78   ComputeIonParameters();                          75   ComputeIonParameters();
 79 }                                                  76 }
 80                                                    77 
 81 //....oooOO0OOooo........oooOO0OOooo........oo     78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
 82                                                    79 
 83 G4IonisParamMat::~G4IonisParamMat()            <<  80 // Fake default constructor - sets only member data and allocates memory
                                                   >>  81 //                            for usage restricted to object persistency
                                                   >>  82 
                                                   >>  83 G4IonisParamMat::G4IonisParamMat(__void__&)
                                                   >>  84   : fMaterial(0), fShellCorrectionVector(0)
 84 {                                                  85 {
 85   delete fDensityEffectCalc;                   <<  86   fMeanExcitationEnergy = 0.0;
 86   delete[] fShellCorrectionVector;             <<  87   fLogMeanExcEnergy = 0.0;
 87   delete fDensityData;                         <<  88   fTaul = 0.0;
 88   fDensityData = nullptr;                      <<  89   fCdensity = 0.0;
 89   fShellCorrectionVector = nullptr;            <<  90   fMdensity = 0.0;
 90   fDensityEffectCalc = nullptr;                <<  91   fAdensity = 0.0;
                                                   >>  92   fX0density = 0.0;
                                                   >>  93   fX1density = 0.0;
                                                   >>  94   fD0density = 0.0;
                                                   >>  95   fPlasmaEnergy = 0.0;
                                                   >>  96   fAdjustmentFactor = 0.0;
                                                   >>  97   fF1fluct = 0.0;          
                                                   >>  98   fF2fluct = 0.0;                       
                                                   >>  99   fEnergy1fluct = 0.0;
                                                   >> 100   fLogEnergy1fluct = 0.0;
                                                   >> 101   fEnergy2fluct = 0.0;
                                                   >> 102   fLogEnergy2fluct = 0.0;
                                                   >> 103   fEnergy0fluct = 0.0;
                                                   >> 104   fRateionexcfluct = 0.0;
                                                   >> 105   fZeff = 0.0;
                                                   >> 106   fFermiEnergy = 0.0;
                                                   >> 107   fLfactor = 0.0;
                                                   >> 108   fInvA23 = 0.0;
                                                   >> 109   fBirks = 0.0;
                                                   >> 110   fMeanEnergyPerIon = 0.0;
                                                   >> 111   twoln10 = 2.*G4Pow::GetInstance()->logZ(10);
                                                   >> 112 
                                                   >> 113   if(!fDensityData) { fDensityData = new G4DensityEffectData(); }
 91 }                                                 114 }
 92                                                   115 
 93 //....oooOO0OOooo........oooOO0OOooo........oo    116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
 94                                                   117 
 95 G4double G4IonisParamMat::GetDensityCorrection << 118 G4IonisParamMat::~G4IonisParamMat()
 96 {                                                 119 {
 97   // x = log10(beta*gamma)                     << 120   if (fShellCorrectionVector) { delete [] fShellCorrectionVector; }
 98   G4double y = 0.0;                            << 121   if (fDensityData) { delete fDensityData; }
 99   if (x < fX0density) {                        << 122   fDensityData = 0;
100     if (fD0density > 0.0) {                    << 123   fShellCorrectionVector = 0;
101       y = fD0density * G4Exp(twoln10 * (x - fX << 
102     }                                          << 
103   }                                            << 
104   else if (x >= fX1density) {                  << 
105     y = twoln10 * x - fCdensity;               << 
106   }                                            << 
107   else {                                       << 
108     y = twoln10 * x - fCdensity + fAdensity *  << 
109   }                                            << 
110   return y;                                    << 
111 }                                                 124 }
112                                                   125 
113 //....oooOO0OOooo........oooOO0OOooo........oo    126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
114                                                   127 
115 void G4IonisParamMat::ComputeMeanParameters()     128 void G4IonisParamMat::ComputeMeanParameters()
116 {                                                 129 {
117   // compute mean excitation energy and shell     130   // compute mean excitation energy and shell correction vector
118   fTaul = (*(fMaterial->GetElementVector()))[0    131   fTaul = (*(fMaterial->GetElementVector()))[0]->GetIonisation()->GetTaul();
119                                                   132 
120   std::size_t nElements = fMaterial->GetNumber << 133   fMeanExcitationEnergy = 0.;
                                                   >> 134   fLogMeanExcEnergy = 0.;
                                                   >> 135 
                                                   >> 136   size_t nElements = fMaterial->GetNumberOfElements();
121   const G4ElementVector* elmVector = fMaterial    137   const G4ElementVector* elmVector = fMaterial->GetElementVector();
122   const G4double* nAtomsPerVolume = fMaterial-    138   const G4double* nAtomsPerVolume = fMaterial->GetVecNbOfAtomsPerVolume();
                                                   >> 139  
                                                   >> 140   G4String ch = fMaterial->GetChemicalFormula();
123                                                   141 
124   fMeanExcitationEnergy = FindMeanExcitationEn << 142   if(ch != "") { fMeanExcitationEnergy = FindMeanExcitationEnergy(ch); }
125   fLogMeanExcEnergy = 0.;                      << 
126                                                   143 
127   // Chemical formula defines mean excitation     144   // Chemical formula defines mean excitation energy
128   if (fMeanExcitationEnergy > 0.0) {           << 145   if(fMeanExcitationEnergy > 0.0) {
129     fLogMeanExcEnergy = G4Log(fMeanExcitationE    146     fLogMeanExcEnergy = G4Log(fMeanExcitationEnergy);
130                                                   147 
131     // Compute average                         << 148     // Compute average 
132   }                                            << 149   } else {
133   else {                                       << 150     for (size_t i=0; i < nElements; i++) {
134     for (std::size_t i = 0; i < nElements; ++i << 
135       const G4Element* elm = (*elmVector)[i];     151       const G4Element* elm = (*elmVector)[i];
136       fLogMeanExcEnergy +=                     << 152       fLogMeanExcEnergy += nAtomsPerVolume[i]*elm->GetZ()
137         nAtomsPerVolume[i] * elm->GetZ() * G4L << 153   *G4Log(elm->GetIonisation()->GetMeanExcitationEnergy());
138     }                                             154     }
139     fLogMeanExcEnergy /= fMaterial->GetTotNbOf    155     fLogMeanExcEnergy /= fMaterial->GetTotNbOfElectPerVolume();
140     fMeanExcitationEnergy = G4Exp(fLogMeanExcE    156     fMeanExcitationEnergy = G4Exp(fLogMeanExcEnergy);
141   }                                               157   }
142                                                   158 
143   fShellCorrectionVector = new G4double[3];    << 159   fShellCorrectionVector = new G4double[3]; 
144                                                   160 
145   for (G4int j = 0; j <= 2; ++j) {             << 161   for (G4int j=0; j<=2; j++)
                                                   >> 162   {
146     fShellCorrectionVector[j] = 0.;               163     fShellCorrectionVector[j] = 0.;
147                                                   164 
148     for (std::size_t k = 0; k < nElements; ++k << 165     for (size_t k=0; k<nElements; k++) {
149       fShellCorrectionVector[j] +=             << 166       fShellCorrectionVector[j] += nAtomsPerVolume[k]
150         nAtomsPerVolume[k] * (((*elmVector)[k] << 167   *(((*elmVector)[k])->GetIonisation()->GetShellCorrectionVector())[j];
151     }                                             168     }
152     fShellCorrectionVector[j] *= 2.0 / fMateri << 169     fShellCorrectionVector[j] *= 2.0/fMaterial->GetTotNbOfElectPerVolume();
153   }                                            << 170   } 
154 }                                                 171 }
155                                                   172 
156 //....oooOO0OOooo........oooOO0OOooo........oo    173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
157                                                   174 
158 G4DensityEffectData* G4IonisParamMat::GetDensi << 175 G4DensityEffectData* G4IonisParamMat::GetDensityEffectData()
                                                   >> 176 {
159   return fDensityData;                            177   return fDensityData;
160 }                                                 178 }
161                                                   179 
162 //....oooOO0OOooo........oooOO0OOooo........oo    180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
163                                                << 181                     
164 void G4IonisParamMat::ComputeDensityEffectPara << 182 void G4IonisParamMat::ComputeDensityEffect()
165 {                                                 183 {
166   G4State State = fMaterial->GetState();          184   G4State State = fMaterial->GetState();
167   G4double density = fMaterial->GetDensity();  << 
168                                                   185 
169   // Check if density effect data exist in the    186   // Check if density effect data exist in the table
170   // R.M. Sternheimer, Atomic Data and Nuclear    187   // R.M. Sternheimer, Atomic Data and Nuclear Data Tables, 30: 261 (1984)
171   // or is assign to one of data set in this t << 
172   G4int idx = fDensityData->GetIndex(fMaterial    188   G4int idx = fDensityData->GetIndex(fMaterial->GetName());
173   auto nelm = (G4int)fMaterial->GetNumberOfEle << 189   G4int nelm= fMaterial->GetNumberOfElements();
174   G4int Z0 = ((*(fMaterial->GetElementVector() << 190   G4int Z0  = G4lrint((*(fMaterial->GetElementVector()))[0]->GetZ());
175   const G4Material* bmat = fMaterial->GetBaseM << 191   if(idx < 0 && 1 == nelm) {
176   G4NistManager* nist = G4NistManager::Instanc << 192     idx = fDensityData->GetElementIndex(Z0, fMaterial->GetState());
177                                                << 
178   // arbitrary empirical limits                << 
179   // parameterisation with very different dens << 
180   static const G4double corrmax = 1.;          << 
181   static const G4double massfracmax = 0.9;     << 
182                                                << 
183   // for simple non-NIST materials             << 
184   G4double corr = 0.0;                         << 
185                                                << 
186   if (idx < 0 && 1 == nelm) {                  << 
187     G4int z = (1 == Z0 && State == kStateLiqui << 
188     idx = fDensityData->GetElementIndex(z);    << 
189                                                << 
190     // Correction for base material or for non << 
191     // Except cases of very different density  << 
192     if (idx >= 0 && 0 < z) {                   << 
193       G4double dens = nist->GetNominalDensity( << 
194       if (dens <= 0.0) {                       << 
195         idx = -1;                              << 
196       }                                        << 
197       else {                                   << 
198         corr = G4Log(dens / density);          << 
199         if (std::abs(corr) > corrmax) {        << 
200           idx = -1;                            << 
201         }                                      << 
202       }                                        << 
203     }                                          << 
204   }                                            << 
205   // for base material case                    << 
206   if (idx < 0 && nullptr != bmat) {            << 
207     idx = fDensityData->GetIndex(bmat->GetName << 
208     if (idx >= 0) {                            << 
209       corr = G4Log(bmat->GetDensity() / densit << 
210       if (std::abs(corr) > corrmax) {          << 
211         idx = -1;                              << 
212       }                                        << 
213     }                                          << 
214   }                                               193   }
215                                                   194 
216   // for compound non-NIST materials with one  << 195   //G4cout<<"DensityEffect for "<<fMaterial->GetName()<<"  "<< idx << G4endl; 
217   if (idx < 0 && 1 < nelm) {                   << 196 
218     const G4double tot = fMaterial->GetTotNbOf << 197   if(idx >= 0) {
219     for (G4int i = 0; i < nelm; ++i) {         << 
220       const G4double frac = fMaterial->GetVecN << 
221       if (frac > massfracmax) {                << 
222         Z0 = ((*(fMaterial->GetElementVector() << 
223         idx = fDensityData->GetElementIndex(Z0 << 
224         G4double dens = nist->GetNominalDensit << 
225         if (idx >= 0 && dens > 0.0) {          << 
226           corr = G4Log(dens / density);        << 
227           if (std::abs(corr) > corrmax) {      << 
228             idx = -1;                          << 
229           }                                    << 
230           else {                               << 
231             break;                             << 
232           }                                    << 
233         }                                      << 
234       }                                        << 
235     }                                          << 
236   }                                            << 
237                                                   198 
238   if (idx >= 0) {                              << 
239     // Take parameters for the density effect     199     // Take parameters for the density effect correction from
240     // R.M. Sternheimer et al. Density Effect  << 200     // R.M. Sternheimer et al. Density Effect For The Ionization Loss 
241     // of Charged Particles in Various Substan << 201     // of Charged Particles in Various Substances. 
242     // Atom. Data Nucl. Data Tabl. 30 (1984) 2 << 202     // Atom. Data Nucl. Data Tabl. 30 (1984) 261-271. 
243                                                   203 
244     fCdensity = fDensityData->GetCdensity(idx) << 204     fCdensity = fDensityData->GetCdensity(idx); 
245     fMdensity = fDensityData->GetMdensity(idx)    205     fMdensity = fDensityData->GetMdensity(idx);
246     fAdensity = fDensityData->GetAdensity(idx)    206     fAdensity = fDensityData->GetAdensity(idx);
247     fX0density = fDensityData->GetX0density(id    207     fX0density = fDensityData->GetX0density(idx);
248     fX1density = fDensityData->GetX1density(id    208     fX1density = fDensityData->GetX1density(idx);
249     fD0density = fDensityData->GetDelta0densit    209     fD0density = fDensityData->GetDelta0density(idx);
250     fPlasmaEnergy = fDensityData->GetPlasmaEne    210     fPlasmaEnergy = fDensityData->GetPlasmaEnergy(idx);
251     fAdjustmentFactor = fDensityData->GetAdjus    211     fAdjustmentFactor = fDensityData->GetAdjustmentFactor(idx);
252                                                   212 
253     // parameter C is computed and not taken f << 213     // Correction for base material
254     // fCdensity = 1. + 2*G4Log(fMeanExcitatio << 214     const G4Material* bmat = fMaterial->GetBaseMaterial();
255     // G4cout << "IonisParamMat: " << fMateria << 215     if(bmat) {
256     //     << "  Cst= " << Cdensity << " C= "  << 216       G4double corr = G4Log(bmat->GetDensity()/fMaterial->GetDensity());
257                                                << 217       fCdensity  += corr;
258     // correction on nominal density           << 218       fX0density += corr/twoln10;
259     fCdensity += corr;                         << 219       fX1density += corr/twoln10;
260     fX0density += corr / twoln10;              << 220     }
261     fX1density += corr / twoln10;              << 221 
262   }                                            << 222   } else {
263   else {                                       << 223 
264     static const G4double Cd2 = 4 * CLHEP::pi  << 224     static const G4double Cd2 = 4*pi*hbarc_squared*classic_electr_radius;
265     fPlasmaEnergy = std::sqrt(Cd2 * fMaterial- << 225     fPlasmaEnergy = std::sqrt(Cd2*fMaterial->GetTotNbOfElectPerVolume());
266                                                   226 
267     // Compute parameters for the density effe    227     // Compute parameters for the density effect correction in DE/Dx formula.
268     // The parametrization is from R.M. Sternh    228     // The parametrization is from R.M. Sternheimer, Phys. Rev.B,3:3681 (1971)
269     G4int icase;                                  229     G4int icase;
270                                                << 230     
271     fCdensity = 1. + 2 * G4Log(fMeanExcitation << 231     fCdensity = 1. + 2*G4Log(fMeanExcitationEnergy/fPlasmaEnergy);
272     //                                            232     //
273     // condensed materials                        233     // condensed materials
274     //                                         << 234     //  
275     if ((State == kStateSolid) || (State == kS << 235     if ((State == kStateSolid)||(State == kStateLiquid)) {
276       static const G4double E100eV = 100. * CL << 
277       static const G4double ClimiS[] = {3.681, << 
278       static const G4double X0valS[] = {1.0, 1 << 
279       static const G4double X1valS[] = {2.0, 3 << 
280                                                << 
281       if (fMeanExcitationEnergy < E100eV) {    << 
282         icase = 0;                             << 
283       }                                        << 
284       else {                                   << 
285         icase = 1;                             << 
286       }                                        << 
287                                                   236 
288       if (fCdensity < ClimiS[icase]) {         << 237       static const G4double E100eV  = 100.*eV; 
289         fX0density = 0.2;                      << 238       static const G4double ClimiS[] = {3.681 , 5.215 };
290       }                                        << 239       static const G4double X0valS[] = {1.0   , 1.5   };
291       else {                                   << 240       static const G4double X1valS[] = {2.0   , 3.0   };
292         fX0density = 0.326 * fCdensity - X0val << 241                                 
293       }                                        << 242       if(fMeanExcitationEnergy < E100eV) { icase = 0; }
294                                                << 243       else                               { icase = 1; } 
295       fX1density = X1valS[icase];              << 244 
296       fMdensity = 3.0;                         << 245       if(fCdensity < ClimiS[icase])    { fX0density = 0.2; }
297                                                << 246       else { fX0density = 0.326*fCdensity - X0valS[icase]; }
298       // special: Hydrogen                     << 247 
                                                   >> 248       fX1density = X1valS[icase]; fMdensity = 3.0;
                                                   >> 249       
                                                   >> 250       //special: Hydrogen
299       if (1 == nelm && 1 == Z0) {                 251       if (1 == nelm && 1 == Z0) {
300         fX0density = 0.425;                    << 252          fX0density = 0.425; fX1density = 2.0; fMdensity = 5.949;
301         fX1density = 2.0;                      << 
302         fMdensity = 5.949;                     << 
303       }                                           253       }
304     }                                             254     }
305     else {                                     << 255     //
306       //                                       << 256     // gases
307       // gases                                 << 257     //
308       //                                       << 258     if (State == kStateGas) { 
                                                   >> 259 
309       fMdensity = 3.;                             260       fMdensity = 3.;
310       fX1density = 4.0;                           261       fX1density = 4.0;
311                                                << 262       //static const G4double ClimiG[] = {10.,10.5,11.,11.5,12.25,13.804};
312       if (fCdensity <= 10.) {                  << 263       //static const G4double X0valG[] = {1.6,1.7,1.8,1.9,2.0,2.0};
313         fX0density = 1.6;                      << 264       //static const G4double X1valG[] = {4.0,4.0,4.0,4.0,4.0,5.0};
314       }                                        << 265 
315       else if (fCdensity <= 10.5) {            << 266       if(fCdensity < 10.) {
316         fX0density = 1.7;                      << 267   fX0density = 1.6; 
317       }                                        << 268       } else if(fCdensity < 11.5) { 
318       else if (fCdensity <= 11.0) {            << 269   fX0density = 1.6 + 0.2*(fCdensity - 10.); 
319         fX0density = 1.8;                      << 270       } else if(fCdensity < 12.25) { 
320       }                                        << 271   fX0density = 1.9 + (fCdensity - 11.5)/7.5; 
321       else if (fCdensity <= 11.5) {            << 272       } else if(fCdensity < 13.804) { 
322         fX0density = 1.9;                      << 273   fX0density = 2.0; 
323       }                                        << 274   fX1density = 4.0 + (fCdensity - 12.25)/1.554;
324       else if (fCdensity <= 12.25) {           << 275       } else {
325         fX0density = 2.0;                      << 276   fX0density = 0.326*fCdensity-2.5; fX1density = 5.0; 
326       }                                        << 
327       else if (fCdensity <= 13.804) {          << 
328         fX0density = 2.0;                      << 
329         fX1density = 5.0;                      << 
330       }                                        << 
331       else {                                   << 
332         fX0density = 0.326 * fCdensity - 2.5;  << 
333         fX1density = 5.0;                      << 
334       }                                           277       }
335                                                << 278       
336       // special: Hydrogen                     << 279       //special: Hydrogen
337       if (1 == nelm && 1 == Z0) {                 280       if (1 == nelm && 1 == Z0) {
338         fX0density = 1.837;                    << 281          fX0density = 1.837; fX1density = 3.0; fMdensity = 4.754;
339         fX1density = 3.0;                      << 
340         fMdensity = 4.754;                     << 
341       }                                           282       }
342                                                << 283       
343       // special: Helium                       << 284       //special: Helium
344       if (1 == nelm && 2 == Z0) {                 285       if (1 == nelm && 2 == Z0) {
345         fX0density = 2.191;                    << 286          fX0density = 2.191; fX1density = 3.0; fMdensity = 3.297;
346         fX1density = 3.0;                      << 
347         fMdensity = 3.297;                     << 
348       }                                           287       }
349     }                                             288     }
350   }                                               289   }
351                                                   290 
352   // change parameters if the gas is not in ST    291   // change parameters if the gas is not in STP.
353   // For the correction the density(STP) is ne << 292   // For the correction the density(STP) is needed. 
354   // Density(STP) is calculated here :         << 293   // Density(STP) is calculated here : 
355                                                << 294   
356   if (State == kStateGas) {                    << 295     
                                                   >> 296   if (State == kStateGas) { 
                                                   >> 297     G4double Density  = fMaterial->GetDensity();
357     G4double Pressure = fMaterial->GetPressure    298     G4double Pressure = fMaterial->GetPressure();
358     G4double Temp = fMaterial->GetTemperature( << 299     G4double Temp     = fMaterial->GetTemperature();
359                                                << 300       
360     G4double DensitySTP = density * STP_Pressu << 301     G4double DensitySTP = Density*STP_Pressure*Temp/(Pressure*STP_Temperature);
361                                                << 302 
362     G4double ParCorr = G4Log(density / Density << 303     G4double ParCorr = G4Log(Density/DensitySTP);
363                                                << 304   
364     fCdensity -= ParCorr;                      << 305     fCdensity  -= ParCorr;
365     fX0density -= ParCorr / twoln10;           << 306     fX0density -= ParCorr/twoln10;
366     fX1density -= ParCorr / twoln10;           << 307     fX1density -= ParCorr/twoln10;
367   }                                            << 308   }
368                                                << 309 
369   // fAdensity parameter can be fixed for not  << 310   // fAdensity parameter can be fixed for not conductive materials 
370   if (0.0 == fD0density) {                     << 311   if(0.0 == fD0density) {
371     G4double Xa = fCdensity / twoln10;         << 312     G4double Xa = fCdensity/twoln10;
372     fAdensity = twoln10 * (Xa - fX0density) /  << 313     fAdensity = twoln10*(Xa-fX0density)
373   }                                            << 314       /std::pow((fX1density-fX0density),fMdensity);
                                                   >> 315   }
                                                   >> 316   /*  
                                                   >> 317   G4cout << "G4IonisParamMat: density effect data for <" 
                                                   >> 318          << fMaterial->GetName() 
                                                   >> 319    << "> " << G4endl;
                                                   >> 320   G4cout << "Eplasma(eV)= " << fPlasmaEnergy/eV
                                                   >> 321    << " rho= " << fAdjustmentFactor
                                                   >> 322    << " -C= " << fCdensity 
                                                   >> 323    << " x0= " << fX0density
                                                   >> 324    << " x1= " << fX1density
                                                   >> 325    << " a= " << fAdensity
                                                   >> 326    << " m= " << fMdensity
                                                   >> 327    << G4endl;
                                                   >> 328   */
374 }                                                 329 }
375                                                   330 
376 //....oooOO0OOooo........oooOO0OOooo........oo    331 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
377                                                   332 
378 void G4IonisParamMat::ComputeFluctModel()         333 void G4IonisParamMat::ComputeFluctModel()
379 {                                                 334 {
380   // compute parameters for the energy loss fl    335   // compute parameters for the energy loss fluctuation model
381   // needs an 'effective Z'                    << 336   // needs an 'effective Z' 
382   G4double Zeff = 0.;                             337   G4double Zeff = 0.;
383   for (std::size_t i = 0; i < fMaterial->GetNu << 338   for (size_t i=0;i<fMaterial->GetNumberOfElements();i++) {
384     Zeff += (fMaterial->GetFractionVector())[i << 339      Zeff += (fMaterial->GetFractionVector())[i]
385   }                                            << 340              *((*(fMaterial->GetElementVector()))[i]->GetZ());
386   if (Zeff > 2.1) {                            << 341   }
387     fF2fluct = 2.0 / Zeff;                     << 342   if (Zeff > 2.) { fF2fluct = 2./Zeff; }
388     fF1fluct = 1. - fF2fluct;                  << 343   else           { fF2fluct = 0.; }
389     fEnergy2fluct = 10. * Zeff * Zeff * CLHEP: << 344 
390     fLogEnergy2fluct = G4Log(fEnergy2fluct);   << 345   fF1fluct         = 1. - fF2fluct;
391     fLogEnergy1fluct = (fLogMeanExcEnergy - fF << 346   fEnergy2fluct    = 10.*Zeff*Zeff*eV;
392   } else if (Zeff > 1.1) {                     << 347   fLogEnergy2fluct = G4Log(fEnergy2fluct);
393     fF2fluct = 0.0;                            << 348   fLogEnergy1fluct = (fLogMeanExcEnergy - fF2fluct*fLogEnergy2fluct)
394     fF1fluct = 1.0;                            << 349                      /fF1fluct;
395     fEnergy2fluct = 40. * CLHEP::eV;           << 350   fEnergy1fluct    = G4Exp(fLogEnergy1fluct);
396     fLogEnergy2fluct = G4Log(fEnergy2fluct);   << 351   fEnergy0fluct    = 10.*eV;
397     fLogEnergy1fluct = fLogMeanExcEnergy;      << 
398   } else {                                     << 
399     fF2fluct = 0.0;                            << 
400     fF1fluct = 1.0;                            << 
401     fEnergy2fluct = 10. * CLHEP::eV;           << 
402     fLogEnergy2fluct = G4Log(fEnergy2fluct);   << 
403     fLogEnergy1fluct = fLogMeanExcEnergy;      << 
404   }                                            << 
405   fEnergy1fluct = G4Exp(fLogEnergy1fluct);     << 
406   fEnergy0fluct = 10. * CLHEP::eV;             << 
407   fRateionexcfluct = 0.4;                         352   fRateionexcfluct = 0.4;
408 }                                                 353 }
409                                                   354 
410 //....oooOO0OOooo........oooOO0OOooo........oo    355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
411                                                   356 
412 void G4IonisParamMat::ComputeIonParameters()      357 void G4IonisParamMat::ComputeIonParameters()
413 {                                                 358 {
414   // get elements in the actual material,         359   // get elements in the actual material,
415   const G4ElementVector* theElementVector = fM << 360   const G4ElementVector* theElementVector = fMaterial->GetElementVector() ;
416   const G4double* theAtomicNumDensityVector =  << 361   const G4double* theAtomicNumDensityVector =
417   const auto NumberOfElements = (G4int)fMateri << 362                          fMaterial->GetAtomicNumDensityVector() ;
                                                   >> 363   const G4int NumberOfElements = fMaterial->GetNumberOfElements() ;
418                                                   364 
419   //  loop for the elements in the material       365   //  loop for the elements in the material
420   //  to find out average values Z, vF, lF        366   //  to find out average values Z, vF, lF
421   G4double z(0.0), vF(0.0), lF(0.0), a23(0.0); << 367   G4double z(0.0), vF(0.0), lF(0.0), norm(0.0), a23(0.0);
422                                                   368 
423   G4Pow* g4pow = G4Pow::GetInstance();         << 369   if( 1 == NumberOfElements ) {
424   if (1 == NumberOfElements) {                 << 
425     const G4Element* element = (*theElementVec    370     const G4Element* element = (*theElementVector)[0];
426     z = element->GetZ();                          371     z = element->GetZ();
427     vF = element->GetIonisation()->GetFermiVel << 372     vF= element->GetIonisation()->GetFermiVelocity();
428     lF = element->GetIonisation()->GetLFactor( << 373     lF= element->GetIonisation()->GetLFactor();
429     a23 = 1.0 / g4pow->A23(element->GetN());   << 374     a23 = 1.0/G4Pow::GetInstance()->Z23(G4int(element->GetN()));
430   }                                            << 375 
431   else {                                       << 376   } else {
432     G4double norm(0.0);                        << 377     for (G4int iel=0; iel<NumberOfElements; iel++)
433     for (G4int iel = 0; iel < NumberOfElements << 378       {
434       const G4Element* element = (*theElementV << 379         const G4Element* element = (*theElementVector)[iel];
435       const G4double weight = theAtomicNumDens << 380         const G4double weight = theAtomicNumDensityVector[iel];
436       norm += weight;                          << 381         norm += weight ;
437       z += element->GetZ() * weight;           << 382         z    += element->GetZ() * weight;
438       vF += element->GetIonisation()->GetFermi << 383         vF   += element->GetIonisation()->GetFermiVelocity() * weight;
439       lF += element->GetIonisation()->GetLFact << 384         lF   += element->GetIonisation()->GetLFactor() * weight;
440       a23 += weight / g4pow->A23(element->GetN << 385   a23  += weight/G4Pow::GetInstance()->Z23(G4int(element->GetN()));
441     }                                          << 386       }
442     if (norm > 0.0) { norm = 1.0/norm; }       << 387     z  /= norm;
443     z *= norm;                                 << 388     vF /= norm;
444     vF *= norm;                                << 389     lF /= norm;
445     lF *= norm;                                << 390     a23 /= norm;
446     a23 *= norm;                               << 391   }  
447   }                                            << 392   fZeff        = z;
448   fZeff = z;                                   << 393   fLfactor     = lF;
449   fLfactor = lF;                               << 394   fFermiEnergy = 25.*keV*vF*vF;
450   fFermiEnergy = 25. * CLHEP::keV * vF * vF;   << 395   fInvA23      = a23;
451   fInvA23 = a23;                               << 
452 }                                                 396 }
453                                                   397 
454 //....oooOO0OOooo........oooOO0OOooo........oo    398 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
455                                                   399 
456 void G4IonisParamMat::SetMeanExcitationEnergy(    400 void G4IonisParamMat::SetMeanExcitationEnergy(G4double value)
457 {                                                 401 {
458   if (value == fMeanExcitationEnergy || value  << 402   if(value == fMeanExcitationEnergy || value <= 0.0) { return; }
459     return;                                    << 
460   }                                            << 
461   if (G4NistManager::Instance()->GetVerbose()     403   if (G4NistManager::Instance()->GetVerbose() > 1) {
462     G4cout << "G4Material: Mean excitation ene << 404     G4cout << "G4Material: Mean excitation energy is changed for "
463            << " Iold= " << fMeanExcitationEner << 405            << fMaterial->GetName()
                                                   >> 406            << " Iold= " << fMeanExcitationEnergy/eV
                                                   >> 407            << "eV; Inew= " << value/eV << " eV;"
464            << G4endl;                             408            << G4endl;
465   }                                               409   }
466                                                << 410   
467   fMeanExcitationEnergy = value;                  411   fMeanExcitationEnergy = value;
468                                                   412 
469   // add corrections to density effect            413   // add corrections to density effect
470   G4double newlog = G4Log(value);                 414   G4double newlog = G4Log(value);
471   G4double corr = 2 * (newlog - fLogMeanExcEne << 415   G4double corr = 2*(newlog - fLogMeanExcEnergy);
472   fCdensity += corr;                           << 416   fCdensity  += corr;
473   fX0density += corr / twoln10;                << 417   fX0density += corr/twoln10;
474   fX1density += corr / twoln10;                << 418   fX1density += corr/twoln10;
475                                                   419 
476   // recompute parameters of fluctuation model    420   // recompute parameters of fluctuation model
477   fLogMeanExcEnergy = newlog;                     421   fLogMeanExcEnergy = newlog;
478   ComputeFluctModel();                            422   ComputeFluctModel();
479 }                                                 423 }
480                                                   424 
481 //....oooOO0OOooo........oooOO0OOooo........oo    425 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
482                                                   426 
483 void G4IonisParamMat::SetDensityEffectParamete << 427 G4double G4IonisParamMat::FindMeanExcitationEnergy(const G4String& chFormula)
484   G4double cd, G4double md, G4double ad, G4dou << 428 {
                                                   >> 429   // The data on mean excitation energy for compaunds
                                                   >> 430   // from "Stopping Powers for Electrons and Positrons"
                                                   >> 431   // ICRU Report N#37, 1984  (energy in eV)
                                                   >> 432 
                                                   >> 433   size_t numberOfMolecula = 54; 
                                                   >> 434   static const G4String name[54] = {
                                                   >> 435     // gas 0 - 12
                                                   >> 436     "NH_3",       "C_4H_10",     "CO_2",      "C_2H_6",      "C_7H_16-Gas",
                                                   >> 437     // "G4_AMMONIA", "G4_BUTANE","G4_CARBON_DIOXIDE","G4_ETHANE", "G4_N-HEPTANE"
                                                   >> 438     "C_6H_14-Gas",   "CH_4",     "NO",        "N_2O",        "C_8H_18-Gas",      
                                                   >> 439     // "G4_N-HEXANE" , "G4_METHANE", "x", "G4_NITROUS_OXIDE", "G4_OCTANE"
                                                   >> 440     "C_5H_12-Gas",   "C_3H_8",   "H_2O-Gas",                        
                                                   >> 441     // "G4_N-PENTANE", "G4_PROPANE", "G4_WATER_VAPOR"
                                                   >> 442 
                                                   >> 443     // liquid 13 - 39
                                                   >> 444     "C_3H_6O",    "C_6H_5NH_2",  "C_6H_6",    "C_4H_9OH",    "CCl_4", 
                                                   >> 445     //"G4_ACETONE","G4_ANILINE","G4_BENZENE","G4_N-BUTYL_ALCOHOL","G4_CARBON_TETRACHLORIDE"  
                                                   >> 446     "C_6H_5Cl",   "CHCl_3",      "C_6H_12",   "C_6H_4Cl_2",  "C_4Cl_2H_8O",
                                                   >> 447     //"G4_CHLOROBENZENE","G4_CHLOROFORM","G4_CYCLOHEXANE","G4_1,2-DICHLOROBENZENE","G4_DICHLORODIETHYL_ETHER"
                                                   >> 448     "C_2Cl_2H_4", "(C_2H_5)_2O", "C_2H_5OH",  "C_3H_5(OH)_3","C_7H_16",
                                                   >> 449     //"G4_1,2-DICHLOROETHANE","G4_DIETHYL_ETHER","G4_ETHYL_ALCOHOL","G4_GLYCEROL","G4_N-HEPTANE"
                                                   >> 450     "C_6H_14",    "CH_3OH",      "C_6H_5NO_2","C_5H_12",     "C_3H_7OH",
                                                   >> 451     //"G4_N-HEXANE","G4_METHANOL","G4_NITROBENZENE","G4_N-PENTANE","G4_N-PROPYL_ALCOHOL",  
                                                   >> 452     "C_5H_5N",    "C_8H_8",      "C_2Cl_4",   "C_7H_8",      "C_2Cl_3H",
                                                   >> 453     //"G4_PYRIDINE","G4_POLYSTYRENE","G4_TETRACHLOROETHYLENE","G4_TOLUENE","G4_TRICHLOROETHYLENE"
                                                   >> 454     "H_2O",       "C_8H_10",                                                 
                                                   >> 455     // "G4_WATER", "G4_XYLENE"
                                                   >> 456 
                                                   >> 457     // solid 40 - 53
                                                   >> 458     "C_5H_5N_5",  "C_5H_5N_5O",  "(C_6H_11NO)-nylon",  "C_25H_52",
                                                   >> 459     // "G4_ADENINE", "G4_GUANINE", "G4_NYLON-6-6", "G4_PARAFFIN"
                                                   >> 460     "(C_2H_4)-Polyethylene",     "(C_5H_8O_2)-Polymethil_Methacrylate",
                                                   >> 461     // "G4_ETHYLENE", "G4_PLEXIGLASS"
                                                   >> 462     "(C_8H_8)-Polystyrene",      "A-150-tissue",       "Al_2O_3",  "CaF_2",
                                                   >> 463     // "G4_POLYSTYRENE", "G4_A-150_TISSUE", "G4_ALUMINUM_OXIDE", "G4_CALCIUM_FLUORIDE"
                                                   >> 464     "LiF",        "Photo_Emulsion",  "(C_2F_4)-Teflon",  "SiO_2"
                                                   >> 465     // "G4_LITHIUM_FLUORIDE", "G4_PHOTO_EMULSION", "G4_TEFLON", "G4_SILICON_DIOXIDE"
                                                   >> 466   } ;
                                                   >> 467     
                                                   >> 468   static const G4double meanExcitation[54] = {
                                                   >> 469 
                                                   >> 470     53.7,   48.3,  85.0,  45.4,  49.2,
                                                   >> 471     49.1,   41.7,  87.8,  84.9,  49.5,
                                                   >> 472     48.2,   47.1,  71.6,
                                                   >> 473 
                                                   >> 474     64.2,   66.2,  63.4,  59.9,  166.3,
                                                   >> 475     89.1,  156.0,  56.4, 106.5,  103.3, 
                                                   >> 476    111.9,   60.0,  62.9,  72.6,   54.4,  
                                                   >> 477     54.0,  67.6,   75.8,  53.6,   61.1,  
                                                   >> 478     66.2,  64.0,  159.2,  62.5,  148.1,  
                                                   >> 479     75.0,  61.8,
                                                   >> 480 
                                                   >> 481     71.4,  75.0,   63.9,  48.3,   57.4,
                                                   >> 482     74.0,  68.7,   65.1, 145.2,  166.,
                                                   >> 483     94.0, 331.0,   99.1, 139.2 
                                                   >> 484   };
                                                   >> 485 
                                                   >> 486   G4double x = fMeanExcitationEnergy;
                                                   >> 487 
                                                   >> 488   for(size_t i=0; i<numberOfMolecula; i++) {
                                                   >> 489     if(chFormula == name[i]) {
                                                   >> 490       x = meanExcitation[i]*eV;
                                                   >> 491       break;
                                                   >> 492     }
                                                   >> 493   }
                                                   >> 494   return x;
                                                   >> 495 }
                                                   >> 496 
                                                   >> 497 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
                                                   >> 498 /*
                                                   >> 499 G4IonisParamMat::G4IonisParamMat(const G4IonisParamMat& right)
                                                   >> 500 {
                                                   >> 501   fShellCorrectionVector = 0;
                                                   >> 502   fMaterial = 0;
                                                   >> 503   *this = right;
                                                   >> 504 }
                                                   >> 505 */
                                                   >> 506 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
                                                   >> 507 
                                                   >> 508 G4IonisParamMat& G4IonisParamMat::operator=(const G4IonisParamMat& right)
                                                   >> 509 {
                                                   >> 510   if (this != &right)
                                                   >> 511     {
                                                   >> 512       fMaterial                 = right.fMaterial;
                                                   >> 513       fMeanExcitationEnergy     = right.fMeanExcitationEnergy;
                                                   >> 514       fLogMeanExcEnergy         = right.fLogMeanExcEnergy;
                                                   >> 515       if(fShellCorrectionVector){ delete [] fShellCorrectionVector; }      
                                                   >> 516       fShellCorrectionVector    = new G4double[3];             
                                                   >> 517       fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
                                                   >> 518       fShellCorrectionVector[1] = right.fShellCorrectionVector[1];
                                                   >> 519       fShellCorrectionVector[2] = right.fShellCorrectionVector[2];
                                                   >> 520       fTaul                     = right.fTaul;
                                                   >> 521       fCdensity                 = right.fCdensity;
                                                   >> 522       fMdensity                 = right.fMdensity;
                                                   >> 523       fAdensity                 = right.fAdensity;
                                                   >> 524       fX0density                = right.fX0density;
                                                   >> 525       fX1density                = right.fX1density;
                                                   >> 526       fD0density                = right.fD0density;
                                                   >> 527       fPlasmaEnergy             = right.fPlasmaEnergy;
                                                   >> 528       fAdjustmentFactor         = right.fAdjustmentFactor;
                                                   >> 529       fF1fluct                  = right.fF1fluct;
                                                   >> 530       fF2fluct                  = right.fF2fluct;
                                                   >> 531       fEnergy1fluct             = right.fEnergy1fluct;
                                                   >> 532       fLogEnergy1fluct          = right.fLogEnergy1fluct;      
                                                   >> 533       fEnergy2fluct             = right.fEnergy2fluct;
                                                   >> 534       fLogEnergy2fluct          = right.fLogEnergy2fluct;      
                                                   >> 535       fEnergy0fluct             = right.fEnergy0fluct;
                                                   >> 536       fRateionexcfluct          = right.fRateionexcfluct;
                                                   >> 537       fZeff                     = right.fZeff;
                                                   >> 538       fFermiEnergy              = right.fFermiEnergy;
                                                   >> 539       fLfactor                  = right.fLfactor;
                                                   >> 540       fInvA23                   = right.fInvA23;
                                                   >> 541       fBirks                    = right.fBirks;
                                                   >> 542       fMeanEnergyPerIon         = right.fMeanEnergyPerIon;
                                                   >> 543       twoln10                   = right.twoln10;
                                                   >> 544     } 
                                                   >> 545   return *this;
                                                   >> 546 }
                                                   >> 547 
                                                   >> 548 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
                                                   >> 549 
                                                   >> 550 G4int G4IonisParamMat::operator==(const G4IonisParamMat& right) const
485 {                                                 551 {
486   // no check on consistence of user parameter << 552   return (this == (G4IonisParamMat*) &right);
487   G4AutoLock l(&ionisMutex);                   << 
488   fCdensity = cd;                              << 
489   fMdensity = md;                              << 
490   fAdensity = ad;                              << 
491   fX0density = x0;                             << 
492   fX1density = x1;                             << 
493   fD0density = d0;                             << 
494   l.unlock();                                  << 
495 }                                                 553 }
496                                                   554 
497 //....oooOO0OOooo........oooOO0OOooo........oo    555 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
498                                                   556 
499 void G4IonisParamMat::SetDensityEffectParamete << 557 G4int G4IonisParamMat::operator!=(const G4IonisParamMat& right) const
500 {                                              << 558 {
501   G4AutoLock l(&ionisMutex);                   << 559   return (this != (G4IonisParamMat*) &right);
502   const G4IonisParamMat* ipm = bmat->GetIonisa << 
503   fCdensity = ipm->GetCdensity();              << 
504   fMdensity = ipm->GetMdensity();              << 
505   fAdensity = ipm->GetAdensity();              << 
506   fX0density = ipm->GetX0density();            << 
507   fX1density = ipm->GetX1density();            << 
508   fD0density = ipm->GetD0density();            << 
509                                                << 
510   G4double corr = G4Log(bmat->GetDensity() / f << 
511   fCdensity += corr;                           << 
512   fX0density += corr / twoln10;                << 
513   fX1density += corr / twoln10;                << 
514   l.unlock();                                  << 
515 }                                              << 
516                                                << 
517 //....oooOO0OOooo........oooOO0OOooo........oo << 
518                                                << 
519 void G4IonisParamMat::ComputeDensityEffectOnFl << 
520 {                                              << 
521   if (val) {                                   << 
522     if (nullptr == fDensityEffectCalc) {       << 
523       G4int n = 0;                             << 
524       for (std::size_t i = 0; i < fMaterial->G << 
525         const G4int Z = fMaterial->GetElement( << 
526         n += G4AtomicShells::GetNumberOfShells << 
527       }                                        << 
528       // The last level is the conduction leve << 
529       // make a dummy conductor level with zer << 
530       fDensityEffectCalc = new G4DensityEffect << 
531     }                                          << 
532   }                                            << 
533   else {                                       << 
534     delete fDensityEffectCalc;                 << 
535     fDensityEffectCalc = nullptr;              << 
536   }                                            << 
537 }                                                 560 }
538                                                   561 
539 //....oooOO0OOooo........oooOO0OOooo........oo    562 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
540                                                   563 
541 G4double G4IonisParamMat::FindMeanExcitationEn << 
542 {                                              << 
543   G4double res = 0.0;                          << 
544   // data from density effect data             << 
545   if (fDensityData != nullptr) {               << 
546     G4int idx = fDensityData->GetIndex(mat->Ge << 
547     if (idx >= 0) {                            << 
548       res = fDensityData->GetMeanIonisationPot << 
549     }                                          << 
550   }                                            << 
551                                                << 
552   // The data on mean excitation energy for co << 
553   // from "Stopping Powers for Electrons and P << 
554   // ICRU Report N#37, 1984  (energy in eV)    << 
555   // this value overwrites Density effect data << 
556   G4String chFormula = mat->GetChemicalFormula << 
557   if (! chFormula.empty()) {                   << 
558     static const size_t numberOfMolecula = 54; << 
559     // clang-format off                        << 
560     static const G4String name[numberOfMolecul << 
561       // gas 0 - 12                            << 
562       "NH_3",       "C_4H_10",     "CO_2",     << 
563       // "G4_AMMONIA", "G4_BUTANE","G4_CARBON_ << 
564       "C_6H_14-Gas",   "CH_4",     "NO",       << 
565       // "G4_N-HEXANE" , "G4_METHANE", "x", "G << 
566       "C_5H_12-Gas",   "C_3H_8",   "H_2O-Gas", << 
567       // "G4_N-PENTANE", "G4_PROPANE", "G4_WAT << 
568                                                << 
569       // liquid 13 - 39                        << 
570       "C_3H_6O",    "C_6H_5NH_2",  "C_6H_6",   << 
571       //"G4_ACETONE","G4_ANILINE","G4_BENZENE" << 
572       "C_6H_5Cl",   "CHCl_3",      "C_6H_12",  << 
573       //"G4_CHLOROBENZENE","G4_CHLOROFORM","G4 << 
574       //"G4_DICHLORODIETHYL_ETHER"             << 
575       "C_2Cl_2H_4", "(C_2H_5)_2O", "C_2H_5OH", << 
576       //"G4_1,2-DICHLOROETHANE","G4_DIETHYL_ET << 
577       "C_6H_14",    "CH_3OH",      "C_6H_5NO_2 << 
578       //"G4_N-HEXANE","G4_METHANOL","G4_NITROB << 
579       "C_5H_5N",    "C_8H_8",      "C_2Cl_4",  << 
580       //"G4_PYRIDINE","G4_POLYSTYRENE","G4_TET << 
581       "H_2O",       "C_8H_10",                 << 
582       // "G4_WATER", "G4_XYLENE"               << 
583                                                << 
584       // solid 40 - 53                         << 
585       "C_5H_5N_5",  "C_5H_5N_5O",  "(C_6H_11NO << 
586       // "G4_ADENINE", "G4_GUANINE", "G4_NYLON << 
587       "(C_2H_4)-Polyethylene",     "(C_5H_8O_2 << 
588       // "G4_ETHYLENE", "G4_PLEXIGLASS"        << 
589       "(C_8H_8)-Polystyrene",      "A-150-tiss << 
590       // "G4_POLYSTYRENE", "G4_A-150_TISSUE",  << 
591       "LiF",        "Photo_Emulsion",  "(C_2F_ << 
592       // "G4_LITHIUM_FLUORIDE", "G4_PHOTO_EMUL << 
593     } ;                                        << 
594                                                << 
595     static const G4double meanExcitation[numbe << 
596                                                << 
597       53.7,   48.3,  85.0,  45.4,  49.2,       << 
598       49.1,   41.7,  87.8,  84.9,  49.5,       << 
599       48.2,   47.1,  71.6,                     << 
600                                                << 
601       64.2,   66.2,  63.4,  59.9,  166.3,      << 
602       89.1,  156.0,  56.4, 106.5,  103.3,      << 
603       111.9,   60.0,  62.9,  72.6,   54.4,     << 
604       54.0,  67.6,   75.8,  53.6,   61.1,      << 
605       66.2,  64.0,  159.2,  62.5,  148.1,      << 
606       75.0,  61.8,                             << 
607                                                << 
608       71.4,  75.0,   63.9,  48.3,   57.4,      << 
609       74.0,  68.7,   65.1, 145.2,  166.,       << 
610       94.0, 331.0,   99.1, 139.2               << 
611     };                                         << 
612     // clang-format on                         << 
613                                                << 
614     for (std::size_t i = 0; i < numberOfMolecu << 
615       if (chFormula == name[i]) {              << 
616         res = meanExcitation[i] * CLHEP::eV;   << 
617         break;                                 << 
618       }                                        << 
619     }                                          << 
620   }                                            << 
621   return res;                                  << 
622 }                                              << 
623                                                   564