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

update processes

Location:
trunk/source/processes/hadronic/models/neutron_hp/src
Files:
30 edited

Legend:

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

    r819 r962  
    2929//
    3030// 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
     31// 080612 bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #5
    3132//
    3233#include "G4NeutronHPAngular.hh"
     
    106107  else
    107108  {
     109    if(frameFlag == 1) // LAB
     110    {
     111      G4double en = aHadron.GetTotalMomentum();
     112      G4ReactionProduct boosted;
     113      boosted.Lorentz(theNeutron, theTarget);
     114      G4double kineticEnergy = boosted.GetKineticEnergy();
     115      G4double cosTh = 0.0;
     116      if(theAngularDistributionType == 1) cosTh = theCoefficients->SampleMax(kineticEnergy);
     117      if(theAngularDistributionType == 2) cosTh = theProbArray->Sample(kineticEnergy);
     118      G4double theta = std::acos(cosTh);
     119      G4double phi = twopi*G4UniformRand();
     120      G4double sinth = std::sin(theta);
     121      G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
     122      aHadron.SetMomentum( temp );
     123    }
     124    else if(frameFlag == 2) // costh in CMS
     125    {
     126      G4ReactionProduct boostedN;
     127      boostedN.Lorentz(theNeutron, theTarget);
     128      G4double kineticEnergy = boostedN.GetKineticEnergy();
     129
     130      G4double cosTh = 0.0;
     131      if(theAngularDistributionType == 1) cosTh = theCoefficients->SampleMax(kineticEnergy);
     132      if(theAngularDistributionType == 2) cosTh = theProbArray->Sample(kineticEnergy);
     133
     134//080612TK bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern)
     135/*
    108136    if(theAngularDistributionType == 1) // LAB
    109137    {
     
    121149    else if(theAngularDistributionType == 2) // costh in CMS
    122150    {
    123       G4ReactionProduct boostedN;
    124       boostedN.Lorentz(theNeutron, theTarget);
    125       G4double kineticEnergy = boostedN.GetKineticEnergy();
    126       G4double cosTh = theProbArray->Sample(kineticEnergy);
     151*/
     152
     153//      G4ReactionProduct boostedN;
     154//      boostedN.Lorentz(theNeutron, theTarget);
     155//      G4double kineticEnergy = boostedN.GetKineticEnergy();
     156//      G4double cosTh = theProbArray->Sample(kineticEnergy);
     157
    127158      G4double theta = std::acos(cosTh);
    128159      G4double phi = twopi*G4UniformRand();
     
    130161     
    131162      G4ThreeVector temp(sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) ); //CMS
     163
     164//080612TK bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #5
     165/*
    132166      G4double en = aHadron.GetTotalEnergy(); // Target rest
    133167     
     
    172206      aHadron.SetTotalEnergy( std::sqrt( mom*mom + aHadron.GetMass()*aHadron.GetMass() ) );
    173207      aHadron.Lorentz(aHadron, trafo); // now in target rest frame
     208*/
     209      // Determination of the hadron kinetic energy in CMS
     210      // aHadron.GetKineticEnergy() is actually the residual kinetic energy in CMS (or target frame)
     211      // kineticEnergy is incident neutron kinetic energy  in CMS (or target frame) 
     212      G4double QValue = aHadron.GetKineticEnergy() - kineticEnergy;
     213      G4double A1     =   theTarget.GetMass()/boostedN.GetMass();
     214      G4double A1prim =   aHadron.GetMass()/ boostedN.GetMass();
     215      G4double kinE   = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*kineticEnergy+(1+A1)*QValue);
     216      G4double totalE = kinE + aHadron.GetMass();
     217      G4double mom2   = totalE*totalE - aHadron.GetMass()*aHadron.GetMass();
     218      G4double mom;
     219      if ( mom2 > 0.0 ) mom = std::sqrt( mom2 );
     220      else mom = 0.0;     
     221
     222      aHadron.SetMomentum( mom*temp ); // Set momentum in CMS
     223      aHadron.SetKineticEnergy(kinE);  // Set kinetic energy in CMS
     224
     225      // get trafo from Target rest frame to CMS
     226      G4ReactionProduct boostedT;
     227      boostedT.Lorentz(theTarget, theTarget);
     228     
     229      G4ThreeVector the3Neutron = boostedN.GetMomentum();
     230      G4double nEnergy = boostedN.GetTotalEnergy();
     231      G4ThreeVector the3Target = boostedT.GetMomentum();
     232      G4double tEnergy = boostedT.GetTotalEnergy();
     233      G4double totE = nEnergy+tEnergy;
     234      G4ThreeVector the3trafo = -the3Target-the3Neutron;
     235      G4ReactionProduct trafo; // for transformation from CMS to target rest frame
     236      trafo.SetMomentum(the3trafo);
     237      G4double cmsMom = std::sqrt(the3trafo*the3trafo);
     238      G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
     239      trafo.SetMass(sqrts);
     240      trafo.SetTotalEnergy(totE);
     241
     242      aHadron.Lorentz(aHadron, trafo);
     243
    174244    }
    175245    else
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPCaptureData.cc

    r819 r962  
    3131// 070613 fix memory leaking by T. Koi
    3232// 071002 enable cross section dump by T. Koi
     33// 080428 change checking point of "neglecting doppler broadening" flag
     34//        from GetCrossSection to BuildPhysicsTable by T. Koi
     35// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3336//
    3437#include "G4NeutronHPCaptureData.hh"
     
    4952// TKDB
    5053   theCrossSections = 0;
     54   onFlightDB = true;
    5155  BuildPhysicsTable(*G4Neutron::Neutron());
    5256}
     
    6569  if(&aP!=G4Neutron::Neutron())
    6670     throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!"); 
     71
     72//080428
     73   if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) onFlightDB = false;
     74
    6775  size_t numberOfElements = G4Element::GetNumberOfElements();
    6876  // G4cout << "CALLED G4NeutronHPCaptureData::BuildPhysicsTable "<<numberOfElements<<G4endl;
     
    136144}
    137145
    138 #include "G4NucleiPropertiesTable.hh"
     146#include "G4NucleiProperties.hh"
    139147
    140148G4double G4NeutronHPCaptureData::
     
    148156  G4double eKinetic = aP->GetKineticEnergy();
    149157
    150   if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) )
     158//if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) )
     159//080428
     160  if ( !onFlightDB )
    151161  {
    152162     G4double factor = 1.0;
     
    171181  G4double theZ = anE->GetZ();
    172182  G4double eleMass;
    173   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
    174              ) / G4Neutron::Neutron()->GetPDGMass();
     183  eleMass = G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) ) / G4Neutron::Neutron()->GetPDGMass();
    175184 
    176185  G4ReactionProduct boosted;
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPCaptureFS.cc

    r819 r962  
    3030// 12-April-06 Enable IC electron emissions T. Koi
    3131// 26-January-07 Add G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION flag
     32// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3233//
    3334#include "G4NeutronHPCaptureFS.hh"
     
    5657    G4double eps = 0.0001;
    5758    if(targetMass<500*MeV)
    58       targetMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /
     59      targetMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theBaseA+eps) , static_cast<G4int>(theBaseZ+eps) )) /
    5960                     G4Neutron::Neutron()->GetPDGMass();
    6061    G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPChannel.cc

    r819 r962  
    3030// 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
    3131// 071031 bug fix T. Koi on behalf of A. Howard
     32// 081203 bug fix in Register method by T. Koi
    3233//
    3334#include "G4NeutronHPChannel.hh"
     
    6869    registerCount++;
    6970    G4int Z = G4lrint(theElement->GetZ());
     71
     72    Z = Z-registerCount;
     73    if ( registerCount > 5 ) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this material"); // for Elastic, Capture, Fission case
     74    if ( Z < 1 ) return false;
     75/*
    7076    if(registerCount<5)
    7177    {
    7278      Z = Z-registerCount;
    7379    }
     80*/
    7481    //if(Z=theElement->GetZ()-5) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this material");
    7582    // Bug fix by TK on behalf of AH
     
    8491    delete [] active;
    8592    active = new G4bool[niso];
     93
    8694    delete [] theFinalStates;
    8795    theFinalStates = new G4NeutronHPFinalState * [niso];
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPContAngularPar.cc

    r819 r962  
    3232//        (This fix has a real effect to the code.)
    3333// 080409 Fix div0 error with G4FPE by T. Koi
     34// 080612 Fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #1
     35// 080714 Limiting the sum of energy of secondary particles by T. Koi
     36// 080801 Fix div0 error wiht G4FPE and memory leak by T. Koi
     37// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3438//
    3539
     
    4650#include "G4Alpha.hh"
    4751#include "G4NeutronHPVector.hh"
    48 #include "G4NucleiPropertiesTable.hh"
     52#include "G4NucleiProperties.hh"
    4953#include "G4NeutronHPKallbachMannSyst.hh"
    5054#include "G4ParticleTable.hh"
     
    6771  G4ReactionProduct *
    6872  G4NeutronHPContAngularPar::Sample(G4double anEnergy, G4double massCode, G4double /*targetMass*/,
    69                                     G4int angularRep, G4int /*interpolE*/)
     73                                    G4int angularRep, G4int interpolE )
    7074  {
    7175    G4ReactionProduct * result = new G4ReactionProduct;
     
    110114    if(angularRep==1)
    111115    {
     116// 080612 Fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #1
     117        if (interpolE == 2)
     118        {
     119
     120            //TK080711
     121           if ( fresh == true )
     122           {
     123              remaining_energy = theAngular[0].GetLabel();
     124              fresh = false;
     125           }
     126           //TK080711
     127
     128           G4double random = G4UniformRand();
     129           G4double * running = new G4double[nEnergies+1];
     130           running[0]=0;
     131
     132            for(i=1; i<nEnergies+1; i++)
     133            {
     134               //TK080711
     135               if ( remaining_energy >= theAngular[ i-1 ].GetLabel() )
     136                  running[i] = running[i-1] + theAngular[i-1].GetValue(0);
     137               else
     138                  running[i] = running[i-1];
     139               //TK080711
     140            }
     141
     142            //080730
     143            if ( running[ nEnergies ] != 0 )
     144            {
     145
     146               for ( i = 1 ; i < nEnergies+1 ; i++ )
     147               {
     148                it = i-1;
     149                if ( random > running[ i-1 ]/running[ nEnergies ] && random <= running[ i ] / running[ nEnergies ] ) break;
     150               }
     151               fsEnergy = theAngular[ it ].GetLabel();
     152
     153            }
     154
     155            //TK080711
     156            if ( i == nEnergies+1 || running[ nEnergies ] == 0 ) fsEnergy = remaining_energy;
     157            //TK080711 //080730
     158
     159            G4NeutronHPLegendreStore theStore(1);
     160            theStore.Init(0,fsEnergy,nAngularParameters);
     161            for(i=0;i<nAngularParameters;i++)
     162            {
     163                theStore.SetCoeff(0,i,theAngular[it].GetValue(i));
     164            }
     165            // use it to sample.
     166            cosTh = theStore.SampleMax(fsEnergy);
     167
     168            //TK080711
     169            remaining_energy -= fsEnergy;
     170            //TK080711
     171
     172           //080801b
     173           delete[] running;
     174           //080801b
     175        }
     176      else
     177      {
     178
     179            //080714
     180            if ( fresh == true )
     181            {
     182               remaining_energy = theAngular[ nEnergies-1 ].GetLabel();
     183               fresh = false;
     184            }
     185            //080714
     186
     187     
    112188      G4double random = G4UniformRand();
    113189      G4double * running = new G4double[nEnergies];
     
    116192      for(i=1; i<nEnergies; i++)
    117193      {
     194/*
    118195        if(i!=0)
    119196        {
     
    126203                             theAngular[i-1].GetLabel(), theAngular[i].GetLabel(),
    127204                             theAngular[i-1].GetValue(0), theAngular[i].GetValue(0));
     205*/
     206
     207        running[i]=running[i-1];
     208        if ( remaining_energy >= theAngular[i].GetLabel() )
     209        {
     210           running[i] += theInt.GetBinIntegral(theManager.GetScheme(i-1),
     211                             theAngular[i-1].GetLabel(), theAngular[i].GetLabel(),
     212                             theAngular[i-1].GetValue(0), theAngular[i].GetValue(0));
     213           weighted += theInt.GetWeightedBinIntegral(theManager.GetScheme(i-1),
     214                             theAngular[i-1].GetLabel(), theAngular[i].GetLabel(),
     215                             theAngular[i-1].GetValue(0), theAngular[i].GetValue(0));
     216        }
    128217      }
    129218      // cash the mean energy in this distribution
    130219      //080409 TKDB
    131       if ( nEnergies == 1
     220      if ( nEnergies == 1 || running[nEnergies-1] == 0
    132221         currentMeanEnergy = 0.0;
    133222      else
     223      {
    134224         currentMeanEnergy = weighted/running[nEnergies-1];
     225      }
    135226     
    136227      //080409 TKDB
    137228      if ( nEnergies == 1 ) it = 0;
    138       //for(i=1; i<nEnergies; i++)
    139       for(i=1; i<nEnergies; i++)
    140       {
    141         it = i;
    142         if(random<running[i]/running[nEnergies-1]) break;
    143       }
     229
     230      //080729
     231      if ( running[nEnergies-1] != 0 ) 
     232      {
     233         for ( i = 1 ; i < nEnergies ; i++ )
     234         {
     235            it = i;
     236            if ( random < running [ i ] / running [ nEnergies-1 ] ) break;
     237         }
     238      }
     239
     240      //080714
     241      if ( running [ nEnergies-1 ] == 0 ) it = 0;
     242      //080714
     243
    144244      if(it<nDiscreteEnergies||it==0)
    145245      {
     
    201301      }
    202302      delete [] running;
     303
     304      //080714
     305      remaining_energy -= fsEnergy;
     306      //080714
     307
     308      }
     309
    203310    }
    204311    else if(angularRep==2)
     
    271378      G4double residualMass =  residualZ*G4Proton::Proton()->GetPDGMass();
    272379               residualMass +=(residualA-residualZ)*G4Neutron::Neutron()->GetPDGMass();
    273                residualMass -= G4NucleiPropertiesTable::GetBindingEnergy(residualZ, residualA);
     380               residualMass -= G4NucleiProperties::GetBindingEnergy( residualA , residualZ );
    274381      G4NeutronHPKallbachMannSyst theKallbach(compoundFraction,
    275382                                              incidentEnergy, incidentMass,
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPContEnergyAngular.cc

    r819 r962  
    2828// A prototype of the low energy neutron transport model.
    2929//
     30// 080721 To be "ClearHistories" effective, the selection scheme of angular distribution is modified by T. Koi
     31//
     32//
    3033#include "G4NeutronHPContEnergyAngular.hh"
    3134
     
    5558     // This is the cause of the He3 problem !!!!!!!!
    5659     // See to it, if you can improve this.
    57      G4double random = G4UniformRand();
    58      G4double deltaE = theAngular[it].GetEnergy()-theAngular[it-1].GetEnergy();
    59      G4double offset = theAngular[it].GetEnergy()-anEnergy;
    60      if(random<offset/deltaE) it--;
     60     //080714 TK commnet Randomizing use angular distribution
     61     //080714 TK Always use the upper side distribution. enabling ClearHistories method.
     62     //G4double random = G4UniformRand();
     63     //G4double deltaE = theAngular[it].GetEnergy()-theAngular[it-1].GetEnergy();
     64     //G4double offset = theAngular[it].GetEnergy()-anEnergy;
     65     //if(random<offset/deltaE) it--;
    6166     theAngular[it].SetTarget(GetTarget());
    6267     theAngular[it].SetTargetCode(theTargetCode);
     
    8489   return result;
    8590}
     91
     92
     93 
     94void G4NeutronHPContEnergyAngular::ClearHistories()
     95{
     96   if ( theAngular!= NULL )
     97   {
     98      for ( G4int i = 0 ; i< nEnergy ; i++ )
     99         theAngular[i].ClearHistories();
     100   }
     101}
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPDeExGammas.cc

    r819 r962  
    2727// J.P. Wellisch, Nov-1996
    2828// A prototype of the low energy neutron transport model.
     29//
     30// 080801 Prohibit level transition to oneself by T. Koi
    2931//
    3032#include "G4NeutronHPDeExGammas.hh"
     
    123125      }
    124126    }
     127//080728
     128    if ( it != -1 && currentLevelE == theLevels[it].GetLevelEnergy() )
     129    {
     130       //TK Comment; Some data file in /Inelastic/Gammas has inconsistent level data (no level to transit)
     131       //G4cout << "DeExGammas Transition level error: it " << it << " " << currentLevelE << " " << gammaE << " " << theLevels[it-1].GetLevelEnergy() << " " << currentLevelE - theLevels[it-1].GetLevelEnergy() << G4endl;
     132       // Forced to connect the next(previous) level
     133       it +=-1;
     134    }
     135//080728
    125136    if(it!=-1) theGammas[i]->SetNext(&theLevels[it]);
    126137  }
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPDiscreteTwoBody.cc

    r819 r962  
    2828// A prototype of the low energy neutron transport model.
    2929//
     30//080612 Bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #2,3
     31//080709 Bug fix Sampling Legendre expansion by T. Koi   
     32//
    3033#include "G4NeutronHPDiscreteTwoBody.hh"
    3134#include "G4Gamma.hh"
     
    9295     if(theCoeff[it].GetRepresentation()==0)
    9396     {
     97//TK Legendre expansion
    9498       G4NeutronHPLegendreStore theStore(1);
    9599       theStore.SetCoeff(0, theCoeff);
    96100       theStore.SetManager(theManager);
    97        cosTh = theStore.SampleMax(anEnergy);
     101       //cosTh = theStore.SampleMax(anEnergy);
     102       //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #3
     103       cosTh = theStore.SampleDiscreteTwoBody(anEnergy);
    98104     }
    99105     else if(theCoeff[it].GetRepresentation()==12) // means LINLIN
     
    136142       if(theCoeff[it].GetRepresentation()==0)
    137143       {
     144//TK Legendre expansion
    138145         G4NeutronHPLegendreStore theStore(2);
    139146         theStore.SetCoeff(0, &(theCoeff[it-1]));
     
    142149         aManager.Init(theManager.GetScheme(it), 2);
    143150         theStore.SetManager(aManager);
    144          cosTh = theStore.SampleMax(anEnergy);
     151         //cosTh = theStore.SampleMax(anEnergy);
     152//080709 TKDB
     153         cosTh = theStore.SampleDiscreteTwoBody(anEnergy);
    145154       }
    146155       else if(theCoeff[it].GetRepresentation()==12) // LINLIN
     
    198207         cosTh = theStore.Sample();
    199208       }
    200        else if(theCoeff[it].GetRepresentation()==14)
     209       else if(theCoeff[it].GetRepresentation()==14) //TK LOG_LIN
    201210       {
    202211         G4NeutronHPVector theBuff1;
     
    266275// now get the energy from kinematics and Q-value.
    267276
    268    G4double restEnergy = anEnergy+GetQValue();
     277   //G4double restEnergy = anEnergy+GetQValue();
    269278   
    270279// assumed to be in CMS @@@@@@@@@@@@@@@@@
    271280
    272    G4double residualMass =   GetTarget()->GetMass() + GetNeutron()->GetMass()
    273                            - result->GetMass() - GetQValue();
    274    G4double kinE = restEnergy/(1+result->GetMass()/residualMass); // non relativistic @@
     281   //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #2
     282   //G4double residualMass =   GetTarget()->GetMass() + GetNeutron()->GetMass()
     283   //                        - result->GetMass() - GetQValue();
     284   //G4double kinE = restEnergy/(1+result->GetMass()/residualMass); // non relativistic @@
     285   G4double A1     =  GetTarget()->GetMass()/GetNeutron()->GetMass();
     286   G4double A1prim =  result->GetMass()/GetNeutron()->GetMass();
     287   G4double E1     =  (A1+1)*(A1+1)/A1/A1*anEnergy;
     288   G4double kinE = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*E1+(1+A1)*GetQValue());
     289
    275290   result->SetKineticEnergy(kinE); // non relativistic @@
    276291   G4double phi = twopi*G4UniformRand();
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPElasticData.cc

    r819 r962  
    3131// 070613 fix memory leaking by T. Koi
    3232// 071002 enable cross section dump by T. Koi
     33// 080428 change checking point of "neglecting doppler broadening" flag
     34//        from GetCrossSection to BuildPhysicsTable by T. Koi
     35// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3336//
    3437#include "G4NeutronHPElasticData.hh"
     
    4952// TKDB
    5053   theCrossSections = 0;
     54   onFlightDB = true;
    5155  BuildPhysicsTable(*G4Neutron::Neutron());
    5256}
     
    6569  if(&aP!=G4Neutron::Neutron())
    6670     throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!"); 
     71
     72//080428
     73   if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) onFlightDB = false;
     74
    6775  size_t numberOfElements = G4Element::GetNumberOfElements();
    6876// TKDB
     
    131139
    132140#include "G4Nucleus.hh"
    133 #include "G4NucleiPropertiesTable.hh"
     141#include "G4NucleiProperties.hh"
    134142#include "G4Neutron.hh"
    135143#include "G4Electron.hh"
     
    146154
    147155  // T. K.
    148   if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) )
     156//  if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) )
     157//080428
     158  if ( !onFlightDB )
    149159  {
    150160     G4double factor = 1.0;
     
    171181
    172182
    173   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     183  eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) )
    174184             ) / G4Neutron::Neutron()->GetPDGMass();
    175185 
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPElasticFS.cc

    r819 r962  
    3030// 25-08-06 New Final State type (refFlag==3 , Legendre (Low Energy) + Probability (High Energy) )
    3131//          is added by T. KOI
     32// 080904 Add Protection for negative energy results in very low energy ( 1E-6 eV ) scattering by T. Koi
    3233//
    3334#include "G4NeutronHPElasticFS.hh"
     
    304305      G4double tM = theTarget.GetMass();
    305306      theTarget.SetTotalEnergy(std::sqrt((tP+tM)*(tP+tM)-2.*tP*tM));
     307
     308/*
     309For debug purpose.
     310Same transformation G4ReactionProduct.Lorentz() by 4vectors
     311{
     312G4LorentzVector n4p = G4LorentzVector ( theNeutron.GetMomentum() , theNeutron.GetKineticEnergy() + theNeutron.GetMass() );   
     313G4cout << "before " << ( n4p.e() - n4p.m() ) / eV<< G4endl;
     314G4LorentzVector cm4p = G4LorentzVector ( theCMS.GetMomentum() , theCMS.GetKineticEnergy() + theCMS.GetMass() );   
     315n4p.boost( cm4p.boostVector() );
     316G4cout << cm4p/eV << G4endl;
     317G4cout << "after " <<  ( n4p.e() - n4p.m() ) / eV<< G4endl;
     318}
     319*/
     320
    306321      theNeutron.Lorentz(theNeutron, -1.*theCMS);
     322//080904 Add Protection for very low energy (1e-6eV) scattering
     323      if ( theNeutron.GetKineticEnergy() < 0 )
     324      {
     325         theNeutron.SetMomentum( G4ThreeVector(0) );
     326         theNeutron.SetTotalEnergy ( theNeutron.GetMass() );
     327      }
     328
    307329      theTarget.Lorentz(theTarget, -1.*theCMS);
     330//080904 Add Protection for very low energy (1e-6eV) scattering
     331      if ( theTarget.GetKineticEnergy() < 0 )
     332      {
     333         theTarget.SetMomentum( G4ThreeVector(0) );
     334         theTarget.SetTotalEnergy ( theTarget.GetMass() );
     335      }
    308336    }
    309337    else
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPEnAngCorrelation.cc

    r819 r962  
    134134  return result;
    135135}
     136
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPFissionData.cc

    r819 r962  
    3030// 070618 fix memory leaking by T. Koi
    3131// 071002 enable cross section dump by T. Koi
     32// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
     33// 081124 Protect invalid read which caused run time errors by T. Koi
    3234
    3335#include "G4NeutronHPFissionData.hh"
     
    110112      G4cout << (*theElementTable)[i]->GetName() << G4endl;
    111113
     114      if ( (*((*theCrossSections)(i))).GetVectorLength() == 0 )
     115      {
     116         G4cout << "The cross-section data of the fission of this element is not available." << G4endl;
     117         G4cout << G4endl;
     118         continue;
     119      }
     120
    112121      G4int ie = 0;
    113122
     
    130139}
    131140
    132 #include "G4NucleiPropertiesTable.hh"
     141#include "G4NucleiProperties.hh"
    133142
    134143G4double G4NeutronHPFissionData::
     
    152161  G4double theZ = anE->GetZ();
    153162  G4double eleMass;
    154   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     163  eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) )
    155164             ) / G4Neutron::Neutron()->GetPDGMass();
    156165 
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelastic.cc

    r819 r962  
    3333// and all its terms.
    3434//
    35 // $Id: G4NeutronHPInelastic.cc,v 1.23 2007/06/22 09:23:48 gcosmo Exp $
    36 // GEANT4 tag $Name: $
     35// $Id: G4NeutronHPInelastic.cc,v 1.24 2008/12/03 22:28:48 tkoi Exp $
     36// GEANT4 tag $Name: geant4-09-02-ref-02 $
    3737//
    38 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
     38// 070523 bug fix for G4FPE_DEBUG on by A. Howard (and T. Koi)
     39// 081203 limit maximum trial for creating final states add protection for 1H isotope case by T. Koi
    3940//
    4041#include "G4NeutronHPInelastic.hh"
     
    5859    {
    5960      theInelastic[i].Init((*(G4Element::GetElementTable()))[i], dirName);
     61      G4int itry = 0;
    6062      do
    6163      {
     
    9799        theInelastic[i].Register(&theDAFS, "F36");
    98100        theInelastic[i].RestartRegistration();
     101        itry++;
    99102      }
    100       while(!theInelastic[i].HasDataInAnyFinalState());
     103      //while(!theInelastic[i].HasDataInAnyFinalState());
     104      while( !theInelastic[i].HasDataInAnyFinalState() && itry < 6 );
     105                                                              // 6 is corresponding to the value(5) of G4NeutronHPChannel. TK 
     106      if ( itry == 6 )
     107      {
     108         // No Final State at all.
     109         G4bool exceptional = false;
     110         if ( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() == 1 )
     111         {
     112            if ( (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() == 1 && (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() == 1 ) exceptional = true;  //1H
     113         }
     114         if ( !exceptional ) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element");
     115      }
    101116    }
    102117  }
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticBaseFS.cc

    r819 r962  
    2828// A prototype of the low energy neutron transport model.
    2929//
     30// 080801 Give a warning message for irregular mass value in data file by T. Koi
     31//        Introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
     32// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
     33//
    3034#include "G4NeutronHPInelasticBaseFS.hh"
    3135#include "G4Nucleus.hh"
    32 #include "G4NucleiPropertiesTable.hh"
     36#include "G4NucleiProperties.hh"
    3337#include "G4He3.hh"
    3438#include "G4Alpha.hh"
    3539#include "G4Electron.hh"
    3640#include "G4NeutronHPDataUsed.hh"
     41
     42#include "G4ParticleTable.hh"
    3743
    3844void G4NeutronHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR)
     
    5561   G4double eps = 0.001;
    5662   theNuclearMassDifference =
    57        G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(ZR+eps),static_cast<G4int>(AR+eps)) -
    58        G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps));
     63       G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(AR+eps),static_cast<G4int>(ZR+eps)) -
     64       G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps));
    5965   theGammas.Init(theGammaData);
    6066   //   delete aName;
     
    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  {
     
    170178  G4double targetMass;
    171179  G4double eps = 0.0001;
    172   targetMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /
     180  targetMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps))) /
    173181               G4Neutron::Neutron()->GetPDGMass();
    174182  if(theEnergyAngData!=0)
     
    176184  if(theAngularDistribution!=0)
    177185     { targetMass = theAngularDistribution->GetTargetMass(); }
     186//080731a
     187if ( targetMass == 0 ) G4cout << "080731a It looks like something wrong value in G4NDL, please update the latest version. If you use the latest, then please report this problem to Geant4 Hyper news." << G4endl;
    178188  G4Nucleus aNucleus;
    179189  G4ReactionProduct theTarget;
     
    255265    }
    256266    G4ReactionProduct * aHadron;
    257     G4double localMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps)));
     267    G4double localMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps)));
    258268    G4ThreeVector bufferedDirection(0,0,0);
    259269    for(i0=0; i0<nDef; i0++)
     
    291301            G4int z1 = static_cast<G4int>(theBaseZ+eps-theDefs[0]->GetPDGCharge()-theDefs[1]->GetPDGCharge());
    292302            G4int a1 = static_cast<G4int>(theBaseA+eps)-theDefs[0]->GetBaryonNumber()-theDefs[1]->GetBaryonNumber();
    293             G4double concreteMass = G4NucleiPropertiesTable::GetNuclearMass(z1, a1);
     303            G4double concreteMass = G4NucleiProperties::GetNuclearMass(a1, z1);
    294304            G4double availableEnergy = eKinetic+mn+localMass-m1-m2-concreteMass;
    295305            // available kinetic energy in CMS (non relativistic)
     
    357367    G4double eBindN = 0;
    358368    G4double eBindP = 0;
    359     G4double eBindD = G4NucleiPropertiesTable::GetBindingEnergy(1,2);
    360     G4double eBindT = G4NucleiPropertiesTable::GetBindingEnergy(1,3);
    361     G4double eBindHe3 = G4NucleiPropertiesTable::GetBindingEnergy(2,3);
    362     G4double eBindA = G4NucleiPropertiesTable::GetBindingEnergy(2,4);
     369    G4double eBindD = G4NucleiProperties::GetBindingEnergy(2,1);
     370    G4double eBindT = G4NucleiProperties::GetBindingEnergy(3,1);
     371    G4double eBindHe3 = G4NucleiProperties::GetBindingEnergy(3,2);
     372    G4double eBindA = G4NucleiProperties::GetBindingEnergy(4,2);
    363373    for(i=0; i<tmpHadrons->size(); i++)
    364374    {
     
    455465  delete tmpHadrons;
    456466
     467//080721
     468   G4ParticleDefinition* targ_pd = G4ParticleTable::GetParticleTable()->GetIon ( (G4int)theBaseZ , (G4int)theBaseA , 0.0 );
     469   G4LorentzVector targ_4p_lab ( theTarget.GetMomentum() , std::sqrt( targ_pd->GetPDGMass()*targ_pd->GetPDGMass() + theTarget.GetMomentum().mag2() ) );
     470   G4LorentzVector proj_4p_lab = theTrack.Get4Momentum();
     471   G4LorentzVector init_4p_lab = proj_4p_lab + targ_4p_lab;
     472   adjust_final_state ( init_4p_lab );
     473
    457474// clean up the primary neutron
    458475  theResult.SetStatusChange(stopAndKill);
  • 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);
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticData.cc

    r819 r962  
    3131// 070613 fix memory leaking by T. Koi
    3232// 071002 enable cross section dump by T. Koi
     33// 080428 change checking point of "neglecting doppler broadening" flag
     34//        from GetCrossSection to BuildPhysicsTable by T. Koi
     35// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3336//
    3437#include "G4NeutronHPInelasticData.hh"
     
    4851{
    4952// TKDB
     53   onFlightDB = true;
    5054   theCrossSections = 0;
    5155  BuildPhysicsTable(*G4Neutron::Neutron());
     
    6468  if(&aP!=G4Neutron::Neutron())
    6569     throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!"); 
     70
     71//080428
     72   if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) onFlightDB = false;
     73
    6674  size_t numberOfElements = G4Element::GetNumberOfElements();
    6775//  theCrossSections = new G4PhysicsTable( numberOfElements );
     
    130138}
    131139
    132 #include "G4NucleiPropertiesTable.hh"
     140#include "G4NucleiProperties.hh"
    133141
    134142G4double G4NeutronHPInelasticData::
     
    143151
    144152  // T. K.
    145   if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) )
     153//if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) )
     154//080428
     155  if ( !onFlightDB )
    146156  {
    147157     G4double factor = 1.0;
     
    166176  G4double theZ = anE->GetZ();
    167177  G4double eleMass;
    168   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     178  eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
    169179             ) / G4Neutron::Neutron()->GetPDGMass();
    170180 
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPIsoData.cc

    r819 r962  
    2828// A prototype of the low energy neutron transport model.
    2929//
     30//080901 Avoiding troubles which caused by G4PhysicsVecotor of length 0 by T. Koi
     31//
    3032#include "G4NeutronHPIsoData.hh"
    3133#include "G4NeutronHPDataUsed.hh"
     
    4547    {
    4648      if(getenv("NeutronHPNamesLogging")) G4cout << "Skipped = "<< filename <<" "<<A<<" "<<Z<<G4endl;
    47       theChannel.close();
    48       return false;
     49      //080901 TKDB No more necessary below protection, cross sections set to 0 in G4NeutronHPNames
     50      //And below two lines causes trouble with G4PhysicsVector
     51      //theChannel.close();
     52      //return false;
    4953    }
    5054    if(!theChannel) {theChannel.close(); return false;}
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPKallbachMannSyst.cc

    r819 r962  
    2727// J.P. Wellisch, Nov-1996
    2828// A prototype of the low energy neutron transport model.
     29//
     30// 080801 Protect div0 error, when theCompundFraction is 1 by T. Koi
    2931//
    3032#include "G4NeutronHPKallbachMannSyst.hh"
     
    6971{
    7072  G4double result;
     73  if ( theCompoundFraction == 1 )
     74  {
     75     //G4cout << "080730b Adjust theCompoundFraction " << G4endl;
     76     theCompoundFraction *= (1-1.0e-15);   
     77  }
    7178  result = 0.5 * (1./A(anEnergy)) * std::log((1-theCompoundFraction)/(1+theCompoundFraction));
    7279  return result;
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPLabAngularEnergy.cc

    r819 r962  
    2828// A prototype of the low energy neutron transport model.
    2929//
     30// 080808 Bug fix in serching mu bin and index for theBuff2b by T. Koi
     31//
    3032#include "G4NeutronHPLabAngularEnergy.hh"
    3133#include "G4Gamma.hh"
     
    111113   {
    112114     it = i;
    113      if(anEnergy<theEnergies[i]) break;
    114    }
    115    if(it==0 || it == nEnergies-1) // it marks the energy bin
    116    {
     115     if ( anEnergy < theEnergies[i] ) break;
     116   }
     117   //080808
     118   //if ( it == 0 || it == nEnergies-1 ) // it marks the energy bin
     119   if ( it == 0 ) // it marks the energy bin
     120   {
     121if(it==0) G4cout << "080808 Something unexpected is happen in G4NeutronHPLabAngularEnergy " << G4endl;
    117122     // integrate the prob for each costh, and select theta.
    118123     G4double * running = new G4double [nCosTh[it]];
     
    130135       if(random<running[i]) break;
    131136     }
    132      if(ith==0 || ith==nCosTh[it]-1)
    133      {
    134        cosTh = theData[it][ith].GetLabel();
    135        secEnergy = theData[it][ith].Sample();
    136        currentMeanEnergy = theData[it][ith].GetMeanX();
     137     //080807
     138     //if ( ith == 0 || ith == nCosTh[it]-1 ) //ith marks the angluar bin
     139     if ( ith == 0 ) //ith marks the angluar bin
     140     {
     141        cosTh = theData[it][ith].GetLabel();
     142        secEnergy = theData[it][ith].Sample();
     143        currentMeanEnergy = theData[it][ith].GetMeanX();
    137144     }
    138145     else
    139146     {
    140        G4double x1 = theData[it][ith-1].GetIntegral();
    141        G4double x2 = theData[it][ith].GetIntegral();
     147       //080808
     148       //G4double x1 = theData[it][ith-1].GetIntegral();
     149       //G4double x2 = theData[it][ith].GetIntegral();
     150       G4double x1 = running [ ith-1 ];
     151       G4double x2 = running [ ith ];
    142152       G4double x = random;
    143153       G4double y1 = theData[it][ith-1].GetLabel();
     
    157167         y1 = theData[it][ith-1].GetY(i);
    158168         y2 = theData[it][ith].GetY(mu);
     169
    159170         y = theInt.Interpolate(theSecondManager[it].GetScheme(ith),
    160171                                cosTh, x1,x2,y1,y2);
     
    298309     G4NeutronHPVector theBuff2b;
    299310     theBuff2b.SetInterpolationManager(theData[it][i2].GetInterpolationManager());
    300      for(i=0;i<theData[it][i1].GetVectorLength(); i++)
    301      {
    302        E = theData[it][i1].GetX(i);
    303        y1 = theData[it][i1-1].GetY(E);
    304        y2 = theData[it][i1].GetY(i);
     311     //080808  i1 -> i2
     312     //for(i=0;i<theData[it][i1].GetVectorLength(); i++)
     313     for(i=0;i<theData[it][i2].GetVectorLength(); i++)
     314     {
     315       //E = theData[it][i1].GetX(i);
     316       //y1 = theData[it][i1-1].GetY(E);
     317       //y2 = theData[it][i1].GetY(i);
     318       E = theData[it][i2].GetX(i);
     319       y1 = theData[it][i2-1].GetY(E);
     320       y2 = theData[it][i2].GetY(i);
    305321       y = theInt.Lin(x, x1,x2,y1,y2);
    306322       theBuff2b.SetData(i, E, y); // wrong E, right theta.
     
    339355     currentMeanEnergy = theOne.GetMeanX();
    340356   }
    341    
     357
    342358// now do random direction in phi, and fill the result.
    343359
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPLegendreStore.cc

    r819 r962  
    2828// A prototype of the low energy neutron transport model.
    2929//
     30// 080612 SampleDiscreteTwoBody contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #3
     31//
    3032#include "G4NeutronHPLegendreStore.hh"
    3133#include "G4NeutronHPVector.hh"
     
    3436#include "Randomize.hh"
    3537#include <iostream>
     38
     39
     40
     41//080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #3
     42G4double G4NeutronHPLegendreStore::SampleDiscreteTwoBody (G4double anEnergy)
     43{
     44  G4double result;
     45 
     46  G4int i0;
     47  G4int low(0), high(0);
     48  G4NeutronHPFastLegendre theLeg;
     49  for (i0=0; i0<nEnergy; i0++)
     50  {
     51    high = i0;
     52    if(theCoeff[i0].GetEnergy()>anEnergy) break;
     53  }
     54  low = std::max(0, high-1);
     55  G4NeutronHPInterpolator theInt;
     56  G4double x, x1, x2;
     57  x = anEnergy;
     58  x1 = theCoeff[low].GetEnergy();
     59  x2 = theCoeff[high].GetEnergy();
     60  G4double theNorm = 0;
     61  G4double try01=0, try02=0;
     62  G4double max1, max2, costh;
     63  max1 = 0; max2 = 0;
     64  G4int l,m;
     65  for(i0=0; i0<601; i0++)
     66  {
     67      costh = G4double(i0-300)/300.;
     68      try01 = 0.5;
     69      for(m=0; m<theCoeff[low].GetNumberOfPoly() ; m++)
     70      { 
     71          l=m+1;
     72          try01 += (2.*l+1)/2.*theCoeff[low].GetCoeff(m)*theLeg.Evaluate(l, costh);
     73      }
     74      if(try01>max1) max1=try01;
     75      try02 = 0.5;
     76      for(m=0; m<theCoeff[high].GetNumberOfPoly() ; m++)
     77      {
     78          l=m+1;
     79          try02 += (2.*l+1)/2.*theCoeff[high].GetCoeff(m)*theLeg.Evaluate(l, costh);
     80      }
     81      if(try02>max2) max2=try02;
     82  }
     83  theNorm = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, max1, max2);
     84 
     85  G4double value, random;
     86  G4double v1, v2;
     87  do
     88  {
     89    v1 = 0.5;
     90    v2 = 0.5;
     91    result = 2.*G4UniformRand()-1.;
     92    for(m=0; m<theCoeff[low].GetNumberOfPoly() ; m++)
     93    {
     94        l=m+1; 
     95        G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
     96        v1 += (2.*l+1)/2.*theCoeff[low].GetCoeff(m)*legend;
     97    }
     98    for(m=0; m<theCoeff[high].GetNumberOfPoly() ; m++)
     99    {   
     100        l=m+1;
     101        G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
     102        v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(m)*legend;
     103    }
     104    // v1 = std::max(0.,v1); // Workaround in case one of the distributions is fully non-physical.
     105    // v2 = std::max(0.,v2);
     106    value = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, v1, v2);
     107    random = G4UniformRand();
     108    if(0>=theNorm) break; // Workaround for negative cross-section values. @@@@ 31 May 2000
     109  }
     110  while(random>value/theNorm);
     111
     112  return result;
     113}
     114
     115
    36116
    37117G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPNBodyPhaseSpace.cc

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.13 2006/06/29 20:53:11 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#include "G4NeutronHPNBodyPhaseSpace.hh"
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPNames.cc

    r819 r962  
    3434//          Natural Abundance data are allowed. by T. Koi
    3535// 07-07-06 Allow _nat_ final state even for isotoped cross sections by T. Koi
     36// 08-09-01 Add protection that deuteron data do not selected for hydrogen and so on by T. Koi
    3637//
    3738#include "G4NeutronHPNames.hh"
     
    319320          else
    320321          {
    321              G4cout << "NeutronHP: " << reac << " file for Z = " << Z << ", A = " << A << " is not found and NeutronHP will use " << result.GetName() << G4endl;
     322             //080901 Add protection that deuteron data do not selected for hydrogen and so on by T. Koi
     323             if ( (reac.find("Inelastic") != reac.size() &&
     324                   ((Z == 1 && A == 1) || (Z == 2 && A == 4) ) )
     325                 ||   
     326                  (reac.find("Capture") != reac.size() && (Z == 2 && A == 4) ) )
     327             {
     328                G4String new_name = base+"/"+rest+"0_0_Zero";
     329                result.SetName( new_name );
     330             }
     331             else
     332             {
     333                G4cout << "NeutronHP: " << reac << " file for Z = " << Z << ", A = " << A << " is not found and NeutronHP will use " << result.GetName() << G4endl;
     334             }
    322335          }
    323336       }
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc

    r819 r962  
    3333// 070606 Add Partial case by T. Koi
    3434// 070618 fix memory leaking by T. Koi
     35// 080801 fix memory leaking by T. Koi
     36// 080801 Correcting data disorder which happened when both InitPartial
     37//        and InitAnglurar methods was called in a same instance by T. Koi
    3538//
    3639// there is a lot of unused (and undebugged) code in this file. Kept for the moment just in case. @@
     
    109112void G4NeutronHPPhotonDist::InitAngular(std::ifstream & aDataFile)
    110113{
     114
    111115  G4int i, ii;
    112116  //angular distributions
     
    115119  {
    116120    aDataFile >> tabulationType >> nDiscrete2 >> nIso;
    117     theShells = new G4double[nDiscrete2];
    118     theGammas = new G4double[nDiscrete2];
     121//080731
     122      if ( theGammas != NULL && nDiscrete2 != nDiscrete ) G4cout << "080731c G4NeutronHPPhotonDist nDiscrete2 != nDiscrete, It looks like something wrong in your NDL files. Please update the latest. If you still have this messages after the update, then please report to Geant4 Hyper News." << G4endl;
     123
     124      // The order of cross section (InitPartials) and distribution (InitAngular here) data are different, we have to re-coordinate consistent data order.
     125      std::vector < G4double > vct_gammas_par;
     126      std::vector < G4double > vct_shells_par;
     127      std::vector < G4int > vct_primary_par;
     128      std::vector < G4int > vct_distype_par;
     129      std::vector < G4NeutronHPVector* > vct_pXS_par;
     130      if ( theGammas != NULL )
     131      {
     132         //copy the cross section data
     133         for ( i = 0 ; i < nDiscrete ; i++ )
     134         {
     135            vct_gammas_par.push_back( theGammas[ i ] );
     136            vct_shells_par.push_back( theShells[ i ] );
     137            vct_primary_par.push_back( isPrimary[ i ] );
     138            vct_distype_par.push_back( disType[ i ] );
     139            G4NeutronHPVector* hpv = new G4NeutronHPVector;
     140            *hpv = thePartialXsec[ i ];
     141            vct_pXS_par.push_back( hpv );
     142         }
     143      }
     144     if ( theGammas == NULL ) theGammas = new G4double[nDiscrete2];
     145     if ( theShells == NULL ) theShells = new G4double[nDiscrete2];
     146//080731
     147
    119148    for (i=0; i< nIso; i++) // isotropic photons
    120149    {
    121         aDataFile >> theGammas[i] >> theShells[i];
    122         theGammas[i]*=eV;
    123         theShells[i]*=eV;
     150       aDataFile >> theGammas[i] >> theShells[i];
     151       theGammas[i]*=eV;
     152       theShells[i]*=eV;
    124153    }
    125154    nNeu = new G4int [nDiscrete2-nIso];
     
    157186      }
    158187    }
     188//080731
     189     if ( vct_gammas_par.size() > 0 )
     190     {
     191        //Reordering cross section data to corrsponding distribution data
     192        for ( i = 0 ; i < nDiscrete ; i++ )
     193        {
     194           for ( G4int j = 0 ; j < nDiscrete ; j++ ) 
     195           {
     196              // Checking gamma and shell to identification
     197              if ( theGammas[ i ] == vct_gammas_par [ j ] && theShells [ i ] == vct_shells_par[ j ] )
     198              {
     199                 isPrimary [ i ] = vct_primary_par [ j ];
     200                 disType [ i ] = vct_distype_par [ j ];
     201                 thePartialXsec[ i ] = ( *( vct_pXS_par[ j ] ) );
     202              }
     203           }
     204        }
     205        //Garbage collection
     206        for ( std::vector < G4NeutronHPVector* >::iterator
     207           it = vct_pXS_par.begin() ; it != vct_pXS_par.end() ; it++ )
     208        {
     209           delete *it;
     210        }
     211     }
     212//080731
    159213  }
    160214}
     
    188242void G4NeutronHPPhotonDist::InitPartials(std::ifstream & aDataFile)
    189243{
     244
    190245  //G4cout << "G4NeutronHPPhotonDist::InitPartials " << G4endl;
    191246  aDataFile >> nDiscrete >> targetMass;
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPProduct.cc

    r819 r962  
    2727// J.P. Wellisch, Nov-1996
    2828// A prototype of the low energy neutron transport model.
     29//
     30// 080718 As for secondary photons, if its mean value has a value of integer,
     31//        then a sampling of multiplicity that based on Poisson Distribution
     32//        is not carried out and the mean is used as a multiplicity.
     33//        modified by T. Koi.
     34// 080721 Using ClearHistories() methodl for limiting the sum of secondary energies
     35//        modified by T. Koi.
     36// 080901 bug fix of too many secnodaries production in nd reactinos by T. Koi
     37//
    2938#include "G4NeutronHPProduct.hh"
    3039#include "G4Poisson.hh"
     
    3847  G4int multi;
    3948  multi = G4int(mean+0.0001);
    40   if(theMassCode==0) multi = G4Poisson(mean); // @@@@gammas. please X-check this
     49  //if(theMassCode==0) multi = G4Poisson(mean); // @@@@gammas. please X-check this
     50  //080718
     51  if ( theMassCode == 0 )
     52  {
     53     if ( G4int ( mean ) == mean )
     54     {
     55        multi = (G4int) mean;
     56     }
     57     else
     58     {
     59        multi = G4Poisson ( mean );
     60     }
     61  }
    4162  theDist->SetTarget(theTarget);
    4263  theDist->SetNeutron(theNeutron);
     
    4667  theCurrentMultiplicity = static_cast<G4int>(mean);
    4768  G4ReactionProduct * tmp;
     69  theDist->ClearHistories();
    4870  for(i=0;i<multi;i++)
    4971  {
     
    5678    delete  tmp;
    5779  }
     80/*
     81//080901 TK Comment out, too many secondaries are produced in deuteron reactions
    5882  if(theTarget->GetMass()<2*GeV) // @@@ take care of residuals in all cases
    5983  {
     
    6286    if(tmp != 0) { result->push_back(tmp); }
    6387  }
     88*/
    6489  return result;
    6590}
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPThermalScattering.cc

    r819 r962  
    3939
    4040// 070625 Fix memory leaking at destructor by T. Koi
     41// 081201 Fix memory leaking at destructor by T. Koi
    4142
    4243#include "G4NeutronHPThermalScattering.hh"
     
    103104{
    104105
    105    { // separate name scope of it
    106    std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* >::iterator it;
    107    for ( it = incoherentFSs.begin() ; it != incoherentFSs.end() ; it++ )
     106   for ( std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* >::iterator it = incoherentFSs.begin() ; it != incoherentFSs.end() ; it++ )
    108107   {
    109108      std::map < G4double , std::vector < E_isoAng* >* >::iterator itt;
     
    119118      delete it->second;
    120119   }
    121    }
    122 
    123    {
    124    std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >::iterator it;
    125    for ( it = coherentFSs.begin() ; it != coherentFSs.end() ; it++ )
     120
     121   for ( std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >::iterator it = coherentFSs.begin() ; it != coherentFSs.end() ; it++ )
    126122   {
    127123      std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >::iterator itt;
     
    137133      delete it->second;
    138134   }
    139    }
    140 
    141    {
    142    std::map < G4int ,  std::map < G4double , std::vector < E_P_E_isoAng* >* >* >::iterator it;
    143    for ( it = inelasticFSs.begin() ; it != inelasticFSs.end() ; it++ )
     135
     136   for ( std::map < G4int ,  std::map < G4double , std::vector < E_P_E_isoAng* >* >* >::iterator it = inelasticFSs.begin() ; it != inelasticFSs.end() ; it++ )
    144137   {
    145138      std::map < G4double , std::vector < E_P_E_isoAng* >* >::iterator itt;
     
    160153      delete it->second;
    161154   }
    162    }
    163 
     155
     156   delete theHPElastic;
    164157   delete theXSection;
    165158}
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPVector.cc

    r819 r962  
    2929//
    3030// 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
     31// 080808 bug fix in Sample() and GetXsec() by T. Koi
    3132//
    3233#include "G4NeutronHPVector.hh"
     
    170171      //if( (theData[high].GetX()-theData[low].GetX())/theData[high].GetX() < 0.000001)
    171172      if ( theData[high].GetX() !=0
    172        &&( theData[high].GetX()-theData[low].GetX())/theData[high].GetX() < 0.000001)
     173       //080808 TKDB
     174       //&&( theData[high].GetX()-theData[low].GetX())/theData[high].GetX() < 0.000001)
     175       &&( std::abs( (theData[high].GetX()-theData[low].GetX())/theData[high].GetX() ) < 0.000001 ) )
    173176      {
    174177        y = theData[low].GetY();
     
    366369      do
    367370      {
     371//080808
     372/*
     373        G4double rand;
    368374        G4double value, test, baseline;
    369375        baseline = theData[GetVectorLength()-1].GetX()-theData[0].GetX();
    370         G4double rand;
    371376        do
    372377        {
     
    379384        while( test < rand && test > 0 );
    380385        result = value;
     386*/
     387        G4double rand;
     388        G4double value, test;
     389        do
     390        {
     391           rand = G4UniformRand();
     392           G4int ibin = -1;
     393           for ( G4int i = 0 ; i < GetVectorLength() ; i++ )
     394           {
     395              if ( rand < theIntegral[i] )
     396              {
     397                 ibin = i;
     398                 break;
     399              }
     400           }
     401           if ( ibin < 0 ) G4cout << "TKDB 080807 " << rand << G4endl;
     402           // result
     403           rand = G4UniformRand();
     404           G4double x1, x2;
     405           if ( ibin == 0 )
     406           {
     407              x1 = theData[ ibin ].GetX();
     408              value = x1;
     409              break;
     410           }
     411           else
     412           {
     413              x1 = theData[ ibin-1 ].GetX();
     414           }
     415           
     416           x2 = theData[ ibin ].GetX();
     417           value = rand * ( x2 - x1 ) + x1;
     418           test = GetY ( value ) / std::max ( GetY( ibin-1 ) , GetY ( ibin ) );
     419        }
     420        while ( G4UniformRand() > test );
     421        result = value;
     422//080807
    381423      }
    382424      while(IsBlocked(result));
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLCaptureData.cc

    r819 r962  
    2929//          If NeutronHP data do not available for an element, then Low Energy
    3030//          Parameterization models handle the interactions of the element.
     31// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3132//
    3233
     
    8990
    9091#include "G4Nucleus.hh"
    91 #include "G4NucleiPropertiesTable.hh"
     92#include "G4NucleiProperties.hh"
    9293#include "G4Neutron.hh"
    9394#include "G4Electron.hh"
     
    114115  G4double theZ = anE->GetZ();
    115116  G4double eleMass;
    116   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     117  eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
    117118             ) / G4Neutron::Neutron()->GetPDGMass();
    118119 
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLEInelasticData.cc

    r819 r962  
    2929//          If NeutronHP data do not available for an element, then Low Energy
    3030//          Parameterization models handle the interactions of the element.
     31// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3132//
    3233
     
    133134
    134135#include "G4Nucleus.hh"
    135 #include "G4NucleiPropertiesTable.hh"
     136#include "G4NucleiProperties.hh"
    136137#include "G4Neutron.hh"
    137138#include "G4Electron.hh"
     
    158159  G4double theZ = anE->GetZ();
    159160  G4double eleMass;
    160   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     161  eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
    161162             ) / G4Neutron::Neutron()->GetPDGMass();
    162163 
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLElasticData.cc

    r819 r962  
    2929//          If NeutronHP data do not available for an element, then Low Energy
    3030//          Parameterization models handle the interactions of the element.
     31// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3132//
    3233
     
    8990
    9091#include "G4Nucleus.hh"
    91 #include "G4NucleiPropertiesTable.hh"
     92#include "G4NucleiProperties.hh"
    9293#include "G4Neutron.hh"
    9394#include "G4Electron.hh"
     
    114115  G4double theZ = anE->GetZ();
    115116  G4double eleMass;
    116   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     117  eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
    117118             ) / G4Neutron::Neutron()->GetPDGMass();
    118119 
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLFissionData.cc

    r819 r962  
    2929//          If NeutronHP data do not available for an element, then Low Energy
    3030//          Parameterization models handle the interactions of the element.
     31// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
    3132//
    3233
     
    8990
    9091#include "G4Nucleus.hh"
    91 #include "G4NucleiPropertiesTable.hh"
     92#include "G4NucleiProperties.hh"
    9293#include "G4Neutron.hh"
    9394#include "G4Electron.hh"
     
    114115  G4double theZ = anE->GetZ();
    115116  G4double eleMass;
    116   eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
     117  eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
    117118             ) / G4Neutron::Neutron()->GetPDGMass();
    118119 
Note: See TracChangeset for help on using the changeset viewer.