Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/src/G4VEmModel.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 /processes/electromagnetic/utils/src/G4VEmModel.cc (Version 11.3.0) and /processes/electromagnetic/utils/src/G4VEmModel.cc (Version 11.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 //                                                 25 //
 26 // -------------------------------------------     26 // -------------------------------------------------------------------
 27 //                                                 27 //
 28 // GEANT4 Class file                               28 // GEANT4 Class file
 29 //                                                 29 //
 30 //                                                 30 //
 31 // File name:     G4VEmModel                       31 // File name:     G4VEmModel
 32 //                                                 32 //
 33 // Author:        Vladimir Ivanchenko              33 // Author:        Vladimir Ivanchenko
 34 //                                                 34 //
 35 // Creation date: 25.07.2005                       35 // Creation date: 25.07.2005
 36 //                                                 36 //
 37 // Modifications:                                  37 // Modifications:
 38 // 25.10.2005 Set default highLimit=100.TeV (V     38 // 25.10.2005 Set default highLimit=100.TeV (V.Ivanchenko)
 39 // 06.02.2006 add method ComputeMeanFreePath()     39 // 06.02.2006 add method ComputeMeanFreePath() (mma)
 40 // 16.02.2009 Move implementations of virtual      40 // 16.02.2009 Move implementations of virtual methods to source (VI)
 41 //                                                 41 //
 42 //                                                 42 //
 43 // Class Description:                              43 // Class Description:
 44 //                                                 44 //
 45 // Abstract interface to energy loss models        45 // Abstract interface to energy loss models
 46                                                    46 
 47 // -------------------------------------------     47 // -------------------------------------------------------------------
 48 //                                                 48 //
 49                                                    49 
 50 #include "G4VEmModel.hh"                           50 #include "G4VEmModel.hh"
 51 #include "G4ElementData.hh"                        51 #include "G4ElementData.hh"
 52 #include "G4LossTableManager.hh"                   52 #include "G4LossTableManager.hh"
 53 #include "G4LossTableBuilder.hh"                   53 #include "G4LossTableBuilder.hh"
 54 #include "G4ProductionCutsTable.hh"                54 #include "G4ProductionCutsTable.hh"
 55 #include "G4ParticleChangeForLoss.hh"              55 #include "G4ParticleChangeForLoss.hh"
 56 #include "G4ParticleChangeForGamma.hh"             56 #include "G4ParticleChangeForGamma.hh"
 57 #include "G4EmParameters.hh"                       57 #include "G4EmParameters.hh"
 58 #include "G4SystemOfUnits.hh"                      58 #include "G4SystemOfUnits.hh"
 59 #include "G4EmUtility.hh"                          59 #include "G4EmUtility.hh"
 60 #include "G4Log.hh"                                60 #include "G4Log.hh"
 61 #include "Randomize.hh"                            61 #include "Randomize.hh"
 62 #include <iostream>                                62 #include <iostream>
 63                                                    63 
 64 //....oooOO0OOooo........oooOO0OOooo........oo     64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 65 //....oooOO0OOooo........oooOO0OOooo........oo     65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 66                                                    66 
 67 G4VEmModel::G4VEmModel(const G4String& nam):       67 G4VEmModel::G4VEmModel(const G4String& nam):
 68   inveplus(1.0/CLHEP::eplus),                      68   inveplus(1.0/CLHEP::eplus),
 69   lowLimit(0.1*CLHEP::keV),                        69   lowLimit(0.1*CLHEP::keV), 
 70   highLimit(100.0*CLHEP::TeV),                     70   highLimit(100.0*CLHEP::TeV),
 71   polarAngleLimit(CLHEP::pi),                      71   polarAngleLimit(CLHEP::pi),
 72   name(nam)                                        72   name(nam)
 73 {                                                  73 {
 74   xsec.resize(nsec);                               74   xsec.resize(nsec);
 75   fEmManager = G4LossTableManager::Instance();     75   fEmManager = G4LossTableManager::Instance();
 76   fEmManager->Register(this);                      76   fEmManager->Register(this);
 77   isMaster = fEmManager->IsMaster();           <<  77 
 78                                                << 
 79   G4LossTableBuilder* bld = fEmManager->GetTab     78   G4LossTableBuilder* bld = fEmManager->GetTableBuilder();
 80   theDensityFactor = bld->GetDensityFactors();     79   theDensityFactor = bld->GetDensityFactors();
 81   theDensityIdx = bld->GetCoupleIndexes();         80   theDensityIdx = bld->GetCoupleIndexes();
 82 }                                                  81 }
 83                                                    82 
 84 //....oooOO0OOooo........oooOO0OOooo........oo     83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 85                                                    84 
 86 G4VEmModel::~G4VEmModel()                          85 G4VEmModel::~G4VEmModel()
 87 {                                                  86 {
 88   if(localElmSelectors) {                          87   if(localElmSelectors) { 
 89     for(G4int i=0; i<nSelectors; ++i) {            88     for(G4int i=0; i<nSelectors; ++i) { 
 90       delete (*elmSelectors)[i];                   89       delete (*elmSelectors)[i]; 
 91     }                                              90     }
 92     delete elmSelectors;                           91     delete elmSelectors; 
 93   }                                                92   }
 94   delete anglModel;                                93   delete anglModel;
 95                                                    94   
 96   if(localTable && xSectionTable != nullptr) {     95   if(localTable && xSectionTable != nullptr) { 
 97     xSectionTable->clearAndDestroy();              96     xSectionTable->clearAndDestroy();
 98     delete xSectionTable;                          97     delete xSectionTable;
 99     xSectionTable = nullptr;                       98     xSectionTable = nullptr; 
100   }                                                99   }
                                                   >> 100   if(isMaster && fElementData != nullptr) {
                                                   >> 101     delete fElementData;
                                                   >> 102     fElementData = nullptr;
                                                   >> 103   }
101   fEmManager->DeRegister(this);                   104   fEmManager->DeRegister(this);
102 }                                                 105 }
103                                                   106 
104 //....oooOO0OOooo........oooOO0OOooo........oo    107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105                                                   108 
106 G4ParticleChangeForLoss* G4VEmModel::GetPartic    109 G4ParticleChangeForLoss* G4VEmModel::GetParticleChangeForLoss()
107 {                                                 110 {
108   G4ParticleChangeForLoss* p = nullptr;           111   G4ParticleChangeForLoss* p = nullptr;
109   if (pParticleChange != nullptr) {               112   if (pParticleChange != nullptr) {
110     p = static_cast<G4ParticleChangeForLoss*>(    113     p = static_cast<G4ParticleChangeForLoss*>(pParticleChange);
111   } else {                                        114   } else {
112     p = new G4ParticleChangeForLoss();            115     p = new G4ParticleChangeForLoss();
113     pParticleChange = p;                          116     pParticleChange = p;
114   }                                               117   }
115   if(fTripletModel != nullptr) { fTripletModel    118   if(fTripletModel != nullptr) { fTripletModel->SetParticleChange(p); }
116   return p;                                       119   return p;
117 }                                                 120 }
118                                                   121 
119 //....oooOO0OOooo........oooOO0OOooo........oo    122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
120                                                   123 
121 G4ParticleChangeForGamma* G4VEmModel::GetParti    124 G4ParticleChangeForGamma* G4VEmModel::GetParticleChangeForGamma()
122 {                                                 125 {
123   G4ParticleChangeForGamma* p = nullptr;          126   G4ParticleChangeForGamma* p = nullptr;
124   if (pParticleChange != nullptr) {               127   if (pParticleChange != nullptr) {
125     p = static_cast<G4ParticleChangeForGamma*>    128     p = static_cast<G4ParticleChangeForGamma*>(pParticleChange);
126   } else {                                        129   } else {
127     p = new G4ParticleChangeForGamma();           130     p = new G4ParticleChangeForGamma();
128     pParticleChange = p;                          131     pParticleChange = p;
129   }                                               132   }
130   if(fTripletModel != nullptr) { fTripletModel    133   if(fTripletModel != nullptr) { fTripletModel->SetParticleChange(p); }
131   return p;                                       134   return p;
132 }                                                 135 }
133                                                   136 
134 //....oooOO0OOooo........oooOO0OOooo........oo    137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135                                                   138 
136 void G4VEmModel::InitialiseElementSelectors(co    139 void G4VEmModel::InitialiseElementSelectors(const G4ParticleDefinition* part, 
137                                             co    140                                             const G4DataVector& cuts)
138 {                                                 141 {
139   if(highLimit <= lowLimit) { return; }           142   if(highLimit <= lowLimit) { return; }
140   G4EmUtility::InitialiseElementSelectors(this    143   G4EmUtility::InitialiseElementSelectors(this,part,cuts,lowLimit,highLimit);
141   localElmSelectors = true;                    << 
142 }                                                 144 }
143                                                   145 
144 //....oooOO0OOooo........oooOO0OOooo........oo    146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145                                                   147 
146 void G4VEmModel::InitialiseLocal(const G4Parti    148 void G4VEmModel::InitialiseLocal(const G4ParticleDefinition*, G4VEmModel*)
147 {}                                                149 {}
148                                                   150 
149 //....oooOO0OOooo........oooOO0OOooo........oo    151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150                                                   152 
151 void G4VEmModel::InitialiseForMaterial(const G    153 void G4VEmModel::InitialiseForMaterial(const G4ParticleDefinition* part,
152                                        const G    154                                        const G4Material* material)
153 {                                                 155 {
154   if(material != nullptr) {                       156   if(material != nullptr) {
155     G4int n = (G4int)material->GetNumberOfElem    157     G4int n = (G4int)material->GetNumberOfElements();
156     for(G4int i=0; i<n; ++i) {                    158     for(G4int i=0; i<n; ++i) {
157       G4int Z = material->GetElement(i)->GetZa    159       G4int Z = material->GetElement(i)->GetZasInt();
158       InitialiseForElement(part, Z);              160       InitialiseForElement(part, Z);
159     }                                             161     }
160   }                                               162   }
161 }                                                 163 }
162                                                   164 
163 //....oooOO0OOooo........oooOO0OOooo........oo    165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164                                                   166 
165 void G4VEmModel::InitialiseForElement(const G4    167 void G4VEmModel::InitialiseForElement(const G4ParticleDefinition*, G4int)
166 {}                                                168 {}
167                                                   169 
168 //....oooOO0OOooo........oooOO0OOooo........oo    170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
169                                                   171 
170 G4double G4VEmModel::ComputeDEDXPerVolume(cons    172 G4double G4VEmModel::ComputeDEDXPerVolume(const G4Material*,
171                                           cons    173                                           const G4ParticleDefinition*,
172                                           G4do    174                                           G4double,G4double)
173 {                                                 175 {
174   return 0.0;                                     176   return 0.0;
175 }                                                 177 }
176                                                   178 
177 //....oooOO0OOooo........oooOO0OOooo........oo    179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
178                                                   180 
179 G4double G4VEmModel::CrossSectionPerVolume(con    181 G4double G4VEmModel::CrossSectionPerVolume(const G4Material* mat,
180                                            con    182                                            const G4ParticleDefinition* p,
181                                            G4d    183                                            G4double ekin,
182                                            G4d    184                                            G4double emin,
183                                            G4d    185                                            G4double emax)
184 {                                                 186 {
185   SetupForMaterial(p, mat, ekin);                 187   SetupForMaterial(p, mat, ekin);
186   const G4double* theAtomNumDensityVector = ma    188   const G4double* theAtomNumDensityVector = mat->GetVecNbOfAtomsPerVolume();
187   G4int nelm = (G4int)mat->GetNumberOfElements    189   G4int nelm = (G4int)mat->GetNumberOfElements(); 
188   if(nelm > nsec) {                               190   if(nelm > nsec) {
189     xsec.resize(nelm);                            191     xsec.resize(nelm);
190     nsec = nelm;                                  192     nsec = nelm;
191   }                                               193   }
192   G4double cross = 0.0;                           194   G4double cross = 0.0;
193   for (G4int i=0; i<nelm; ++i) {                  195   for (G4int i=0; i<nelm; ++i) {
194     cross += theAtomNumDensityVector[i]*          196     cross += theAtomNumDensityVector[i]*
195       ComputeCrossSectionPerAtom(p,mat->GetEle    197       ComputeCrossSectionPerAtom(p,mat->GetElement(i),ekin,emin,emax);
196     xsec[i] = cross;                              198     xsec[i] = cross;
197   }                                               199   }
198   return cross;                                   200   return cross;
199 }                                                 201 }
200                                                   202 
201 //....oooOO0OOooo........oooOO0OOooo........oo    203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
202                                                   204 
203 G4double G4VEmModel::GetPartialCrossSection(co    205 G4double G4VEmModel::GetPartialCrossSection(const G4Material*, G4int,
204                                             co    206                                             const G4ParticleDefinition*,
205                                             G4    207                                             G4double)
206 {                                                 208 { 
207   return 0.0;                                     209   return 0.0;
208 }                                                 210 }
209                                                   211 
210 //....oooOO0OOooo........oooOO0OOooo........oo    212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
211                                                   213 
212 void G4VEmModel::StartTracking(G4Track*)          214 void G4VEmModel::StartTracking(G4Track*)
213 {}                                                215 {}
214                                                   216 
215 //....oooOO0OOooo........oooOO0OOooo........oo    217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
216                                                   218 
217 const G4Element* G4VEmModel::SelectRandomAtom(    219 const G4Element* G4VEmModel::SelectRandomAtom(const G4Material* mat,
218                                                   220                                               const G4ParticleDefinition* pd,
219                                                   221                                               G4double kinEnergy,
220                                                   222                                               G4double tcut,
221                                                   223                                               G4double tmax)
222 {                                                 224 {
223   G4int n = (G4int)mat->GetNumberOfElements();    225   G4int n = (G4int)mat->GetNumberOfElements();
224   fCurrentElement = mat->GetElement(0);           226   fCurrentElement = mat->GetElement(0);
225   if (n > 1) {                                    227   if (n > 1) {
226     const G4double x = G4UniformRand()*           228     const G4double x = G4UniformRand()*
227       G4VEmModel::CrossSectionPerVolume(mat,pd    229       G4VEmModel::CrossSectionPerVolume(mat,pd,kinEnergy,tcut,tmax);
228     for(G4int i=0; i<n; ++i) {                    230     for(G4int i=0; i<n; ++i) {
229       if (x <= xsec[i]) {                         231       if (x <= xsec[i]) {
230         fCurrentElement = mat->GetElement(i);     232         fCurrentElement = mat->GetElement(i);
231         break;                                    233         break;
232       }                                           234       }
233     }                                             235     }
234   }                                               236   }
235   return fCurrentElement;                         237   return fCurrentElement;
236 }                                                 238 }
237                                                   239 
238 //....oooOO0OOooo........oooOO0OOooo........oo    240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
239                                                   241 
240 const G4Element* G4VEmModel::GetCurrentElement    242 const G4Element* G4VEmModel::GetCurrentElement(const G4Material* mat) const
241 {                                                 243 {
242   const G4Element* elm = fCurrentElement;         244   const G4Element* elm = fCurrentElement;
243   if(nullptr == elm && nullptr != mat) {          245   if(nullptr == elm && nullptr != mat) {
244     elm = G4EmUtility::SampleRandomElement(mat    246     elm = G4EmUtility::SampleRandomElement(mat);
245   }                                               247   }
246   return elm;                                     248   return elm;
247 }                                                 249 }
248                                                   250 
249 //....oooOO0OOooo........oooOO0OOooo........oo    251 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
250                                                   252 
251 G4int G4VEmModel::SelectRandomAtomNumber(const    253 G4int G4VEmModel::SelectRandomAtomNumber(const G4Material* mat) const
252 {                                                 254 {
253   const G4Element* elm = GetCurrentElement(mat    255   const G4Element* elm = GetCurrentElement(mat);
254   return (nullptr == elm) ? 0 : elm->GetZasInt    256   return (nullptr == elm) ? 0 : elm->GetZasInt();
255 }                                                 257 }
256                                                   258 
257 //....oooOO0OOooo........oooOO0OOooo........oo    259 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
258                                                   260 
259 const G4Isotope* G4VEmModel::GetCurrentIsotope    261 const G4Isotope* G4VEmModel::GetCurrentIsotope(const G4Element* elm) const
260 {                                                 262 {
261   const G4Isotope* iso = nullptr;                 263   const G4Isotope* iso = nullptr;
262   const G4Element* el = elm;                      264   const G4Element* el = elm;
263   if(nullptr == el && nullptr != fCurrentCoupl    265   if(nullptr == el && nullptr != fCurrentCouple) { 
264     el = GetCurrentElement(fCurrentCouple->Get    266     el = GetCurrentElement(fCurrentCouple->GetMaterial());
265   }                                               267   }
266   if(nullptr != el) {                             268   if(nullptr != el) {
267     iso = G4EmUtility::SampleRandomIsotope(el)    269     iso = G4EmUtility::SampleRandomIsotope(el);
268   }                                               270   }
269   return iso;                                     271   return iso;
270 }                                                 272 }
271                                                   273 
272 //....oooOO0OOooo........oooOO0OOooo........oo    274 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
273                                                   275 
274 G4int G4VEmModel::SelectIsotopeNumber(const G4    276 G4int G4VEmModel::SelectIsotopeNumber(const G4Element* elm) const
275 {                                                 277 {
276   auto iso = GetCurrentIsotope(elm);              278   auto iso = GetCurrentIsotope(elm);
277   return (nullptr != iso) ? iso->GetN() : 0;      279   return (nullptr != iso) ? iso->GetN() : 0;
278 }                                                 280 }
279                                                   281 
280 //....oooOO0OOooo........oooOO0OOooo........oo    282 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
281                                                   283 
282 G4double G4VEmModel::ComputeCrossSectionPerAto    284 G4double G4VEmModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
283                                                   285                                                 G4double, G4double, G4double,
284                                                   286                                                 G4double, G4double)
285 {                                                 287 {
286   return 0.0;                                     288   return 0.0;
287 }                                                 289 }
288                                                   290 
289 //....oooOO0OOooo........oooOO0OOooo........oo    291 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
290                                                   292 
291 G4double                                          293 G4double 
292 G4VEmModel::ComputeCrossSectionPerShell(const     294 G4VEmModel::ComputeCrossSectionPerShell(const G4ParticleDefinition*,
293                                         G4int,    295                                         G4int, G4int, 
294                                         G4doub    296                                         G4double, G4double, G4double)
295 {                                                 297 {
296   return 0.0;                                     298   return 0.0;
297 }                                                 299 }
298                                                   300 
299 //....oooOO0OOooo........oooOO0OOooo........oo    301 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
300                                                   302 
301 void G4VEmModel::DefineForRegion(const G4Regio    303 void G4VEmModel::DefineForRegion(const G4Region*) 
302 {}                                                304 {}
303                                                   305 
304 //....oooOO0OOooo........oooOO0OOooo........oo    306 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
305                                                   307 
306 void G4VEmModel::FillNumberOfSecondaries(G4int    308 void G4VEmModel::FillNumberOfSecondaries(G4int& numberOfTriplets,
307                                          G4int    309                                          G4int& numberOfRecoil)
308 {                                                 310 {
309   numberOfTriplets = 0;                           311   numberOfTriplets = 0;
310   numberOfRecoil = 0;                             312   numberOfRecoil = 0;
311 }                                                 313 }
312                                                   314 
313 //....oooOO0OOooo........oooOO0OOooo........oo    315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
314                                                   316 
315 G4double G4VEmModel::ChargeSquareRatio(const G    317 G4double G4VEmModel::ChargeSquareRatio(const G4Track& track)
316 {                                                 318 {
317   return GetChargeSquareRatio(track.GetParticl    319   return GetChargeSquareRatio(track.GetParticleDefinition(), 
318                               track.GetMateria    320                               track.GetMaterial(), track.GetKineticEnergy());
319 }                                                 321 }
320                                                   322 
321 //....oooOO0OOooo........oooOO0OOooo........oo    323 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
322                                                   324 
323 G4double G4VEmModel::GetChargeSquareRatio(cons    325 G4double G4VEmModel::GetChargeSquareRatio(const G4ParticleDefinition* p,
324                                           cons    326                                           const G4Material*, G4double)
325 {                                                 327 {
326   const G4double q = p->GetPDGCharge()*inveplu    328   const G4double q = p->GetPDGCharge()*inveplus;
327   return q*q;                                     329   return q*q;
328 }                                                 330 }
329                                                   331 
330 //....oooOO0OOooo........oooOO0OOooo........oo    332 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
331                                                   333 
332 G4double G4VEmModel::GetParticleCharge(const G    334 G4double G4VEmModel::GetParticleCharge(const G4ParticleDefinition* p,
333                                        const G    335                                        const G4Material*, G4double)
334 {                                                 336 {
335   return p->GetPDGCharge();                       337   return p->GetPDGCharge();
336 }                                                 338 }
337                                                   339 
338 //....oooOO0OOooo........oooOO0OOooo........oo    340 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
339                                                   341 
340 void G4VEmModel::CorrectionsAlongStep(const G4    342 void G4VEmModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,
341                                       const G4    343                                       const G4DynamicParticle*,
342                                       const G4    344                                       const G4double&,G4double&)
343 {}                                                345 {}
344                                                   346 
345 //....oooOO0OOooo........oooOO0OOooo........oo    347 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
346                                                   348 
347 G4double G4VEmModel::Value(const G4MaterialCut    349 G4double G4VEmModel::Value(const G4MaterialCutsCouple* couple,
348                            const G4ParticleDef    350                            const G4ParticleDefinition* p, G4double e)
349 {                                                 351 {
350   SetCurrentCouple(couple);                       352   SetCurrentCouple(couple);
351   return pFactor*e*e*CrossSectionPerVolume(pBa    353   return pFactor*e*e*CrossSectionPerVolume(pBaseMaterial,p,e,0.0,DBL_MAX);
352 }                                                 354 }
353                                                   355 
354 //....oooOO0OOooo........oooOO0OOooo........oo    356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
355                                                   357 
356 G4double G4VEmModel::MinPrimaryEnergy(const G4    358 G4double G4VEmModel::MinPrimaryEnergy(const G4Material*,
357                                       const G4    359                                       const G4ParticleDefinition*,
358                                       G4double    360                                       G4double)
359 {                                                 361 {
360   return 0.0;                                     362   return 0.0;
361 }                                                 363 }
362                                                   364 
363 //....oooOO0OOooo........oooOO0OOooo........oo    365 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
364                                                   366 
365 G4double G4VEmModel::MinEnergyCut(const G4Part    367 G4double G4VEmModel::MinEnergyCut(const G4ParticleDefinition*, 
366                                   const G4Mate    368                                   const G4MaterialCutsCouple*)
367 {                                                 369 {
368   return 0.0;                                     370   return 0.0;
369 }                                                 371 }
370                                                   372 
371 //....oooOO0OOooo........oooOO0OOooo........oo    373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
372                                                   374 
373 G4double G4VEmModel::MaxSecondaryEnergy(const     375 G4double G4VEmModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
374                                         G4doub    376                                         G4double kineticEnergy)
375 {                                                 377 {
376   return kineticEnergy;                           378   return kineticEnergy;
377 }                                                 379 }
378                                                   380 
379 //....oooOO0OOooo........oooOO0OOooo........oo    381 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
380                                                   382 
381 void G4VEmModel::SetupForMaterial(const G4Part << 383 void G4VEmModel::SetupForMaterial(const G4ParticleDefinition*,
382                                   const G4Mate << 384                                   const G4Material*, G4double)
383 {                                              << 385 {}
384   GetChargeSquareRatio(p, mat, ekin);          << 
385 }                                              << 
386                                                   386 
387 //....oooOO0OOooo........oooOO0OOooo........oo    387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
388                                                   388 
389 void                                              389 void 
390 G4VEmModel::SetParticleChange(G4VParticleChang    390 G4VEmModel::SetParticleChange(G4VParticleChange* p, G4VEmFluctuationModel* f)
391 {                                                 391 {
392   if(p != nullptr && pParticleChange != p) { p    392   if(p != nullptr && pParticleChange != p) { pParticleChange = p; }
393   if(flucModel != f) { flucModel = f; }           393   if(flucModel != f) { flucModel = f; }
394 }                                                 394 }
395                                                   395 
396 //....oooOO0OOooo........oooOO0OOooo........oo    396 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
397                                                   397 
398 void G4VEmModel::SetCrossSectionTable(G4Physic    398 void G4VEmModel::SetCrossSectionTable(G4PhysicsTable* p, G4bool isLocal)
399 {                                                 399 {
400   xSectionTable = p;                           << 400   if(p != xSectionTable) {
401   localTable = isLocal;                        << 401     if(xSectionTable != nullptr && localTable) { 
402 }                                              << 402       xSectionTable->clearAndDestroy(); 
403                                                << 403       delete xSectionTable;
404 //....oooOO0OOooo........oooOO0OOooo........oo << 404     }
405                                                << 405     xSectionTable = p;
406 void G4VEmModel::SetLPMFlag(G4bool)            << 
407 {                                              << 
408   if (G4EmParameters::Instance()->Verbose() >  << 
409     G4ExceptionDescription ed;                 << 
410     ed << "The obsolete method SetLPMFlag(..)  << 
411        << " is called. Please, use G4EmParamet << 
412        << " instead";                          << 
413     G4Exception("G4VEmModel::SetLPMFlag", "em0 << 
414   }                                               406   }
                                                   >> 407   localTable = isLocal;
415 }                                                 408 }
416                                                << 
417 //....oooOO0OOooo........oooOO0OOooo........oo << 
418                                                << 
419 void G4VEmModel::SetMasterThread(G4bool)       << 
420 {}                                             << 
421                                                   409 
422 //....oooOO0OOooo........oooOO0OOooo........oo    410 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
423                                                   411 
424 void  G4VEmModel::ModelDescription(std::ostrea    412 void  G4VEmModel::ModelDescription(std::ostream& outFile) const
425 {                                                 413 {
426   outFile << "The description for this model h    414   outFile << "The description for this model has not been written yet.\n";
427 }                                                 415 }
428                                                   416 
429 //....oooOO0OOooo........oooOO0OOooo........oo    417 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
430                                                   418