Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -119,6 +119,7 @@ public: // With description
virtual void AddSolid (const G4Ellipsoid&);
virtual void AddSolid (const G4Polycone&);
virtual void AddSolid (const G4Polyhedra&);
virtual void AddSolid (const G4TessellatedSolid&);
// For solids not above.
virtual void AddSolid (const G4VSolid&);
@@ -46,16 +46,28 @@
#include "G4Transform3D.hh"
class G4VGraphicsScene;
class G4ModelingParameters;
class G4VUserVisAction
{
public: // With description
G4VUserVisAction() {}
G4VUserVisAction()
: fpSceneHandler(nullptr)
, fpTransform(nullptr)
, fpMP(nullptr)
{}
virtual ~G4VUserVisAction() {}
virtual void Draw() = 0;
void operator()(G4VGraphicsScene&, const G4Transform3D&) {
void operator()(G4VGraphicsScene& scene, const G4Transform3D& trans, const G4ModelingParameters* pMP) {
fpSceneHandler = &scene;
fpTransform = &trans;
fpMP = pMP;
Draw();
}
protected:
G4VGraphicsScene* fpSceneHandler;
const G4Transform3D* fpTransform;
const G4ModelingParameters* fpMP;
};
#endif
@@ -68,7 +68,7 @@ private:
Arrow2D(G4double x1, G4double y1,
G4double x2, G4double y2,
G4double width, const G4Colour& colour);
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters* fpMp);
G4Polyline fShaftPolyline;
G4Polyline fHeadPolyline;
G4double fWidth;
@@ -105,7 +105,7 @@ private:
const G4String& date):
fpVisManager(vm), fSize(size),
fX(x), fY(y), fLayout(layout), fDate(date) {}
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
G4VisManager* fpVisManager;
G4Timer fTimer;
G4int fSize;
@@ -137,12 +137,14 @@ public:
private:
G4VisCommandSceneAddEventID (const G4VisCommandSceneAddEventID&);
G4VisCommandSceneAddEventID& operator = (const G4VisCommandSceneAddEventID&);
enum ForWhat {forEndOfEvent, forEndOfRun};
struct EventID {
EventID(G4VisManager* vm, G4int size,
G4double x, G4double y, G4Text::Layout layout):
fpVisManager(vm), fSize(size),
fX(x), fY(y), fLayout(layout) {}
void operator()(G4VGraphicsScene&, const G4Transform3D&);
EventID(ForWhat w, G4VisManager* vm, G4int size,
G4double x, G4double y, G4Text::Layout layout):
fForWhat(w), fpVisManager(vm), fSize(size),
fX(x), fY(y), fLayout(layout) {}
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
ForWhat fForWhat;
G4VisManager* fpVisManager;
G4int fSize;
G4double fX, fY;
@@ -164,7 +166,7 @@ private:
Extent(G4double xmin, G4double xmax,
G4double ymin, G4double ymax,
G4double zmin, G4double zmax);
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
G4VisExtent fExtent;
};
G4UIcommand* fpCommand;
@@ -194,7 +196,7 @@ private:
struct Frame {
Frame(G4double size, G4double width, const G4Colour& colour):
fSize(size), fWidth(width), fColour(colour) {}
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
G4double fSize;
G4double fWidth;
G4Colour fColour;
@@ -252,7 +254,7 @@ private:
Line(G4double x1, G4double y1, G4double z1,
G4double x2, G4double y2, G4double z2,
G4double width, const G4Colour& colour);
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
G4Polyline fPolyline;
G4double fWidth;
G4Colour fColour;
@@ -273,7 +275,7 @@ private:
Line2D(G4double x1, G4double y1,
G4double x2, G4double y2,
G4double width, const G4Colour& colour);
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
G4Polyline fPolyline;
G4double fWidth;
G4Colour fColour;
@@ -308,7 +310,7 @@ private:
struct G4Logo {
G4Logo(G4double height, const G4VisAttributes&);
~G4Logo();
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
private:
G4VisAttributes fVisAtts;
G4Polyhedron *fpG, *fp4;
@@ -331,7 +333,7 @@ private:
G4double x, G4double y, G4Text::Layout layout):
fpVisManager(vm), fSize(size),
fX(x), fY(y), fLayout(layout) {}
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
G4VisManager* fpVisManager;
G4int fSize;
G4double fX, fY;
@@ -399,7 +401,7 @@ private:
G4VisCommandSceneAddText2D& operator = (const G4VisCommandSceneAddText2D&);
struct G4Text2D {
G4Text2D(const G4Text&);
void operator()(G4VGraphicsScene&, const G4Transform3D&);
void operator()(G4VGraphicsScene&, const G4Transform3D&, const G4ModelingParameters*);
private:
G4Text fText;
};
@@ -406,6 +406,8 @@ public: // With description
G4bool GetTransientsDrawnThisEvent () const;
G4bool GetDrawEventOnlyIfToBeKept () const;
const G4Event* GetRequestedEvent () const;
G4int GetNKeepRequests () const;
G4bool GetReviewingKeptEvents () const;
G4bool GetAbortReviewKeptEvents () const;
const G4ViewParameters& GetDefaultViewParameters () const;
#ifdef G4MULTITHREADED
@@ -429,6 +431,7 @@ public: // With description
void SetDrawEventOnlyIfToBeKept (G4bool);
// If non-zero, requested event is used in G4VSceneHandler::ProcessScene.
void SetRequestedEvent (const G4Event*);
void SetReviewingKeptEvents (G4bool);
void SetAbortReviewKeptEvents (G4bool);
void SetDefaultViewParameters (const G4ViewParameters&);
#ifdef G4MULTITHREADED
@@ -525,6 +528,7 @@ private:
G4bool fKeptLastEvent;
G4bool fDrawEventOnlyIfToBeKept;
const G4Event* fpRequestedEvent; // If non-zero, scene handler uses.
G4bool fReviewingKeptEvents;
G4bool fAbortReviewKeptEvents;
G4ViewParameters fDefaultViewParameters;
G4bool fIsDrawGroup;
@@ -94,6 +94,14 @@ inline const G4Event* G4VisManager::GetRequestedEvent() const {
return fpRequestedEvent;
}
inline G4int G4VisManager::GetNKeepRequests () const {
return fNKeepRequests;
}
inline G4bool G4VisManager::GetReviewingKeptEvents() const {
return fReviewingKeptEvents;
}
inline G4bool G4VisManager::GetAbortReviewKeptEvents() const {
return fAbortReviewKeptEvents;
}
@@ -151,6 +159,9 @@ inline void G4VisManager::SetRequestedEvent (const G4Event* event) {
fpRequestedEvent = event;
}
inline void G4VisManager::SetReviewingKeptEvents (G4bool reveiwing) {
fReviewingKeptEvents = reveiwing;
}
inline void G4VisManager::SetAbortReviewKeptEvents (G4bool abort) {
fAbortReviewKeptEvents = abort;
}