/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Attributes
DsG4GdNeutronHPCaptureFS Class Reference

#include <DsG4GdNeutronHPCaptureFS.h>

Collaboration diagram for DsG4GdNeutronHPCaptureFS:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Private Attributes

G4Fragment * nucleus
G4DynamicParticle * theTwo
G4ReactionProduct theTarget
G4Nucleus aNucleus
G4ReactionProduct theNeutron
G4double targetMass
G4NeutronHPPhotonDist theFinalStatePhotons
DsG4GdCaptureGammas theFinalgammas
G4NeutronHPNames theNames
G4double theCurrentA
G4double theCurrentZ

Detailed Description

Definition at line 29 of file DsG4GdNeutronHPCaptureFS.h.


Constructor & Destructor Documentation

DsG4GdNeutronHPCaptureFS::DsG4GdNeutronHPCaptureFS ( )

Definition at line 24 of file DsG4GdNeutronHPCaptureFS.cc.

{
    hasXsec = false; 
    targetMass = 0;
    //    G4cerr << "DsG4GdNeutronHPCaptureFS" << G4endl; 
}
DsG4GdNeutronHPCaptureFS::~DsG4GdNeutronHPCaptureFS ( )

Definition at line 31 of file DsG4GdNeutronHPCaptureFS.cc.

{ 
}

Member Function Documentation

void DsG4GdNeutronHPCaptureFS::UpdateNucleus ( const G4Fragment *  gamma,
G4double  eGamma 
)

Definition at line 140 of file DsG4GdNeutronHPCaptureFS.cc.

{
    G4LorentzVector p4Gamma = gamma->GetMomentum();
    G4ThreeVector pGamma(p4Gamma.vect());
  
    G4LorentzVector p4Nucleus(nucleus->GetMomentum() );
  
    G4double m1 = G4ParticleTable::GetParticleTable()->GetIonTable()
        ->GetIonMass(static_cast<G4int>(nucleus->GetZ()),
                     static_cast<G4int>(nucleus->GetA()));
    G4double m2 = nucleus->GetZ() *  G4Proton::Proton()->GetPDGMass() + 
        (nucleus->GetA()- nucleus->GetZ())*G4Neutron::Neutron()->GetPDGMass();
  
    G4double Mass = std::min(m1,m2);
  
    G4double newExcitation = p4Nucleus.mag() - Mass - eGamma;
  
    if(newExcitation < 0)
        newExcitation = 0;
  
    G4ThreeVector p3Residual(p4Nucleus.vect() - pGamma);
    G4double newEnergy = std::sqrt(p3Residual * p3Residual +
                                   (Mass + newExcitation) * (Mass + newExcitation));
    G4LorentzVector p4Residual(p3Residual, newEnergy);
  
    // Update excited nucleus parameters
  
    nucleus->SetMomentum(p4Residual);

    return;
}
void DsG4GdNeutronHPCaptureFS::Init ( G4double  A,
G4double  Z,
G4String &  dirName,
G4String &  aFSType 
)

Definition at line 172 of file DsG4GdNeutronHPCaptureFS.cc.

{
    G4String tString = "/FS/";
    G4bool dbool;
    G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), dirName, tString, dbool);
    G4String filename = aFile.GetName();
    theBaseA = A;
    theBaseZ = G4int(Z+.5);
    if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || 
                              std::abs(theBaseA - A)>0.0001))) {
        hasAnyData = false;
        hasFSData = false; 
        hasXsec = false;
        return;
    }
    std::ifstream theData(filename, std::ios::in);
    
    hasFSData = theFinalStatePhotons.InitMean(theData); 
    if(hasFSData) {
        targetMass = theFinalStatePhotons.GetTargetMass();
        theFinalStatePhotons.InitAngular(theData); 
        theFinalStatePhotons.InitEnergies(theData); 
    }
    theData.close();
}
G4HadFinalState * DsG4GdNeutronHPCaptureFS::ApplyYourself ( const G4HadProjectile &  theTrack)

Definition at line 35 of file DsG4GdNeutronHPCaptureFS.cc.

