Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
@@ -38,14 +38,14 @@
// screen or remake a graphical database whenever required. The
// function class must contain:
//
// void operator()(G4VGraphicsScene&, const G4Transform3D&)
// void operator()(G4VGraphicsScene&,const G4ModelingParameters*)
//
// A base class G4VUserVisAction is provided in the visualisation
// category. A G4CallbackModel is made by instantiating this template
// with a pointer to the function object. The G4VisManager does this
// for the user if he/she registers it (SetUserAction) and issues the
// for the user if he/she registers it (Register*UserVisAction) and issues the
// command /vis/scene/add/userAction. See the User Guide for
// Application Developers, Section 8.8.7 and 8.8.8.
// Application Developers.
#ifndef G4CALLBACKMODEL_HH
#define G4CALLBACKMODEL_HH
@@ -62,6 +62,11 @@ public: // With description
cloud // Draw as a cloud of points
};
enum CutawayMode {
cutawayUnion, // Union (addition) of result of each cutaway plane.
cutawayIntersection // Intersection (multiplication).
};
// enums and nested class for communicating a modification to the vis
// attributes for a specfic touchable defined by PVNameCopyNoPath.
enum VisAttributesSignifier {
@@ -174,6 +179,7 @@ public: // With description
const G4Point3D& GetExplodeCentre () const;
G4int GetNoOfSides () const;
G4DisplacedSolid* GetSectionSolid () const;
CutawayMode GetCutawayMode () const;
G4DisplacedSolid* GetCutawaySolid () const;
const G4Event* GetEvent () const;
const std::vector<VisAttributesModifier>& GetVisAttributesModifiers() const;
@@ -196,6 +202,7 @@ public: // With description
void SetExplodeCentre (const G4Point3D& explodeCentre);
G4int SetNoOfSides (G4int); // Returns actual number set.
void SetSectionSolid (G4DisplacedSolid* pSectionSolid);
void SetCutawayMode (CutawayMode);
void SetCutawaySolid (G4DisplacedSolid* pCutawaySolid);
void SetEvent (const G4Event* pEvent);
void SetVisAttributesModifiers(const std::vector<VisAttributesModifier>&);
@@ -234,6 +241,7 @@ private:
G4Point3D fExplodeCentre; // ...about this centre.
G4int fNoOfSides; // ...if polygon approximates circle.
G4DisplacedSolid* fpSectionSolid; // For generic section (DCUT).
CutawayMode fCutawayMode; // Cutaway mode.
G4DisplacedSolid* fpCutawaySolid; // For generic cutaways.
const G4Event* fpEvent; // Event being processed.
std::vector<VisAttributesModifier> fVisAttributesModifiers;
@@ -94,6 +94,9 @@ inline G4int G4ModelingParameters::GetNoOfSides () const {
inline G4DisplacedSolid* G4ModelingParameters::GetSectionSolid () const
{return fpSectionSolid;}
inline G4ModelingParameters::CutawayMode G4ModelingParameters::GetCutawayMode () const
{ return fCutawayMode;}
inline G4DisplacedSolid* G4ModelingParameters::GetCutawaySolid () const
{return fpCutawaySolid;}
@@ -164,6 +167,11 @@ inline void G4ModelingParameters::SetExplodeCentre
fExplodeCentre = explodeCentre;
}
inline void G4ModelingParameters::SetCutawayMode
(G4ModelingParameters::CutawayMode cutawayMode) {
fCutawayMode = cutawayMode;
}
inline void G4ModelingParameters::SetEvent(const G4Event* pEvent) {
fpEvent = pEvent;
}
@@ -223,7 +223,11 @@ public: // With description
static G4ModelingParameters::PVNameCopyNoPath GetPVNameCopyNoPath
(const std::vector<G4PhysicalVolumeNodeID>&);
// Converts
// Converts to PVNameCopyNoPath
static G4String GetPVNamePathString(const std::vector<G4PhysicalVolumeNodeID>&);
// Converts to path string, e.g., " World 0 Envelope 0 Shape1 0".
// Note leading space character.
const std::map<G4String,G4AttDef>* GetAttDefs() const;
// Attribute definitions for current solid.
@@ -304,6 +308,7 @@ protected:
mutable G4bool fCurtailDescent;// Can be set to curtail descent.
G4VSolid* fpClippingSolid;
ClippingMode fClippingMode;
G4int fNClippers; // No of clipping/cutting solids - only 0 or 1 allowed
private:
@@ -51,11 +51,13 @@ class G4PseudoScene: public G4VGraphicsScene {
public:
G4PseudoScene(): fpCurrentObjectTransformation(0) {}
virtual ~G4PseudoScene () {}
G4PseudoScene() = default;
virtual ~G4PseudoScene() = default;
void PreAddSolid (const G4Transform3D& objectTransformation,
const G4VisAttributes&)
{fpCurrentObjectTransformation = &objectTransformation;}
const G4VisAttributes& visAttributes) {
fpCurrentObjectTransformation = &objectTransformation;
fpVisAttributes = &visAttributes;
}
void PostAddSolid () {}
// From geometry/solids/CSG
void AddSolid (const G4Box& solid) {ProcessVolume (solid);}
@@ -98,7 +100,8 @@ public:
protected:
virtual void ProcessVolume (const G4VSolid&);
const G4Transform3D* fpCurrentObjectTransformation;
const G4Transform3D* fpCurrentObjectTransformation = nullptr;
const G4VisAttributes* fpVisAttributes = nullptr;
};
#endif
@@ -34,8 +34,6 @@
// graphics-system-indepedent description of a Geant4 component.
// The key fuctionality of a model is to know how to describe itself
// to a scene handler. A scene is a collection of models.
// A special case is made for G4PhysicalVolumeModel - a non-null pointer
// is to be returned by G4PhysicalVolumeModel::GetG4PhysicalVolumeModel().
#ifndef G4VMODEL_HH
#define G4VMODEL_HH
@@ -46,8 +44,6 @@
class G4VGraphicsScene;
class G4ModelingParameters;
class G4PhysicalVolumeModel; // Special case - see above.
class G4VModel {
public: // With description