Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -38,15 +38,26 @@
#include "G4NeutronHPInterpolator.hh"
#include "G4InterpolationManager.hh"
#include "G4Cache.hh"
class G4NeutronHPContAngularPar
{
struct toBeCached {
G4bool fresh;
G4double currentMeanEnergy;
G4double remaining_energy;
toBeCached():fresh(true),currentMeanEnergy(-2),remaining_energy(0){};
};
public:
G4NeutronHPContAngularPar()
{
theAngular = 0;
currentMeanEnergy = -2;
fresh = true;
fCache.Put(NULL);
//currentMeanEnergy = -2;
//fresh = true;
}
~G4NeutronHPContAngularPar()
{
@@ -110,16 +121,16 @@ class G4NeutronHPContAngularPar
G4double MeanEnergyOfThisInteraction()
{
G4double result;
if(currentMeanEnergy<-1)
if( fCache.Get()->currentMeanEnergy<-1)
{
return 0;
// throw G4HadronicException(__FILE__, __LINE__, "G4NeutronHPContAngularPar: Logical error in Product class");
}
else
{
result = currentMeanEnergy;
result = fCache.Get()->currentMeanEnergy;
}
currentMeanEnergy = -2;
fCache.Get()->currentMeanEnergy = -2;
return result;
}
@@ -147,13 +158,25 @@ class G4NeutronHPContAngularPar
G4ReactionProduct * theTarget;
G4ReactionProduct * thePrimary;
G4double currentMeanEnergy;
//G4double currentMeanEnergy;
//080718
public:
void ClearHistories(){ fresh = true; };
private:
G4bool fresh;
G4double remaining_energy; // represent energy rest of cascade chain
//G4bool fresh;
//G4double remaining_energy; // represent energy rest of cascade chain
private:
G4Cache< toBeCached* > fCache;
void cacheInit() {
toBeCached* val = new toBeCached;
val->currentMeanEnergy = -2;
val->remaining_energy = 0;
val->fresh=true;
fCache.Put( val );
};
public:
void ClearHistories(){
if ( fCache.Get() == NULL ) cacheInit();
fCache.Get()->fresh = true; };
};
#endif