Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.4 1998/11/18 18:38:21 kurasige Exp $
|
||||
# $Id: GNUmakefile,v 1.2 1999/04/16 09:05:36 mora Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for modeling library. John Allison, 31/12/1997.
|
||||
# --------------------------------------------------------------
|
||||
@@ -19,7 +19,6 @@ CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
|
||||
CPPFLAGS += -I$(G4BASE)/materials/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/HEPRandom/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/parameterisation/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/electromagnetic/utils/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/particles/management/include
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 2.5 1998/11/25 16:26:53 allison Exp $
|
||||
$Id: History,v 1.2 1999/02/07 17:24:13 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,11 @@ committal in the CVS repository !
|
||||
History file for visualization/modeling
|
||||
---------------------------------------
|
||||
|
||||
vis-01-00-05 7th February 1999 John Allison
|
||||
- Added list facility to G4PhysicalVolumeSearchScene.
|
||||
- Added virtual functions AddThis (const G4Polycone and G4Polyhedra to
|
||||
G4BoundingSphereScene and G4PhysicalVolumeSearchScene.
|
||||
|
||||
vis-00-04-01 25th November 1998 John Allison.
|
||||
- Added const G4VisAttributes* fpDefaultVisAttributes and access
|
||||
functions to G4ModelingParameters.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BoundingSphereScene.hh,v 2.2 1998/08/22 16:34:57 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4BoundingSphereScene.hh,v 1.4 1999/05/10 14:04:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 7th June 1997
|
||||
@@ -25,21 +25,25 @@
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
|
||||
class G4BoundingSphereScene: public G4VGraphicsScene {
|
||||
|
||||
public:
|
||||
G4BoundingSphereScene ();
|
||||
~G4BoundingSphereScene ();
|
||||
virtual void AddThis (const G4Box& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Cons& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Tubs& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Trd& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Trap& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Sphere& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Para& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4Torus& s) {Accrue (s);}
|
||||
virtual void AddThis (const G4VSolid& s) {Accrue (s);}
|
||||
void AddThis (const G4Box& s) {Accrue (s);}
|
||||
void AddThis (const G4Cons& s) {Accrue (s);}
|
||||
void AddThis (const G4Tubs& s) {Accrue (s);}
|
||||
void AddThis (const G4Trd& s) {Accrue (s);}
|
||||
void AddThis (const G4Trap& s) {Accrue (s);}
|
||||
void AddThis (const G4Sphere& s) {Accrue (s);}
|
||||
void AddThis (const G4Para& s) {Accrue (s);}
|
||||
void AddThis (const G4Torus& s) {Accrue (s);}
|
||||
void AddThis (const G4Polycone& s) {Accrue (s);}
|
||||
void AddThis (const G4Polyhedra& s) {Accrue (s);}
|
||||
void AddThis (const G4VSolid& s) {Accrue (s);}
|
||||
void PreAddThis (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes&) {
|
||||
fpObjectTransformation = &objectTransformation;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FlavoredParallelWorldModel.hh,v 2.3 1998/08/22 16:34:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FlavoredParallelWorldModel.hh,v 1.3 1999/04/16 09:05:39 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// P. Mora de Freitas et M.Verderi - 19 June 1998.
|
||||
// Model for flavored parallel world volumes.
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
class G4FlavoredParallelWorld;
|
||||
class G4VFlavoredParallelWorld;
|
||||
|
||||
class G4FlavoredParallelWorldModel : public G4PhysicalVolumeModel {
|
||||
|
||||
public:
|
||||
|
||||
G4FlavoredParallelWorldModel
|
||||
(G4FlavoredParallelWorld* FPW,
|
||||
(G4VFlavoredParallelWorld* FPW,
|
||||
G4int soughtDepth = G4PhysicalVolumeModel::UNLIMITED,
|
||||
const G4Transform3D& modelTransformation = G4Transform3D::Identity,
|
||||
const G4ModelingParameters* mp = 0);
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
G4FlavoredParallelWorld* theFlavoredParallelWorld;
|
||||
G4VFlavoredParallelWorld* theFlavoredParallelWorld;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HitsModel.hh,v 1.2 1998/08/31 15:41:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HitsModel.hh,v 1.2 1999/01/11 00:48:43 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 26th August 1998.
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HitsModel.icc,v 2.1 1998/08/31 15:42:00 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
|
||||
inline G4HitsModel::~G4HitsModel () {}
|
||||
// $Id: G4HitsModel.icc,v 1.3 1999/05/10 14:04:22 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
|
||||
inline G4String G4HitsModel::GetCurrentTag () const {
|
||||
return fGlobalTag;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ModelingParameters.hh,v 2.2 1998/11/25 16:24:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ModelingParameters.hh,v 1.3 1999/05/25 09:14:23 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -25,8 +25,6 @@ class G4VisAttributes;
|
||||
class G4ModelingParameters {
|
||||
|
||||
friend ostream& operator << (ostream& os, const G4ModelingParameters&);
|
||||
friend G4bool operator != (const G4ModelingParameters&,
|
||||
const G4ModelingParameters&);
|
||||
|
||||
public:
|
||||
|
||||
@@ -48,7 +46,23 @@ public:
|
||||
G4bool isDensityCulling,
|
||||
G4double visibleDensity,
|
||||
G4bool isCullingCovered,
|
||||
G4int noOfSides);
|
||||
G4int noOfSides
|
||||
);
|
||||
// noOfSides is suggested no. of sides per circle in case a
|
||||
// polygonal representation is produced.
|
||||
|
||||
G4ModelingParameters (const G4VisAttributes* pDefaultVisAttributes,
|
||||
RepStyle repStyle,
|
||||
G4bool isCulling,
|
||||
G4bool isCullingInvisible,
|
||||
G4bool isDensityCulling,
|
||||
G4double visibleDensity,
|
||||
G4bool isCullingCovered,
|
||||
G4int noOfSides,
|
||||
G4bool isViewGeom,
|
||||
G4bool isViewHits,
|
||||
G4bool isViewDigis
|
||||
);
|
||||
// noOfSides is suggested no. of sides per circle in case a
|
||||
// polygonal representation is produced.
|
||||
|
||||
@@ -56,6 +70,8 @@ public:
|
||||
|
||||
// Note: uses default assignment operator and copy constructor.
|
||||
|
||||
G4bool operator != (const G4ModelingParameters&) const;
|
||||
|
||||
// Get and Is functions...
|
||||
const G4VisAttributes* GetDefaultVisAttributes () const;
|
||||
RepStyle GetRepStyle () const;
|
||||
@@ -65,6 +81,9 @@ public:
|
||||
G4double GetVisibleDensity () const;
|
||||
G4bool IsCullingCovered () const;
|
||||
G4int GetNoOfSides () const;
|
||||
G4bool IsViewGeom () const;
|
||||
G4bool IsViewHits () const;
|
||||
G4bool IsViewDigis () const;
|
||||
|
||||
// Set functions...
|
||||
void SetDefaultVisAttributes (const G4VisAttributes* pDefaultVisAttributes);
|
||||
@@ -75,6 +94,12 @@ public:
|
||||
void SetVisibleDensity (G4double);
|
||||
void SetCullingCovered (G4bool);
|
||||
void SetNoOfSides (G4int);
|
||||
void SetViewGeom ();
|
||||
void UnsetViewGeom ();
|
||||
void SetViewHits ();
|
||||
void UnsetViewHits ();
|
||||
void SetViewDigis ();
|
||||
void UnsetViewDigis ();
|
||||
|
||||
// Other functions...
|
||||
void PrintDifferences (const G4ModelingParameters& that) const;
|
||||
@@ -90,6 +115,9 @@ private:
|
||||
G4double fVisibleDensity; // ...density lower than this not drawn.
|
||||
G4bool fCullCovered; // Cull daughters covered by opaque mothers.
|
||||
G4int fNoOfSides; // ...if polygon approximates circle.
|
||||
G4bool fViewGeom; // View geometry objects.
|
||||
G4bool fViewHits; // View hits, if any.
|
||||
G4bool fViewDigis; // View digis, if any.
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ModelingParameters.icc,v 2.1 1998/11/25 16:24:30 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ModelingParameters.icc,v 1.2 1999/01/10 13:25:49 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -46,6 +46,18 @@ inline G4int G4ModelingParameters::GetNoOfSides () const {
|
||||
return fNoOfSides;
|
||||
}
|
||||
|
||||
inline G4bool G4ModelingParameters::IsViewGeom () const {
|
||||
return fViewGeom;
|
||||
}
|
||||
|
||||
inline G4bool G4ModelingParameters::IsViewHits () const {
|
||||
return fViewHits;
|
||||
}
|
||||
|
||||
inline G4bool G4ModelingParameters::IsViewDigis () const {
|
||||
return fViewDigis;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::SetDefaultVisAttributes
|
||||
(const G4VisAttributes* pDefaultVisAttributes) {
|
||||
fpDefaultVisAttributes = pDefaultVisAttributes;
|
||||
@@ -71,3 +83,27 @@ inline void G4ModelingParameters::SetDensityCulling (G4bool value) {
|
||||
inline void G4ModelingParameters::SetCullingCovered (G4bool value) {
|
||||
fCullCovered = value;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::SetViewGeom () {
|
||||
fViewGeom = true;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::UnsetViewGeom () {
|
||||
fViewGeom = false;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::SetViewHits () {
|
||||
fViewHits = true;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::UnsetViewHits () {
|
||||
fViewHits = false;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::SetViewDigis () {
|
||||
fViewDigis = true;
|
||||
}
|
||||
|
||||
inline void G4ModelingParameters::UnsetViewDigis () {
|
||||
fViewDigis = false;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NullModel.hh,v 2.1 1998/08/31 15:42:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4NullModel.hh,v 1.3 1999/05/10 14:04:23 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 4th April 1998.
|
||||
@@ -24,12 +24,12 @@ public:
|
||||
|
||||
G4NullModel (const G4ModelingParameters* = 0);
|
||||
|
||||
~G4NullModel ();
|
||||
virtual ~G4NullModel ();
|
||||
|
||||
virtual void DescribeYourselfTo (G4VGraphicsScene&);
|
||||
void DescribeYourselfTo (G4VGraphicsScene&);
|
||||
// An exception is thrown if this is called!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
virtual G4bool Validate ();
|
||||
G4bool Validate ();
|
||||
// Validate, but allow internal changes (hence non-const function).
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeModel.hh,v 2.3 1998/08/31 15:42:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeModel.hh,v 1.3 1999/05/10 14:04:24 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -39,9 +39,9 @@ public:
|
||||
const G4Transform3D& modelTransformation = G4Transform3D::Identity,
|
||||
const G4ModelingParameters* = 0);
|
||||
|
||||
~G4PhysicalVolumeModel ();
|
||||
virtual ~G4PhysicalVolumeModel ();
|
||||
|
||||
virtual void DescribeYourselfTo (G4VGraphicsScene&);
|
||||
void DescribeYourselfTo (G4VGraphicsScene&);
|
||||
// The main task of a model is to describe itself to the scene. It
|
||||
// can also provide special information through pointers to working
|
||||
// space in the scene. These pointers must be set up (if required
|
||||
@@ -52,13 +52,13 @@ public:
|
||||
// here. To see how this works, look at the implementation of this
|
||||
// function and G4VScene::Establish/DecommissionSpecials.
|
||||
|
||||
virtual G4String GetCurrentTag () const;
|
||||
G4String GetCurrentTag () const;
|
||||
// A tag which depends on the current state of the model.
|
||||
|
||||
virtual G4String GetCurrentDescription () const;
|
||||
G4String GetCurrentDescription () const;
|
||||
// A description which depends on the current state of the model.
|
||||
|
||||
virtual G4bool Validate ();
|
||||
G4bool Validate ();
|
||||
// Validate, but allow internal changes (hence non-const function).
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeModel.icc,v 2.0 1998/07/02 16:50:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeModel.icc,v 1.2 1999/01/11 00:48:45 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeSearchScene.hh,v 2.2 1998/08/22 16:34:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeSearchScene.hh,v 1.4 1999/05/10 14:04:25 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 10th August 1998.
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
@@ -33,7 +35,7 @@ class G4PhysicalVolumeSearchScene: public G4VGraphicsScene {
|
||||
public:
|
||||
G4PhysicalVolumeSearchScene
|
||||
(const G4String& requiredPhysicalVolumeName, G4int requiredCopyNo);
|
||||
~G4PhysicalVolumeSearchScene ();
|
||||
virtual ~G4PhysicalVolumeSearchScene ();
|
||||
void AddThis (const G4Box& s) {FindVolume (s);}
|
||||
void AddThis (const G4Cons & s) {FindVolume (s);}
|
||||
void AddThis (const G4Tubs& s) {FindVolume (s);}
|
||||
@@ -42,6 +44,8 @@ public:
|
||||
void AddThis (const G4Sphere& s) {FindVolume (s);}
|
||||
void AddThis (const G4Para& s) {FindVolume (s);}
|
||||
void AddThis (const G4Torus& s) {FindVolume (s);}
|
||||
void AddThis (const G4Polycone& s) {FindVolume (s);}
|
||||
void AddThis (const G4Polyhedra& s) {FindVolume (s);}
|
||||
void AddThis (const G4VSolid& s) {FindVolume (s);}
|
||||
void PreAddThis (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes&);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeSearchScene.icc,v 2.1 1998/08/22 16:35:00 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeSearchScene.icc,v 1.2 1999/01/11 00:48:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 10th August 1998.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoriesModel.hh,v 1.2 1998/08/31 15:42:03 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrajectoriesModel.hh,v 1.2 1999/01/11 00:48:47 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 26th August 1998.
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoriesModel.icc,v 2.1 1998/08/31 15:42:04 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
|
||||
inline G4TrajectoriesModel::~G4TrajectoriesModel () {}
|
||||
// $Id: G4TrajectoriesModel.icc,v 1.3 1999/05/10 14:04:27 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
|
||||
inline G4String G4TrajectoriesModel::GetCurrentTag () const {
|
||||
return fGlobalTag;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VModel.hh,v 2.3 1998/08/31 15:42:05 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VModel.hh,v 1.2 1999/01/11 00:48:49 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VModel.icc,v 2.3 1998/08/31 15:42:06 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VModel.icc,v 1.2 1999/01/11 00:48:50 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BoundingSphereScene.cc,v 2.4 1998/11/23 10:12:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4BoundingSphereScene.cc,v 1.2 1999/01/11 00:48:50 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 7th June 1997
|
||||
|
||||
@@ -5,21 +5,21 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FlavoredParallelWorldModel.cc,v 2.1 1998/08/22 16:35:04 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FlavoredParallelWorldModel.cc,v 1.3 1999/04/16 09:05:41 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// P. Mora de Freitas et M.Verderi - 19 June 1998.
|
||||
// Model for flavored parallel world volumes.
|
||||
|
||||
#include "G4FlavoredParallelWorldModel.hh"
|
||||
|
||||
#include "G4FlavoredParallelWorld.hh"
|
||||
#include "G4VFlavoredParallelWorld.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
G4FlavoredParallelWorldModel::G4FlavoredParallelWorldModel
|
||||
(G4FlavoredParallelWorld* FPW,
|
||||
(G4VFlavoredParallelWorld* FPW,
|
||||
G4int soughtDepth,
|
||||
const G4Transform3D& modelTransformation,
|
||||
const G4ModelingParameters* mp)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HitsModel.cc,v 1.2 1998/08/31 15:42:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4HitsModel.cc,v 1.3 1999/05/10 14:04:28 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 26th August 1998.
|
||||
@@ -14,24 +14,29 @@
|
||||
|
||||
#include "G4HitsModel.hh"
|
||||
|
||||
#include "G4ModelingParameters.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
|
||||
G4HitsModel::~G4HitsModel () {}
|
||||
|
||||
G4HitsModel::G4HitsModel () {
|
||||
fGlobalTag = "G4HitsModel for all hits.";
|
||||
fGlobalDescription = fGlobalTag;
|
||||
}
|
||||
|
||||
void G4HitsModel::DescribeYourselfTo (G4VGraphicsScene& scene) {
|
||||
G4RunManager* runManager = G4RunManager::GetRunManager ();
|
||||
const G4Event* event = runManager -> GetCurrentEvent ();
|
||||
if (event) {
|
||||
G4HCofThisEvent* HCE = event -> GetHCofThisEvent ();
|
||||
if (HCE) {
|
||||
G4int nHC = HCE -> GetCapacity ();
|
||||
for (int iHC = 0; iHC < nHC; iHC++) {
|
||||
HCE -> GetHC (iHC) -> DrawAllHits ();
|
||||
if (fpMP && fpMP -> IsViewHits ()) {
|
||||
G4RunManager* runManager = G4RunManager::GetRunManager ();
|
||||
const G4Event* event = runManager -> GetCurrentEvent ();
|
||||
if (event) {
|
||||
G4HCofThisEvent* HCE = event -> GetHCofThisEvent ();
|
||||
if (HCE) {
|
||||
G4int nHC = HCE -> GetCapacity ();
|
||||
for (int iHC = 0; iHC < nHC; iHC++) {
|
||||
HCE -> GetHC (iHC) -> DrawAllHits ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ModelingParameters.cc,v 2.2 1998/11/25 16:24:34 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ModelingParameters.cc,v 1.3 1999/05/25 09:14:26 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -25,7 +25,11 @@ G4ModelingParameters::G4ModelingParameters ():
|
||||
fDensityCulling (false),
|
||||
fVisibleDensity (0.01 * g / cm3),
|
||||
fCullCovered (false),
|
||||
fNoOfSides (24) {}
|
||||
fNoOfSides (24),
|
||||
fViewGeom (true),
|
||||
fViewHits (true),
|
||||
fViewDigis (true)
|
||||
{}
|
||||
|
||||
G4ModelingParameters::G4ModelingParameters
|
||||
(const G4VisAttributes* pDefaultVisAttributes,
|
||||
@@ -35,7 +39,8 @@ G4ModelingParameters::G4ModelingParameters
|
||||
G4bool isDensityCulling,
|
||||
G4double visibleDensity,
|
||||
G4bool isCullingCovered,
|
||||
G4int noOfSides):
|
||||
G4int noOfSides
|
||||
):
|
||||
fpDefaultVisAttributes (pDefaultVisAttributes),
|
||||
fRepStyle (repStyle),
|
||||
fCulling (isCulling),
|
||||
@@ -43,7 +48,37 @@ G4ModelingParameters::G4ModelingParameters
|
||||
fDensityCulling (isDensityCulling),
|
||||
fVisibleDensity (visibleDensity),
|
||||
fCullCovered (isCullingCovered),
|
||||
fNoOfSides (noOfSides) {}
|
||||
fNoOfSides (noOfSides),
|
||||
fViewGeom (true),
|
||||
fViewHits (true),
|
||||
fViewDigis (true)
|
||||
{}
|
||||
|
||||
G4ModelingParameters::G4ModelingParameters
|
||||
(const G4VisAttributes* pDefaultVisAttributes,
|
||||
G4ModelingParameters::RepStyle repStyle,
|
||||
G4bool isCulling,
|
||||
G4bool isCullingInvisible,
|
||||
G4bool isDensityCulling,
|
||||
G4double visibleDensity,
|
||||
G4bool isCullingCovered,
|
||||
G4int noOfSides,
|
||||
G4bool isViewGeom,
|
||||
G4bool isViewHits,
|
||||
G4bool isViewDigis
|
||||
):
|
||||
fpDefaultVisAttributes (pDefaultVisAttributes),
|
||||
fRepStyle (repStyle),
|
||||
fCulling (isCulling),
|
||||
fCullInvisible (isCullingInvisible),
|
||||
fDensityCulling (isDensityCulling),
|
||||
fVisibleDensity (visibleDensity),
|
||||
fCullCovered (isCullingCovered),
|
||||
fNoOfSides (noOfSides),
|
||||
fViewGeom (isViewGeom),
|
||||
fViewHits (isViewHits),
|
||||
fViewDigis (isViewDigis)
|
||||
{}
|
||||
|
||||
G4ModelingParameters::~G4ModelingParameters () {}
|
||||
|
||||
@@ -86,7 +121,10 @@ void G4ModelingParameters::PrintDifferences
|
||||
(fDensityCulling != that.fDensityCulling) ||
|
||||
(fVisibleDensity != that.fVisibleDensity) ||
|
||||
(fCullCovered != that.fCullCovered) ||
|
||||
(fNoOfSides != that.fNoOfSides))
|
||||
(fNoOfSides != that.fNoOfSides) ||
|
||||
(fViewGeom != that.fViewGeom) ||
|
||||
(fViewHits != that.fViewHits) ||
|
||||
(fViewDigis != that.fViewDigis))
|
||||
G4cout << "Difference in 1st batch." << endl;
|
||||
}
|
||||
|
||||
@@ -128,24 +166,39 @@ ostream& operator << (ostream& os, const G4ModelingParameters& mp) {
|
||||
os << "\n No. of sides used in circle polygon approximation: "
|
||||
<< mp.fNoOfSides;
|
||||
|
||||
os << "\n View geometry: ";
|
||||
if (mp.fViewGeom) os << "true";
|
||||
else os << "false";
|
||||
|
||||
os << "\n View hits : ";
|
||||
if (mp.fViewHits) os << "true";
|
||||
else os << "false";
|
||||
|
||||
os << "\n View digits : ";
|
||||
if (mp.fViewDigis) os << "true";
|
||||
else os << "false";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
G4bool operator != (const G4ModelingParameters& mp1,
|
||||
const G4ModelingParameters& mp2) {
|
||||
G4bool G4ModelingParameters::operator !=
|
||||
(const G4ModelingParameters& mp) const {
|
||||
|
||||
if (
|
||||
(*mp1.fpDefaultVisAttributes != *mp2.fpDefaultVisAttributes) ||
|
||||
(mp1.fRepStyle != mp2.fRepStyle) ||
|
||||
(mp1.fCulling != mp2.fCulling) ||
|
||||
(mp1.fCullInvisible != mp2.fCullInvisible) ||
|
||||
(mp1.fDensityCulling != mp2.fDensityCulling) ||
|
||||
(mp1.fCullCovered != mp2.fCullCovered) ||
|
||||
(mp1.fNoOfSides != mp2.fNoOfSides))
|
||||
(*fpDefaultVisAttributes != *mp.fpDefaultVisAttributes) ||
|
||||
(fRepStyle != mp.fRepStyle) ||
|
||||
(fCulling != mp.fCulling) ||
|
||||
(fCullInvisible != mp.fCullInvisible) ||
|
||||
(fDensityCulling != mp.fDensityCulling) ||
|
||||
(fCullCovered != mp.fCullCovered) ||
|
||||
(fNoOfSides != mp.fNoOfSides) ||
|
||||
(fViewGeom != mp.fViewGeom) ||
|
||||
(fViewHits != mp.fViewHits) ||
|
||||
(fViewDigis != mp.fViewDigis))
|
||||
return true;
|
||||
|
||||
if (mp1.fDensityCulling &&
|
||||
(mp1.fVisibleDensity != mp2.fVisibleDensity)) return true;
|
||||
if (fDensityCulling &&
|
||||
(fVisibleDensity != mp.fVisibleDensity)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NullModel.cc,v 2.2 1998/08/31 15:42:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4NullModel.cc,v 1.2 1999/01/11 00:48:52 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 4th April 1998.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeModel.cc,v 2.6 1998/11/25 16:25:49 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeModel.cc,v 1.3 1999/01/10 13:25:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -58,14 +58,17 @@ G4PhysicalVolumeModel::G4PhysicalVolumeModel
|
||||
G4BoundingSphereScene bsScene;
|
||||
const G4ModelingParameters* tempMP = fpMP;
|
||||
G4ModelingParameters mParams
|
||||
(0, // No default vis attributes.
|
||||
(0, // No default vis attributes.
|
||||
G4ModelingParameters::wireframe,
|
||||
true, // Global culling.
|
||||
true, // Cull invisible volumes.
|
||||
false, // Density culling.
|
||||
0., // Density (not relevant if density culling false).
|
||||
true, // Cull daughters of opaque mothers.
|
||||
24); // No of sides (not relevant for this operation).
|
||||
true, // Global culling.
|
||||
true, // Cull invisible volumes.
|
||||
false, // Density culling.
|
||||
0., // Density (not relevant if density culling false).
|
||||
true, // Cull daughters of opaque mothers.
|
||||
24, // No of sides (not relevant for this operation).
|
||||
true, // View geometry.
|
||||
false, // View hits - not relevant for physical volume model.
|
||||
false); // View digis - not relevant for physical volume model.
|
||||
fpMP = &mParams;
|
||||
//bsScene.SetBoundingSphereExtent
|
||||
// (fpTopPV -> GetLogicalVolume () -> GetSolid () -> GetExtent ());
|
||||
@@ -76,35 +79,38 @@ G4PhysicalVolumeModel::G4PhysicalVolumeModel
|
||||
|
||||
void G4PhysicalVolumeModel::DescribeYourselfTo (G4VGraphicsScene& scene) {
|
||||
|
||||
scene.EstablishSpecials (*this);
|
||||
// See .hh file for explanation of this mechanism.
|
||||
if (fpMP && fpMP -> IsViewGeom ()) {
|
||||
|
||||
fCurrentDepth = 0;
|
||||
// Store in working space (via pointer to working space).
|
||||
if (fpCurrentDepth) *fpCurrentDepth = fCurrentDepth;
|
||||
scene.EstablishSpecials (*this);
|
||||
// See .hh file for explanation of this mechanism.
|
||||
|
||||
//G4Transform3D startingTransformation = fTransform;
|
||||
G4Transform3D startingTransformation;
|
||||
fCurrentDepth = 0;
|
||||
// Store in working space (via pointer to working space).
|
||||
if (fpCurrentDepth) *fpCurrentDepth = fCurrentDepth;
|
||||
|
||||
VisitGeometryAndGetVisReps (fpTopPV,
|
||||
fSoughtDepth,
|
||||
startingTransformation,
|
||||
scene);
|
||||
//G4Transform3D startingTransformation = fTransform;
|
||||
G4Transform3D startingTransformation;
|
||||
|
||||
// Clear current data and working space (via pointers to working space).
|
||||
fCurrentDepth = 0;
|
||||
fpCurrentPV = 0;
|
||||
fpCurrentLV = 0;
|
||||
if (fpCurrentDepth) *fpCurrentDepth = fCurrentDepth;
|
||||
if (fppCurrentPV) *fppCurrentPV = fpCurrentPV;
|
||||
if (fppCurrentLV) *fppCurrentLV = fpCurrentLV;
|
||||
VisitGeometryAndGetVisReps (fpTopPV,
|
||||
fSoughtDepth,
|
||||
startingTransformation,
|
||||
scene);
|
||||
|
||||
scene.DecommissionSpecials (*this);
|
||||
// Clear current data and working space (via pointers to working space).
|
||||
fCurrentDepth = 0;
|
||||
fpCurrentPV = 0;
|
||||
fpCurrentLV = 0;
|
||||
if (fpCurrentDepth) *fpCurrentDepth = fCurrentDepth;
|
||||
if (fppCurrentPV) *fppCurrentPV = fpCurrentPV;
|
||||
if (fppCurrentLV) *fppCurrentLV = fpCurrentLV;
|
||||
|
||||
// Clear pointers to working space.
|
||||
fpCurrentDepth = 0;
|
||||
fppCurrentPV = 0;
|
||||
fppCurrentLV = 0;
|
||||
scene.DecommissionSpecials (*this);
|
||||
|
||||
// Clear pointers to working space.
|
||||
fpCurrentDepth = 0;
|
||||
fppCurrentPV = 0;
|
||||
fppCurrentLV = 0;
|
||||
}
|
||||
}
|
||||
|
||||
G4String G4PhysicalVolumeModel::GetCurrentTag () const {
|
||||
@@ -301,7 +307,7 @@ void G4PhysicalVolumeModel::DescribeAndDescend
|
||||
// the volumes are visible and opaque, and then only if no sections
|
||||
// or cutways are in operation.
|
||||
G4bool cullDaughter = thisToBeDrawn && IsDaughterCulled (pLV);
|
||||
if (!(thisToBeDrawn && IsDaughterCulled (pLV))) {
|
||||
if (!cullDaughter) {
|
||||
// OK, now let's check for daughters...
|
||||
if (soughtDepth != 0) {
|
||||
int nDaughters = pLV -> GetNoDaughters ();
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhysicalVolumeSearchScene.cc,v 2.1 1998/08/22 16:35:06 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4PhysicalVolumeSearchScene.cc,v 1.3 1999/02/07 17:23:22 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 10th August 1998.
|
||||
@@ -42,12 +42,22 @@ void G4PhysicalVolumeSearchScene::EstablishSpecials
|
||||
}
|
||||
|
||||
void G4PhysicalVolumeSearchScene::FindVolume (const G4VSolid& solid) {
|
||||
|
||||
/**************************************************
|
||||
G4cout << "Required volume: \"" << fRequiredPhysicalVolumeName
|
||||
<< "\", copy no. " << fRequiredCopyNo << endl;
|
||||
G4cout << "PhysicalVolume: \"" << fpCurrentPV -> GetName ()
|
||||
<< "\", copy no. " << fpCurrentPV -> GetCopyNo () << endl;
|
||||
*******************************************/
|
||||
|
||||
if (fRequiredPhysicalVolumeName == "list") {
|
||||
for (G4int i = 0; i < fCurrentDepth; i++ ) G4cout << " ";
|
||||
G4cout << "\"" << fpCurrentPV -> GetName ()
|
||||
<< "\", copy no. " << fpCurrentPV -> GetCopyNo ()
|
||||
<< endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fRequiredPhysicalVolumeName == fpCurrentPV -> GetName () &&
|
||||
fRequiredCopyNo == fpCurrentPV -> GetCopyNo ()) {
|
||||
// Current policy - take first one found!!
|
||||
@@ -70,6 +80,6 @@ void G4PhysicalVolumeSearchScene::FindVolume (const G4VSolid& solid) {
|
||||
"\n This function gives you access to the first occurrence only."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoriesModel.cc,v 1.2 1998/08/31 15:42:18 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrajectoriesModel.cc,v 1.5 1999/05/26 02:11:42 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 26th August 1998.
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Event.hh"
|
||||
|
||||
G4TrajectoriesModel::~G4TrajectoriesModel () {}
|
||||
|
||||
G4TrajectoriesModel::G4TrajectoriesModel () {
|
||||
fGlobalTag = "G4TrajectoriesModel for all trajectories.";
|
||||
fGlobalDescription = fGlobalTag;
|
||||
@@ -30,7 +32,11 @@ void G4TrajectoriesModel::DescribeYourselfTo (G4VGraphicsScene& scene) {
|
||||
if (TC) {
|
||||
G4int nT = TC -> entries ();
|
||||
for (int iT = 0; iT < nT; iT++) {
|
||||
(*TC) [iT] -> DrawTrajectory (50);
|
||||
// GB : default representation should be the most efficent one.
|
||||
// Representation with a circle at each step should be an option
|
||||
// choosable from a command.
|
||||
// (*TC) [iT] -> DrawTrajectory (50);
|
||||
(*TC) [iT] -> DrawTrajectory ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VModel.cc,v 2.2 1998/08/22 16:34:30 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VModel.cc,v 1.2 1999/01/11 00:48:54 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
|
||||
Reference in New Issue
Block a user