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

In This Package:

DsG4NNDCNeutronHPCaptureFS Class Reference

#include <DsG4NNDCNeutronHPCaptureFS.h>

Collaboration diagram for DsG4NNDCNeutronHPCaptureFS:

[legend]
List of all members.

Public Member Functions

 DsG4NNDCNeutronHPCaptureFS ()
 ~DsG4NNDCNeutronHPCaptureFS ()
void UpdateNucleus (const G4Fragment *, G4double)
void Init (G4double A, G4double Z, G4String &dirName, G4String &aFSType)
G4HadFinalState * ApplyYourself (const G4HadProjectile &theTrack)
G4NeutronHPFinalState * New ()
G4NeutronHPVector * GetXsec ()

Private Attributes

G4Fragment * nucleus
G4DynamicParticle * theTwo
G4ReactionProduct theTarget
G4Nucleus aNucleus
G4ReactionProduct theNeutron
G4double targetMass
DsG4NNDCCaptureGammas theFinalgammas
G4NeutronHPVector theCrossSection

Detailed Description

Definition at line 27 of file DsG4NNDCNeutronHPCaptureFS.h.


Constructor & Destructor Documentation

DsG4NNDCNeutronHPCaptureFS::DsG4NNDCNeutronHPCaptureFS (  ) 

Definition at line 22 of file DsG4NNDCNeutronHPCaptureFS.cc.

00023 {
00024     hasXsec = false; 
00025     targetMass = 0;
00026 }

DsG4NNDCNeutronHPCaptureFS::~DsG4NNDCNeutronHPCaptureFS (  ) 

Definition at line 28 of file DsG4NNDCNeutronHPCaptureFS.cc.

00029 { 
00030 }


Member Function Documentation

void DsG4NNDCNeutronHPCaptureFS::UpdateNucleus ( const G4Fragment *  ,
G4double   
)

Definition at line 138 of file DsG4NNDCNeutronHPCaptureFS.cc.

00139 {
00140     G4LorentzVector p4Gamma = gamma->GetMomentum();
00141     G4ThreeVector pGamma(p4Gamma.vect());
00142   
00143     G4LorentzVector p4Nucleus(nucleus->GetMomentum() );
00144   
00145     G4double m1 = G4ParticleTable::GetParticleTable()->GetIonTable()
00146         ->GetIonMass(static_cast<G4int>(nucleus->GetZ()+0.5),
00147                      static_cast<G4int>(nucleus->GetA()+0.5));
00148     G4double m2 = nucleus->GetZ() *  G4Proton::Proton()->GetPDGMass() + 
00149         (nucleus->GetA()- nucleus->GetZ())*G4Neutron::Neutron()->GetPDGMass();
00150   
00151     G4double Mass = std::min(m1,m2);
00152   
00153     G4double newExcitation = p4Nucleus.mag() - Mass - eGamma;
00154   
00155     if(newExcitation < 0)
00156         newExcitation = 0;
00157   
00158     G4ThreeVector p3Residual(p4Nucleus.vect() - pGamma);
00159     G4double newEnergy = std::sqrt(p3Residual * p3Residual +
00160                                    (Mass + newExcitation) * (Mass + newExcitation));
00161     G4LorentzVector p4Residual(p3Residual, newEnergy);
00162   
00163     // Update excited nucleus parameters
00164   
00165     nucleus->SetMomentum(p4Residual);
00166 
00167     return;
00168 }

void DsG4NNDCNeutronHPCaptureFS::Init ( G4double  A,
G4double  Z,
G4String &  dirName,
G4String &  aFSType 
)

Definition at line 170 of file DsG4NNDCNeutronHPCaptureFS.cc.

