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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/fission/src/G4FissionLibrary.cc (Version 11.3.0) and /processes/hadronic/models/fission/src/G4FissionLibrary.cc (Version 5.2.p1)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //                                                
 27 // This software was developed by Lawrence Liv    
 28 //                                                
 29 // Redistribution and use in source and binary    
 30 // modification, are permitted provided that t    
 31 //                                                
 32 // 1. Redistributions of source code must reta    
 33 //   this list of conditions and the following    
 34 // 2. Redistributions in binary form must repr    
 35 //   this list of conditions and the following    
 36 //   and/or other materials provided with the     
 37 // 3. The name of the author may not be used t    
 38 //   derived from this software without specif    
 39 //                                                
 40 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``A    
 41 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO,     
 42 // MERCHANTABILITY AND FITNESS FOR A PARTICULA    
 43 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DI    
 44 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE    
 45 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES    
 46 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AN    
 47 // WHETHER IN CONTRACT, STRICT LIABILITY, OR T    
 48 // OTHERWISE) ARISING IN ANY WAY OUT OF THE US    
 49 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
 50 //                                                
 51 // Copyright (c) 2006 The Regents of the Unive    
 52 // All rights reserved.                           
 53 // UCRL-CODE-224807                               
 54 //                                                
 55 //                                                
 56 //                                                
 57 // neutron_hp -- source file                      
 58 // J.M. Verbeke, Jan-2007                         
 59 // A low energy neutron-induced fission model.    
 60 //                                                
 61                                                   
 62 #include "G4FissionLibrary.hh"                    
 63 #include "G4ParticleHPManager.hh"                 
 64 #include "G4SystemOfUnits.hh"                     
 65 #include "G4PhysicsModelCatalog.hh"               
 66                                                   
 67 G4FissionLibrary::G4FissionLibrary()              
 68   : G4ParticleHPFinalState(), theIsotope(0), t    
 69 {                                                 
 70   hasXsec = false;                                
 71   fe=0;                                           
 72   secID = G4PhysicsModelCatalog::GetModelID( "    
 73 }                                                 
 74                                                   
 75 G4FissionLibrary::~G4FissionLibrary()             
 76 {}                                                
 77                                                   
 78 G4ParticleHPFinalState * G4FissionLibrary::New    
 79 {                                                 
 80   G4FissionLibrary * theNew = new G4FissionLib    
 81   return theNew;                                  
 82 }                                                 
 83                                                   
 84 //void G4FissionLibrary::Init (G4double A, G4d    
 85 void G4FissionLibrary::Init (G4double A, G4dou    
 86 {                                                 
 87   G4String tString = "/FS/";                      
 88   G4bool dbool;                                   
 89   theIsotope = static_cast<G4int>(1000*Z+A);      
 90   G4ParticleHPDataUsed aFile = theNames.GetNam    
 91   G4String filename = aFile.GetName();            
 92                                                   
 93   if(!dbool)                                      
 94   {                                               
 95     hasAnyData = false;                           
 96     hasFSData = false;                            
 97     hasXsec = false;                              
 98     return;                                       
 99   }                                               
100   //std::ifstream theData(filename, std::ios::    
101   std::istringstream theData(std::ios::in);       
102   G4ParticleHPManager::GetInstance()->GetDataS    
103                                                   
104   // here it comes                                
105   G4int infoType, dataType;                       
106   hasFSData = false;                              
107   while (theData >> infoType) // Loop checking    
108   {                                               
109     hasFSData = true;                             
110     theData >> dataType;                          
111     switch(infoType)                              
112     {                                             
113       case 1:                                     
114         if(dataType==4) theNeutronAngularDis.I    
115         if(dataType==5) thePromptNeutronEnDis.    
116         if(dataType==12) theFinalStatePhotons.    
117         if(dataType==14) theFinalStatePhotons.    
118         if(dataType==15) theFinalStatePhotons.    
119         break;                                    
120       case 2:                                     
121         if(dataType==1) theFinalStateNeutrons.    
122         break;                                    
123       case 3:                                     
124         if(dataType==1) theFinalStateNeutrons.    
125         if(dataType==5) theDelayedNeutronEnDis    
126         break;                                    
127       case 4:                                     
128         if(dataType==1) theFinalStateNeutrons.    
129         break;                                    
130       case 5:                                     
131         if(dataType==1) theEnergyRelease.Init(    
132         break;                                    
133       default:                                    
134         G4cout << "G4FissionLibrary::Init: unk    
135         throw G4HadronicException(__FILE__, __    
136         break;                                    
137     }                                             
138   }                                               
139   targetMass = theFinalStateNeutrons.GetTarget    
140   //theData.close();                              
141 }                                                 
142                                                   
143 G4HadFinalState* G4FissionLibrary::ApplyYourse    
144 {                                                 
145                                                   
146   if ( theResult.Get() == NULL ) theResult.Put    
147   theResult.Get()->Clear();                       
148                                                   
149   // prepare neutron                              
150   G4double eKinetic = theTrack.GetKineticEnerg    
151   const G4HadProjectile* incidentParticle = &t    
152   G4ReactionProduct theNeutron(incidentParticl    
153   theNeutron.SetMomentum(incidentParticle->Get    
154   theNeutron.SetKineticEnergy(eKinetic);          
155                                                   
156   // prepare target                               
157   G4Nucleus aNucleus;                             
158   G4ReactionProduct theTarget;                    
159   G4ThreeVector neuVelo = (1./incidentParticle    
160   theTarget = aNucleus.GetBiasedThermalNucleus    
161                                                   
162   // set neutron and target in the FS classes     
163   //theNeutronAngularDis.SetNeutron(theNeutron    
164   theNeutronAngularDis.SetProjectileRP(theNeut    
165   theNeutronAngularDis.SetTarget(theTarget);      
166                                                   
167   // boost to target rest system                  
168   theNeutron.Lorentz(theNeutron, -1*theTarget)    
169                                                   
170   eKinetic = theNeutron.GetKineticEnergy();       
171                                                   
172   // dice neutron and gamma multiplicities, en    
173   // no energy conservation on an event-to-eve    
174   // also for mean, we rely on the consistency    
175                                                   
176   G4int nPrompt=0, gPrompt=0;                     
177   SampleMult(theTrack, &nPrompt, &gPrompt, eKi    
178                                                   
179   // Build neutrons and add them to dynamic pa    
180   G4double momentum;                              
181   for(G4int i=0; i<nPrompt; i++)                  
182   {                                               
183     G4DynamicParticle * it = new G4DynamicPart    
184     it->SetDefinition(G4Neutron::Neutron());      
185     it->SetKineticEnergy(fe->getNeutronEnergy(    
186     momentum = it->GetTotalMomentum();            
187     G4ThreeVector temp(momentum*fe->getNeutron    
188                        momentum*fe->getNeutron    
189                        momentum*fe->getNeutron    
190     it->SetMomentum( temp );                      
191 //    it->SetGlobalTime(fe->getNeutronAge(i)*s    
192     theResult.Get()->AddSecondary(it, secID);     
193 //    G4cout <<"G4FissionLibrary::ApplyYoursel    
194   }                                               
195                                                   
196   // Build gammas, lorentz transform them, and    
197   for(G4int i=0; i<gPrompt; i++)                  
198   {                                               
199     G4ReactionProduct * thePhoton = new G4Reac    
200     thePhoton->SetDefinition(G4Gamma::Gamma())    
201     thePhoton->SetKineticEnergy(fe->getPhotonE    
202     momentum = thePhoton->GetTotalMomentum();     
203     G4ThreeVector temp(momentum*fe->getPhotonD    
204                        momentum*fe->getPhotonD    
205                        momentum*fe->getPhotonD    
206     thePhoton->SetMomentum( temp );               
207     thePhoton->Lorentz(*thePhoton, -1.*theTarg    
208                                                   
209     G4DynamicParticle * it = new G4DynamicPart    
210     it->SetDefinition(thePhoton->GetDefinition    
211     it->SetMomentum(thePhoton->GetMomentum());    
212 //    it->SetGlobalTime(fe->getPhotonAge(i)*se    
213 //    G4cout <<"G4FissionLibrary::ApplyYoursel    
214     theResult.Get()->AddSecondary(it, secID);     
215     delete thePhoton;                             
216   }                                               
217 //  G4cout <<"G4FissionLibrary::ApplyYourself:    
218 //  G4cout <<"G4FissionLibrary::ApplyYourself:    
219 //  G4cout <<"G4FissionLibrary::ApplyYourself:    
220                                                   
221   // finally deal with local energy deposition    
222   G4double eDepByFragments = theEnergyRelease.    
223   theResult.Get()->SetLocalEnergyDeposit(eDepB    
224 //   G4cout << "G4FissionLibrary::local energy    
225   // clean up the primary neutron                 
226   theResult.Get()->SetStatusChange(stopAndKill    
227   return theResult.Get();                         
228 }                                                 
229                                                   
230 void G4FissionLibrary::SampleMult(const G4HadP    
231                                    G4int* gPro    
232 {                                                 
233    G4double promptNeutronMulti = 0;               
234    promptNeutronMulti = theFinalStateNeutrons.    
235    G4double delayedNeutronMulti = 0;              
236    delayedNeutronMulti = theFinalStateNeutrons    
237                                                   
238    G4double time = theTrack.GetGlobalTime()/se    
239    G4double totalNeutronMulti = theFinalStateN    
240    if(delayedNeutronMulti==0&&promptNeutronMul    
241      // no data for prompt and delayed neutron    
242      // but there is perhaps data for the tota    
243      // we use it for prompt neutron emission     
244      if (fe != 0) delete fe;                      
245      fe = new G4fissionEvent(theIsotope, time,    
246    } else {                                       
247      // prompt nubar != 0 || delayed nubar !=     
248      if (fe != 0) delete fe;                      
249      fe = new G4fissionEvent(theIsotope, time,    
250    }                                              
251    *nPrompt = fe->getNeutronNu();                 
252    if (*nPrompt == -1) *nPrompt = 0; // the fi    
253    *gPrompt = fe->getPhotonNu();                  
254    if (*gPrompt == -1) *gPrompt = 0; // the fi    
255 }                                                 
256                                                   
257