| 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 | // neutron_hp -- source file
|
|---|
| 27 | // J.P. Wellisch, Nov-1996
|
|---|
| 28 | // A prototype of the low energy neutron transport model.
|
|---|
| 29 | //
|
|---|
| 30 | // 12-Apr-06 fix in delayed neutron and photon emission without FS data by T. Koi
|
|---|
| 31 | //
|
|---|
| 32 | #include "G4NeutronHPFissionFS.hh"
|
|---|
| 33 | #include "G4Nucleus.hh"
|
|---|
| 34 | #include "G4DynamicParticleVector.hh"
|
|---|
| 35 | #include "G4NeutronHPFissionERelease.hh"
|
|---|
| 36 | void G4NeutronHPFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
|---|
| 37 | {
|
|---|
| 38 | theFS.Init(A, Z, dirName, aFSType);
|
|---|
| 39 | theFC.Init(A, Z, dirName, aFSType);
|
|---|
| 40 | theSC.Init(A, Z, dirName, aFSType);
|
|---|
| 41 | theTC.Init(A, Z, dirName, aFSType);
|
|---|
| 42 | theLC.Init(A, Z, dirName, aFSType);
|
|---|
| 43 | }
|
|---|
| 44 | G4HadFinalState * G4NeutronHPFissionFS::ApplyYourself(const G4HadProjectile & theTrack)
|
|---|
| 45 | {
|
|---|
| 46 | // prepare neutron
|
|---|
| 47 | theResult.Clear();
|
|---|
| 48 | G4double eKinetic = theTrack.GetKineticEnergy();
|
|---|
| 49 | const G4HadProjectile *incidentParticle = &theTrack;
|
|---|
| 50 | G4ReactionProduct theNeutron( const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) );
|
|---|
| 51 | theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
|
|---|
| 52 | theNeutron.SetKineticEnergy( eKinetic );
|
|---|
| 53 |
|
|---|
| 54 | // prepare target
|
|---|
| 55 | G4Nucleus aNucleus;
|
|---|
| 56 | G4ReactionProduct theTarget;
|
|---|
| 57 | G4double targetMass = theFS.GetMass();
|
|---|
| 58 | G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum();
|
|---|
| 59 | theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature());
|
|---|
| 60 |
|
|---|
| 61 | // set neutron and target in the FS classes
|
|---|
| 62 | theFS.SetNeutron(theNeutron);
|
|---|
| 63 | theFS.SetTarget(theTarget);
|
|---|
| 64 | theFC.SetNeutron(theNeutron);
|
|---|
| 65 | theFC.SetTarget(theTarget);
|
|---|
| 66 | theSC.SetNeutron(theNeutron);
|
|---|
| 67 | theSC.SetTarget(theTarget);
|
|---|
| 68 | theTC.SetNeutron(theNeutron);
|
|---|
| 69 | theTC.SetTarget(theTarget);
|
|---|
| 70 | theLC.SetNeutron(theNeutron);
|
|---|
| 71 | theLC.SetTarget(theTarget);
|
|---|
| 72 |
|
|---|
| 73 | // boost to target rest system and decide on channel.
|
|---|
| 74 | theNeutron.Lorentz(theNeutron, -1*theTarget);
|
|---|
| 75 |
|
|---|
| 76 | // dice the photons
|
|---|
| 77 |
|
|---|
| 78 | G4DynamicParticleVector * thePhotons;
|
|---|
| 79 | thePhotons = theFS.GetPhotons();
|
|---|
| 80 |
|
|---|
| 81 | // select the FS in charge
|
|---|
| 82 |
|
|---|
| 83 | eKinetic = theNeutron.GetKineticEnergy();
|
|---|
| 84 | G4double xSec[4];
|
|---|
| 85 | xSec[0] = theFC.GetXsec(eKinetic);
|
|---|
| 86 | xSec[1] = xSec[0]+theSC.GetXsec(eKinetic);
|
|---|
| 87 | xSec[2] = xSec[1]+theTC.GetXsec(eKinetic);
|
|---|
| 88 | xSec[3] = xSec[2]+theLC.GetXsec(eKinetic);
|
|---|
| 89 | G4int it;
|
|---|
| 90 | unsigned int i=0;
|
|---|
| 91 | G4double random = G4UniformRand();
|
|---|
| 92 | if(xSec[3]==0)
|
|---|
| 93 | {
|
|---|
| 94 | it=-1;
|
|---|
| 95 | }
|
|---|
| 96 | else
|
|---|
| 97 | {
|
|---|
| 98 | for(i=0; i<4; i++)
|
|---|
| 99 | {
|
|---|
| 100 | it =i;
|
|---|
| 101 | if(random<xSec[i]/xSec[3]) break;
|
|---|
| 102 | }
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | // dice neutron multiplicities, energies and momenta in Lab. @@
|
|---|
| 106 | // no energy conservation on an event-to-event basis. we rely on the data to be ok. @@
|
|---|
| 107 | // also for mean, we rely on the consistancy of the data. @@
|
|---|
| 108 |
|
|---|
| 109 | G4int Prompt=0, delayed=0, all=0;
|
|---|
| 110 | G4DynamicParticleVector * theNeutrons = 0;
|
|---|
| 111 | switch(it) // check logic, and ask, if partials can be assumed to correspond to individual particles @@@
|
|---|
| 112 | {
|
|---|
| 113 | case 0:
|
|---|
| 114 | theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
|
|---|
| 115 | if(Prompt==0&&delayed==0) Prompt=all;
|
|---|
| 116 | theNeutrons = theFC.ApplyYourself(Prompt); // delayed always in FS
|
|---|
| 117 | // take 'U' into account explicitely (see 5.4) in the sampling of energy @@@@
|
|---|
| 118 | break;
|
|---|
| 119 | case 1:
|
|---|
| 120 | theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 1);
|
|---|
| 121 | if(Prompt==0&&delayed==0) Prompt=all;
|
|---|
| 122 | theNeutrons = theSC.ApplyYourself(Prompt); // delayed always in FS, off done in FSFissionFS
|
|---|
| 123 | break;
|
|---|
| 124 | case 2:
|
|---|
| 125 | theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 2);
|
|---|
| 126 | if(Prompt==0&&delayed==0) Prompt=all;
|
|---|
| 127 | theNeutrons = theTC.ApplyYourself(Prompt); // delayed always in FS
|
|---|
| 128 | break;
|
|---|
| 129 | case 3:
|
|---|
| 130 | theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 3);
|
|---|
| 131 | if(Prompt==0&&delayed==0) Prompt=all;
|
|---|
| 132 | theNeutrons = theLC.ApplyYourself(Prompt); // delayed always in FS
|
|---|
| 133 | break;
|
|---|
| 134 | default:
|
|---|
| 135 | break;
|
|---|
| 136 | }
|
|---|
| 137 | // dice delayed neutrons and photons, and fallback
|
|---|
| 138 | // for Prompt in case channel had no FS data; add all paricles to FS.
|
|---|
| 139 |
|
|---|
| 140 | G4double * theDecayConstants;
|
|---|
| 141 |
|
|---|
| 142 | if(theNeutrons != 0)
|
|---|
| 143 | {
|
|---|
| 144 | theDecayConstants = new G4double[delayed];
|
|---|
| 145 | G4int nPhotons = 0;
|
|---|
| 146 | if(thePhotons!=0) nPhotons = thePhotons->size();
|
|---|
| 147 | for(i=0; i<theNeutrons->size(); i++)
|
|---|
| 148 | {
|
|---|
| 149 | theResult.AddSecondary(theNeutrons->operator[](i));
|
|---|
| 150 | }
|
|---|
| 151 | delete theNeutrons;
|
|---|
| 152 |
|
|---|
| 153 | G4DynamicParticleVector * theDelayed = 0;
|
|---|
| 154 | theDelayed = theFS.ApplyYourself(0, delayed, theDecayConstants);
|
|---|
| 155 | for(i=0; i<theDelayed->size(); i++)
|
|---|
| 156 | {
|
|---|
| 157 | G4double time = -std::log(G4UniformRand())/theDecayConstants[i];
|
|---|
| 158 | time += theTrack.GetGlobalTime();
|
|---|
| 159 | G4HadSecondary * track = new G4HadSecondary(theDelayed->operator[](i));
|
|---|
| 160 | track->SetTime(time);
|
|---|
| 161 | theResult.AddSecondary(track);
|
|---|
| 162 | }
|
|---|
| 163 | delete theDelayed;
|
|---|
| 164 | }
|
|---|
| 165 | else
|
|---|
| 166 | {
|
|---|
| 167 | // cout << " all = "<<all<<G4endl;
|
|---|
| 168 | theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
|
|---|
| 169 | theDecayConstants = new G4double[delayed];
|
|---|
| 170 | if(Prompt==0&&delayed==0) Prompt=all;
|
|---|
| 171 | theNeutrons = theFS.ApplyYourself(Prompt, delayed, theDecayConstants);
|
|---|
| 172 | G4int nPhotons = 0;
|
|---|
| 173 | if(thePhotons!=0) nPhotons = thePhotons->size();
|
|---|
| 174 | G4int i0;
|
|---|
| 175 | for(i0=0; i0<Prompt; i0++)
|
|---|
| 176 | {
|
|---|
| 177 | theResult.AddSecondary(theNeutrons->operator[](i0));
|
|---|
| 178 | }
|
|---|
| 179 | for(i0=Prompt; i0<Prompt+delayed; i0++)
|
|---|
| 180 | {
|
|---|
| 181 | G4double time = -std::log(G4UniformRand())/theDecayConstants[i0-Prompt];
|
|---|
| 182 | time += theTrack.GetGlobalTime();
|
|---|
| 183 | //G4HadSecondary * track = new G4HadSecondary(theNeutrons->operator[](i)); this line will be delete
|
|---|
| 184 | G4HadSecondary * track = new G4HadSecondary( theNeutrons->operator[]( i0 ) );
|
|---|
| 185 | track->SetTime(time);
|
|---|
| 186 | theResult.AddSecondary(track);
|
|---|
| 187 | }
|
|---|
| 188 | delete theNeutrons;
|
|---|
| 189 | }
|
|---|
| 190 | delete [] theDecayConstants;
|
|---|
| 191 | // cout << "all delayed "<<delayed<<G4endl;
|
|---|
| 192 | unsigned int nPhotons = 0;
|
|---|
| 193 | if(thePhotons!=0)
|
|---|
| 194 | {
|
|---|
| 195 | nPhotons = thePhotons->size();
|
|---|
| 196 | for(i=0; i<nPhotons; i++)
|
|---|
| 197 | {
|
|---|
| 198 | theResult.AddSecondary(thePhotons->operator[](i));
|
|---|
| 199 | }
|
|---|
| 200 | delete thePhotons;
|
|---|
| 201 | }
|
|---|
| 202 |
|
|---|
| 203 | // finally deal with local energy depositions.
|
|---|
| 204 | // G4cout <<"Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< G4endl;
|
|---|
| 205 | // G4cout <<"Number of photons = "<<nPhotons<<G4endl;
|
|---|
| 206 | // G4cout <<"Number of Prompt = "<<Prompt<<G4endl;
|
|---|
| 207 | // G4cout <<"Number of delayed = "<<delayed<<G4endl;
|
|---|
| 208 |
|
|---|
| 209 | G4NeutronHPFissionERelease * theERelease = theFS.GetEnergyRelease();
|
|---|
| 210 | G4double eDepByFragments = theERelease->GetFragmentKinetic();
|
|---|
| 211 | theResult.SetLocalEnergyDeposit(eDepByFragments);
|
|---|
| 212 | // cout << "local energy deposit" << eDepByFragments<<G4endl;
|
|---|
| 213 | // clean up the primary neutron
|
|---|
| 214 | theResult.SetStatusChange(stopAndKill);
|
|---|
| 215 | return &theResult;
|
|---|
| 216 | }
|
|---|