00171 {
00172     G4String tString = "/FS/";
00173     theBaseA = A;
00174     theBaseZ = Z;
00175     theFinalgammas.Init( G4int(theBaseA+.5), G4int(theBaseZ+.5) );
00176 
00177     if( !theFinalgammas.hasData() ){
00178       // No gamma data for this isotope
00179       // Set the cross-section to zero
00180       hasXsec = true;
00181       theCrossSection.SetEnergy(0,0.0*MeV);
00182       theCrossSection.SetEnergy(1,20.0*MeV);
00183       theCrossSection.SetXsec(0,0.0);
00184       theCrossSection.SetXsec(1,0.0);
00185     }
00186 
00187     /*
00188     G4bool dbool;
00189     G4NeutronHPDataUsed aFile = theNames.GetName(theBaseA, 
00190                                                  theBaseB, 
00191                                                  dirName, tString, dbool);
00192     G4String filename = aFile.GetName();
00193     if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || 
00194                               std::abs(theBaseA - A)>0.0001))) {
00195         hasAnyData = false;
00196         hasFSData = false; 
00197         hasXsec = false;
00198         return;
00199     }
00200     std::ifstream theData(filename, std::ios::in);
00201     
00202     hasFSData = theFinalStatePhotons.InitMean(theData); 
00203     if(hasFSData) {
00204         targetMass = theFinalStatePhotons.GetTargetMass();
00205         theFinalStatePhotons.InitAngular(theData); 
00206         theFinalStatePhotons.InitEnergies(theData); 
00207     }
00208     theData.close();
00209     */
00210 }

G4HadFinalState * DsG4NNDCNeutronHPCaptureFS::ApplyYourself ( const G4HadProjectile &  theTrack  ) 

Definition at line 32 of file DsG4NNDCNeutronHPCaptureFS.cc.

00033 {
00034     G4int i;
00035     G4int nuclA = G4int(theBaseA+0.5); /* Convert double to closest integer */
00036     G4int nuclZ = G4int(theBaseZ+0.5); /* Convert double to closest integer */
00037     theResult.Clear();
00038     // prepare neutron
00039     G4double eKinetic = theTrack.GetKineticEnergy();
00040     const G4HadProjectile *incidentParticle = &theTrack;
00041     theNeutron = const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) ;
00042     theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
00043     theNeutron.SetKineticEnergy( eKinetic );
00044 
00045     // prepare target
00046     if(targetMass<500*MeV) {
00047         targetMass = ( G4NucleiProperties::GetNuclearMass(nuclA, nuclZ)) 
00048           / G4Neutron::Neutron()->GetPDGMass();
00049     }
00050     G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
00051     G4double temperature = theTrack.GetMaterial()->GetTemperature();
00052     theTarget = aNucleus.GetBiasedThermalNucleus(targetMass, neutronVelocity, temperature);
00053 
00054     // go to nucleus rest system
00055     theNeutron.Lorentz(theNeutron, -1*theTarget);
00056     eKinetic = theNeutron.GetKineticEnergy();
00057 
00058     // dice the photons
00059     // get the emission gammas
00060     G4ReactionProductVector * thePhotons = NULL; 
00061     thePhotons = theFinalgammas.GetGammas();    
00062 
00063     // update the nucleus, calculate the target state after gamma emission.
00064     G4ThreeVector aCMSMomentum = theNeutron.GetMomentum()+theTarget.GetMomentum();
00065     G4LorentzVector p4(aCMSMomentum, theTarget.GetTotalEnergy() + theNeutron.GetTotalEnergy());
00066     nucleus = new G4Fragment(nuclA+1, nuclZ ,p4);
00067 
00068     G4int nPhotons = 0;
00069     if(thePhotons!=NULL) nPhotons=thePhotons->size();
00070   
00071     for(i=0;i<nPhotons;i++) {
00072         G4ThreeVector pGamma(thePhotons->operator[](i)->GetMomentum());
00073         G4LorentzVector gamma(pGamma,thePhotons->operator[](i)->GetTotalEnergy());
00074         G4Fragment* theOne= new G4Fragment(gamma,G4Gamma::GammaDefinition());
00075         UpdateNucleus(theOne,thePhotons->operator[](i)->GetTotalEnergy());
00076     }
00077 
00078     theTwo = new G4DynamicParticle;
00079     theTwo->SetDefinition(G4ParticleTable::GetParticleTable()
00080                           ->FindIon(nuclZ, nuclA+1,
00081                                     0, nuclZ));
00082     theTwo->SetMomentum(nucleus->GetMomentum());
00083 
00084     // add them to the final state
00085 
00086     G4int nParticles = nPhotons;
00087     if(1==nPhotons) nParticles = 2;
00088 
00089     // back to lab system
00090     for(i=0; i<nPhotons; i++)
00091         thePhotons->operator[](i)->Lorentz(*(thePhotons->operator[](i)), theTarget);
00092         
00093     // Recoil, if only one gamma
00094     if (1==nPhotons) {
00095         G4DynamicParticle * theOne = new G4DynamicParticle;
00096         G4ParticleDefinition * aRecoil = G4ParticleTable::GetParticleTable()
00097             ->FindIon(nuclZ, nuclA+1, 0, nuclZ);
00098         theOne->SetDefinition(aRecoil);
00099     
00100         // Now energy; 
00101         // Can be done slightly better @
00102         G4ThreeVector aMomentum =  theTrack.Get4Momentum().vect()
00103             +theTarget.GetMomentum()
00104             -thePhotons->operator[](0)->GetMomentum();
00105 
00106         G4ThreeVector theMomUnit = aMomentum.unit();
00107         G4double aKinEnergy =  theTrack.GetKineticEnergy()
00108             +theTarget.GetKineticEnergy(); // gammas come from Q-value
00109         G4double theResMass = aRecoil->GetPDGMass();
00110         G4double theResE = aRecoil->GetPDGMass()+aKinEnergy;
00111         G4double theAbsMom = std::sqrt(theResE*theResE - theResMass*theResMass);
00112         G4ThreeVector theMomentum = theAbsMom*theMomUnit;
00113         theOne->SetMomentum(theMomentum);
00114         //Add recoiling deexcited nucleus
00115         theResult.AddSecondary(theOne);     
00116     }else{
00117         //Add deexcited nucleus
00118         theResult.AddSecondary(theTwo);
00119     }
00120 
00121     // Now fill in the gammas.
00122     for(i=0; i<nPhotons; i++) {
00123         // back to lab system
00124         G4DynamicParticle * theOne = new G4DynamicParticle;
00125         theOne->SetDefinition(thePhotons->operator[](i)->GetDefinition());
00126         theOne->SetMomentum(thePhotons->operator[](i)->GetMomentum());
00127         theResult.AddSecondary(theOne);
00128         delete thePhotons->operator[](i);
00129     }
00130     delete thePhotons; 
00131 
00132     // clean up the primary neutron
00133     theResult.SetStatusChange(stopAndKill);
00134     return &theResult;
00135 }

