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