Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (15 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

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

Legend:

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

    r962 r1055  
    3636//        introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
    3737// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
     38// 090514 Fix bug in IC electron emission case
     39//        Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu)
    3840//
    3941#include "G4NeutronHPInelasticCompFS.hh"
     
    6971void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
    7072{
     73
    7174  gammaPath = "/Inelastic/Gammas/";
    7275    if(!getenv("G4NEUTRONHPDATA"))
     
    460463
    461464      aHadron.SetMomentum( Vector*p );
    462                                      
     465
    463466    }
    464467
     
    577580      {
    578581        theSec = new G4DynamicParticle;   
    579         theSec->SetDefinition(G4Gamma::Gamma());
     582        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
     583        //theSec->SetDefinition(G4Gamma::Gamma());
     584        theSec->SetDefinition( thePhotons->operator[](i)->GetDefinition() );
     585        //But never cause real effect at least with G4NDL3.13 TK
    580586        theSec->SetMomentum(thePhotons->operator[](i)->GetMomentum());
    581587        theResult.AddSecondary(theSec);
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc

    r962 r1055  
    3636// 080801 Correcting data disorder which happened when both InitPartial
    3737//        and InitAnglurar methods was called in a same instance by T. Koi
     38// 090514 Fix bug in IC electron emission case
     39//        Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu)
     40//        But it looks like never cause real effect in G4NDL3.13 (at least Natural elements) TK
    3841//
    3942// there is a lot of unused (and undebugged) code in this file. Kept for the moment just in case. @@
     
    4851G4bool G4NeutronHPPhotonDist::InitMean(std::ifstream & aDataFile)
    4952{
     53
    5054  G4bool result = true;
    5155  if(aDataFile >> repFlag)
    5256  {
     57
    5358    aDataFile >> targetMass;
    5459    if(repFlag==1)
     
    7378       theBaseEnergy*=eV;
    7479       aDataFile >> theInternalConversionFlag;
     80       // theInternalConversionFlag == 1 No IC, theInternalConversionFlag == 2 with IC
    7581       aDataFile >> nGammaEnergies;
    7682       theLevelEnergies = new G4double[nGammaEnergies];
     
    118124  if (isoFlag != 1)
    119125  {
     126if ( repFlag == 2 ) G4cout << "TKDB repFlag == 2 && isoFlag !=1  " << G4endl;
    120127    aDataFile >> tabulationType >> nDiscrete2 >> nIso;
    121128//080731
     
    547554    {
    548555      theOne->SetDefinition(G4Electron::Electron());
     556      //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
     557      //But never enter at least with G4NDL3.13
     558      totalEnergy += G4Electron::Electron()->GetPDGMass(); //proposed correction: add this line for electron
    549559    }
    550560    theOne->SetTotalEnergy(totalEnergy);
    551     if( isoFlag == 1)
     561    if( isoFlag == 1 )
    552562    {
    553563      G4double costheta = 2.*G4UniformRand()-1;
     
    555565      G4double phi = twopi*G4UniformRand();
    556566      G4double sinth = std::sin(theta);
    557       G4double en = theOne->GetTotalEnergy();
     567      //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
     568      //G4double en = theOne->GetTotalEnergy();
     569      G4double en = theOne->GetTotalMomentum();
     570      //But never cause real effect at least with G4NDL3.13 TK
    558571      G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
    559572      theOne->SetMomentum( temp ) ;
     
    569582      if(ii<nIso)
    570583      {
     584        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
    571585        // isotropic distribution
    572         G4double theta = pi*G4UniformRand();
     586        //G4double theta = pi*G4UniformRand();
     587        G4double theta = std::acos(2.*G4UniformRand()-1.);
     588        //But this is alos never cause real effect at least with G4NDL3.13 TK  not repFlag == 2 AND isoFlag != 1
    573589        G4double phi = twopi*G4UniformRand();
    574590        G4double sinth = std::sin(theta);
    575         G4double en = theOne->GetTotalEnergy();
     591        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
     592        //G4double en = theOne->GetTotalEnergy();
     593        G4double en = theOne->GetTotalMomentum();
     594        //But never cause real effect at least with G4NDL3.13 TK
    576595        G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
    577596        theOne->SetMomentum( tempVector ) ;
     
    594613        G4double phi = twopi*G4UniformRand();
    595614        G4double sinth = std::sin(theta);
    596         G4double en = theOne->GetTotalEnergy();
     615        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
     616        //G4double en = theOne->GetTotalEnergy();
     617        G4double en = theOne->GetTotalMomentum();
     618        //But never cause real effect at least with G4NDL3.13 TK
    597619        G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
    598620        theOne->SetMomentum( tempVector ) ;
     
    612634        G4double phi = twopi*G4UniformRand();
    613635        G4double sinth = std::sin(theta);
    614         G4double en = theOne->GetTotalEnergy();
     636        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
     637        //G4double en = theOne->GetTotalEnergy();
     638        G4double en = theOne->GetTotalMomentum();
     639        //But never cause real effect at least with G4NDL3.13 TK
    615640        G4ThreeVector tmpVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*costh );
    616641        theOne->SetMomentum( tmpVector ) ;
Note: See TracChangeset for help on using the changeset viewer.