#include <G4FissionLibrary.hh>
Inheritance diagram for G4FissionLibrary:
Public Member Functions | |
G4FissionLibrary () | |
~G4FissionLibrary () | |
void | Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &) |
G4HadFinalState * | ApplyYourself (const G4HadProjectile &theTrack) |
G4NeutronHPFinalState * | New () |
Definition at line 76 of file G4FissionLibrary.hh.
G4FissionLibrary::G4FissionLibrary | ( | ) |
Definition at line 66 of file G4FissionLibrary.cc.
References G4NeutronHPFinalState::hasXsec.
00067 : G4NeutronHPFinalState(), theIsotope(0), targetMass(0.0) 00068 { 00069 hasXsec = false; 00070 }
G4FissionLibrary::~G4FissionLibrary | ( | ) |
G4HadFinalState * G4FissionLibrary::ApplyYourself | ( | const G4HadProjectile & | theTrack | ) | [virtual] |
Reimplemented from G4NeutronHPFinalState.
Definition at line 138 of file G4FissionLibrary.cc.
References G4HadFinalState::AddSecondary(), G4HadFinalState::Clear(), G4Gamma::Gamma(), G4HadProjectile::Get4Momentum(), G4Nucleus::GetBiasedThermalNucleus(), G4HadProjectile::GetDefinition(), G4NeutronHPFissionERelease::GetFragmentKinetic(), G4ReactionProduct::GetKineticEnergy(), G4HadProjectile::GetKineticEnergy(), G4HadProjectile::GetMaterial(), G4ReactionProduct::GetMomentum(), getndircosu_(), getndircosv_(), getndircosw_(), getneng_(), G4ParticleDefinition::GetPDGMass(), getpdircosu_(), getpdircosv_(), getpdircosw_(), getpeng_(), G4Material::GetTemperature(), G4ReactionProduct::Lorentz(), G4Neutron::Neutron(), G4DynamicParticle::SetDefinition(), G4ReactionProduct::SetKineticEnergy(), G4HadFinalState::SetLocalEnergyDeposit(), G4DynamicParticle::SetMomentum(), G4ReactionProduct::SetMomentum(), G4NeutronHPAngular::SetNeutron(), G4HadFinalState::SetStatusChange(), G4NeutronHPAngular::SetTarget(), stopAndKill, and G4NeutronHPFinalState::theResult.
00139 { 00140 theResult.Clear(); 00141 00142 // prepare neutron 00143 G4double eKinetic = theTrack.GetKineticEnergy(); 00144 const G4HadProjectile *incidentParticle = &theTrack; 00145 G4ReactionProduct theNeutron( const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) ); 00146 theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() ); 00147 theNeutron.SetKineticEnergy( eKinetic ); 00148 00149 // prepare target 00150 G4Nucleus aNucleus; 00151 G4ReactionProduct theTarget; 00152 G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum(); 00153 theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature()); 00154 00155 // set neutron and target in the FS classes 00156 theNeutronAngularDis.SetNeutron(theNeutron); 00157 theNeutronAngularDis.SetTarget(theTarget); 00158 00159 // boost to target rest system 00160 theNeutron.Lorentz(theNeutron, -1*theTarget); 00161 00162 eKinetic = theNeutron.GetKineticEnergy(); 00163 00164 // dice neutron and gamma multiplicities, energies and momenta in Lab. @@ 00165 // no energy conservation on an event-to-event basis. we rely on the data to be ok. @@ 00166 // also for mean, we rely on the consistency of the data. @@ 00167 00168 G4int nPrompt=0, gPrompt=0; 00169 SampleMult(theTrack, &nPrompt, &gPrompt, eKinetic); 00170 00171 // Build neutrons and add them to dynamic particle vector 00172 G4double momentum; 00173 for(G4int i=0; i<nPrompt; i++) 00174 { 00175 G4DynamicParticle * it = new G4DynamicParticle; 00176 it->SetDefinition(G4Neutron::Neutron()); 00177 it->SetKineticEnergy(getneng_(&i)*MeV); 00178 momentum = it->GetTotalMomentum(); 00179 G4ThreeVector temp(momentum*getndircosu_(&i), 00180 momentum*getndircosv_(&i), 00181 momentum*getndircosw_(&i)); 00182 it->SetMomentum( temp ); 00183 // it->SetGlobalTime(getnage_(&i)*second); 00184 theResult.AddSecondary(it); 00185 // G4cout <<"G4FissionLibrary::ApplyYourself: energy of prompt neutron " << i << " = " << it->GetKineticEnergy()<<G4endl; 00186 } 00187 00188 // Build gammas, lorentz transform them, and add them to dynamic particle vector 00189 for(G4int i=0; i<gPrompt; i++) 00190 { 00191 G4ReactionProduct * thePhoton = new G4ReactionProduct; 00192 thePhoton->SetDefinition(G4Gamma::Gamma()); 00193 thePhoton->SetKineticEnergy(getpeng_(&i)*MeV); 00194 momentum = thePhoton->GetTotalMomentum(); 00195 G4ThreeVector temp(momentum*getpdircosu_(&i), 00196 momentum*getpdircosv_(&i), 00197 momentum*getpdircosw_(&i)); 00198 thePhoton->SetMomentum( temp ); 00199 thePhoton->Lorentz(*thePhoton, -1.*theTarget); 00200 00201 G4DynamicParticle * it = new G4DynamicParticle; 00202 it->SetDefinition(thePhoton->GetDefinition()); 00203 it->SetMomentum(thePhoton->GetMomentum()); 00204 // it->SetGlobalTime(getpage_(&i)*second); 00205 // G4cout <<"G4FissionLibrary::ApplyYourself: energy of prompt photon " << i << " = " << it->GetKineticEnergy()<<G4endl; 00206 theResult.AddSecondary(it); 00207 delete thePhoton; 00208 } 00209 // G4cout <<"G4FissionLibrary::ApplyYourself: Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< G4endl; 00210 // G4cout <<"G4FissionLibrary::ApplyYourself: Number of induced prompt neutron = "<<nPrompt<<G4endl; 00211 // G4cout <<"G4FissionLibrary::ApplyYourself: Number of induced prompt photons = "<<gPrompt<<G4endl; 00212 00213 // finally deal with local energy depositions. 00214 G4double eDepByFragments = theEnergyRelease.GetFragmentKinetic(); 00215 theResult.SetLocalEnergyDeposit(eDepByFragments); 00216 // G4cout << "G4FissionLibrary::local energy deposit" << eDepByFragments<<G4endl; 00217 // clean up the primary neutron 00218 theResult.SetStatusChange(stopAndKill); 00219 return &theResult; 00220 }
void G4FissionLibrary::Init | ( | G4double | A, | |
G4double | Z, | |||
G4int | M, | |||
G4String & | dirName, | |||
G4String & | ||||
) | [virtual] |
Implements G4NeutronHPFinalState.
Definition at line 82 of file G4FissionLibrary.cc.
References G4cout, G4endl, G4NeutronHPDataUsed::GetName(), G4NeutronHPNames::GetName(), G4NeutronHPNeutronYield::GetTargetMass(), G4NeutronHPFinalState::hasAnyData, G4NeutronHPFinalState::hasFSData, G4NeutronHPFinalState::hasXsec, G4NeutronHPFissionERelease::Init(), G4NeutronHPEnergyDistribution::Init(), G4NeutronHPAngular::Init(), G4NeutronHPPhotonDist::InitAngular(), G4NeutronHPNeutronYield::InitDelayed(), G4NeutronHPPhotonDist::InitEnergies(), G4NeutronHPNeutronYield::InitMean(), G4NeutronHPPhotonDist::InitMean(), G4NeutronHPNeutronYield::InitPrompt(), and G4NeutronHPFinalState::theNames.
00083 { 00084 G4String tString = "/FS/"; 00085 G4bool dbool; 00086 theIsotope = static_cast<G4int>(1000*Z+A); 00087 G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, dirName, tString, dbool); 00088 G4String filename = aFile.GetName(); 00089 00090 if(!dbool) 00091 { 00092 hasAnyData = false; 00093 hasFSData = false; 00094 hasXsec = false; 00095 return; 00096 } 00097 std::ifstream theData(filename, std::ios::in); 00098 00099 // here it comes 00100 G4int infoType, dataType; 00101 hasFSData = false; 00102 while (theData >> infoType) 00103 { 00104 hasFSData = true; 00105 theData >> dataType; 00106 switch(infoType) 00107 { 00108 case 1: 00109 if(dataType==4) theNeutronAngularDis.Init(theData); 00110 if(dataType==5) thePromptNeutronEnDis.Init(theData); 00111 if(dataType==12) theFinalStatePhotons.InitMean(theData); 00112 if(dataType==14) theFinalStatePhotons.InitAngular(theData); 00113 if(dataType==15) theFinalStatePhotons.InitEnergies(theData); 00114 break; 00115 case 2: 00116 if(dataType==1) theFinalStateNeutrons.InitMean(theData); 00117 break; 00118 case 3: 00119 if(dataType==1) theFinalStateNeutrons.InitDelayed(theData); 00120 if(dataType==5) theDelayedNeutronEnDis.Init(theData); 00121 break; 00122 case 4: 00123 if(dataType==1) theFinalStateNeutrons.InitPrompt(theData); 00124 break; 00125 case 5: 00126 if(dataType==1) theEnergyRelease.Init(theData); 00127 break; 00128 default: 00129 G4cout << "G4FissionLibrary::Init: unknown data type"<<dataType<<G4endl; 00130 throw G4HadronicException(__FILE__, __LINE__, "G4FissionLibrary::Init: unknown data type"); 00131 break; 00132 } 00133 } 00134 targetMass = theFinalStateNeutrons.GetTargetMass(); 00135 theData.close(); 00136 }
G4NeutronHPFinalState * G4FissionLibrary::New | ( | ) | [virtual] |
Implements G4NeutronHPFinalState.
Definition at line 75 of file G4FissionLibrary.cc.
00076 { 00077 G4FissionLibrary * theNew = new G4FissionLibrary; 00078 return theNew; 00079 }