Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AxesModel.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4AxesModel.hh 83403 2014-08-21 15:07:30Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 3rd April 2001
|
||||
@@ -51,7 +51,8 @@ public: // With description
|
||||
G4double arrowWidth = 1.,
|
||||
const G4String& colourString = "auto",
|
||||
const G4String& description = "",
|
||||
G4bool withAnnotation = true
|
||||
G4bool withAnnotation = true,
|
||||
G4double textSize = 10.
|
||||
);
|
||||
|
||||
virtual ~G4AxesModel ();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BoundingSphereScene.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4BoundingSphereScene.hh 81056 2014-05-20 09:02:16Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 7th June 1997
|
||||
@@ -33,46 +33,23 @@
|
||||
#ifndef G4BOUNDINGSPHERESCENE_HH
|
||||
#define G4BOUNDINGSPHERESCENE_HH
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4PseudoScene.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
|
||||
class G4VModel;
|
||||
|
||||
class G4BoundingSphereScene: public G4VGraphicsScene {
|
||||
class G4BoundingSphereScene: public G4PseudoScene {
|
||||
|
||||
public:
|
||||
|
||||
G4BoundingSphereScene (G4VModel* pModel = 0);
|
||||
|
||||
virtual ~G4BoundingSphereScene ();
|
||||
void PreAddSolid (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes&);
|
||||
void PostAddSolid () {}
|
||||
void AddSolid (const G4Box& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Cons& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Tubs& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Trd& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Trap& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Sphere& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Para& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Torus& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Polycone& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4Polyhedra& solid) {Accrue (solid);}
|
||||
void AddSolid (const G4VSolid& solid) {Accrue (solid);}
|
||||
void AddCompound (const G4VTrajectory&) {}
|
||||
void AddCompound (const G4VHit&) {}
|
||||
void AddCompound (const G4VDigi&) {}
|
||||
void AddCompound (const G4THitsMap<G4double>&) {}
|
||||
|
||||
G4VisExtent GetBoundingSphereExtent ();
|
||||
|
||||
const G4Point3D& GetCentre() const {return fCentre;}
|
||||
|
||||
G4double GetRadius() const {return fRadius;}
|
||||
|
||||
void SetCentre(const G4Point3D& centre) {fCentre = centre;}
|
||||
@@ -86,27 +63,13 @@ public:
|
||||
void AccrueBoundingSphere (const G4Point3D& centre,
|
||||
G4double radius);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Functions not used by required by the abstract interface.
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D&) {}
|
||||
virtual void EndPrimitives () {}
|
||||
virtual void BeginPrimitives2D (const G4Transform3D&) {}
|
||||
virtual void EndPrimitives2D () {}
|
||||
virtual void AddPrimitive (const G4Polyline&) {}
|
||||
virtual void AddPrimitive (const G4Scale&) {}
|
||||
virtual void AddPrimitive (const G4Text&) {}
|
||||
virtual void AddPrimitive (const G4Circle&) {}
|
||||
virtual void AddPrimitive (const G4Square&) {}
|
||||
virtual void AddPrimitive (const G4Polymarker&) {}
|
||||
virtual void AddPrimitive (const G4Polyhedron&) {}
|
||||
|
||||
private:
|
||||
void Accrue (const G4VSolid& solid);
|
||||
|
||||
void ProcessVolume (const G4VSolid& solid);
|
||||
|
||||
G4VModel* fpModel; // Instantiating code may optionally set this.
|
||||
G4Point3D fCentre;
|
||||
G4double fRadius;
|
||||
const G4Transform3D* fpObjectTransformation;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ModelingParameters.hh 77479 2013-11-25 10:01:22Z gcosmo $
|
||||
// $Id: G4ModelingParameters.hh 81056 2014-05-20 09:02:16Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -74,6 +74,7 @@ public: // With description
|
||||
VASForceAuxEdgeVisible,
|
||||
VASForceLineSegmentsPerCircle
|
||||
};
|
||||
|
||||
class PVNameCopyNo {
|
||||
public:
|
||||
PVNameCopyNo(G4String name, G4int copyNo):
|
||||
@@ -88,6 +89,7 @@ public: // With description
|
||||
};
|
||||
typedef std::vector<PVNameCopyNo> PVNameCopyNoPath;
|
||||
typedef PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator;
|
||||
|
||||
class VisAttributesModifier {
|
||||
public:
|
||||
VisAttributesModifier
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeModel.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4PhysicalVolumeModel.hh 81056 2014-05-20 09:02:16Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -219,7 +219,11 @@ public: // With description
|
||||
G4bool Validate (G4bool warn);
|
||||
// Validate, but allow internal changes (hence non-const function).
|
||||
|
||||
void CurtailDescent() {fCurtailDescent = true;}
|
||||
void Abort () const {fAbort = true;}
|
||||
// Abort all further traversing.
|
||||
|
||||
void CurtailDescent() const {fCurtailDescent = true;}
|
||||
// Curtail descent of current branch.
|
||||
|
||||
protected:
|
||||
|
||||
@@ -260,7 +264,8 @@ protected:
|
||||
std::vector<G4PhysicalVolumeNodeID> fBaseFullPVPath;
|
||||
std::vector<G4PhysicalVolumeNodeID> fFullPVPath;
|
||||
std::vector<G4PhysicalVolumeNodeID> fDrawnPVPath;
|
||||
G4bool fCurtailDescent;// Can be set to curtail descent.
|
||||
mutable G4bool fAbort; // Abort all further traversing.
|
||||
mutable G4bool fCurtailDescent;// Can be set to curtail descent.
|
||||
G4VSolid* fpClippingSolid;
|
||||
ClippingMode fClippingMode;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeSearchScene.hh 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
// $Id: G4PhysicalVolumeSearchScene.hh 81056 2014-05-20 09:02:16Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 10th August 1998.
|
||||
@@ -33,77 +33,42 @@
|
||||
#ifndef G4PHYSICALVOLUMESEARCHSCENE_HH
|
||||
#define G4PHYSICALVOLUMESEARCHSCENE_HH
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4PseudoScene.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
class G4PhysicalVolumeSearchScene: public G4VGraphicsScene {
|
||||
class G4PhysicalVolumeSearchScene: public G4PseudoScene {
|
||||
|
||||
public:
|
||||
|
||||
G4PhysicalVolumeSearchScene
|
||||
(G4PhysicalVolumeModel*,
|
||||
const G4String& requiredPhysicalVolumeName,
|
||||
G4int requiredCopyNo,
|
||||
G4int verbosity = 99);
|
||||
|
||||
virtual ~G4PhysicalVolumeSearchScene ();
|
||||
void PreAddSolid (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes&);
|
||||
void PostAddSolid ();
|
||||
void AddSolid (const G4Box& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Cons & solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Tubs& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Trd& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Trap& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Sphere& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Para& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Torus& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Polycone& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4Polyhedra& solid) {FindVolume (solid);}
|
||||
void AddSolid (const G4VSolid& solid) {FindVolume (solid);}
|
||||
void AddCompound (const G4VTrajectory&) {}
|
||||
void AddCompound (const G4VHit&) {}
|
||||
void AddCompound (const G4VDigi&) {}
|
||||
void AddCompound (const G4THitsMap<G4double>&) {}
|
||||
|
||||
|
||||
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>&
|
||||
GetFoundFullPVPath () const;
|
||||
G4int GetFoundDepth () const;
|
||||
G4VPhysicalVolume* GetFoundVolume () const;
|
||||
const G4Transform3D& GetFoundTransformation () const;
|
||||
GetFoundFullPVPath() const
|
||||
{return fFoundFullPVPath;}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Functions not used but required by the abstract interface.
|
||||
G4int GetFoundDepth() const {return fFoundDepth;}
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D&) {}
|
||||
virtual void EndPrimitives () {}
|
||||
virtual void BeginPrimitives2D (const G4Transform3D&) {}
|
||||
virtual void EndPrimitives2D () {}
|
||||
virtual void AddPrimitive (const G4Polyline&) {}
|
||||
virtual void AddPrimitive (const G4Scale&) {}
|
||||
virtual void AddPrimitive (const G4Text&) {}
|
||||
virtual void AddPrimitive (const G4Circle&) {}
|
||||
virtual void AddPrimitive (const G4Square&) {}
|
||||
virtual void AddPrimitive (const G4Polymarker&) {}
|
||||
virtual void AddPrimitive (const G4Polyhedron&) {}
|
||||
G4VPhysicalVolume* GetFoundVolume() const {return fpFoundPV;}
|
||||
|
||||
const G4Transform3D& GetFoundTransformation () const
|
||||
{return fFoundObjectTransformation;}
|
||||
|
||||
private:
|
||||
void FindVolume (const G4VSolid&);
|
||||
|
||||
void ProcessVolume(const G4VSolid&);
|
||||
|
||||
const G4PhysicalVolumeModel* fpPVModel;
|
||||
G4String fRequiredPhysicalVolumeName;
|
||||
G4int fRequiredCopyNo;
|
||||
const G4Transform3D* fpCurrentObjectTransformation;
|
||||
std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>
|
||||
fFoundFullPVPath; // Found full path.
|
||||
G4int fFoundDepth; // Found depth.
|
||||
@@ -114,6 +79,4 @@ private:
|
||||
G4bool fMultipleOccurrence;
|
||||
};
|
||||
|
||||
#include "G4PhysicalVolumeSearchScene.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PseudoScene.hh 66773 2013-01-12 14:48:08Z allison $
|
||||
//
|
||||
//
|
||||
// John Allison 15th May 2014
|
||||
// A base class for "pseudo" scenes/graphics systems.
|
||||
|
||||
#ifndef G4PSEUDOSCENE_HH
|
||||
#define G4PSEUDOSCENE_HH
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
|
||||
class G4PseudoScene: public G4VGraphicsScene {
|
||||
|
||||
public:
|
||||
|
||||
G4PseudoScene(): fpCurrentObjectTransformation(0) {}
|
||||
virtual ~G4PseudoScene () {}
|
||||
void PreAddSolid (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes&)
|
||||
{fpCurrentObjectTransformation = &objectTransformation;}
|
||||
void PostAddSolid () {}
|
||||
void AddSolid (const G4Box& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Cons & solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Tubs& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Trd& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Trap& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Sphere& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Para& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Torus& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Polycone& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Polyhedra& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4VSolid& solid) {ProcessVolume (solid);}
|
||||
void AddCompound (const G4VTrajectory&) {}
|
||||
void AddCompound (const G4VHit&) {}
|
||||
void AddCompound (const G4VDigi&) {}
|
||||
void AddCompound (const G4THitsMap<G4double>&) {}
|
||||
void BeginPrimitives (const G4Transform3D&) {}
|
||||
void EndPrimitives () {}
|
||||
void BeginPrimitives2D (const G4Transform3D&) {}
|
||||
void EndPrimitives2D () {}
|
||||
void AddPrimitive (const G4Polyline&) {}
|
||||
void AddPrimitive (const G4Scale&) {}
|
||||
void AddPrimitive (const G4Text&) {}
|
||||
void AddPrimitive (const G4Circle&) {}
|
||||
void AddPrimitive (const G4Square&) {}
|
||||
void AddPrimitive (const G4Polymarker&) {}
|
||||
void AddPrimitive (const G4Polyhedron&) {}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void ProcessVolume (const G4VSolid&) = 0;
|
||||
const G4Transform3D* fpCurrentObjectTransformation;
|
||||
};
|
||||
|
||||
#endif
|
||||
+30
-22
@@ -24,35 +24,43 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeSearchScene.icc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4TouchableDumpScene.hh 66773 2013-01-12 14:48:08Z allison $
|
||||
//
|
||||
//
|
||||
// John Allison 10th August 1998.
|
||||
// An artificial scene to find physical volumes.
|
||||
|
||||
inline void G4PhysicalVolumeSearchScene::PreAddSolid
|
||||
(const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes&) {
|
||||
fpCurrentObjectTransformation = &objectTransformation;
|
||||
}
|
||||
#ifndef G4TOUCHABLEDUMPSCENE_HH
|
||||
#define G4TOUCHABLEDUMPSCENE_HH
|
||||
|
||||
inline void G4PhysicalVolumeSearchScene::PostAddSolid () {}
|
||||
#include "G4PseudoScene.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4ModelingParameters.hh"
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
inline const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>&
|
||||
G4PhysicalVolumeSearchScene::GetFoundFullPVPath () const {
|
||||
return fFoundFullPVPath;
|
||||
}
|
||||
#include <iostream>
|
||||
|
||||
inline G4int G4PhysicalVolumeSearchScene::GetFoundDepth () const {
|
||||
return fFoundDepth;
|
||||
}
|
||||
class G4TouchableDumpScene: public G4PseudoScene {
|
||||
|
||||
inline G4VPhysicalVolume*
|
||||
G4PhysicalVolumeSearchScene::GetFoundVolume () const {
|
||||
return fpFoundPV;
|
||||
}
|
||||
public:
|
||||
|
||||
inline const G4Transform3D&
|
||||
G4PhysicalVolumeSearchScene::GetFoundTransformation () const {
|
||||
return fFoundObjectTransformation;
|
||||
}
|
||||
G4TouchableDumpScene
|
||||
(std::ostream& os,
|
||||
G4PhysicalVolumeModel* pPVModel,
|
||||
const G4ModelingParameters::PVNameCopyNoPath& requiredTouchable);
|
||||
|
||||
virtual ~G4TouchableDumpScene ();
|
||||
|
||||
G4bool IsFound() {return fFound;}
|
||||
|
||||
private:
|
||||
|
||||
void ProcessVolume(const G4VSolid&);
|
||||
|
||||
std::ostream& fos;
|
||||
const G4PhysicalVolumeModel* fpPVModel;
|
||||
G4ModelingParameters::PVNameCopyNoPath fRequiredTouchable;
|
||||
G4bool fFound;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TrajectoriesModel.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4TrajectoriesModel.hh 78838 2014-01-28 08:46:17Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 26th August 1998.
|
||||
@@ -63,12 +63,22 @@ public: // With description
|
||||
const G4VTrajectory* GetCurrentTrajectory() const
|
||||
{return fpCurrentTrajectory;}
|
||||
|
||||
void SetCurrentTrajectory(const G4VTrajectory* pTraj)
|
||||
{fpCurrentTrajectory = pTraj;}
|
||||
|
||||
void SetRunID(G4int runID)
|
||||
{fRunID = runID;}
|
||||
|
||||
void SetEventID(G4int eventID)
|
||||
{fEventID = eventID;}
|
||||
|
||||
const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
std::vector<G4AttValue>* CreateCurrentAttValues() const;
|
||||
|
||||
private:
|
||||
|
||||
const G4VTrajectory* fpCurrentTrajectory;
|
||||
G4int fRunID;
|
||||
G4int fEventID;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user