{
    G4int i;
    theResult.Clear();
    // prepare neutron
    G4double eKinetic = theTrack.GetKineticEnergy();
    const G4HadProjectile *incidentParticle = &theTrack;
    theNeutron = const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) ;
    theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
    theNeutron.SetKineticEnergy( eKinetic );

    // prepare target
    G4double eps = 0.0001;
    if(targetMass<500*MeV) {
        targetMass = G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps),
                                                        static_cast<G4int>(theBaseZ+eps))
            / G4Neutron::Neutron()->GetPDGMass();
    }
    G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
    G4double temperature = theTrack.GetMaterial()->GetTemperature();
    theTarget = aNucleus.GetBiasedThermalNucleus(targetMass, neutronVelocity, temperature);

    // go to nucleus rest system
    theNeutron.Lorentz(theNeutron, -1*theTarget);
    eKinetic = theNeutron.GetKineticEnergy();

    // dice the photons
    // get the emission gammas
    G4ReactionProductVector * thePhotons = NULL; 
    thePhotons = theFinalgammas.GetGammas();    

    // update the nucleus, calculate the target state after gamma emission.
    G4ThreeVector aCMSMomentum = theNeutron.GetMomentum()+theTarget.GetMomentum();
    G4LorentzVector p4(aCMSMomentum, theTarget.GetTotalEnergy() + theNeutron.GetTotalEnergy());
    nucleus = new G4Fragment(static_cast<G4int>(theBaseA+1), static_cast<G4int>(theBaseZ) ,p4);

    G4int nPhotons = 0;
    if(thePhotons!=NULL) nPhotons=thePhotons->size();
  
    for(i=0;i<nPhotons;i++) {
        G4ThreeVector pGamma(thePhotons->operator[](i)->GetMomentum());
        G4LorentzVector gamma(pGamma,thePhotons->operator[](i)->GetTotalEnergy());
        G4Fragment* theOne= new G4Fragment(gamma,G4Gamma::GammaDefinition());
        UpdateNucleus(theOne,thePhotons->operator[](i)->GetTotalEnergy());
    }

    theTwo = new G4DynamicParticle;
    theTwo->SetDefinition(G4ParticleTable::GetParticleTable()
                          ->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ)));
    theTwo->SetMomentum(nucleus->GetMomentum());

    // add them to the final state

    G4int nParticles = nPhotons;
    if(1==nPhotons) nParticles = 2;

    // back to lab system
    for(i=0; i<nPhotons; i++)
        thePhotons->operator[](i)->Lorentz(*(thePhotons->operator[](i)), theTarget);
        
    // Recoil, if only one gamma
    if (1==nPhotons) {
        G4DynamicParticle * theOne = new G4DynamicParticle;
        G4ParticleDefinition * aRecoil = G4ParticleTable::GetParticleTable()
            ->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 
                      0, static_cast<G4int>(theBaseZ));
        theOne->SetDefinition(aRecoil);
    
        // Now energy; 
        // Can be done slightly better @
        G4ThreeVector aMomentum =  theTrack.Get4Momentum().vect()
            +theTarget.GetMomentum()
            -thePhotons->operator[](0)->GetMomentum();

        G4ThreeVector theMomUnit = aMomentum.unit();
        G4double aKinEnergy =  theTrack.GetKineticEnergy()
            +theTarget.GetKineticEnergy(); // gammas come from Q-value
        G4double theResMass = aRecoil->GetPDGMass();
        G4double theResE = aRecoil->GetPDGMass()+aKinEnergy;
        G4double theAbsMom = std::sqrt(theResE*theResE - theResMass*theResMass);
        G4ThreeVector theMomentum = theAbsMom*theMomUnit;
        theOne->SetMomentum(theMomentum);
        theResult.AddSecondary(theOne);     
    }else{
      //Add deexcited nucleus
      theResult.AddSecondary(theTwo);
    }

    // Now fill in the gammas.
     for(i=0; i<nPhotons; i++) {
        // back to lab system
        G4DynamicParticle * theOne = new G4DynamicParticle;
        theOne->SetDefinition(thePhotons->operator[](i)->GetDefinition());
        theOne->SetMomentum(thePhotons->operator[](i)->GetMomentum());
        theResult.AddSecondary(theOne);
        delete thePhotons->operator[](i);
    }
    delete thePhotons; 
    
    // clean up the primary neutron
    theResult.SetStatusChange(stopAndKill);
    return &theResult;
}
G4NeutronHPFinalState* DsG4GdNeutronHPCaptureFS::New ( ) [inline]

Definition at line 41 of file DsG4GdNeutronHPCaptureFS.h.

                                  {
        DsG4GdNeutronHPCaptureFS * theNew = new DsG4GdNeutronHPCaptureFS;
        return theNew;
    }

Member Data Documentation

G4Fragment* DsG4GdNeutronHPCaptureFS::nucleus [private]

Definition at line 48 of file DsG4GdNeutronHPCaptureFS.h.

G4DynamicParticle* DsG4GdNeutronHPCaptureFS::theTwo [private]

Definition at line 50 of file DsG4GdNeutronHPCaptureFS.h.

G4ReactionProduct DsG4GdNeutronHPCaptureFS::theTarget [private]

Definition at line 51 of file DsG4GdNeutronHPCaptureFS.h.

Definition at line 52 of file DsG4GdNeutronHPCaptureFS.h.

G4ReactionProduct DsG4GdNeutronHPCaptureFS::theNeutron [private]

Definition at line 53 of file DsG4GdNeutronHPCaptureFS.h.

Definition at line 55 of file DsG4GdNeutronHPCaptureFS.h.

G4NeutronHPPhotonDist DsG4GdNeutronHPCaptureFS::theFinalStatePhotons [private]

Definition at line 57 of file DsG4GdNeutronHPCaptureFS.h.

Definition at line 58 of file DsG4GdNeutronHPCaptureFS.h.

G4NeutronHPNames DsG4GdNeutronHPCaptureFS::theNames [private]

Definition at line 59 of file DsG4GdNeutronHPCaptureFS.h.

Definition at line 61 of file DsG4GdNeutronHPCaptureFS.h.

Definition at line 62 of file DsG4GdNeutronHPCaptureFS.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 Fri May 16 2014 10:17:58 for DetSim by doxygen 1.7.4