G4NeutronHPFinalState* DsG4NNDCNeutronHPCaptureFS::New (  )  [inline]

Definition at line 39 of file DsG4NNDCNeutronHPCaptureFS.h.

00039                                   {
00040         DsG4NNDCNeutronHPCaptureFS * theNew = new DsG4NNDCNeutronHPCaptureFS;
00041         return theNew;
00042     }

G4NeutronHPVector* DsG4NNDCNeutronHPCaptureFS::GetXsec (  )  [inline]

Definition at line 43 of file DsG4NNDCNeutronHPCaptureFS.h.

00043 { return &theCrossSection; }


Member Data Documentation

G4Fragment* DsG4NNDCNeutronHPCaptureFS::nucleus [private]

Definition at line 47 of file DsG4NNDCNeutronHPCaptureFS.h.

G4DynamicParticle* DsG4NNDCNeutronHPCaptureFS::theTwo [private]

Definition at line 49 of file DsG4NNDCNeutronHPCaptureFS.h.

G4ReactionProduct DsG4NNDCNeutronHPCaptureFS::theTarget [private]

Definition at line 50 of file DsG4NNDCNeutronHPCaptureFS.h.

G4Nucleus DsG4NNDCNeutronHPCaptureFS::aNucleus [private]

Definition at line 51 of file DsG4NNDCNeutronHPCaptureFS.h.

G4ReactionProduct DsG4NNDCNeutronHPCaptureFS::theNeutron [private]

Definition at line 52 of file DsG4NNDCNeutronHPCaptureFS.h.

G4double DsG4NNDCNeutronHPCaptureFS::targetMass [private]

Definition at line 54 of file DsG4NNDCNeutronHPCaptureFS.h.

DsG4NNDCCaptureGammas DsG4NNDCNeutronHPCaptureFS::theFinalgammas [private]

Definition at line 56 of file DsG4NNDCNeutronHPCaptureFS.h.

G4NeutronHPVector DsG4NNDCNeutronHPCaptureFS::theCrossSection [private]

Definition at line 57 of file DsG4NNDCNeutronHPCaptureFS.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

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