Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (15 years ago)
Author:
garnier
Message:

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc

    r819 r962  
    3030// 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
    3131// 070606 bug fix and migrate to enable to Partial cases by T. Koi
     32// 080603 bug fix for Hadron Hyper News #932 by T. Koi
     33// 080612 bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4,6
     34// 080717 bug fix of calculation of residual momentum by T. Koi
     35// 080801 protect negative avalable energy by T. Koi
     36//        introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
     37// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3238//
    3339#include "G4NeutronHPInelasticCompFS.hh"
    3440#include "G4Nucleus.hh"
    35 #include "G4NucleiPropertiesTable.hh"
     41#include "G4NucleiProperties.hh"
    3642#include "G4He3.hh"
    3743#include "G4Alpha.hh"
     
    7480  theBaseA = aFile.GetA();
    7581  theBaseZ = aFile.GetZ();
     82   theNDLDataA = (int)aFile.GetA();
     83   theNDLDataZ = aFile.GetZ();
    7684  if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001)))
    7785  {
     
    185193}
    186194
     195
     196                                                                                                       //n,p,d,t,he3,a
    187197void G4NeutronHPInelasticCompFS::CompositeApply(const G4HadProjectile & theTrack, G4ParticleDefinition * aDefinition)
    188198{
    189199
    190     //G4cout << "G4NeutronHPInelasticCompFS::CompositeApply " << G4endl;
    191200// prepare neutron
    192201    theResult.Clear();
     
    201210    for(i=0; i<50; i++)
    202211    { if(theXsection[i] != 0) { break; } }
     212
    203213    G4double targetMass=0;
    204214    G4double eps = 0.0001;
    205     targetMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /
     215    targetMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps))) /
    206216                   G4Neutron::Neutron()->GetPDGMass();
    207217//    if(theEnergyAngData[i]!=0)
     
    220230    G4double residualZ = theBaseZ - aDefinition->GetPDGCharge();
    221231    G4double residualA = theBaseA - aDefinition->GetBaryonNumber()+1;
    222     residualMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(residualZ+eps), static_cast<G4int>(residualA+eps)) ) /
     232    residualMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(residualA+eps), static_cast<G4int>(residualZ+eps)) ) /
    223233                     G4Neutron::Neutron()->GetPDGMass();
    224234
     
    230240 
    231241// select exit channel for composite FS class.
    232     G4int it = SelectExitChannel(eKinetic);
     242    G4int it = SelectExitChannel( eKinetic );
    233243   
    234244// set target and neutron in the relevant exit channel
     
    241251    G4double availableEnergy = theNeutron.GetKineticEnergy() + theNeutron.GetMass() - aHadron.GetMass() +
    242252                             (targetMass - residualMass)*G4Neutron::Neutron()->GetPDGMass();
     253//080730c
     254    if ( availableEnergy < 0 )
     255    {
     256       //G4cout << "080730c Adjust availavleEnergy " << G4endl;
     257       availableEnergy = 0;
     258    }
    243259    G4int nothingWasKnownOnHadron = 0;
    244260    G4int dummy;
    245261    G4double eGamm = 0;
    246262    G4int iLevel=it-1;
    247 //  TK debug 070530  (without photon has it = 0)
    248     //if(50==it)
    249     if( 0 == it )
    250     {
     263
     264//  TK without photon has it = 0
     265    if( 50 == it )
     266    {
     267
     268//    TK Excitation level is not determined
    251269      iLevel=-1;
    252270      aHadron.SetKineticEnergy(availableEnergy*residualMass*G4Neutron::Neutron()->GetPDGMass()/
    253271                               (aHadron.GetMass()+residualMass*G4Neutron::Neutron()->GetPDGMass()));
    254272
    255       //aHadron.SetMomentum(theNeutron.GetMomentum()*(1./theNeutron.GetTotalMomentum())*
    256       //                  std::sqrt(aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()-
    257       //                            aHadron.GetMass()*aHadron.GetMass()));
    258 
     273      aHadron.SetMomentum(theNeutron.GetMomentum()*(1./theNeutron.GetTotalMomentum())*
     274                        std::sqrt(aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()-
     275                                  aHadron.GetMass()*aHadron.GetMass()));
     276
     277/*
    259278      G4double p2 = ( aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()-aHadron.GetMass()*aHadron.GetMass() );
    260279      G4double p = 0.0;
     
    264283      }
    265284      aHadron.SetMomentum(theNeutron.GetMomentum()*(1./theNeutron.GetTotalMomentum())*p );
     285*/
    266286
    267287    }
     
    270290      while( iLevel!=-1 && theGammas.GetLevel(iLevel)==0 ) { iLevel--; }
    271291    }
    272     if(theAngularDistribution[it]!= 0)
    273     {
    274       if(theEnergyDistribution[it]!=0)
     292
     293
     294    if ( theAngularDistribution[it] != 0 ) // MF4
     295    {
     296      if(theEnergyDistribution[it]!=0) // MF5
    275297      {
    276298        aHadron.SetKineticEnergy(theEnergyDistribution[it]->Sample(eKinetic, dummy));
     
    304326      }
    305327      theAngularDistribution[it]->SampleAndUpdate(aHadron);
    306       if(theFinalStatePhotons[it] == 0)
     328
     329      if( theFinalStatePhotons[it] == 0 )
    307330      {
    308331// TK comment Most n,n* eneter to this 
     
    324347      }
    325348    }
    326     else if(theEnergyAngData[it] != 0)
     349    else if(theEnergyAngData[it] != 0) // MF6
    327350    {
    328351      theParticles = theEnergyAngData[it]->Sample(eKinetic);
     
    333356      nothingWasKnownOnHadron = 1;
    334357    }
     358
    335359    //G4cout << "theFinalStatePhotons it " << it << G4endl;
    336360    //G4cout << "theFinalStatePhotons[it] " << theFinalStatePhotons[it] << G4endl;
    337 //  TK 070530
    338     if ( it != 0 ) it = 50;  // it 50 has final state data for photon MF13 cross and MF14 ang
    339361    //G4cout << "theFinalStatePhotons it " << it << G4endl;
    340362    //G4cout << "theFinalStatePhotons[it] " << theFinalStatePhotons[it] << G4endl;
    341363    //G4cout << "thePhotons " << thePhotons << G4endl;
    342     if(theFinalStatePhotons[it]!=0)
    343     {
    344       // the photon distributions are in the Nucleus rest frame.
     364
     365    if ( theFinalStatePhotons[it] != 0 )
     366    {
     367       // the photon distributions are in the Nucleus rest frame.
     368       // TK residual rest frame
    345369      G4ReactionProduct boosted;
    346370      boosted.Lorentz(theNeutron, theTarget);
     
    493517                                  ->GetIon(static_cast<G4int>(residualZ), static_cast<G4int>(residualA), 0)); 
    494518        theResidual.SetKineticEnergy(aHadron.GetKineticEnergy()*aHadron.GetMass()/theResidual.GetMass());
    495         theResidual.SetMomentum(-1.*aHadron.GetMomentum());
     519
     520        //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #6
     521        //theResidual.SetMomentum(-1.*aHadron.GetMomentum());
     522        G4ThreeVector incidentNeutronMomentum = theNeutron.GetMomentum();
     523        theResidual.SetMomentum(incidentNeutronMomentum - aHadron.GetMomentum());
     524
    496525        theResidual.Lorentz(theResidual, -1.*theTarget);
    497526        G4ThreeVector totalPhotonMomentum(0,0,0);
     
    529558//        cout << "Kinetic energy of the residual = "<<resiualKineticEnergy<<endl;
    530559        theResidual.SetKineticEnergy(resiualKineticEnergy);
    531         theResidual.SetMomentum(-1.*totalMomentum);
     560
     561        //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4
     562        //theResidual.SetMomentum(-1.*totalMomentum);
     563        //G4ThreeVector incidentNeutronMomentum = theNeutron.GetMomentum();
     564        //theResidual.SetMomentum(incidentNeutronMomentum - aHadron.GetMomentum());
     565//080717 TK Comment still do NOT include photon's mometum which produce by thePhotons
     566        theResidual.SetMomentum( theNeutron.GetMomentum() + theTarget.GetMomentum() - totalMomentum );
     567
    532568        theSec = new G4DynamicParticle;   
    533569        theSec->SetDefinition(theResidual.GetDefinition());
     
    549585      delete thePhotons;
    550586    }
     587
     588//080721
     589   G4ParticleDefinition* targ_pd = G4ParticleTable::GetParticleTable()->GetIon ( (G4int)theBaseZ , (G4int)theBaseA , 0.0 );
     590   G4LorentzVector targ_4p_lab ( theTarget.GetMomentum() , std::sqrt( targ_pd->GetPDGMass()*targ_pd->GetPDGMass() + theTarget.GetMomentum().mag2() ) );
     591   G4LorentzVector proj_4p_lab = theTrack.Get4Momentum();
     592   G4LorentzVector init_4p_lab = proj_4p_lab + targ_4p_lab;
     593   adjust_final_state ( init_4p_lab );
     594
    551595// clean up the primary neutron
    552596    theResult.SetStatusChange(stopAndKill);
Note: See TracChangeset for help on using the changeset viewer.