Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -23,37 +23,31 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4AdjointPrimaryGenerator
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointPrimaryGenerator
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
// Class description:
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// November 2009 creation by L. Desorgher, Splitting of G4AdjointPrimaryGeneratorAction in two classes G4AdjointPrimaryGeneratorAction and G4AdjointPrimaryGenerator
//
//-------------------------------------------------------------
// Documentation:
// This class represents the Primary Generator that generate vertex (energy,position and direction) of primary adjoint particles.
// It is used by G4AdjointPrimaryGeneratorAction. If the adjoint source is selected by the user as being on the external boundary of a volume
// it uses the class G4AdjointPosOnPhysVolGenerator to generate the vertex positions and directions. Otherwise G4SingleParticleSource is used.
//
//
//
#ifndef G4AdjointPrimaryGenerator_h
#define G4AdjointPrimaryGenerator_h 1
#include "globals.hh"
#include"G4ThreeVector.hh"
// This class represents the Primary Generator that generates vertex
// (energy, position and direction) of primary adjoint particles.
// It is used by G4AdjointPrimaryGeneratorAction. If the adjoint source is
// selected by the user as being on the external boundary of a volume,
// it uses the class G4AdjointPosOnPhysVolGenerator to generate the vertex
// positions and directions. Otherwise G4SingleParticleSource is used.
// Author: L. Desorgher, SpaceIT GmbH - November 2009
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
// --------------------------------------------------------------------
#ifndef G4AdjointPrimaryGenerator_hh
#define G4AdjointPrimaryGenerator_hh 1
#include <vector>
#include <map>
#include <iterator>
#include"G4PhysicsOrderedFreeVector.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
#include"G4PhysicsOrderedFreeVector.hh"
class G4AdjointPosOnPhysVolGenerator;
class G4Event;
@@ -61,49 +55,50 @@ class G4SingleParticleSource;
class G4ParticleDefinition;
class G4Navigator;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
class G4AdjointPrimaryGenerator
{ public:
{
public:
G4AdjointPrimaryGenerator();
~G4AdjointPrimaryGenerator();
public: //public methods
G4AdjointPrimaryGenerator(const G4AdjointPrimaryGenerator&) = delete;
G4AdjointPrimaryGenerator& operator=(const G4AdjointPrimaryGenerator&) = delete;
public:
void GenerateAdjointPrimaryVertex(G4Event* anEvt,G4ParticleDefinition* adj_part,G4double E1,G4double E2);
void GenerateFwdPrimaryVertex(G4Event* anEvt,G4ParticleDefinition* adj_part,G4double E1,G4double E2);
void GenerateAdjointPrimaryVertex(G4Event* anEvt,
G4ParticleDefinition* adj_part,
G4double E1, G4double E2);
void GenerateFwdPrimaryVertex(G4Event* anEvt,
G4ParticleDefinition* adj_part,
G4double E1, G4double E2);
void SetSphericalAdjointPrimarySource(G4double radius, G4ThreeVector pos);
void SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(const G4String& volume_name);
void SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(const G4String& v_name);
void ComputeAccumulatedDepthVectorAlongBackRay(G4ThreeVector glob_pos,
G4ThreeVector direction,
G4double ekin,
G4ParticleDefinition* aPartDef);
G4ParticleDefinition* aPDef);
G4double SampleDistanceAlongBackRayAndComputeWeightCorrection(G4double& weight_corr);
private: //attributes
private: // attributes
//The class responsible for the random generation of positions and direction of primaries for adjoint source set on the external surface of
//a G4 volume
G4AdjointPosOnPhysVolGenerator* theG4AdjointPosOnPhysVolGenerator;
// The class responsible for the random generation of positions
// and direction of primaries for adjoint source set on the external
// surface of a G4 volume
//
G4AdjointPosOnPhysVolGenerator* theG4AdjointPosOnPhysVolGenerator = nullptr;
G4SingleParticleSource* theSingleParticleSource;
G4SingleParticleSource* theSingleParticleSource = nullptr;
//Type of adjoint source
//--------------------
G4String type_of_adjoint_source; //Spherical ExtSurfaceOfAVolume
G4double radius_spherical_source;
// Type of adjoint source
// ----------------------
G4String type_of_adjoint_source; // Spherical ExtSurfaceOfAVolume
G4double radius_spherical_source = 0.0;
G4ThreeVector center_spherical_source;
G4Navigator* fLinearNavigator;
G4PhysicsOrderedFreeVector* theAccumulatedDepthVector;
//G4PhysicsOrderedFreeVector* theAccumulatedCSDepthVector;
//Disable copy constructor and assignement operator
G4AdjointPrimaryGenerator(const G4AdjointPrimaryGenerator&);
G4AdjointPrimaryGenerator& operator=(const G4AdjointPrimaryGenerator&);
G4Navigator* fLinearNavigator = nullptr;
G4PhysicsOrderedFreeVector* theAccumulatedDepthVector = nullptr;
};
#endif
#endif