Import Geant4 11.2.0 source tree
This commit is contained in:
+23
-44
@@ -28,6 +28,7 @@
|
||||
// 080721 Add ClearHistories() method by T. Koi
|
||||
//
|
||||
// P. Arce, June-2014 Conversion neutron_hp to particle_hp
|
||||
// V. Ivanchenko, July-2023 Basic revision of particle HP classes
|
||||
//
|
||||
#ifndef G4ParticleHPContEnergyAngular_h
|
||||
#define G4ParticleHPContEnergyAngular_h 1
|
||||
@@ -43,58 +44,36 @@
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
// we will need one of these per product.
|
||||
|
||||
class G4ParticleHPContEnergyAngular : public G4VParticleHPEnergyAngular
|
||||
{
|
||||
public:
|
||||
G4ParticleHPContEnergyAngular(G4ParticleDefinition* proj) : theProjectile(proj)
|
||||
{
|
||||
theAngular = nullptr;
|
||||
currentMeanEnergy.Put(-2);
|
||||
theTargetCode = -1.0;
|
||||
theAngularRep = -1;
|
||||
nEnergy = -1;
|
||||
theInterpolation = -1;
|
||||
fCacheAngular.Put(nullptr); // fix
|
||||
}
|
||||
public:
|
||||
|
||||
~G4ParticleHPContEnergyAngular() override
|
||||
{
|
||||
delete[] theAngular;
|
||||
if (fCacheAngular.Get() != nullptr) delete fCacheAngular.Get(); // fix
|
||||
}
|
||||
G4ParticleHPContEnergyAngular(const G4ParticleDefinition* proj);
|
||||
|
||||
void Init(std::istream& aDataFile) override
|
||||
{
|
||||
aDataFile >> theTargetCode >> theAngularRep >> theInterpolation >> nEnergy;
|
||||
theAngular = new G4ParticleHPContAngularPar[nEnergy];
|
||||
theManager.Init(aDataFile);
|
||||
for (G4int i = 0; i < nEnergy; i++) {
|
||||
theAngular[i].Init(aDataFile, theProjectile);
|
||||
theAngular[i].SetInterpolation(theInterpolation);
|
||||
#ifndef PHP_AS_HP
|
||||
theAngular[i].PrepareTableInterpolation();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
~G4ParticleHPContEnergyAngular() override;
|
||||
|
||||
G4double MeanEnergyOfThisInteraction() override;
|
||||
G4ReactionProduct* Sample(G4double anEnergy, G4double massCode, G4double mass) override;
|
||||
void ClearHistories() override;
|
||||
void Init(std::istream& aDataFile) override;
|
||||
|
||||
private:
|
||||
G4double theTargetCode;
|
||||
G4int theAngularRep;
|
||||
G4int nEnergy;
|
||||
G4double MeanEnergyOfThisInteraction() override;
|
||||
G4ReactionProduct* Sample(G4double anEnergy, G4double massCode, G4double mass) override;
|
||||
void ClearHistories() override;
|
||||
|
||||
G4int theInterpolation;
|
||||
G4ParticleHPContEnergyAngular(G4ParticleHPContEnergyAngular&) = delete;
|
||||
G4ParticleHPContEnergyAngular& operator=
|
||||
(const G4ParticleHPContEnergyAngular& right) = delete;
|
||||
|
||||
G4InterpolationManager theManager; // knows the interpolation between stores
|
||||
G4ParticleHPContAngularPar* theAngular;
|
||||
private:
|
||||
G4double theTargetCode{-1};
|
||||
G4int theAngularRep{-1};
|
||||
G4int nEnergy{-1};
|
||||
G4int theInterpolation{-1};
|
||||
|
||||
G4Cache<G4double> currentMeanEnergy;
|
||||
G4Cache<G4ParticleHPContAngularPar*> fCacheAngular; // fix
|
||||
G4ParticleDefinition* theProjectile;
|
||||
G4InterpolationManager theManager; // knows the interpolation between stores
|
||||
G4ParticleHPContAngularPar* theAngular;
|
||||
|
||||
G4Cache<G4double> currentMeanEnergy;
|
||||
G4Cache<G4ParticleHPContAngularPar*> fCacheAngular;
|
||||
const G4ParticleDefinition* theProjectile;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user