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] [ 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/hadronic/models/radioactive_decay/src/G4ITDecay.cc (Version 11.3.0) and /processes/hadronic/models/radioactive_decay/src/G4ITDecay.cc (Version 11.2)


  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 //  File:   G4ITDecay.cc                           28 //  File:   G4ITDecay.cc                                                      //
 29 //  Author: D.H. Wright (SLAC)                     29 //  Author: D.H. Wright (SLAC)                                                //
 30 //  Date:   14 November 2014                       30 //  Date:   14 November 2014                                                  //
 31 //                                                 31 //                                                                            //
 32 //////////////////////////////////////////////     32 ////////////////////////////////////////////////////////////////////////////////
 33                                                    33 
 34 #include "G4ITDecay.hh"                            34 #include "G4ITDecay.hh"
 35 #include "G4IonTable.hh"                           35 #include "G4IonTable.hh"
 36 #include "G4ThreeVector.hh"                        36 #include "G4ThreeVector.hh"
 37 #include "G4LorentzVector.hh"                      37 #include "G4LorentzVector.hh"
 38 #include "G4DynamicParticle.hh"                    38 #include "G4DynamicParticle.hh"
 39 #include "G4DecayProducts.hh"                      39 #include "G4DecayProducts.hh"
 40 #include "G4PhotonEvaporation.hh"                  40 #include "G4PhotonEvaporation.hh"
 41 #include "G4VAtomDeexcitation.hh"                  41 #include "G4VAtomDeexcitation.hh"
 42 #include "G4AtomicShells.hh"                       42 #include "G4AtomicShells.hh"
 43 #include "G4Electron.hh"                           43 #include "G4Electron.hh"
 44 #include "G4LossTableManager.hh"                   44 #include "G4LossTableManager.hh"
 45 #include "G4Fragment.hh"                           45 #include "G4Fragment.hh"
 46 #include "G4SystemOfUnits.hh"                      46 #include "G4SystemOfUnits.hh"
 47 #include "G4PhysicalConstants.hh"                  47 #include "G4PhysicalConstants.hh"
 48                                                    48 
 49                                                    49 
 50 G4ITDecay::G4ITDecay(G4PhotonEvaporation* ptr)     50 G4ITDecay::G4ITDecay(G4PhotonEvaporation* ptr)
 51   : G4NuclearDecay("IT decay", IT, 0.0, noFloa     51   : G4NuclearDecay("IT decay", IT, 0.0, noFloat), photonEvaporation(ptr)
 52 {}                                                 52 {}
 53                                                    53 
 54 G4ITDecay::G4ITDecay(const G4ParticleDefinitio     54 G4ITDecay::G4ITDecay(const G4ParticleDefinition* theParentNucleus,
 55                      const G4double& branch, c     55                      const G4double& branch, const G4double&,
 56                      const G4double& excitatio     56                      const G4double& excitationE)
 57   : G4NuclearDecay("IT decay", IT, excitationE     57   : G4NuclearDecay("IT decay", IT, excitationE, noFloat)
 58 {                                                  58 {
 59   SetParent(theParentNucleus);  // Store name      59   SetParent(theParentNucleus);  // Store name of parent nucleus, delete G4MT_parent 
 60   SetBR(branch);                                   60   SetBR(branch);
 61   SetNumberOfDaughters(1);                         61   SetNumberOfDaughters(1);
 62   SetDaughter(0, theParentNucleus);                62   SetDaughter(0, theParentNucleus);
 63                                                    63 
 64   SetupDecay(theParentNucleus);                    64   SetupDecay(theParentNucleus);
 65 }                                                  65 }
 66                                                    66 
 67 void G4ITDecay::SetupDecay(const G4ParticleDef     67 void G4ITDecay::SetupDecay(const G4ParticleDefinition* theParentNucleus)
 68 {                                                  68 {
 69   theParent = theParentNucleus;                    69   theParent = theParentNucleus;
 70   parentZ = theParentNucleus->GetAtomicNumber(     70   parentZ = theParentNucleus->GetAtomicNumber();
 71   parentA = theParentNucleus->GetAtomicMass();     71   parentA = theParentNucleus->GetAtomicMass();
 72 }                                                  72 }
 73                                                    73 
 74 G4DecayProducts* G4ITDecay::DecayIt(G4double)      74 G4DecayProducts* G4ITDecay::DecayIt(G4double)
 75 {                                                  75 {
 76   // Set up final state                            76   // Set up final state
 77   // parentParticle is set at rest here becaus     77   // parentParticle is set at rest here because boost with correct momentum 
 78   // is done later                                 78   // is done later
 79   G4LorentzVector atRest(theParent->GetPDGMass     79   G4LorentzVector atRest(theParent->GetPDGMass(), G4ThreeVector(0.,0.,0.) );
 80   G4DynamicParticle parentParticle(theParent,      80   G4DynamicParticle parentParticle(theParent, atRest);
 81   G4DecayProducts* products = new G4DecayProdu     81   G4DecayProducts* products = new G4DecayProducts(parentParticle);
 82                                                    82 
 83   // Let G4PhotonEvaporation do the decay          83   // Let G4PhotonEvaporation do the decay
 84   G4Fragment parentNucleus(parentA, parentZ, a     84   G4Fragment parentNucleus(parentA, parentZ, atRest);
 85                                                    85 
 86   // one emission, parent nucleaus become less     86   // one emission, parent nucleaus become less excited
 87   G4Fragment* eOrGamma = photonEvaporation->Em     87   G4Fragment* eOrGamma = photonEvaporation->EmittedFragment(&parentNucleus);
 88                                                    88 
 89   // Modified nuclide is returned as dynDaught     89   // Modified nuclide is returned as dynDaughter
 90   auto theIonTable = G4ParticleTable::GetParti     90   auto theIonTable = G4ParticleTable::GetParticleTable()->GetIonTable();
 91   G4ParticleDefinition* daughterIon =              91   G4ParticleDefinition* daughterIon =
 92     theIonTable->GetIon(parentZ, parentA, pare     92     theIonTable->GetIon(parentZ, parentA, parentNucleus.GetExcitationEnergy(), 
 93                         G4Ions::FloatLevelBase     93                         G4Ions::FloatLevelBase(parentNucleus.GetFloatingLevelNumber()));
 94   G4DynamicParticle* dynDaughter = new G4Dynam     94   G4DynamicParticle* dynDaughter = new G4DynamicParticle(daughterIon,
 95                                                    95                                                          parentNucleus.GetMomentum());
 96                                                    96 
 97   if (nullptr != eOrGamma) {                       97   if (nullptr != eOrGamma) {
 98     G4DynamicParticle* eOrGammaDyn =               98     G4DynamicParticle* eOrGammaDyn =
 99       new G4DynamicParticle(eOrGamma->GetParti     99       new G4DynamicParticle(eOrGamma->GetParticleDefinition(),
100                             eOrGamma->GetMomen    100                             eOrGamma->GetMomentum() );
101     eOrGammaDyn->SetProperTime(eOrGamma->GetCr    101     eOrGammaDyn->SetProperTime(eOrGamma->GetCreationTime() );
102     products->PushProducts(eOrGammaDyn);          102     products->PushProducts(eOrGammaDyn);
103     delete eOrGamma;                              103     delete eOrGamma;
104                                                   104 
105     // Now do atomic relaxation if e- is emitt    105     // Now do atomic relaxation if e- is emitted
106     if (applyARM) {                               106     if (applyARM) {
107       G4int shellIndex = photonEvaporation->Ge    107       G4int shellIndex = photonEvaporation->GetVacantShellNumber();
108       if (shellIndex > -1) {                      108       if (shellIndex > -1) {
109         G4VAtomDeexcitation* atomDeex =           109         G4VAtomDeexcitation* atomDeex =
110           G4LossTableManager::Instance()->Atom    110           G4LossTableManager::Instance()->AtomDeexcitation();
111         if (atomDeex->IsFluoActive() && parent    111         if (atomDeex->IsFluoActive() && parentZ > 5 && parentZ < 105) {
112           G4int nShells = G4AtomicShells::GetN    112           G4int nShells = G4AtomicShells::GetNumberOfShells(parentZ);
113           if (shellIndex >= nShells) shellInde    113           if (shellIndex >= nShells) shellIndex = nShells;
114           G4AtomicShellEnumerator as = G4Atomi    114           G4AtomicShellEnumerator as = G4AtomicShellEnumerator(shellIndex);
115           const G4AtomicShell* shell = atomDee    115           const G4AtomicShell* shell = atomDeex->GetAtomicShell(parentZ, as);
116           std::vector<G4DynamicParticle*> armP    116           std::vector<G4DynamicParticle*> armProducts;
117                                                   117 
118           // VI, SI                               118           // VI, SI
119           // Allows fixing of Bugzilla 1727       119           // Allows fixing of Bugzilla 1727
120           G4double deexLimit = 0.1*keV;           120           G4double deexLimit = 0.1*keV;
121           if (G4EmParameters::Instance()->Deex    121           if (G4EmParameters::Instance()->DeexcitationIgnoreCut())  deexLimit =0.;
122           //                                      122           //
123                                                   123 
124           atomDeex->GenerateParticles(&armProd    124           atomDeex->GenerateParticles(&armProducts, shell, parentZ, deexLimit,
125                                                   125                                                                     deexLimit);
126           G4double productEnergy = 0.;            126           G4double productEnergy = 0.;
127           for (G4int i = 0; i < G4int(armProdu    127           for (G4int i = 0; i < G4int(armProducts.size()); i++)
128             productEnergy += armProducts[i]->G    128             productEnergy += armProducts[i]->GetKineticEnergy();
129                                                   129 
130           G4double deficit = shell->BindingEne    130           G4double deficit = shell->BindingEnergy() - productEnergy;
131           if (deficit > 0.0) {                    131           if (deficit > 0.0) { 
132             // Add a dummy electron to make up    132             // Add a dummy electron to make up extra energy
133             G4double cosTh = 1.-2.*G4UniformRa    133             G4double cosTh = 1.-2.*G4UniformRand();
134             G4double sinTh = std::sqrt(1.- cos    134             G4double sinTh = std::sqrt(1.- cosTh*cosTh);
135             G4double phi = twopi*G4UniformRand    135             G4double phi = twopi*G4UniformRand();
136                                                   136          
137             G4ThreeVector electronDirection(si    137             G4ThreeVector electronDirection(sinTh*std::sin(phi),
138                                             si    138                                             sinTh*std::cos(phi), cosTh);
139             G4DynamicParticle* extra =            139             G4DynamicParticle* extra =
140               new G4DynamicParticle(G4Electron    140               new G4DynamicParticle(G4Electron::Electron(), electronDirection,
141                                     deficit);     141                                     deficit);
142             armProducts.push_back(extra);         142             armProducts.push_back(extra);
143           }                                       143           } 
144                                                   144 
145           std::size_t nArm = armProducts.size(    145           std::size_t nArm = armProducts.size();
146           if (nArm > 0) {                         146           if (nArm > 0) {
147             G4ThreeVector bst = dynDaughter->G    147             G4ThreeVector bst = dynDaughter->Get4Momentum().boostVector();
148             for (std::size_t i = 0; i < nArm;     148             for (std::size_t i = 0; i < nArm; ++i) {
149               G4DynamicParticle* dp = armProdu    149               G4DynamicParticle* dp = armProducts[i];
150               G4LorentzVector lv = dp->Get4Mom    150               G4LorentzVector lv = dp->Get4Momentum().boost(bst);
151               dp->Set4Momentum(lv);               151               dp->Set4Momentum(lv);
152               products->PushProducts(dp);         152               products->PushProducts(dp);
153             }                                     153             }
154           }                                       154           }
155         }                                         155         }
156       }                                           156       }
157     } // if ARM on                                157     } // if ARM on 
158   } // eOrGamma                                   158   } // eOrGamma
159                                                   159 
160   products->PushProducts(dynDaughter);            160   products->PushProducts(dynDaughter);
161                                                   161 
162   // Energy conservation check                    162   // Energy conservation check
163   /*                                              163   /*
164   G4int newSize = products->entries();            164   G4int newSize = products->entries();
165   G4DynamicParticle* temp = 0;                    165   G4DynamicParticle* temp = 0;
166   G4double KEsum = 0.0;                           166   G4double KEsum = 0.0;
167   for (G4int i = 0; i < newSize; i++) {           167   for (G4int i = 0; i < newSize; i++) {
168     temp = products->operator[](i);               168     temp = products->operator[](i);
169     KEsum += temp->GetKineticEnergy();            169     KEsum += temp->GetKineticEnergy();
170   }                                               170   }
171   G4double eCons = G4MT_parent->GetPDGMass() -    171   G4double eCons = G4MT_parent->GetPDGMass() - dynDaughter->GetMass() - KEsum;
172   G4cout << " IT check: Ediff (keV) = " << eCo    172   G4cout << " IT check: Ediff (keV) = " << eCons/keV << G4endl; 
173   */                                              173   */
174   return products;                                174   return products;
175 }                                                 175 }
176                                                   176 
177                                                   177 
178 void G4ITDecay::DumpNuclearInfo()                 178 void G4ITDecay::DumpNuclearInfo()
179 {                                                 179 {
180   if (theParent != nullptr) {                     180   if (theParent != nullptr) {
181     G4cout << " G4ITDecay for parent nucleus "    181     G4cout << " G4ITDecay for parent nucleus " << theParent->GetParticleName() << G4endl;
182   }                                               182   }
183 }                                                 183 }
184                                                   184 
185                                                   185