Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
@@ -31,8 +31,9 @@
#ifndef G4VParticleHPEnergyAngular_h
#define G4VParticleHPEnergyAngular_h 1
#include "G4ios.hh"
#include <fstream>
#include "G4ios.hh"
#include "globals.hh"
#include "G4ReactionProduct.hh"
#include "G4Cache.hh"
@@ -40,37 +41,39 @@
class G4VParticleHPEnergyAngular
{
struct toBeCached {
struct toBeCached
{
G4ReactionProduct* theProjectileRP;
G4ReactionProduct* theTarget;
G4ReactionProduct* theCMS;
toBeCached() : theProjectileRP(NULL),theTarget(NULL),theCMS(NULL) {};
toBeCached() : theProjectileRP(0),theTarget(0),theCMS(0) {};
};
public:
public:
G4VParticleHPEnergyAngular()
{
//theTarget = 0;
//theProjectileRP = 0;
theQValue=0;
toBeCached val;
fCache.Put( val );
toBeCached val;
fCache.Put( val );
}
virtual ~G4VParticleHPEnergyAngular()
{
}
virtual ~G4VParticleHPEnergyAngular(){}
public:
public:
virtual void Init(std::istream & aDataFile) = 0;
virtual G4ReactionProduct * Sample(G4double anEnergy,
G4double massCode,
G4double mass) = 0;
virtual G4double MeanEnergyOfThisInteraction() = 0; // returns value cashed in sample
virtual G4double MeanEnergyOfThisInteraction() = 0;
// returns value cashed in sample
void SetProjectileRP(G4ReactionProduct * aIncidentParticleRP)
{
fCache.Get().theProjectileRP = aIncidentParticleRP;
//if(fCache.Get().theTarget!=0) theCMS = *fCache.Get().theProjectileRP+*fCache.Get().theTarget;
}
void SetTarget(G4ReactionProduct * aTarget)
@@ -78,30 +81,40 @@ class G4VParticleHPEnergyAngular
fCache.Get().theTarget = aTarget;
}
G4ReactionProduct * GetTarget() { return fCache.Get().theTarget; }
G4ReactionProduct * GetTarget()
{
return fCache.Get().theTarget;
}
G4ReactionProduct * GetProjectileRP() { return fCache.Get().theProjectileRP; }
G4ReactionProduct * GetProjectileRP()
{
return fCache.Get().theProjectileRP;
}
G4ReactionProduct * GetCMS() {
*fCache.Get().theCMS = *fCache.Get().theProjectileRP + *fCache.Get().theTarget;
return fCache.Get().theCMS; }
G4ReactionProduct * GetCMS()
{
*fCache.Get().theCMS = *fCache.Get().theProjectileRP
+ *fCache.Get().theTarget;
return fCache.Get().theCMS;
}
inline void SetQValue(G4double aValue) { theQValue = aValue; }
inline void SetQValue(G4double aValue)
{
theQValue = aValue;
}
virtual void ClearHistories()
{
}
protected:
protected:
inline G4double GetQValue() { return theQValue; }
private:
private:
G4double theQValue;
//G4ReactionProduct * theTarget;
//G4ReactionProduct * theProjectileRP;
//G4ReactionProduct theCMS;
G4Cache<toBeCached> fCache;
public:
virtual void ClearHistories(){;};
G4Cache<toBeCached> fCache;
};
#endif