[819] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | |
---|
| 27 | // |
---|
| 28 | // ------------------------------------------------------------------- |
---|
| 29 | // GEANT 4 class file |
---|
| 30 | // |
---|
| 31 | // CERN, Geneva, Switzerland |
---|
| 32 | // |
---|
| 33 | // File name: G4PhotonEvaporation |
---|
| 34 | // |
---|
| 35 | // Author: Maria Grazia Pia (pia@genova.infn.it) |
---|
| 36 | // |
---|
| 37 | // Creation date: 23 October 1998 |
---|
| 38 | // |
---|
| 39 | // Modifications: |
---|
| 40 | // |
---|
| 41 | // 8 March 2002, Fan Lei (flei@space.qinetiq.com) |
---|
| 42 | // |
---|
| 43 | // Implementation of Internal Convertion process in discrete deexcitation |
---|
| 44 | // The following public methods have been added. |
---|
| 45 | // |
---|
| 46 | // void SetICM (G4bool); |
---|
| 47 | // void CallFromRDM(G4bool); |
---|
| 48 | // void SetMaxHalfLife(G4double) ; |
---|
| 49 | // void SetEOccupancy( G4ElectronOccupancy eOccupancy) ; |
---|
| 50 | // G4ElectronOccupancy GetEOccupancy () ; |
---|
| 51 | // |
---|
| 52 | // ------------------------------------------------------------------- |
---|
| 53 | |
---|
| 54 | #include "G4PhotonEvaporation.hh" |
---|
| 55 | |
---|
| 56 | #include "globals.hh" |
---|
| 57 | #include "Randomize.hh" |
---|
| 58 | #include "G4Gamma.hh" |
---|
| 59 | #include "G4LorentzVector.hh" |
---|
| 60 | #include "G4VGammaTransition.hh" |
---|
| 61 | #include "G4Fragment.hh" |
---|
| 62 | #include "G4FragmentVector.hh" |
---|
| 63 | #include "G4ContinuumGammaDeexcitation.hh" |
---|
| 64 | #include "G4DiscreteGammaDeexcitation.hh" |
---|
| 65 | #include "G4E1Probability.hh" |
---|
| 66 | #include "G4AtomicDeexcitation.hh" |
---|
| 67 | |
---|
| 68 | G4PhotonEvaporation::G4PhotonEvaporation() |
---|
| 69 | :_verbose(0),_myOwnProbAlgorithm (true), |
---|
| 70 | _eOccupancy(0), _vShellNumber(-1),_gammaE(0.),_applyARM(false) |
---|
| 71 | { |
---|
| 72 | _probAlgorithm = new G4E1Probability; |
---|
| 73 | _discrDeexcitation = new G4DiscreteGammaDeexcitation; |
---|
| 74 | _contDeexcitation = new G4ContinuumGammaDeexcitation; |
---|
| 75 | (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetICM(false); |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | G4PhotonEvaporation::~G4PhotonEvaporation() |
---|
| 80 | { |
---|
| 81 | if(_myOwnProbAlgorithm) delete _probAlgorithm; |
---|
| 82 | delete _discrDeexcitation; |
---|
| 83 | delete _contDeexcitation; |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | void G4PhotonEvaporation::Initialize(const G4Fragment& fragment) |
---|
| 88 | { |
---|
| 89 | _nucleus = fragment; |
---|
| 90 | return; |
---|
| 91 | } |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | G4FragmentVector* G4PhotonEvaporation::BreakUp(const G4Fragment& nucleus) |
---|
| 95 | { |
---|
| 96 | _nucleus = nucleus; |
---|
| 97 | |
---|
| 98 | G4FragmentVector* products = new G4FragmentVector; |
---|
| 99 | |
---|
| 100 | _contDeexcitation->SetNucleus(nucleus); |
---|
| 101 | _discrDeexcitation->SetNucleus(nucleus); |
---|
| 102 | |
---|
| 103 | // Do one photon emission |
---|
| 104 | |
---|
| 105 | // Products from continuum gamma transitions |
---|
| 106 | |
---|
| 107 | G4FragmentVector* contProducts = _contDeexcitation->DoTransition(); |
---|
| 108 | |
---|
| 109 | G4int nCont = 0; |
---|
| 110 | if (contProducts != 0) nCont = contProducts->size(); |
---|
| 111 | |
---|
| 112 | G4FragmentVector::iterator i; |
---|
| 113 | if (nCont > 0) |
---|
| 114 | { |
---|
| 115 | G4Fragment modifiedNucleus = _contDeexcitation->GetNucleus(); |
---|
| 116 | _discrDeexcitation->SetNucleus(modifiedNucleus); |
---|
| 117 | for (i = contProducts->begin(); i != contProducts->end(); i++) |
---|
| 118 | { |
---|
| 119 | products->push_back(*i); |
---|
| 120 | } |
---|
| 121 | } |
---|
| 122 | else |
---|
| 123 | { |
---|
| 124 | // Products from discrete gamma transitions |
---|
| 125 | G4FragmentVector* discrProducts = _discrDeexcitation->DoTransition(); |
---|
| 126 | |
---|
| 127 | G4int nDiscr = 0; |
---|
| 128 | if (discrProducts != 0) nDiscr = discrProducts->size(); |
---|
| 129 | |
---|
| 130 | if (_verbose > 0) |
---|
| 131 | G4cout << " = BreakUp = " << nDiscr |
---|
| 132 | << " gammas from DiscreteDeexcitation " |
---|
| 133 | << G4endl; |
---|
| 134 | |
---|
| 135 | for (i = discrProducts->begin(); i != discrProducts->end(); i++) |
---|
| 136 | { |
---|
| 137 | products->push_back(*i); |
---|
| 138 | } |
---|
| 139 | discrProducts->clear(); |
---|
| 140 | delete discrProducts; |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | _gammaE = 0.; |
---|
| 145 | if (products->size() > 0) |
---|
| 146 | { |
---|
| 147 | _gammaE = (*(products->begin()))->GetMomentum().e(); |
---|
| 148 | } |
---|
| 149 | |
---|
| 150 | contProducts->clear(); |
---|
| 151 | delete contProducts; // delete vector, not fragments |
---|
| 152 | |
---|
| 153 | // Add deexcited nucleus to products |
---|
| 154 | G4Fragment* finalNucleus = new G4Fragment(_discrDeexcitation->GetNucleus()); |
---|
| 155 | products->push_back(finalNucleus); |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | if (_verbose > 0) |
---|
| 159 | G4cout << "*-*-*-* Photon evaporation: " << products->size() << G4endl; |
---|
| 160 | |
---|
| 161 | return products; |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | |
---|
| 165 | G4FragmentVector* G4PhotonEvaporation::BreakItUp(const G4Fragment& nucleus) |
---|
| 166 | { |
---|
| 167 | _nucleus = nucleus; |
---|
| 168 | |
---|
| 169 | G4FragmentVector* products = new G4FragmentVector; |
---|
| 170 | |
---|
| 171 | _contDeexcitation->SetNucleus(nucleus); |
---|
| 172 | _discrDeexcitation->SetNucleus(nucleus); |
---|
| 173 | |
---|
| 174 | // Do the whole gamma chain |
---|
| 175 | |
---|
| 176 | G4FragmentVector* contProducts = _contDeexcitation->DoChain(); |
---|
| 177 | |
---|
| 178 | // Products from continuum gamma transitions |
---|
| 179 | G4int nCont = 0; |
---|
| 180 | if (contProducts != 0) nCont = contProducts->size(); |
---|
| 181 | |
---|
| 182 | if (_verbose > 0) |
---|
| 183 | G4cout << " = BreakItUp = " << nCont |
---|
| 184 | << " gammas from ContinuumDeexcitation " << G4endl; |
---|
| 185 | |
---|
| 186 | G4FragmentVector::iterator i; |
---|
| 187 | if (nCont > 0) |
---|
| 188 | { |
---|
| 189 | G4Fragment modifiedNucleus = _contDeexcitation->GetNucleus(); |
---|
| 190 | _discrDeexcitation->SetNucleus(modifiedNucleus); |
---|
| 191 | for (i = contProducts->begin(); i != contProducts->end(); i++) |
---|
| 192 | { |
---|
| 193 | products->push_back(*i); |
---|
| 194 | } |
---|
| 195 | } |
---|
| 196 | |
---|
| 197 | // Products from discrete gamma transitions |
---|
| 198 | G4FragmentVector* discrProducts = _discrDeexcitation->DoChain(); |
---|
| 199 | _eOccupancy = _discrDeexcitation->GetEO(); |
---|
| 200 | _vShellNumber = _discrDeexcitation->GetVacantSN(); |
---|
| 201 | // _eOccupancy.DumpInfo() ; |
---|
| 202 | _discrDeexcitation->SetVaccantSN(-1); |
---|
| 203 | |
---|
| 204 | G4int nDiscr = 0; |
---|
| 205 | if (discrProducts != 0) nDiscr = discrProducts->size(); |
---|
| 206 | |
---|
| 207 | if (_verbose > 0) |
---|
| 208 | G4cout << " = BreakItUp = " << nDiscr |
---|
| 209 | << " gammas from DiscreteDeexcitation " << G4endl; |
---|
| 210 | |
---|
| 211 | for (i = discrProducts->begin(); i != discrProducts->end(); i++) |
---|
| 212 | { |
---|
| 213 | products->push_back(*i); |
---|
| 214 | } |
---|
| 215 | |
---|
| 216 | // now to see if apply Atomic relaxation model or not |
---|
| 217 | // only when there is a vacant orbital electron |
---|
| 218 | |
---|
| 219 | if (_applyARM && _vShellNumber != -1) |
---|
| 220 | { |
---|
| 221 | G4int aZ = static_cast<G4int>(_discrDeexcitation->GetNucleus().GetZ()); |
---|
| 222 | G4int eShell = _vShellNumber+1; |
---|
| 223 | if ( eShell > 0 ) { |
---|
| 224 | G4AtomicDeexcitation* atomDeex = new G4AtomicDeexcitation(); |
---|
| 225 | // no auger electron for now |
---|
| 226 | atomDeex->ActivateAugerElectronProduction(0); |
---|
| 227 | std::vector<G4DynamicParticle*>* armProducts = atomDeex->GenerateParticles(aZ,eShell); |
---|
| 228 | G4DynamicParticle* aParticle; |
---|
| 229 | if (_verbose > 0) |
---|
| 230 | G4cout << " = BreakItUp = " << armProducts->size() |
---|
| 231 | << " particles from G4AtomicDeexcitation " << G4endl; |
---|
| 232 | for (size_t i = 0; i < armProducts->size(); i++) |
---|
| 233 | { |
---|
| 234 | aParticle = (*armProducts)[i] ; |
---|
| 235 | G4LorentzVector lParticle = aParticle->Get4Momentum(); |
---|
| 236 | G4Fragment* aFragment = new |
---|
| 237 | G4Fragment(lParticle,aParticle->GetDefinition()); |
---|
| 238 | aFragment->SetCreationTime(aParticle->GetProperTime()); |
---|
| 239 | products->push_back(aFragment); |
---|
| 240 | } |
---|
| 241 | |
---|
| 242 | for (size_t i = 0; i < armProducts->size(); i++) |
---|
| 243 | delete (*armProducts)[i]; |
---|
| 244 | delete armProducts; |
---|
| 245 | delete atomDeex; |
---|
| 246 | } |
---|
| 247 | } |
---|
| 248 | // Add deexcited nucleus to products |
---|
| 249 | G4Fragment* finalNucleus = new G4Fragment(_discrDeexcitation->GetNucleus()); |
---|
| 250 | products->push_back(finalNucleus); |
---|
| 251 | if (_verbose > 0) |
---|
| 252 | G4cout << " = BreakItUp = Nucleus added to products" << G4endl; |
---|
| 253 | |
---|
| 254 | if (_verbose > 0) |
---|
| 255 | G4cout << "*-*-* Photon evaporation: " << products->size() << G4endl; |
---|
| 256 | |
---|
| 257 | #ifdef debug |
---|
| 258 | if ( armProducts->size() == 0) |
---|
| 259 | CheckConservation(nucleus,products); |
---|
| 260 | #endif |
---|
| 261 | contProducts->clear(); |
---|
| 262 | discrProducts->clear(); |
---|
| 263 | delete contProducts; // delete vector, not fragments |
---|
| 264 | delete discrProducts; |
---|
| 265 | return products; |
---|
| 266 | } |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | G4double G4PhotonEvaporation::GetEmissionProbability() const |
---|
| 270 | { |
---|
| 271 | G4double prob = 0.; |
---|
| 272 | if (_probAlgorithm != 0) prob = _probAlgorithm->EmissionProbability(_nucleus,_gammaE); |
---|
| 273 | return prob; |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | |
---|
| 277 | void G4PhotonEvaporation::SetEmissionStrategy(G4VEmissionProbability * probAlgorithm) |
---|
| 278 | { |
---|
| 279 | |
---|
| 280 | // CD - not sure about always wanting to delete this pointer.... |
---|
| 281 | |
---|
| 282 | if(_myOwnProbAlgorithm) delete _probAlgorithm; |
---|
| 283 | |
---|
| 284 | _probAlgorithm = probAlgorithm; |
---|
| 285 | |
---|
| 286 | _myOwnProbAlgorithm = false; |
---|
| 287 | |
---|
| 288 | return; |
---|
| 289 | } |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | void G4PhotonEvaporation::SetVerboseLevel(G4int verbose) |
---|
| 293 | { |
---|
| 294 | _verbose = verbose; |
---|
| 295 | _contDeexcitation->SetVerboseLevel(verbose); |
---|
| 296 | _discrDeexcitation->SetVerboseLevel(verbose); |
---|
| 297 | |
---|
| 298 | return; |
---|
| 299 | } |
---|
| 300 | |
---|
| 301 | void G4PhotonEvaporation::SetICM(G4bool ic) |
---|
| 302 | { |
---|
| 303 | (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetICM(ic); |
---|
| 304 | return; |
---|
| 305 | } |
---|
| 306 | |
---|
| 307 | void G4PhotonEvaporation::SetMaxHalfLife(G4double hl) |
---|
| 308 | { |
---|
| 309 | (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetHL(hl); |
---|
| 310 | return; |
---|
| 311 | } |
---|
| 312 | |
---|
| 313 | void G4PhotonEvaporation::RDMForced(G4bool fromRDM) |
---|
| 314 | { |
---|
| 315 | (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetRDM(fromRDM); |
---|
| 316 | return; |
---|
| 317 | } |
---|
| 318 | |
---|
| 319 | void G4PhotonEvaporation::SetEOccupancy(G4ElectronOccupancy eo) |
---|
| 320 | { |
---|
| 321 | _discrDeexcitation->SetEO(eo); |
---|
| 322 | return; |
---|
| 323 | } |
---|
| 324 | |
---|
| 325 | #ifdef debug |
---|
| 326 | void G4PhotonEvaporation::CheckConservation(const G4Fragment & theInitialState, |
---|
| 327 | G4FragmentVector * Result) const |
---|
| 328 | { |
---|
| 329 | G4double ProductsEnergy =0; |
---|
| 330 | G4ThreeVector ProductsMomentum; |
---|
| 331 | G4int ProductsA = 0; |
---|
| 332 | G4int ProductsZ = 0; |
---|
| 333 | G4FragmentVector::iterator h; |
---|
| 334 | for (h = Result->begin(); h != Result->end(); h++) { |
---|
| 335 | G4LorentzVector tmp = (*h)->GetMomentum(); |
---|
| 336 | ProductsEnergy += tmp.e(); |
---|
| 337 | ProductsMomentum += tmp.vect(); |
---|
| 338 | ProductsA += static_cast<G4int>((*h)->GetA()); |
---|
| 339 | ProductsZ += static_cast<G4int>((*h)->GetZ()); |
---|
| 340 | } |
---|
| 341 | |
---|
| 342 | if (ProductsA != theInitialState.GetA()) { |
---|
| 343 | G4cout << "!!!!!!!!!! Baryonic Number Conservation Violation !!!!!!!!!!" << G4endl; |
---|
| 344 | G4cout << "G4PhotonEvaporation.cc: Barionic Number Conservation test for evaporation fragments" |
---|
| 345 | << G4endl; |
---|
| 346 | G4cout << "Initial A = " << theInitialState.GetA() |
---|
| 347 | << " Fragments A = " << ProductsA << " Diference --> " |
---|
| 348 | << theInitialState.GetA() - ProductsA << G4endl; |
---|
| 349 | } |
---|
| 350 | if (ProductsZ != theInitialState.GetZ()) { |
---|
| 351 | G4cout << "!!!!!!!!!! Charge Conservation Violation !!!!!!!!!!" << G4endl; |
---|
| 352 | G4cout << "G4PhotonEvaporation.cc: Charge Conservation test for evaporation fragments" |
---|
| 353 | << G4endl; |
---|
| 354 | G4cout << "Initial Z = " << theInitialState.GetZ() |
---|
| 355 | << " Fragments Z = " << ProductsZ << " Diference --> " |
---|
| 356 | << theInitialState.GetZ() - ProductsZ << G4endl; |
---|
| 357 | } |
---|
| 358 | if (std::abs(ProductsEnergy-theInitialState.GetMomentum().e()) > 1.0*keV) { |
---|
| 359 | G4cout << "!!!!!!!!!! Energy Conservation Violation !!!!!!!!!!" << G4endl; |
---|
| 360 | G4cout << "G4PhotonEvaporation.cc: Energy Conservation test for evaporation fragments" |
---|
| 361 | << G4endl; |
---|
| 362 | G4cout << "Initial E = " << theInitialState.GetMomentum().e()/MeV << " MeV" |
---|
| 363 | << " Fragments E = " << ProductsEnergy/MeV << " MeV Diference --> " |
---|
| 364 | << (theInitialState.GetMomentum().e() - ProductsEnergy)/MeV << " MeV" << G4endl; |
---|
| 365 | } |
---|
| 366 | if (std::abs(ProductsMomentum.x()-theInitialState.GetMomentum().x()) > 1.0*keV || |
---|
| 367 | std::abs(ProductsMomentum.y()-theInitialState.GetMomentum().y()) > 1.0*keV || |
---|
| 368 | std::abs(ProductsMomentum.z()-theInitialState.GetMomentum().z()) > 1.0*keV) { |
---|
| 369 | G4cout << "!!!!!!!!!! Momentum Conservation Violation !!!!!!!!!!" << G4endl; |
---|
| 370 | G4cout << "G4PhotonEvaporation.cc: Momentum Conservation test for evaporation fragments" |
---|
| 371 | << G4endl; |
---|
| 372 | G4cout << "Initial P = " << theInitialState.GetMomentum().vect() << " MeV" |
---|
| 373 | << " Fragments P = " << ProductsMomentum << " MeV Diference --> " |
---|
| 374 | << theInitialState.GetMomentum().vect() - ProductsMomentum << " MeV" << G4endl; |
---|
| 375 | } |
---|
| 376 | return; |
---|
| 377 | } |
---|
| 378 | #endif |
---|
| 379 | |
---|
| 380 | |
---|
| 381 | |
---|