Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDef.hh,v 1.3 2002/10/24 14:35:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#ifndef G4ATTDEF_HH
|
||||
#define G4ATTDEF_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// @class G4AttDef
|
||||
//
|
||||
// @brief This class represents a HepRep-style Attribute Definition.
|
||||
// The G4AttDef is used to define new kinds of attributes that can
|
||||
// then have values set for a Trajectory, Trajectory Point or Sensitive
|
||||
// Detector Hit. These attributes are then made available to the end user
|
||||
// in an interactive visualization system (such as WIRED).
|
||||
// Values are set by creating G4AttValue objects and attaching them to the
|
||||
// relevant Trajectory, Trajectory Point or Sensitive Detector Hit.
|
||||
// The association between the G4AttValue and the G4AttDef object is
|
||||
// made through the data member "name".
|
||||
// For details, see the HepRep home page at http://heprep.freehep.org
|
||||
//
|
||||
// @author M.Frailis
|
||||
// @author R.Giannitrapani
|
||||
// @author J.Perl
|
||||
// Class Description - End:
|
||||
|
||||
|
||||
class G4AttDef{
|
||||
|
||||
public:
|
||||
G4AttDef(const G4String& name,
|
||||
const G4String& desc,
|
||||
const G4String& category,
|
||||
const G4String& extra,
|
||||
const G4String& valueType):
|
||||
m_name(name),m_desc(desc),
|
||||
m_category(category),
|
||||
m_extra(extra),m_valueType(valueType){};
|
||||
|
||||
G4AttDef(){};
|
||||
|
||||
const G4String& GetName()const{return m_name;};
|
||||
const G4String& GetDesc()const{return m_desc;};
|
||||
const G4String& GetCategory()const{return m_category;};
|
||||
const G4String& GetExtra()const{return m_extra;};
|
||||
const G4String& GetValueType()const{return m_valueType;};
|
||||
|
||||
void SetName(const G4String& name){m_name = name;};
|
||||
void SetDesc(const G4String& desc){m_desc = desc;};
|
||||
void SetCategory(const G4String& cat){m_category = cat;};
|
||||
void SetExtra(const G4String& extra){m_extra = extra;};
|
||||
void SetValueType(const G4String& type){m_valueType = type;};
|
||||
|
||||
private:
|
||||
/// The name of the attribute
|
||||
G4String m_name;
|
||||
/// A short description of the attribute
|
||||
G4String m_desc;
|
||||
/// The category (Draw, Physics, PickAction, Association)
|
||||
G4String m_category;
|
||||
/// Some extra property of the attribute (units etc)
|
||||
G4String m_extra;
|
||||
/// The type of the value of the attribute (int, double, string)
|
||||
G4String m_valueType;
|
||||
};
|
||||
#endif //G4ATTDEF_H
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDefStore.hh,v 1.3 2002/11/20 14:18:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#ifndef G4ATTDEFSTORE_HH
|
||||
#define G4ATTDEFSTORE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/map"
|
||||
|
||||
class G4AttDef;
|
||||
|
||||
class G4AttDefStore{
|
||||
public:
|
||||
static G4std::map<G4String,G4AttDef>*
|
||||
GetInstance(G4String storeName,bool& isNew);
|
||||
// Returns a pointer to the named store and isNew is true if store is new.
|
||||
protected:
|
||||
G4AttDefStore();
|
||||
~G4AttDefStore();
|
||||
private:
|
||||
G4AttDefStore(const G4AttDefStore&);
|
||||
G4AttDefStore& operator=(const G4AttDefStore&);
|
||||
static G4std::map<G4String,G4std::map<G4String,G4AttDef>*> m_stores;
|
||||
};
|
||||
|
||||
#endif //G4ATTDEFSTORE_H
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttValue.hh,v 1.3 2002/10/24 14:35:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#ifndef G4ATTVALUE_HH
|
||||
#define G4ATTVALUE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// @class G4AttValue
|
||||
//
|
||||
// @brief This class represents a HepRep-style Attribute Value.
|
||||
// G4AttValues can be attached to a Trajectory, Trajectory Point or Sensitive
|
||||
// Detector Hit. These attributes are then made available to the end user
|
||||
// in interactive visualization systems (such as WIRED).
|
||||
// The G4AttValue is further defined in a G4AttDef object.
|
||||
// The association between the G4AttValue and the G4AttDef object is
|
||||
// made through the data member "name".
|
||||
// For details, see the HepRep home page at http://heprep.freehep.org
|
||||
//
|
||||
// @author M.Frailis
|
||||
// @author R.Giannitrapani
|
||||
// @author J.Perl
|
||||
// Class Description - End:
|
||||
|
||||
|
||||
class G4AttValue {
|
||||
|
||||
public:
|
||||
G4AttValue(const G4String& name,
|
||||
const G4String& value,
|
||||
const G4String& showLabel):
|
||||
m_name(name),m_value(value),
|
||||
m_showLabel(showLabel){};
|
||||
G4AttValue(){};
|
||||
|
||||
const G4String& GetName()const{return m_name;};
|
||||
const G4String& GetValue()const{return m_value;};
|
||||
const G4String& GetShowLabel()const{return m_showLabel;};
|
||||
|
||||
void SetName(const G4String& name){m_name = name;};
|
||||
void SetValue(const G4String& val){m_value = val;};
|
||||
void SetShowLabel(const G4String& lab){m_showLabel = lab;};
|
||||
|
||||
private:
|
||||
/// The name of the attribute
|
||||
G4String m_name;
|
||||
/// The value of the attribute
|
||||
G4String m_value;
|
||||
/// The bitmap for the label display
|
||||
G4String m_showLabel;
|
||||
};
|
||||
#endif //G4ATTVALUE_H
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Circle.hh,v 1.6 2001/07/11 10:01:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Color.hh,v 1.4 2001/07/11 10:01:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.hh,v 1.6 2001/07/11 10:01:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Colour.hh,v 1.7 2002/10/23 12:03:38 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -32,9 +32,7 @@
|
||||
// and alpha) components of colour. Each component takes a value between
|
||||
// 0 and 1. If an irrelevant value, i.e., a value less than 0 or greater
|
||||
// than 1, is given as an argument of the constructor, such a value is
|
||||
// automatically clipped to 0 or 1. Alpha is opacity, which is not used
|
||||
// at present. You can use its default value 1, which means "opaque"
|
||||
// in instantiation of G4Colour.
|
||||
// automatically clipped to 0 or 1. Alpha is opacity (1 = opaque).
|
||||
//
|
||||
// A G4Colour object is instantiated by giving red, green, and blue
|
||||
// components to its constructor, i.e.,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBS.hh,v 1.6 2001/07/11 10:01:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBSbox.hh,v 1.6 2001/07/11 10:01:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBScylinder.hh,v 1.6 2001/07/11 10:01:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBShexahedron.hh,v 1.6 2001/07/11 10:01:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Hexa hedron builder prototype
|
||||
// OC 17 9 96
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStube.hh,v 1.6 2001/07/11 10:01:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStubesector.hh,v 1.5 2001/07/11 10:01:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PlacedPolyhedron.hh,v 1.9 2001/07/11 10:01:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
|
||||
// Class Description:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Point3DList.hh,v 1.10 2001/08/20 23:28:42 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyhedron.hh,v 1.10 2001/07/11 10:01:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#ifndef G4POLYHEDRON_HH
|
||||
#define G4POLYHEDRON_HH
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyline.hh,v 1.9 2001/08/20 23:28:43 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.hh,v 1.7 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.icc,v 1.3 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.hh,v 1.3 2001/09/10 10:28:24 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Scale.hh,v 1.5 2002/11/27 12:24:01 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001.
|
||||
@@ -75,14 +75,16 @@ public: // With description
|
||||
G4double GetYmid() const;
|
||||
G4double GetZmid() const;
|
||||
|
||||
static G4String GuidanceString;
|
||||
static const G4String& GetGuidanceString();
|
||||
|
||||
private:
|
||||
|
||||
G4double fLength;
|
||||
G4String fAnnotation;
|
||||
Direction fDirection;
|
||||
G4bool fAutoPlacing;
|
||||
G4double fXmid, fYmid, fZmid;
|
||||
static const G4String GuidanceString;
|
||||
};
|
||||
|
||||
#include "G4Scale.icc"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.icc,v 1.2 2001/07/24 21:41:42 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.hh,v 1.5 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.icc,v 1.3 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.hh,v 1.7 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.icc,v 1.3 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.hh,v 1.7 2001/07/11 10:01:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4VMarker.hh,v 1.8 2002/11/27 12:23:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4VMarker - base class for markers - circles, squares, etc.
|
||||
@@ -31,9 +31,10 @@
|
||||
// Class Description:
|
||||
// G4VMarkers are 2-dimensional G4VVisPrims with the special
|
||||
// properties (a) of always facing the camera and (b) of having the
|
||||
// possibility of a size defined in screen units. The convention is
|
||||
// possibility of a size defined in screen units (pixels) or paper
|
||||
// units (points - there are 72 points per inch). The convention is
|
||||
// that if a world size is not specified, then the marker will be
|
||||
// drawn to the given screen size or paper size regardless of the
|
||||
// drawn to the given screen size or paper size independent of the
|
||||
// viewing transformation in effect.
|
||||
//
|
||||
// "Size" means "overall size", e.g., diameter of circle, side of
|
||||
@@ -135,7 +136,7 @@ public: // With description
|
||||
void SetScreenRadius (G4double);
|
||||
void SetFillStyle (FillStyle);
|
||||
|
||||
// Access functions to the string for user custimizable information
|
||||
// Access functions to the string for user customizable information
|
||||
virtual const G4String& GetInfo() const;
|
||||
virtual void SetInfo( const G4String& info );
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.icc,v 1.6 2001/07/11 10:01:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisPrim.hh,v 1.8 2001/07/11 10:01:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison August 1995
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.hh,v 1.7 2001/07/11 10:01:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4VisAttributes.hh,v 1.10 2002/11/20 14:18:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
@@ -48,11 +48,15 @@
|
||||
#ifndef __G4VISATTRIBUTES_HH__
|
||||
#define __G4VISATTRIBUTES_HH__
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
#include "G4Colour.hh"
|
||||
#include "G4Color.hh"
|
||||
|
||||
class G4AttValue;
|
||||
class G4AttDef;
|
||||
|
||||
class G4VisAttributes {
|
||||
|
||||
friend G4std::ostream& operator << (G4std::ostream& os, const G4VisAttributes& a);
|
||||
@@ -69,6 +73,8 @@ public: // With description
|
||||
|
||||
static const G4VisAttributes Invisible;
|
||||
|
||||
static const G4VisAttributes& GetInvisible();
|
||||
|
||||
G4bool operator != (const G4VisAttributes& a) const;
|
||||
G4bool operator == (const G4VisAttributes& a) const;
|
||||
|
||||
@@ -79,7 +85,9 @@ public: // With description
|
||||
LineStyle GetLineStyle () const;
|
||||
G4double GetLineWidth () const;
|
||||
G4bool IsForceDrawingStyle () const;
|
||||
ForcedDrawingStyle GetForcedDrawingStyle () const;
|
||||
ForcedDrawingStyle GetForcedDrawingStyle () const;
|
||||
const G4std::vector<G4AttValue>* GetAttValues () const;
|
||||
const G4std::vector<G4AttDef>* GetAttDefs () const;
|
||||
|
||||
void SetVisibility (G4bool);
|
||||
void SetDaughtersInvisible (G4bool);
|
||||
@@ -93,6 +101,8 @@ public: // With description
|
||||
void SetLineWidth (G4double);
|
||||
void SetForceWireframe (G4bool);
|
||||
void SetForceSolid (G4bool);
|
||||
void SetAttValues (const G4std::vector<G4AttValue>*);
|
||||
void SetAttDefs (const G4std::vector<G4AttDef>*);
|
||||
|
||||
private:
|
||||
|
||||
@@ -102,8 +112,10 @@ private:
|
||||
LineStyle fLineStyle;
|
||||
G4double fLineWidth; // Units of "normal" device linewidth, e.g.,
|
||||
// pixels for screen, 0.1 mm for paper.
|
||||
G4bool fForceDrawingStyle; // To override view parameters.
|
||||
ForcedDrawingStyle fForcedStyle;
|
||||
G4bool fForceDrawingStyle; // To switch on forced drawing style.
|
||||
ForcedDrawingStyle fForcedStyle; // Value of forced drawing style.
|
||||
const G4std::vector<G4AttValue>* fAttValues; // For picking, etc.
|
||||
const G4std::vector<G4AttDef>* fAttDefs; // Corresponding definitions.
|
||||
};
|
||||
|
||||
#include "G4VisAttributes.icc"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.icc,v 1.4 2001/07/11 10:01:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4VisAttributes.icc,v 1.5 2002/10/24 14:36:40 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 18th November 1996
|
||||
@@ -53,6 +53,15 @@ G4VisAttributes::GetForcedDrawingStyle () const {
|
||||
return fForcedStyle;
|
||||
}
|
||||
|
||||
inline const G4std::vector<G4AttValue>*
|
||||
G4VisAttributes::GetAttValues () const {
|
||||
return fAttValues;
|
||||
}
|
||||
|
||||
inline const G4std::vector<G4AttDef>* G4VisAttributes::GetAttDefs () const {
|
||||
return fAttDefs;
|
||||
}
|
||||
|
||||
inline void G4VisAttributes::SetVisibility (G4bool v) {fVisible = v;}
|
||||
|
||||
inline void G4VisAttributes::SetDaughtersInvisible (G4bool v) {
|
||||
@@ -94,3 +103,13 @@ inline void G4VisAttributes::SetForceSolid (G4bool force) {
|
||||
fForceDrawingStyle = force;
|
||||
fForcedStyle = G4VisAttributes::solid;
|
||||
}
|
||||
|
||||
inline void G4VisAttributes::SetAttValues
|
||||
(const G4std::vector<G4AttValue>* attValues){
|
||||
fAttValues = attValues;
|
||||
}
|
||||
|
||||
inline void G4VisAttributes::SetAttDefs
|
||||
(const G4std::vector<G4AttDef>* attDefs) {
|
||||
fAttDefs = attDefs;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExtent.hh,v 1.6 2001/07/24 21:39:43 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// A.Walkden 28/11/95
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.hh,v 1.7 2001/07/11 10:01:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.icc,v 1.4 2001/07/11 10:01:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: HepPolyhedron.h,v 1.9 2001/07/11 10:01:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: HepPolyhedron.h,v 1.12 2002/11/20 14:18:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
@@ -148,20 +148,15 @@
|
||||
// 25.05.01 E.Chernyaev
|
||||
// - added GetSurfaceArea() and GetVolume();
|
||||
//
|
||||
// 05.11.02 E.Chernyaev
|
||||
// - added createTwistedTrap() and createPolyhedron();
|
||||
//
|
||||
|
||||
#ifndef HEP_POLYHEDRON_HH
|
||||
#define HEP_POLYHEDRON_HH
|
||||
|
||||
#include <CLHEP/Geometry/Point3D.h>
|
||||
|
||||
#ifndef HepStd
|
||||
#ifndef HEP_USE_STD
|
||||
#define HepStd
|
||||
#else
|
||||
#define HepStd std
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_NUMBER_OF_STEPS
|
||||
#define DEFAULT_NUMBER_OF_STEPS 24
|
||||
#endif
|
||||
@@ -192,7 +187,7 @@ class HepPolyhedron {
|
||||
HepPoint3D *pV;
|
||||
G4Facet *pF;
|
||||
|
||||
// Allocate memory for HepPolyhedron
|
||||
// Re-allocate memory for HepPolyhedron
|
||||
void AllocateMemory(int Nvert, int Nface);
|
||||
|
||||
// Find neighbouring facet
|
||||
@@ -205,19 +200,19 @@ class HepPolyhedron {
|
||||
void CreatePrism();
|
||||
|
||||
// Generate facets by revolving an edge around Z-axis
|
||||
void RotateEdge(int k1, int k2, HepDouble r1, HepDouble r2,
|
||||
void RotateEdge(int k1, int k2, double r1, double r2,
|
||||
int v1, int v2, int vEdge,
|
||||
HepBoolean ifWholeCircle, int ns, int &kface);
|
||||
bool ifWholeCircle, int ns, int &kface);
|
||||
|
||||
// Set side facets for the case of incomplete rotation
|
||||
void SetSideFacets(int ii[4], int vv[4],
|
||||
int *kk, HepDouble *r,
|
||||
HepDouble dphi, int ns, int &kface);
|
||||
int *kk, double *r,
|
||||
double dphi, int ns, int &kface);
|
||||
|
||||
// Create HepPolyhedron for body of revolution around Z-axis
|
||||
void RotateAroundZ(int nstep, HepDouble phi, HepDouble dphi,
|
||||
void RotateAroundZ(int nstep, double phi, double dphi,
|
||||
int np1, int np2,
|
||||
const HepDouble *z, HepDouble *r,
|
||||
const double *z, double *r,
|
||||
int nodeVis, int edgeVis);
|
||||
|
||||
// For each edge set reference to neighbouring facet
|
||||
@@ -228,10 +223,7 @@ class HepPolyhedron {
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
HepPolyhedron(int Nvert=0, int Nface=0)
|
||||
: nvert(Nvert), nface(Nface),
|
||||
pV(Nvert ? new HepPoint3D[Nvert+1] : 0),
|
||||
pF(Nface ? new G4Facet[Nface+1] : 0) {}
|
||||
HepPolyhedron() : nvert(0), nface(0), pV(0), pF(0) {}
|
||||
|
||||
// Copy constructor
|
||||
HepPolyhedron(const HepPolyhedron & from);
|
||||
@@ -252,30 +244,30 @@ class HepPolyhedron {
|
||||
HepPolyhedron & Transform(const HepTransform3D & t);
|
||||
|
||||
// Get next vertex index of the quadrilateral
|
||||
HepBoolean GetNextVertexIndex(int & index, int & edgeFlag) const;
|
||||
bool GetNextVertexIndex(int & index, int & edgeFlag) const;
|
||||
|
||||
// Get vertex by index
|
||||
HepPoint3D GetVertex(int index) const;
|
||||
|
||||
// Get next vertex + edge visibility of the quadrilateral
|
||||
HepBoolean GetNextVertex(HepPoint3D & vertex, int & edgeFlag) const;
|
||||
bool GetNextVertex(HepPoint3D & vertex, int & edgeFlag) const;
|
||||
|
||||
// Get next vertex + edge visibility + normal of the quadrilateral
|
||||
HepBoolean GetNextVertex(HepPoint3D & vertex, int & edgeFlag,
|
||||
bool GetNextVertex(HepPoint3D & vertex, int & edgeFlag,
|
||||
HepNormal3D & normal) const;
|
||||
|
||||
// Get indeces of the next edge with indeces of the faces
|
||||
HepBoolean GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag,
|
||||
bool GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag,
|
||||
int & iface1, int & iface2) const;
|
||||
|
||||
// Get indeces of the next edge
|
||||
HepBoolean GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag) const;
|
||||
bool GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag) const;
|
||||
|
||||
// Get next edge
|
||||
HepBoolean GetNextEdge(HepPoint3D &p1, HepPoint3D &p2, int &edgeFlag) const;
|
||||
bool GetNextEdge(HepPoint3D &p1, HepPoint3D &p2, int &edgeFlag) const;
|
||||
|
||||
// Get next edge
|
||||
HepBoolean GetNextEdge(HepPoint3D &p1, HepPoint3D &p2, int &edgeFlag,
|
||||
bool GetNextEdge(HepPoint3D &p1, HepPoint3D &p2, int &edgeFlag,
|
||||
int &iface1, int &iface2) const;
|
||||
|
||||
// Get face by index
|
||||
@@ -287,7 +279,7 @@ class HepPolyhedron {
|
||||
int *edgeFlags = 0, HepNormal3D *normals = 0) const;
|
||||
|
||||
// Get next face with normals at the nodes
|
||||
HepBoolean GetNextFacet(int &n, HepPoint3D *nodes,
|
||||
bool GetNextFacet(int &n, HepPoint3D *nodes,
|
||||
int *edgeFlags=0, HepNormal3D *normals=0) const;
|
||||
|
||||
// Get normal of the face given by index
|
||||
@@ -297,10 +289,10 @@ class HepPolyhedron {
|
||||
HepNormal3D GetUnitNormal(int iFace) const;
|
||||
|
||||
// Get normal of the next face
|
||||
HepBoolean GetNextNormal(HepNormal3D &normal) const;
|
||||
bool GetNextNormal(HepNormal3D &normal) const;
|
||||
|
||||
// Get normal of unit length of the next face
|
||||
HepBoolean GetNextUnitNormal(HepNormal3D &normal) const;
|
||||
bool GetNextUnitNormal(HepNormal3D &normal) const;
|
||||
|
||||
// Boolean operations
|
||||
HepPolyhedron add(const HepPolyhedron &p) const;
|
||||
@@ -314,21 +306,51 @@ class HepPolyhedron {
|
||||
double GetVolume() const;
|
||||
|
||||
// Get number of steps for whole circle
|
||||
static int GetNumberOfRotationSteps() { return fNumberOfRotationSteps; }
|
||||
static int GetNumberOfRotationSteps();
|
||||
|
||||
// Set number of steps for whole circle
|
||||
static void SetNumberOfRotationSteps(int n);
|
||||
|
||||
// Reset number of steps for whole circle to default value
|
||||
static void ResetNumberOfRotationSteps() {
|
||||
fNumberOfRotationSteps = DEFAULT_NUMBER_OF_STEPS;
|
||||
}
|
||||
static void ResetNumberOfRotationSteps();
|
||||
|
||||
/**
|
||||
* Creates polyhedron for twisted trapezoid.
|
||||
* The trapezoid is given by two bases perpendicular to the z-axis.
|
||||
*
|
||||
* @param Dz half length in z
|
||||
* @param xy1 1st base (at z = -Dz)
|
||||
* @param xy2 2nd base (at z = +Dz)
|
||||
* @return status of the operation - is non-zero in case of problem
|
||||
*/
|
||||
int createTwistedTrap(double Dz,
|
||||
const double xy1[][2], const double xy2[][2]);
|
||||
|
||||
/**
|
||||
* Creates user defined polyhedron.
|
||||
* This function allows to the user to define arbitrary polyhedron.
|
||||
* The faces of the polyhedron should be either triangles or planar
|
||||
* quadrilateral. Nodes of a face are defined by indexes pointing to
|
||||
* the elements in the xyz array. Numeration of the elements in the
|
||||
* array starts from 1 (like in fortran). The indexes can be positive
|
||||
* or negative. Negative sign means that the corresponding edge is
|
||||
* invisible. The normal of the face should be directed to exterior
|
||||
* of the polyhedron.
|
||||
*
|
||||
* @param Nnodes number of nodes
|
||||
* @param Nfaces number of faces
|
||||
* @param xyz nodes
|
||||
* @param faces faces (quadrilaterals or triangles)
|
||||
* @return status of the operation - is non-zero in case of problem
|
||||
*/
|
||||
int createPolyhedron(int Nnodes, int Nfaces,
|
||||
const double xyz[][3], const int faces[][4]);
|
||||
};
|
||||
|
||||
class HepPolyhedronTrd2 : public HepPolyhedron {
|
||||
public:
|
||||
HepPolyhedronTrd2(HepDouble Dx1, HepDouble Dx2,
|
||||
HepDouble Dy1, HepDouble Dy2, HepDouble Dz);
|
||||
HepPolyhedronTrd2(double Dx1, double Dx2,
|
||||
double Dy1, double Dy2, double Dz);
|
||||
virtual ~HepPolyhedronTrd2();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -337,8 +359,8 @@ class HepPolyhedronTrd2 : public HepPolyhedron {
|
||||
|
||||
class HepPolyhedronTrd1 : public HepPolyhedronTrd2 {
|
||||
public:
|
||||
HepPolyhedronTrd1(HepDouble Dx1, HepDouble Dx2,
|
||||
HepDouble Dy, HepDouble Dz);
|
||||
HepPolyhedronTrd1(double Dx1, double Dx2,
|
||||
double Dy, double Dz);
|
||||
virtual ~HepPolyhedronTrd1();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -347,7 +369,7 @@ class HepPolyhedronTrd1 : public HepPolyhedronTrd2 {
|
||||
|
||||
class HepPolyhedronBox : public HepPolyhedronTrd2 {
|
||||
public:
|
||||
HepPolyhedronBox(HepDouble Dx, HepDouble Dy, HepDouble Dz);
|
||||
HepPolyhedronBox(double Dx, double Dy, double Dz);
|
||||
virtual ~HepPolyhedronBox();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -356,11 +378,11 @@ class HepPolyhedronBox : public HepPolyhedronTrd2 {
|
||||
|
||||
class HepPolyhedronTrap : public HepPolyhedron {
|
||||
public:
|
||||
HepPolyhedronTrap(HepDouble Dz, HepDouble Theta, HepDouble Phi,
|
||||
HepDouble Dy1,
|
||||
HepDouble Dx1, HepDouble Dx2, HepDouble Alp1,
|
||||
HepDouble Dy2,
|
||||
HepDouble Dx3, HepDouble Dx4, HepDouble Alp2);
|
||||
HepPolyhedronTrap(double Dz, double Theta, double Phi,
|
||||
double Dy1,
|
||||
double Dx1, double Dx2, double Alp1,
|
||||
double Dy2,
|
||||
double Dx3, double Dx4, double Alp2);
|
||||
virtual ~HepPolyhedronTrap();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -369,8 +391,8 @@ public:
|
||||
|
||||
class HepPolyhedronPara : public HepPolyhedronTrap {
|
||||
public:
|
||||
HepPolyhedronPara(HepDouble Dx, HepDouble Dy, HepDouble Dz,
|
||||
HepDouble Alpha, HepDouble Theta, HepDouble Phi);
|
||||
HepPolyhedronPara(double Dx, double Dy, double Dz,
|
||||
double Alpha, double Theta, double Phi);
|
||||
virtual ~HepPolyhedronPara();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -379,9 +401,9 @@ public:
|
||||
|
||||
class HepPolyhedronCons : public HepPolyhedron {
|
||||
public:
|
||||
HepPolyhedronCons(HepDouble Rmn1, HepDouble Rmx1,
|
||||
HepDouble Rmn2, HepDouble Rmx2, HepDouble Dz,
|
||||
HepDouble Phi1, HepDouble Dphi);
|
||||
HepPolyhedronCons(double Rmn1, double Rmx1,
|
||||
double Rmn2, double Rmx2, double Dz,
|
||||
double Phi1, double Dphi);
|
||||
virtual ~HepPolyhedronCons();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -390,8 +412,8 @@ public:
|
||||
|
||||
class HepPolyhedronCone : public HepPolyhedronCons {
|
||||
public:
|
||||
HepPolyhedronCone(HepDouble Rmn1, HepDouble Rmx1,
|
||||
HepDouble Rmn2, HepDouble Rmx2, HepDouble Dz);
|
||||
HepPolyhedronCone(double Rmn1, double Rmx1,
|
||||
double Rmn2, double Rmx2, double Dz);
|
||||
virtual ~HepPolyhedronCone();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -400,8 +422,8 @@ public:
|
||||
|
||||
class HepPolyhedronTubs : public HepPolyhedronCons {
|
||||
public:
|
||||
HepPolyhedronTubs(HepDouble Rmin, HepDouble Rmax, HepDouble Dz,
|
||||
HepDouble Phi1, HepDouble Dphi);
|
||||
HepPolyhedronTubs(double Rmin, double Rmax, double Dz,
|
||||
double Phi1, double Dphi);
|
||||
virtual ~HepPolyhedronTubs();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -410,7 +432,7 @@ public:
|
||||
|
||||
class HepPolyhedronTube : public HepPolyhedronCons {
|
||||
public:
|
||||
HepPolyhedronTube (HepDouble Rmin, HepDouble Rmax, HepDouble Dz);
|
||||
HepPolyhedronTube (double Rmin, double Rmax, double Dz);
|
||||
virtual ~HepPolyhedronTube();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -419,10 +441,10 @@ public:
|
||||
|
||||
class HepPolyhedronPgon : public HepPolyhedron {
|
||||
public:
|
||||
HepPolyhedronPgon(HepDouble phi, HepDouble dphi, int npdv, int nz,
|
||||
const HepDouble *z,
|
||||
const HepDouble *rmin,
|
||||
const HepDouble *rmax);
|
||||
HepPolyhedronPgon(double phi, double dphi, int npdv, int nz,
|
||||
const double *z,
|
||||
const double *rmin,
|
||||
const double *rmax);
|
||||
virtual ~HepPolyhedronPgon();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -431,10 +453,10 @@ public:
|
||||
|
||||
class HepPolyhedronPcon : public HepPolyhedronPgon {
|
||||
public:
|
||||
HepPolyhedronPcon(HepDouble phi, HepDouble dphi, int nz,
|
||||
const HepDouble *z,
|
||||
const HepDouble *rmin,
|
||||
const HepDouble *rmax);
|
||||
HepPolyhedronPcon(double phi, double dphi, int nz,
|
||||
const double *z,
|
||||
const double *rmin,
|
||||
const double *rmax);
|
||||
virtual ~HepPolyhedronPcon();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -443,9 +465,9 @@ public:
|
||||
|
||||
class HepPolyhedronSphere : public HepPolyhedron {
|
||||
public:
|
||||
HepPolyhedronSphere(HepDouble rmin, HepDouble rmax,
|
||||
HepDouble phi, HepDouble dphi,
|
||||
HepDouble the, HepDouble dthe);
|
||||
HepPolyhedronSphere(double rmin, double rmax,
|
||||
double phi, double dphi,
|
||||
double the, double dthe);
|
||||
virtual ~HepPolyhedronSphere();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
@@ -454,8 +476,8 @@ public:
|
||||
|
||||
class HepPolyhedronTorus : public HepPolyhedron {
|
||||
public:
|
||||
HepPolyhedronTorus(HepDouble rmin, HepDouble rmax, HepDouble rtor,
|
||||
HepDouble phi, HepDouble dphi);
|
||||
HepPolyhedronTorus(double rmin, double rmax, double rtor,
|
||||
double phi, double dphi);
|
||||
virtual ~HepPolyhedronTorus();
|
||||
virtual HepPolyhedron& operator = (const HepPolyhedron& from) {
|
||||
return HepPolyhedron::operator = (from);
|
||||
|
||||
Reference in New Issue
Block a user