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