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
Files:
134 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/neutron_hp/History

    r819 r962  
    1 $Id: History,v 1.23.2.2 2008/04/29 07:05:37 gcosmo Exp $
    21-------------------------------------------------------------------
    32
     
    1413     ---------------------------------------------------------------
    1514     * Please list in reverse chronological order (last date on top)
    16       ---------------------------------------------------------------
    17 
    18 29 April 2008 Gabriele Cosmo (hadr-hpn-V09-00-07)
    19 -------------------------------------------------
    20 - Tag for release 9.1.p02.
     15     ---------------------------------------------------------------
     16
     173 December 2008  Tatsumi Koi  (hadr-hpn-V09-01-28)
     18- Fix bug in Register in G4NeutronHPChannel
     19  and add limitation of trial of creating final states and proctection for pure 1H case in G4NeutronHPInelastic
     20        G4NeutronHPChannel.cc
     21        G4NeutronHPInelastic.cc
     22
     232 December 2008  Tatsumi Koi  (hadr-hpn-V09-01-27)
     24- Remove unused variable
     25        G4NeutronHPThermalScattering.cc
     26
     271 December 2008  Tatsumi Koi  (hadr-hpn-V09-01-26)
     28- Fix for Memory Leak
     29        G4NeutronHPThermalScattering.cc
     30
     3124 November 2008  Tatsumi Koi  (hadr-hpn-V09-01-25)
     32- Protect invalid read which caused run time errors
     33        G4NeutronHPFissionData.cc
     34
     3505 November 2008  Dennis Wright  (hadr-hpn-V09-01-24)
     36  G4NeutronHPNames.cc: put parentheses around && in || (line 324) to
     37  satisfy gcc 4.3 compiler.
     38
     3927 October 2008 Tatsumi Koi (hadr-hpn-V09-01-23)
     40  Z,A to A,Z for functions of NucleiProperties
     41        recommit and re tag hadr-hpn-V09-01-22
     42
     4327 October 2008 Tatsumi Koi (hadr-hpn-V09-01-22)
     44  Z,A to A,Z for functions of NucleiProperties
     45        G4NeutronHPThermalBoost.hh
     46        G4NeutronHPCaptureData.cc
     47        G4NeutronHPCaptureFS.cc
     48        G4NeutronHPContAngularPar.cc
     49        G4NeutronHPElasticData.cc
     50        G4NeutronHPFissionData.cc
     51        G4NeutronHPInelasticBaseFS.cc
     52        G4NeutronHPInelasticCompFS.cc
     53        G4NeutronHPInelasticData.cc
     54        G4NeutronHPorLCaptureData.cc
     55        G4NeutronHPorLEInelasticData.cc
     56        G4NeutronHPorLElasticData.cc
     57        G4NeutronHPorLFissionData.cc
     58
     5924 October 2008 Tatsumi Koi (hadr-hpn-V09-01-21)
     60- Migarate to "particles-V09-01-09"
     61        G4NeutronHPThermalBoost.hh
     62        G4NeutronHPCaptureData.cc
     63        G4NeutronHPCaptureFS.cc
     64        G4NeutronHPContAngularPar.cc
     65        G4NeutronHPElasticData.cc
     66        G4NeutronHPFissionData.cc
     67        G4NeutronHPInelasticBaseFS.cc
     68        G4NeutronHPInelasticCompFS.cc
     69        G4NeutronHPInelasticData.cc
     70        G4NeutronHPorLCaptureData.cc
     71        G4NeutronHPorLEInelasticData.cc
     72        G4NeutronHPorLElasticData.cc
     73        G4NeutronHPorLFissionData.cc
     74
     754 September 2008 Tatsumi Koi (hadr-hpn-V09-01-20)
     76---------------------------------------------
     77- Delete output for debugging
     78        G4NeutronHPProduct.cc
     79
     804 September 2008 Tatsumi Koi (hadr-hpn-V09-01-19)
     81---------------------------------------------
     82- Add Protection for negative energy results in very low energy ( 1E-6 eV ) scattering
     83        G4NeutronHPElasticFS.cc
     84
     851 September 2008 Tatsumi Koi (hadr-hpn-V09-01-18)
     86---------------------------------------------
     87- Bug fix of too many secondaries production in nd rections
     88        G4NeutronHPProduct.cc
     89- Set protection for selecting data in hydrogen and alpha
     90        G4NeutronHPName.cc
     91- Avoiding troubles which caused by G4PhysicsVecotor of length 0
     92        G4NeutronHPIsoData.cc
     93
     9411 August 2008 Tatsumi Koi (hadr-hpn-V09-01-17)
     95---------------------------------------------
     96- Bug fix G4NeutronHPLabAngularEnergy
     97        G4NeutronHPLabAngularEnergy.cc
     98  Change interpolation scheme for histogram 
     99        G4NeutronHPInterpolator.hh
     100  Bug fix in Sample and GetXsec in G4NeutronHpVector
     101        G4NeutronHPVector.hh
     102        G4NeutronHPVector.cc
     103  Prohibit level transition to oneself
     104        G4NeutronHPDeExGammas.cc
     105  Fix memory leak and Correcting data disorder which happened
     106      when both InitPartial and InitAnglurar methods
     107      was called in a same instance
     108        G4NeutronHPPhotonDist.cc
     109
     1101 August 2008 Tatsumi Koi (hadr-hpn-V09-01-16)
     111---------------------------------------------
     112- Introduce theNDLDataA,Z which has A and Z of used NDL data
     113  residual reconstraction with theNDLDataA,Z
     114  several fixes and protection for G4FPE_DEBUF and checking with valgrind
     115        G4NeutronHPFinalState.hh
     116        G4NeutronHPFinalState.cc
     117        G4NeutronHPInelasticCompFS.cc
     118        G4NeutronHPInelasticBaseFS.cc
     119        G4NeutronHPKallbachMannSyst.cc
     120        G4NeutronHPContAngularPar.cc
     121
     12221 July 2008 Tatsumi Koi (hadr-hpn-V09-01-15)
     123---------------------------------------------
     124- Adjusting final states based on the energy and momentum conservation
     125        G4NeutronHPFinalState.hh
     126        G4NeutronHPFinalState.cc
     127        G4NeutronHPInelasticCompFS.cc
     128        G4NeutronHPInelasticBaseFS.cc
     129
     13021 July 2008 Tatsumi Koi (hadr-hpn-V09-01-14)
     131---------------------------------------------
     132- Limiting the sum of secondary energies
     133        G4VNeutronHPEnergyAngular.hh
     134        G4NeutronHPContEnergyAngular.hh
     135        G4NeutronHPContAngularPar.hh
     136        G4NeutronHPProduct.cc
     137        G4NeutronHPEnAngCorrelation.cc
     138        G4NeutronHPContEnergyAngular.cc
     139        G4NeutronHPContAngularPar.cc
     140
     14117 July 2008 Tatsumi Koi (hadr-hpn-V09-01-13)
     142---------------------------------------------
     143- Fix of calculation of residual momentum
     144        G4NeutronHPInelasticCompFS.cc
     145        G4NeutronHPDiscreteTwoBody.cc
     146
     14726 June 2008 Tatsumi Koi (hadr-hpn-V09-01-12)
     148---------------------------------------------
     149- Fix for Memory Leak
     150        G4NeutronHPPhotonDist.hh
     151
     15218 June 2008 Tatsumi Koi (hadr-hpn-V09-01-11)
     153---------------------------------------------
     154- Fix for tag hadr-hpn-V09-01-09 and 10
     155        G4NeutronHPDiscreteTwoBody.cc
     156
     15713 June 2008 Tatsumi Koi (hadr-hpn-V09-01-10)
     158---------------------------------------------
     159- Bug fixes contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern)
     160        G4NeutronHPContAngularPar.cc
     161
     16212 June 2008 Tatsumi Koi (hadr-hpn-V09-01-09)
     163---------------------------------------------
     164- Bug fixes contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern)
     165        G4NeutronHPLegendreStore.hh
     166        G4NeutronHPAngular.cc
     167        G4NeutronHPDiscreteTwoBody.cc
     168        G4NeutronHPInelasticCompFS.cc
     169        G4NeutronHPLegendreStore.cc
     170
     171
     17203 June 2008 Tatsumi Koi (hadr-hpn-V09-01-08)
     173---------------------------------------------
     174- Bug fixe for codition jump by uninitialised value by T. Koi
     175        G4NeutronHPInelasticData.cc
     176        G4NeutronHPCaptureData.cc
     177
     17803 June 2008 Tatsumi Koi (hadr-hpn-V09-01-07)
     179---------------------------------------------
     180- Bug fixes for Hadron Hyper News #932 by T. Koi
     181        G4NeutronHPInelasticCompFS.cc
     182
     18320 May 2008 Tatsumi Koi (hadr-hpn-V09-01-06)
     184---------------------------------------------
     185- Delete unnecessary dependencies by T. Koi
     186        G4NeutronHPChannel.hh
     187        G4NeutronHPElementData.hh
     188
     18928 April 2008 Tatsumi Koi (hadr-hpn-V09-01-05)
     190---------------------------------------------
     191- Change checking point of "neglecting doppler broadening" flag
     192  from GetCrossSection to BuildPhysicsTable by T. Koi
     193        G4NeutronHPElasticData.hh
     194        G4NeutronHPInelasticData.hh
     195        G4NeutronHPCaptureData.hh
     196        G4NeutronHPElasticData.cc
     197        G4NeutronHPInelasticData.cc
     198        G4NeutronHPCaptureData.cc
    21199
    2220022 April 2008 Tatsumi Koi (hadr-hpn-V09-01-04)
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4InterpolationIterator.hh

    r819 r962  
    2626//
    2727// $Id: G4InterpolationIterator.hh,v 1.9 2006/06/29 20:46:13 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4InterpolationIterator_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4InterpolationManager.hh

    r819 r962  
    2626//
    2727// $Id: G4InterpolationManager.hh,v 1.13 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4InterpolationManager_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4InterpolationScheme.hh

    r819 r962  
    2626//
    2727// $Id: G4InterpolationScheme.hh,v 1.8 2006/06/29 20:46:17 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4InterpolationScheme_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2AInelasticFS.hh,v 1.9 2006/06/29 20:46:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2N2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2N2AInelasticFS.hh,v 1.9 2006/06/29 20:46:21 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2N2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2NAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2NAInelasticFS.hh,v 1.9 2006/06/29 20:46:23 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2NAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2NDInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2NDInelasticFS.hh,v 1.9 2006/06/29 20:46:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2NDInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2NInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2NInelasticFS.hh,v 1.9 2006/06/29 20:46:27 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2NInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2NPInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2NPInelasticFS.hh,v 1.9 2006/06/29 20:46:29 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2NPInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP2PInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP2PInelasticFS.hh,v 1.9 2006/06/29 20:46:31 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP2PInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP3AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP3AInelasticFS.hh,v 1.9 2006/06/29 20:46:33 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP3AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP3NAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP3NAInelasticFS.hh,v 1.9 2006/06/29 20:46:35 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP3NAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP3NInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP3NInelasticFS.hh,v 1.9 2006/06/29 20:46:37 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP3NInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP3NPInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP3NPInelasticFS.hh,v 1.9 2006/06/29 20:46:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP3NPInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHP4NInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHP4NInelasticFS.hh,v 1.9 2006/06/29 20:46:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHP4NInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPAInelasticFS.hh,v 1.9 2006/06/29 20:46:43 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPAngular.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPAngular.hh,v 1.12 2007/06/22 09:23:47 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 070613 fix memory leaking by T. Koi
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPAngularP.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPAngularP.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPAngularP_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPArbitaryTab.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPArbitaryTab.hh,v 1.12 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPArbitaryTab_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPCapture.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPCapture.hh,v 1.10 2006/06/29 20:46:51 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: Very Low Energy Neutron X-Sections
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPCaptureData.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPCaptureData.hh,v 1.9.2.1 2008/04/29 07:05:37 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4NeutronHPCaptureData.hh,v 1.11 2008/04/28 19:07:54 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 080417 Add IsZAApplicable method (return false) by T. Koi
     31// 080428 Add bool onFlightDB by T. Koi
    3132//
    3233#ifndef G4NeutronHPCaptureData_h
     
    7071   
    7172   G4PhysicsTable * theCrossSections;
     73
     74      G4bool onFlightDB;
    7275};
    7376
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPCaptureFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPCaptureFS.hh,v 1.11 2006/06/29 20:46:55 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPCaptureFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPChannel.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPChannel.hh,v 1.14 2007/06/14 17:17:30 tkoi Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4NeutronHPChannel.hh,v 1.15 2008/05/20 21:24:28 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: Very Low Energy Neutron X-Sections
     
    3434// Bug fixes and workarounds in the destructor, F.W.Jones 06-Jul-1999
    3535// 070612 Fix memory leaking by T. Koi
     36//
     37// 080520 Delete unnecessary dependencies by T. Koi
    3638 
    3739#ifndef G4NeutronHPChannel_h
     
    4244#include "G4Material.hh"
    4345#include "G4HadProjectile.hh"
    44 #include "G4NeutronInelasticProcess.hh"
    45 #include "G4HadronFissionProcess.hh"
    46 #include "G4HadronElasticProcess.hh"
    47 #include "G4HadronCaptureProcess.hh"
     46//#include "G4NeutronInelasticProcess.hh"
     47//#include "G4HadronFissionProcess.hh"
     48//#include "G4HadronElasticProcess.hh"
     49//#include "G4HadronCaptureProcess.hh"
    4850#include "G4StableIsotopes.hh"
    4951#include "G4NeutronHPCaptureFS.hh"
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPChannelList.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPChannelList.hh,v 1.10 2006/06/29 20:46:59 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: Very Low Energy Neutron X-Sections
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPContAngularPar.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPContAngularPar.hh,v 1.12 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name:  $
     27// $Id: G4NeutronHPContAngularPar.hh,v 1.13 2008/07/21 23:26:29 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
     29//
     30// 080718 Add ClearHistories method and related class member
    2931//
    3032#ifndef G4NeutronHPContAngularPar_h
     
    4749    theAngular = 0;
    4850    currentMeanEnergy = -2;
     51     fresh = true;
    4952  }
    5053  ~G4NeutronHPContAngularPar()
     
    148151 
    149152  G4double currentMeanEnergy;
     153
     154//080718
     155   public:
     156      void ClearHistories(){ fresh = true; };
     157   private:
     158      G4bool fresh;
     159      G4double remaining_energy; // represent energy rest of cascade chain
    150160};
    151161#endif
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPContEnergyAngular.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPContEnergyAngular.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name:  $
     27// $Id: G4NeutronHPContEnergyAngular.hh,v 1.12 2008/07/21 23:26:29 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
     29//
     30// 080721 Add ClearHistories() method by T. Koi
    2931//
    3032#ifndef G4NeutronHPContEnergyAngular_h
     
    8385 
    8486  G4double currentMeanEnergy;
     87
     88   public:
     89      void ClearHistories();
    8590 
    8691};
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPD2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPD2AInelasticFS.hh,v 1.9 2006/06/29 20:47:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPD2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPDAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPDAInelasticFS.hh,v 1.9 2006/06/29 20:47:07 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPDAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPDInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPDInelasticFS.hh,v 1.9 2006/06/29 20:47:09 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPDInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPData.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPData.hh,v 1.9 2006/06/29 20:47:11 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: Very Low Energy Neutron X-Sections
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPDataPoint.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPDataPoint.hh,v 1.8 2006/06/29 20:47:13 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPDataPoint_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPDeExGammas.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPDeExGammas.hh,v 1.13 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPDeExGammas_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPDiscreteTwoBody.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPDiscreteTwoBody.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPDiscreteTwoBody_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPElastic.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPElastic.hh,v 1.10 2006/06/29 20:47:21 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: High Precision low E neutron tracking
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPElasticData.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPElasticData.hh,v 1.9.2.1 2008/04/29 07:05:37 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4NeutronHPElasticData.hh,v 1.11 2008/04/28 19:07:53 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 080417 Add IsZAApplicable method (return false) by T. Koi
     31// 080428 Add bool onFlightDB by T. Koi
    3132//
    3233#ifndef G4NeutronHPElasticData_h
     
    7071   
    7172   G4PhysicsTable * theCrossSections;
     73      G4bool onFlightDB;
     74   
    7275};
    7376
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPElasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPElasticFS.hh,v 1.12 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 25-08-06 New Final State type (refFlag==3 , Legendre (Low Energy) + Probability (High Energy) )
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPElementData.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPElementData.hh,v 1.9 2006/06/29 20:47:27 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4NeutronHPElementData.hh,v 1.10 2008/05/20 21:24:28 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: Very Low Energy Neutron X-Sections
    3131 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
    3232 // Builds and has the Cross-section data for one material.
     33//
     34// 080520 Delete unnecessary dependencies by T. Koi
    3335 
    3436#ifndef G4NeutronHPElementData_h
     
    3941#include "G4Material.hh"
    4042#include "G4HadronCrossSections.hh"
    41 #include "G4NeutronInelasticProcess.hh"
    42 #include "G4HadronFissionProcess.hh"
    43 #include "G4HadronCaptureProcess.hh"
     43#include "G4ReactionProduct.hh"
     44#include "G4Nucleus.hh"
     45//#include "G4NeutronInelasticProcess.hh"
     46//#include "G4HadronFissionProcess.hh"
     47//#include "G4HadronCaptureProcess.hh"
    4448#include "G4NeutronHPElasticData.hh"
    4549#include "G4NeutronHPFissionData.hh"
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPEnAngCorrelation.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPEnAngCorrelation.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPEnAngCorrelation_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPEnergyDistribution.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPEnergyDistribution.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPEnergyDistribution_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPEvapSpectrum.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPEvapSpectrum.hh,v 1.10 2006/06/29 20:47:33 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPEvapSpectrum_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFCFissionFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFCFissionFS.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFCFissionFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFSFissionFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFSFissionFS.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFSFissionFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFastLegendre.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFastLegendre.hh,v 1.11 2006/06/29 20:47:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFastLegendre_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPField.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPField.hh,v 1.8 2006/06/29 20:47:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPField_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFieldPoint.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFieldPoint.hh,v 1.9 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFieldPoint_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFinalState.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPFinalState.hh,v 1.13 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name:  $
     27// $Id: G4NeutronHPFinalState.hh,v 1.15 2008/08/05 22:43:26 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
     29//
     30// 080721 Create adjust_final_state method by T. Koi 
     31// 080801 Introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
    2932//
    3033#ifndef G4NeutronHPFinalState_h
     
    4952    theBaseZ = 0;
    5053    theBaseA = 0;
     54
     55    theNDLDataZ = 0;
     56    theNDLDataA = 0;
     57
     58     adjustResult = true;
     59     if ( getenv( "G4NEUTRONHP_DO_NOT_ADJUST_FINAL_STATE" ) ) adjustResult = false;
     60
    5161  };
    5262 
     
    5868    throw G4HadronicException(__FILE__, __LINE__, "G4HadFinalState * ApplyYourself(const G4HadProjectile & theTrack) needs implementation");
    5969    return 0;
    60   }
     70  };
    6171 
    6272  // of course this would better be Done templating G4NeutronHPChannel...,
     
    6575  virtual G4NeutronHPFinalState * New() = 0;
    6676 
    67   G4bool HasXsec() {return hasXsec;}
    68   G4bool HasFSData() {return hasFSData;}
    69   G4bool HasAnyData() {return hasAnyData;}
     77  G4bool HasXsec() {return hasXsec;};
     78  G4bool HasFSData() {return hasFSData;};
     79  G4bool HasAnyData() {return hasAnyData;};
    7080 
    71   virtual G4double GetXsec(G4double ) { return 0; }
    72   virtual G4NeutronHPVector * GetXsec() { return 0; }
     81  virtual G4double GetXsec(G4double ) { return 0; };
     82  virtual G4NeutronHPVector * GetXsec() { return 0; };
    7383 
    74   void     SetA_Z(G4double anA, G4double aZ) {theBaseA = anA; theBaseZ = aZ; }
    75   G4double GetZ() { return theBaseZ; }
    76   G4double GetN() { return theBaseA; }
     84  void     SetA_Z(G4double anA, G4double aZ) {theBaseA = anA; theBaseZ = aZ; };
     85  G4double GetZ() { return theBaseZ; };
     86  G4double GetN() { return theBaseA; };
    7787 
    7888  protected:
     
    8898  G4double theBaseZ;
    8999
    90   private:
    91  
     100
     101//080721
     102   protected:
     103      void adjust_final_state ( G4LorentzVector );
     104      G4int theNDLDataZ;
     105      G4int theNDLDataA;
     106
     107   private:
     108      G4bool adjustResult;
     109
     110
    92111};
    93112#endif
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFission.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFission.hh,v 1.10 2006/06/29 20:47:47 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: High Precision low E neutron tracking
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFissionBaseFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFissionBaseFS.hh,v 1.13 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFissionBaseFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFissionData.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPFissionData.hh,v 1.9.2.1 2008/04/29 07:05:37 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4NeutronHPFissionData.hh,v 1.10 2008/04/16 23:39:56 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 080417 Add IsZAApplicable method (return false) by T. Koi
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFissionERelease.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFissionERelease.hh,v 1.12 2007/06/08 22:39:50 tkoi Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 070606 fix for Valgrind by T. Koi
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFissionFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFissionFS.hh,v 1.9 2006/06/29 20:47:55 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFissionFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPFissionSpectrum.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPFissionSpectrum.hh,v 1.11 2006/06/29 20:47:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPFissionSpectrum_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPGamma.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPGamma.hh,v 1.14 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPGamma_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPHe3InelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPHe3InelasticFS.hh,v 1.9 2006/06/29 20:48:03 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPHe3InelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPInelastic.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPInelastic.hh,v 1.9 2006/06/29 20:48:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: High Precision low E neutron tracking
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPInelasticBaseFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPInelasticBaseFS.hh,v 1.12 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPInelasticBaseFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPInelasticCompFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPInelasticCompFS.hh,v 1.13 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPInelasticCompFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPInelasticData.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPInelasticData.hh,v 1.9.2.1 2008/04/29 07:05:37 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4NeutronHPInelasticData.hh,v 1.11 2008/04/28 19:07:54 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 080417 Add IsZAApplicable method (return false) by T. Koi
     31// 080428 Add bool onFlightDB by T. Koi
    3132//
    3233#ifndef G4NeutronHPInelasticData_h
     
    7071   
    7172   G4PhysicsTable * theCrossSections;
     73
     74      G4bool onFlightDB;
    7275};
    7376
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPInterpolator.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPInterpolator.hh,v 1.19 2006/06/29 20:48:13 gunter Exp $
    28 // GEANT4 tag $Name:  $
     27// $Id: G4NeutronHPInterpolator.hh,v 1.20 2008/08/12 00:42:31 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
     29//
     30// 080809 Change interpolation scheme of "histogram", now using LinearLinear
     31//        For multidimensional interpolations By T. Koi
    2932//
    3033#ifndef G4NeutronHPInterpolator_h
     
    9194  {
    9295    case 1:
    93       result = Histogram(x, x1, x2, y1, y2);
     96      //080809
     97      //result = Histogram(x, x1, x2, y1, y2);
     98      result = LinearLinear(x, x1, x2, y1, y2);
    9499      break;
    95100    case 2:
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPIsoData.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPIsoData.hh,v 1.16 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPIsoData_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPIsotropic.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPIsotropic.hh,v 1.10 2006/06/29 20:48:17 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPIsotropic_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPKallbachMannSyst.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPKallbachMannSyst.hh,v 1.8 2006/06/29 20:48:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPKallbachMannSyst_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPLCFissionFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPLCFissionFS.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPLCFissionFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPLabAngularEnergy.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPLabAngularEnergy.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPLabAngularEnergy_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPLegendreStore.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPLegendreStore.hh,v 1.11 2006/06/29 20:48:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4NeutronHPLegendreStore.hh,v 1.12 2008/06/13 00:29:26 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPLegendreStore_h
     
    7272  inline G4int GetNumberOfPoly(G4int i) {return theCoeff[i].GetNumberOfPoly();}
    7373 
     74  G4double SampleDiscreteTwoBody (G4double anEnergy);
    7475  G4double SampleElastic (G4double anEnergy);
    7576  G4double Sample (G4double energy);
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPLegendreTable.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPLegendreTable.hh,v 1.12 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPLegendreTable_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPLevel.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPLevel.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPLevel_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPMadlandNixSpectrum.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPMadlandNixSpectrum.hh,v 1.12 2006/06/29 20:48:33 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPMadlandNixSpectrum_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPN2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPN2AInelasticFS.hh,v 1.9 2006/06/29 20:48:35 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPN2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPN2PInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPN2PInelasticFS.hh,v 1.9 2006/06/29 20:48:37 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPN2PInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPN3AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPN3AInelasticFS.hh,v 1.9 2006/06/29 20:48:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPN3AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNAInelasticFS.hh,v 1.9 2006/06/29 20:48:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNBodyPhaseSpace.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNBodyPhaseSpace.hh,v 1.12 2006/06/29 20:48:43 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNBodyPhaseSpace_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPND2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPND2AInelasticFS.hh,v 1.9 2006/06/29 20:48:45 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPND2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNDInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNDInelasticFS.hh,v 1.9 2006/06/29 20:48:47 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNDInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNHe3InelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNHe3InelasticFS.hh,v 1.9 2006/06/29 20:48:49 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNHe3InelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNInelasticFS.hh,v 1.9 2006/06/29 20:48:51 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNPAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNPAInelasticFS.hh,v 1.9 2006/06/29 20:48:53 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNPAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNPInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNPInelasticFS.hh,v 1.9 2006/06/29 20:48:55 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNPInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNT2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNT2AInelasticFS.hh,v 1.9 2006/06/29 20:48:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNT2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNTInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNTInelasticFS.hh,v 1.9 2006/06/29 20:48:59 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNTInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNXInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNXInelasticFS.hh,v 1.9 2006/06/29 20:49:01 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNXInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNames.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNames.hh,v 1.15 2006/06/29 20:49:03 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNames_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPNeutronYield.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPNeutronYield.hh,v 1.10 2006/06/29 20:49:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPNeutronYield_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPAInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPAInelasticFS.hh,v 1.9 2006/06/29 20:49:07 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPPAInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPDInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPDInelasticFS.hh,v 1.9 2006/06/29 20:49:09 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPPDInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPInelasticFS.hh,v 1.9 2006/06/29 20:49:11 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPPInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPTInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPTInelasticFS.hh,v 1.9 2006/06/29 20:49:13 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPPTInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPartial.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPartial.hh,v 1.13 2007/06/18 20:56:05 tkoi Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// 070618 Comment out unused private member leaking by T. Koi
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPhotonDist.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4NeutronHPPhotonDist.hh,v 1.16 2007/06/22 09:23:47 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4NeutronHPPhotonDist.hh,v 1.17 2008/06/26 02:40:23 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030 // Hadronic Process: Very Low Energy Neutron X-Sections
     
    3434// 070612 fix memory leaking by T. Koi
    3535// 070615 fix memory leaking by T. Koi
     36// 080625 fix memory leaking by T. Koi
    3637//
    3738 
     
    102103     delete [] theGammas;
    103104     delete [] nNeu;
    104      delete [] theLegendre;
    105105     delete [] theAngular;
    106106     delete [] distribution;
    107107     delete [] probs;
    108108
    109 // TKDB
     109     if ( theLegendre != NULL )
     110     {
     111        for ( G4int i = 0 ; i < (nDiscrete2-nIso) ; i++ )
     112           if ( theLegendre[i] != NULL ) delete[] theLegendre[i];
     113
     114        delete [] theLegendre;
     115     }
     116
    110117     if ( partials != 0 )
    111118     {
    112119        for ( G4int i = 0 ; i < nPartials ; i++ )
    113            { delete partials[ i ]; }
     120           { delete partials[i]; }
    114121
    115122        delete [] partials;
    116123     }
    117      // delete [] partials;
    118124
    119125     delete [] actualMult;
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPhotonXSection.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPhotonXSection.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPPhotonXSection_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPolynomExpansion.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPPolynomExpansion.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPPolynomExpansion_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPProduct.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPProduct.hh,v 1.12 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPProduct_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPSCFissionFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPSCFissionFS.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPSCFissionFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPSimpleEvapSpectrum.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPSimpleEvapSpectrum.hh,v 1.11 2006/06/29 20:49:27 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPSimpleEvapSpectrum_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPT2AInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPT2AInelasticFS.hh,v 1.9 2006/06/29 20:49:29 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPT2AInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPTCFissionFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPTCFissionFS.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPTCFissionFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPTInelasticFS.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPTInelasticFS.hh,v 1.9 2006/06/29 20:49:33 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPTInelasticFS_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPThermalBoost.hh

    r819 r962  
    2424// ********************************************************************
    2525//
     26// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
     27//
    2628#ifndef G4NeutronHPThermalBoost_h
    2729#define G4NeutronHPThermalBoost_h
     
    3133#include "G4ReactionProduct.hh"
    3234#include "G4Nucleus.hh"
    33 #include "G4NucleiPropertiesTable.hh"
     35#include "G4NucleiProperties.hh"
    3436#include "G4Electron.hh"
    3537#include "G4Neutron.hh"
     
    6264    G4double eps = 0.0001;
    6365    G4double eleMass;
    64     eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))
    65                ) / G4Neutron::Neutron()->GetPDGMass();
     66    eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) ) ) / G4Neutron::Neutron()->GetPDGMass();
    6667 
    6768    G4ReactionProduct aThermalNuc = aNuc.GetBiasedThermalNucleus(eleMass, neuVelo, aT);
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPVector.hh

    r819 r962  
    2626// 070606 fix with Valgrind by T. Koi
    2727// 080409 Fix div0 error with G4FPE by T. Koi
     28// 080811 Comment out unused method SetBlocked and SetBuffered
     29//        Add required cleaning up in CleanUp by T. Koi
    2830//
    2931#ifndef G4NeutronHPVector_h
     
    253255    maxValue = -DBL_MAX;
    254256    theHash.Clear();
     257//080811 TK DB
     258    delete[] theIntegral;
     259    theIntegral = NULL;
    255260  }
    256261
     
    491496  }
    492497 
     498/*
    493499  void Block(G4double aX)
    494500  {
     
    500506    theBuffered.push_back(aX);
    501507  }
     508*/
    502509 
    503510  std::vector<G4double> GetBlocked() {return theBlocked;}
    504511  std::vector<G4double> GetBuffered() {return theBuffered;}
    505512 
    506   void SetBlocked(const std::vector<G4double> &aBlocked) {theBlocked = aBlocked;}
    507   void SetBuffered(const std::vector<G4double> &aBuffer) {theBuffered = aBuffer;}
     513//  void SetBlocked(const std::vector<G4double> &aBlocked) {theBlocked = aBlocked;}
     514//  void SetBuffered(const std::vector<G4double> &aBuffer) {theBuffered = aBuffer;}
    508515
    509516  G4double Get15percentBorder();
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPWattSpectrum.hh

    r819 r962  
    2626//
    2727// $Id: G4NeutronHPWattSpectrum.hh,v 1.11 2006/06/29 20:49:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4NeutronHPWattSpectrum_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4VNeutronHPEDis.hh

    r819 r962  
    2626//
    2727// $Id: G4VNeutronHPEDis.hh,v 1.10 2006/06/29 20:50:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030#ifndef G4VNeutronHPEDis_h
  • trunk/source/processes/hadronic/models/neutron_hp/include/G4VNeutronHPEnergyAngular.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4VNeutronHPEnergyAngular.hh,v 1.11 2007/06/06 12:45:13 ahoward Exp $
    28 // GEANT4 tag $Name:  $
     27// $Id: G4VNeutronHPEnergyAngular.hh,v 1.12 2008/07/21 23:26:29 tkoi Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
     29//
     30// 080718 Add ClearHistories() method by T. Koi
    2931//
    3032#ifndef G4VNeutronHPEnergyAngular_h
     
    8789  G4ReactionProduct theCMS;
    8890   
     91   public:
     92      virtual void ClearHistories(){;};
    8993};
    9094#endif
  • 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.