| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DsG4GdNeutronHPCaptureFS.cc

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 //                   Final state of neutron captured by Gadolinium            
00003 //                            
00004 // Modified class from original G4NeutronHPCaptureFS class to deexcite and
00005 // add correctly the secondary to the hadronic final state.
00006 //-------------------------------------------------------------------------
00007 // Author: Liang Zhan, 2006/01/27
00008 // Modified: bv@bnl.gov 2008/4/16 for DetSim
00009 //-------------------------------------------------------------------------
00010 
00011 #include "DsG4GdNeutronHPCaptureFS.h"
00012 
00013 #include "G4Gamma.hh"
00014 #include "G4ReactionProduct.hh"
00015 #include "G4Nucleus.hh"
00016 #include "G4PhotonEvaporation.hh"
00017 #include "G4Fragment.hh"
00018 #include "G4ParticleTable.hh" 
00019 #include "G4NeutronHPDataUsed.hh"
00020 #include "G4NucleiProperties.hh"
00021 
00023 
00024 DsG4GdNeutronHPCaptureFS::DsG4GdNeutronHPCaptureFS() 
00025 {
00026     hasXsec = false; 
00027     targetMass = 0;
00028     //    G4cerr << "DsG4GdNeutronHPCaptureFS" << G4endl; 
00029 }
00030   
00031 DsG4GdNeutronHPCaptureFS::~DsG4GdNeutronHPCaptureFS() 
00032 { 
00033 }
00034 
00035 G4HadFinalState * DsG4GdNeutronHPCaptureFS::ApplyYourself(const G4HadProjectile & theTrack)
00036 {
00037     G4int i;
00038     theResult.Clear();
00039     // prepare neutron
00040     G4double eKinetic = theTrack.GetKineticEnergy();
00041     const G4HadProjectile *incidentParticle = &theTrack;
00042     theNeutron = const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) ;
00043     theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
00044     theNeutron.SetKineticEnergy( eKinetic );
00045 
00046     // prepare target
00047     G4double eps = 0.0001;
00048     if(targetMass<500*MeV) {
00049         targetMass = G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps),
00050                                                         static_cast<G4int>(theBaseZ+eps))
00051             / G4Neutron::Neutron()->GetPDGMass();
00052     }
00053     G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
00054     G4double temperature = theTrack.GetMaterial()->GetTemperature();
00055     theTarget = aNucleus.GetBiasedThermalNucleus(targetMass, neutronVelocity, temperature);
00056 
00057     // go to nucleus rest system
00058     theNeutron.Lorentz(theNeutron, -1*theTarget);
00059     eKinetic = theNeutron.GetKineticEnergy();
00060 
00061     // dice the photons
00062     // get the emission gammas
00063     G4ReactionProductVector * thePhotons = NULL; 
00064     thePhotons = theFinalgammas.GetGammas();    
00065 
00066     // update the nucleus, calculate the target state after gamma emission.
00067     G4ThreeVector aCMSMomentum = theNeutron.GetMomentum()+theTarget.GetMomentum();
00068     G4LorentzVector p4(aCMSMomentum, theTarget.GetTotalEnergy() + theNeutron.GetTotalEnergy());
00069     nucleus = new G4Fragment(static_cast<G4int>(theBaseA+1), static_cast<G4int>(theBaseZ) ,p4);
00070 
00071     G4int nPhotons = 0;
00072     if(thePhotons!=NULL) nPhotons=thePhotons->size();
00073   
00074     for(i=0;i<nPhotons;i++) {
00075         G4ThreeVector pGamma(thePhotons->operator[](i)->GetMomentum());
00076         G4LorentzVector gamma(pGamma,thePhotons->operator[](i)->GetTotalEnergy());
00077         G4Fragment* theOne= new G4Fragment(gamma,G4Gamma::GammaDefinition());
00078         UpdateNucleus(theOne,thePhotons->operator[](i)->GetTotalEnergy());
00079     }
00080 
00081     theTwo = new G4DynamicParticle;
00082     theTwo->SetDefinition(G4ParticleTable::GetParticleTable()
00083                           ->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ)));
00084     theTwo->SetMomentum(nucleus->GetMomentum());
00085 
00086     // add them to the final state
00087 
00088     G4int nParticles = nPhotons;
00089     if(1==nPhotons) nParticles = 2;
00090 
00091     // back to lab system
00092     for(i=0; i<nPhotons; i++)
00093         thePhotons->operator[](i)->Lorentz(*(thePhotons->operator[](i)), theTarget);
00094         
00095     // Recoil, if only one gamma
00096     if (1==nPhotons) {
00097         G4DynamicParticle * theOne = new G4DynamicParticle;
00098         G4ParticleDefinition * aRecoil = G4ParticleTable::GetParticleTable()
00099             ->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 
00100                       0, static_cast<G4int>(theBaseZ));
00101         theOne->SetDefinition(aRecoil);
00102     
00103         // Now energy; 
00104         // Can be done slightly better @
00105         G4ThreeVector aMomentum =  theTrack.Get4Momentum().vect()
00106             +theTarget.GetMomentum()
00107             -thePhotons->operator[](0)->GetMomentum();
00108 
00109         G4ThreeVector theMomUnit = aMomentum.unit();
00110         G4double aKinEnergy =  theTrack.GetKineticEnergy()
00111             +theTarget.GetKineticEnergy(); // gammas come from Q-value
00112         G4double theResMass = aRecoil->GetPDGMass();
00113         G4double theResE = aRecoil->GetPDGMass()+aKinEnergy;
00114         G4double theAbsMom = std::sqrt(theResE*theResE - theResMass*theResMass);
00115         G4ThreeVector theMomentum = theAbsMom*theMomUnit;
00116         theOne->SetMomentum(theMomentum);
00117         theResult.AddSecondary(theOne);     
00118     }else{
00119       //Add deexcited nucleus
00120       theResult.AddSecondary(theTwo);
00121     }
00122 
00123     // Now fill in the gammas.
00124      for(i=0; i<nPhotons; i++) {
00125         // back to lab system
00126         G4DynamicParticle * theOne = new G4DynamicParticle;
00127         theOne->SetDefinition(thePhotons->operator[](i)->GetDefinition());
00128         theOne->SetMomentum(thePhotons->operator[](i)->GetMomentum());
00129         theResult.AddSecondary(theOne);
00130         delete thePhotons->operator[](i);
00131     }
00132     delete thePhotons; 
00133     
00134     // clean up the primary neutron
00135     theResult.SetStatusChange(stopAndKill);
00136     return &theResult;
00137 }
00138 
00139 // for recoil, calculate the target nucleus state after gamma emission.
00140 void DsG4GdNeutronHPCaptureFS::UpdateNucleus( const G4Fragment* gamma , G4double eGamma )
00141 {
00142     G4LorentzVector p4Gamma = gamma->GetMomentum();
00143     G4ThreeVector pGamma(p4Gamma.vect());
00144   
00145     G4LorentzVector p4Nucleus(nucleus->GetMomentum() );
00146   
00147     G4double m1 = G4ParticleTable::GetParticleTable()->GetIonTable()
00148         ->GetIonMass(static_cast<G4int>(nucleus->GetZ()),
00149                      static_cast<G4int>(nucleus->GetA()));
00150     G4double m2 = nucleus->GetZ() *  G4Proton::Proton()->GetPDGMass() + 
00151         (nucleus->GetA()- nucleus->GetZ())*G4Neutron::Neutron()->GetPDGMass();
00152   
00153     G4double Mass = std::min(m1,m2);
00154   
00155     G4double newExcitation = p4Nucleus.mag() - Mass - eGamma;
00156   
00157     if(newExcitation < 0)
00158         newExcitation = 0;
00159   
00160     G4ThreeVector p3Residual(p4Nucleus.vect() - pGamma);
00161     G4double newEnergy = std::sqrt(p3Residual * p3Residual +
00162                                    (Mass + newExcitation) * (Mass + newExcitation));
00163     G4LorentzVector p4Residual(p3Residual, newEnergy);
00164   
00165     // Update excited nucleus parameters
00166   
00167     nucleus->SetMomentum(p4Residual);
00168 
00169     return;
00170 }
00171 
00172 void DsG4GdNeutronHPCaptureFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
00173 {
00174     G4String tString = "/FS/";
00175     G4bool dbool;
00176     G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), dirName, tString, dbool);
00177     G4String filename = aFile.GetName();
00178     theBaseA = A;
00179     theBaseZ = G4int(Z+.5);
00180     if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || 
00181                               std::abs(theBaseA - A)>0.0001))) {
00182         hasAnyData = false;
00183         hasFSData = false; 
00184         hasXsec = false;
00185         return;
00186     }
00187     std::ifstream theData(filename, std::ios::in);
00188     
00189     hasFSData = theFinalStatePhotons.InitMean(theData); 
00190     if(hasFSData) {
00191         targetMass = theFinalStatePhotons.GetTargetMass();
00192         theFinalStatePhotons.InitAngular(theData); 
00193         theFinalStatePhotons.InitEnergies(theData); 
00194     }
00195     theData.close();
00196 }
00197 
00198 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:53:24 2011 for DetSim by doxygen 1.4.7