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,34 +23,23 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4AdjointCrossSurfChecker
//
/////////////////////////////////////////////////////////////////////////////////
// Class Name: G4AdjointCrossSurfChecker
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 15 January 2007 creation by L. Desorgher
// - 01/11/2009 Some cleaning and adding of documentation for the
// first Release in the Geant4 toolkit, L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
// This class is responsible for checking the crossing of a surface
// that could be the external boundary of a volume or the external
// surface of a sphere.
// It is used to check if an adjoint particle reaches the external
// surface or reenter the sensitive region delimited by the adjoint
// source.
// Class Description:
//
// This class is responsible for checking the crossing of a surface
// that could be the external boundary of a volume or the external
// surface of a sphere.
// It is used to check if an adjoint particle reaches the external
// surface or reenter the sensitive region delimited by the adjoint
// source.
#ifndef G4AdjointCrossSurfChecker_h
#define G4AdjointCrossSurfChecker_h 1
// Author: L. Desorgher, SpaceIT GmbH - 15 January 2007
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
//---------------------------------------------------------------------
#ifndef G4AdjointCrossSurfChecker_hh
#define G4AdjointCrossSurfChecker_hh 1
#include "globals.hh"
#include "G4ThreeVector.hh"
@@ -58,49 +47,92 @@
class G4Step;
class G4AdjointCrossSurfChecker
{
public:
public:
static G4AdjointCrossSurfChecker* GetInstance();
static G4AdjointCrossSurfChecker* GetInstance();
public:
G4bool CrossingASphere(const G4Step* aStep,G4double sphere_radius, G4ThreeVector sphere_center,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
G4bool GoingInOrOutOfaVolume(const G4Step* aStep,const G4String& volume_name, G4double& cos_to_surface, G4bool& GoingIn);
G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step* aStep,const G4String& volume_name,const G4String& mother_log_vol_name, G4double& cos_to_surface, G4bool& GoingIn);
G4bool CrossingASphere(const G4Step* aStep,
G4double sphere_radius,
G4ThreeVector sphere_center,
G4ThreeVector& cross_pos,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep,const G4String& surface_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep, int ind,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
G4bool CrossingOneOfTheRegisteredSurface(const G4Step* aStep,G4String& surface_name,G4ThreeVector& crossing_pos,G4double& cos_to_surface, G4bool& GoingIn);
G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step* aStep,const G4String& vol1_name,const G4String& vol2_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
G4bool AddaSphericalSurface(const G4String& SurfaceName, G4double radius, G4ThreeVector pos,G4double& area);
G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String& SurfaceName, G4double radius, const G4String& volume_name, G4ThreeVector& center, G4double& area);
G4bool AddanExtSurfaceOfAvolume(const G4String& SurfaceName,const G4String& volume_name,G4double& area);
G4bool AddanInterfaceBetweenTwoVolumes(const G4String& SurfaceName, const G4String& volume_name1, const G4String& volume_name2,G4double& area);
void ClearListOfSelectedSurface();
private:
G4AdjointCrossSurfChecker();
~G4AdjointCrossSurfChecker();
G4int FindRegisteredSurface(const G4String& name);
private:
static G4ThreadLocal G4AdjointCrossSurfChecker* instance;
std::vector<G4String> ListOfSurfaceName;
std::vector<G4String> ListOfSurfaceType;
std::vector<G4double> ListOfSphereRadius;
std::vector<G4ThreeVector> ListOfSphereCenter;
std::vector<G4String> ListOfVol1Name;
std::vector<G4String> ListOfVol2Name;
std::vector<G4double> AreaOfSurface;
G4bool GoingInOrOutOfaVolume(const G4Step* aStep,
const G4String& volume_name,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step* aStep,
const G4String& volume_name,
const G4String& mother_lvol_name,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep,
const G4String& surface_name,
G4ThreeVector& cross_pos,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep,
G4int ind,
G4ThreeVector& cross_pos,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool CrossingOneOfTheRegisteredSurface(const G4Step* aStep,
G4String& surface_name,
G4ThreeVector& cross_pos,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step* aStep,
const G4String& vol1_name,
const G4String& vol2_name,
G4ThreeVector& cross_pos,
G4double& cos_to_surface,
G4bool& GoingIn);
G4bool AddaSphericalSurface(const G4String& SurfaceName,
G4double radius,
G4ThreeVector pos,
G4double& area);
G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(
const G4String& SurfaceName,
G4double radius,
const G4String& volume_name,
G4ThreeVector& center,
G4double& area);
G4bool AddanExtSurfaceOfAvolume(const G4String& SurfaceName,
const G4String& volume_name,
G4double& area);
G4bool AddanInterfaceBetweenTwoVolumes(const G4String& SurfaceName,
const G4String& volume_name1,
const G4String& volume_name2,
G4double& area);
void ClearListOfSelectedSurface();
private:
G4AdjointCrossSurfChecker();
~G4AdjointCrossSurfChecker();
G4int FindRegisteredSurface(const G4String& name);
private:
static G4ThreadLocal G4AdjointCrossSurfChecker* instance;
std::vector<G4String> ListOfSurfaceName;
std::vector<G4String> ListOfSurfaceType;
std::vector<G4double> ListOfSphereRadius;
std::vector<G4ThreeVector> ListOfSphereCenter;
std::vector<G4String> ListOfVol1Name;
std::vector<G4String> ListOfVol2Name;
std::vector<G4double> AreaOfSurface;
};
#endif