Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.37 2001/09/10 10:27:18 johna Exp $
|
||||
cvs log $Id: History,v 1.45 2002/11/27 12:24:19 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,38 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
27th November 2002 John Allison (greps-V04-01-05)
|
||||
- Small revison of G4Scale and improvements in G4VMarker class description.
|
||||
|
||||
Nov 20, 2002, G.Cosmo (greps-V04-01-04)
|
||||
- Patched access to public static data in G4Scale and G4VisAttributes.
|
||||
Added static accessors to be used in the kernel to allow porting on
|
||||
Windows DLLs.
|
||||
- HepPolyhedron[.hh.cc]: changed inline static methods to not inlined.
|
||||
|
||||
Nov 11, 2002, E.Chernaev (greps-V04-01-03)
|
||||
- Minor bug fix in HepPolyhedron::GetFacet().
|
||||
- HepDouble, HepBoolean --> double, bool in HepPolyhedron
|
||||
|
||||
Nov 7, 2002, E.Chernaev (greps-V04-01-02)
|
||||
- Added createTwistedTrap() and createPolyhedron() to HepPolyhedron.
|
||||
|
||||
Oct 28, 2002, J.Allison (greps-V04-01-01)
|
||||
- Changed AttDefStore to return a map.
|
||||
|
||||
24th October 2002 John Allison (greps-V04-01-00)
|
||||
- Added G4AttDefStore.
|
||||
- Further improved G4AttDef/Value.
|
||||
- Added const G4std::vector<G4AttValue>* fAttValues/Defs to G4VisAttributes.
|
||||
|
||||
23rd October 2002 John Allison
|
||||
- G4Colour class description corrected.
|
||||
- G4VisAttributes comments slightly improved.
|
||||
- G4AttDef and G4AttValue headers changed to follow G4 conventions.
|
||||
|
||||
27th September 2002 Joseph Perl
|
||||
- Added first versions of headers for G4AttDef and G4AttValue.
|
||||
|
||||
10th September 2001 John Allison (greps-V03-02-04)
|
||||
- Added G4Scale::GuidanceString.
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.2 2002/10/28 11:13:08 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#include "G4AttDefStore.hh"
|
||||
|
||||
#include "G4AttDef.hh"
|
||||
|
||||
G4std::map<G4String,G4std::map<G4String,G4AttDef>*> G4AttDefStore::m_stores;
|
||||
|
||||
G4std::map<G4String,G4AttDef>*
|
||||
G4AttDefStore::GetInstance(G4String storeName,bool& isNew) {
|
||||
G4std::map<G4String,G4AttDef>* store;
|
||||
G4std::map<G4String,G4std::map<G4String,G4AttDef>*>::iterator iStore =
|
||||
m_stores.find(storeName);
|
||||
if (iStore == m_stores.end()) {
|
||||
isNew = true;
|
||||
store = new G4std::map<G4String,G4AttDef>;
|
||||
m_stores[storeName] = store;
|
||||
}
|
||||
else {
|
||||
isNew = false;
|
||||
store = iStore->second;
|
||||
}
|
||||
return store;
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Circle.cc,v 1.4 2001/07/11 10:01:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.cc,v 1.4 2001/07/11 10:01:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBS.cc,v 1.5 2001/08/14 18:24:29 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBSbox.cc,v 1.4 2001/07/11 10:01:07 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.cc,v 1.4 2001/07/11 10:01:07 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.cc,v 1.4 2001/07/11 10:01:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// hexahedron implementation
|
||||
// OC 17 9 96
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStube.cc,v 1.4 2001/07/11 10:01:07 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.cc,v 1.5 2001/07/11 10:01:08 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.cc,v 1.3 2001/07/11 10:01:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#include "G4PlacedPolyhedron.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Point3DList.cc,v 1.5 2001/07/11 10:01:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyhedron.cc,v 1.11 2001/07/11 10:01:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyline.cc,v 1.7 2001/08/14 18:24:58 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.cc,v 1.7 2001/07/11 10:01:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.cc,v 1.4 2001/09/10 10:28:56 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Scale.cc,v 1.6 2002/11/27 12:24:01 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001
|
||||
@@ -66,7 +66,7 @@ G4Scale & G4Scale::operator = (const G4Scale &from) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4String G4Scale::GuidanceString
|
||||
const G4String G4Scale::GuidanceString
|
||||
(
|
||||
"An annotated line in the specified direction with tick marks at the"
|
||||
"\nend. If autoPlacing is true it is required to be centred at the"
|
||||
@@ -83,3 +83,8 @@ G4String G4Scale::GuidanceString
|
||||
"\n if direction == y then (x,y,z) to (x,y + length,z)"
|
||||
"\n if direction == z then (x,y,z - length) to (x,y,z)"
|
||||
);
|
||||
|
||||
const G4String& G4Scale::GetGuidanceString()
|
||||
{
|
||||
return GuidanceString;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.cc,v 1.3 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.cc,v 1.6 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.cc,v 1.7 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisPrim.cc,v 1.7 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison August 1995
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.cc,v 1.6 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4VisAttributes.cc,v 1.8 2002/11/20 14:18:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
@@ -35,7 +35,9 @@ fDaughtersInvisible (false),
|
||||
fColour (G4Colour ()),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false)
|
||||
fForceDrawingStyle (false),
|
||||
fAttValues (0),
|
||||
fAttDefs (0)
|
||||
{}
|
||||
|
||||
G4VisAttributes::G4VisAttributes (G4bool visibility):
|
||||
@@ -44,7 +46,9 @@ fDaughtersInvisible (false),
|
||||
fColour (G4Colour ()),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false)
|
||||
fForceDrawingStyle (false),
|
||||
fAttValues (0),
|
||||
fAttDefs (0)
|
||||
{}
|
||||
|
||||
G4VisAttributes::G4VisAttributes (const G4Colour& colour):
|
||||
@@ -53,7 +57,9 @@ fDaughtersInvisible (false),
|
||||
fColour (colour),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle ( false)
|
||||
fForceDrawingStyle (false),
|
||||
fAttValues (0),
|
||||
fAttDefs (0)
|
||||
{}
|
||||
|
||||
G4VisAttributes::G4VisAttributes (G4bool visibility,
|
||||
@@ -63,11 +69,17 @@ fDaughtersInvisible (false),
|
||||
fColour (colour),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false)
|
||||
fForceDrawingStyle (false),
|
||||
fAttValues (0),
|
||||
fAttDefs (0)
|
||||
{}
|
||||
|
||||
const G4VisAttributes G4VisAttributes::Invisible = G4VisAttributes (false);
|
||||
|
||||
const G4VisAttributes& G4VisAttributes::GetInvisible() {
|
||||
return Invisible;
|
||||
}
|
||||
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4VisAttributes& a) {
|
||||
|
||||
os << "G4VisAttributes: ";
|
||||
@@ -100,10 +112,19 @@ G4std::ostream& operator << (G4std::ostream& os, const G4VisAttributes& a) {
|
||||
else {
|
||||
os << "unforced";
|
||||
}
|
||||
os << "\n vector<G4AttValue> pointer is ";
|
||||
if (a.fAttValues) {
|
||||
os << "non-";
|
||||
}
|
||||
os << "zero";
|
||||
os << "\n vector<G4AttDef> pointer is ";
|
||||
if (a.fAttDefs) {
|
||||
os << "non-";
|
||||
}
|
||||
os << "zero";
|
||||
}
|
||||
else os << " The pointer is zero ";
|
||||
else os << " zero G4VisAttributes pointer";
|
||||
return os;
|
||||
|
||||
}
|
||||
|
||||
G4bool G4VisAttributes::operator != (const G4VisAttributes& a) const {
|
||||
@@ -114,7 +135,9 @@ G4bool G4VisAttributes::operator != (const G4VisAttributes& a) const {
|
||||
(fColour != a.fColour) ||
|
||||
(fLineStyle != a.fLineStyle) ||
|
||||
(fLineWidth != a.fLineWidth) ||
|
||||
(fForceDrawingStyle != a.fForceDrawingStyle)
|
||||
(fForceDrawingStyle != a.fForceDrawingStyle) ||
|
||||
(fAttValues != a.fAttValues) ||
|
||||
(fAttDefs != a.fAttDefs)
|
||||
)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExtent.cc,v 1.6 2001/07/24 21:39:50 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.cc,v 1.4 2001/07/11 10:01:09 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.cc,v 1.9 2001/07/11 10:01:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: HepPolyhedron.cc,v 1.12 2002/11/20 14:18:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -49,6 +49,9 @@
|
||||
// 25.05.01 E.Chernyaev
|
||||
// - added GetSurfaceArea() and GetVolume();
|
||||
//
|
||||
// 05.11.02 E.Chernyaev
|
||||
// - added createTwistedTrap() and createPolyhedron();
|
||||
//
|
||||
|
||||
#include "HepPolyhedron.h"
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
@@ -91,18 +94,11 @@ HepPolyhedron::HepPolyhedron(const HepPolyhedron &from)
|
||||
* Author: E.Chernyaev (IHEP/Protvino) Revised: *
|
||||
* *
|
||||
***********************************************************************/
|
||||
: nvert(0), nface(0), pV(0), pF(0)
|
||||
{
|
||||
if (from.nvert > 0 && from.nface > 0) {
|
||||
nvert = from.nvert;
|
||||
nface = from.nface;
|
||||
pV = new HepPoint3D[nvert + 1];
|
||||
pF = new G4Facet[nface + 1];
|
||||
int i;
|
||||
for (i=1; i<=nvert; i++) pV[i] = from.pV[i];
|
||||
for (i=1; i<=nface; i++) pF[i] = from.pF[i];
|
||||
}else{
|
||||
nvert = 0; nface = 0; pV = 0; pF = 0;
|
||||
}
|
||||
AllocateMemory(from.nvert, from.nface);
|
||||
for (int i=1; i<=nvert; i++) pV[i] = from.pV[i];
|
||||
for (int k=1; k<=nface; k++) pF[k] = from.pF[k];
|
||||
}
|
||||
|
||||
HepPolyhedron & HepPolyhedron::operator=(const HepPolyhedron &from)
|
||||
@@ -111,23 +107,14 @@ HepPolyhedron & HepPolyhedron::operator=(const HepPolyhedron &from)
|
||||
* Name: HepPolyhedron operator = Date: 23.07.96 *
|
||||
* Author: E.Chernyaev (IHEP/Protvino) Revised: *
|
||||
* *
|
||||
* Function: Copy contents of one GEANT4 polyhedron to another *
|
||||
* Function: Copy contents of one polyhedron to another *
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
if (this == &from) return *this;
|
||||
delete [] pV;
|
||||
delete [] pF;
|
||||
if (from.nvert > 0 && from.nface > 0) {
|
||||
nvert = from.nvert;
|
||||
nface = from.nface;
|
||||
pV = new HepPoint3D[nvert + 1];
|
||||
pF = new G4Facet[nface + 1];
|
||||
int i;
|
||||
for (i=1; i<=nvert; i++) pV[i] = from.pV[i];
|
||||
for (i=1; i<=nface; i++) pF[i] = from.pF[i];
|
||||
}else{
|
||||
nvert = 0; nface = 0; pV = 0; pF = 0;
|
||||
if (this != &from) {
|
||||
AllocateMemory(from.nvert, from.nface);
|
||||
for (int i=1; i<=nvert; i++) pV[i] = from.pV[i];
|
||||
for (int k=1; k<=nface; k++) pF[k] = from.pF[k];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -189,6 +176,19 @@ HepNormal3D HepPolyhedron::FindNodeNormal(int iFace, int iNode) const
|
||||
return normal.unit();
|
||||
}
|
||||
|
||||
int HepPolyhedron::GetNumberOfRotationSteps()
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::GetNumberOfRotationSteps Date: 24.06.97 *
|
||||
* Author: J.Allison (Manchester University) Revised: *
|
||||
* *
|
||||
* Function: Get number of steps for whole circle *
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
return fNumberOfRotationSteps;
|
||||
}
|
||||
|
||||
void HepPolyhedron::SetNumberOfRotationSteps(int n)
|
||||
/***********************************************************************
|
||||
* *
|
||||
@@ -211,11 +211,24 @@ void HepPolyhedron::SetNumberOfRotationSteps(int n)
|
||||
}
|
||||
}
|
||||
|
||||
void HepPolyhedron::ResetNumberOfRotationSteps()
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::GetNumberOfRotationSteps Date: 24.06.97 *
|
||||
* Author: J.Allison (Manchester University) Revised: *
|
||||
* *
|
||||
* Function: Reset number of steps for whole circle to default value *
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
fNumberOfRotationSteps = DEFAULT_NUMBER_OF_STEPS;
|
||||
}
|
||||
|
||||
void HepPolyhedron::AllocateMemory(int Nvert, int Nface)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::AllocateMemory Date: 19.06.96 *
|
||||
* Author: E.Chernyaev (IHEP/Protvino) Revised: *
|
||||
* Author: E.Chernyaev (IHEP/Protvino) Revised: 05.11.02 *
|
||||
* *
|
||||
* Function: Allocate memory for GEANT4 polyhedron *
|
||||
* *
|
||||
@@ -224,10 +237,17 @@ void HepPolyhedron::AllocateMemory(int Nvert, int Nface)
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
nvert = Nvert;
|
||||
nface = Nface;
|
||||
pV = new HepPoint3D[nvert+1];
|
||||
pF = new G4Facet[nface+1];
|
||||
if (nvert == Nvert && nface == Nface) return;
|
||||
if (pV != 0) delete [] pV;
|
||||
if (pF != 0) delete [] pF;
|
||||
if (Nvert > 0 && Nface > 0) {
|
||||
nvert = Nvert;
|
||||
nface = Nface;
|
||||
pV = new HepPoint3D[nvert+1];
|
||||
pF = new G4Facet[nface+1];
|
||||
}else{
|
||||
nvert = 0; nface = 0; pV = 0; pF = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void HepPolyhedron::CreatePrism()
|
||||
@@ -250,9 +270,9 @@ void HepPolyhedron::CreatePrism()
|
||||
pF[6] = G4Facet(5,FRONT, 6,RIGHT, 7,BACK, 8,LEFT);
|
||||
}
|
||||
|
||||
void HepPolyhedron::RotateEdge(int k1, int k2, HepDouble r1, HepDouble r2,
|
||||
void HepPolyhedron::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)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::RotateEdge Date: 05.12.96 *
|
||||
@@ -313,8 +333,8 @@ void HepPolyhedron::RotateEdge(int k1, int k2, HepDouble r1, HepDouble r2,
|
||||
}
|
||||
|
||||
void HepPolyhedron::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)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::SetSideFacets Date: 20.05.97 *
|
||||
@@ -334,7 +354,7 @@ void HepPolyhedron::SetSideFacets(int ii[4], int vv[4],
|
||||
{
|
||||
int k1, k2, k3, k4;
|
||||
|
||||
if (abs((HepDouble)(dphi-M_PI)) < perMillion) { // half a circle
|
||||
if (abs((double)(dphi-M_PI)) < perMillion) { // half a circle
|
||||
for (int i=0; i<4; i++) {
|
||||
k1 = ii[i];
|
||||
k2 = (i == 3) ? ii[0] : ii[i+1];
|
||||
@@ -383,9 +403,9 @@ void HepPolyhedron::SetSideFacets(int ii[4], int vv[4],
|
||||
}
|
||||
}
|
||||
|
||||
void HepPolyhedron::RotateAroundZ(int nstep, HepDouble phi, HepDouble dphi,
|
||||
void HepPolyhedron::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)
|
||||
/***********************************************************************
|
||||
* *
|
||||
@@ -409,18 +429,17 @@ void HepPolyhedron::RotateAroundZ(int nstep, HepDouble phi, HepDouble dphi,
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
static HepDouble wholeCircle = 2*M_PI;
|
||||
static double wholeCircle = 2*M_PI;
|
||||
|
||||
// S E T R O T A T I O N P A R A M E T E R S
|
||||
|
||||
HepBoolean ifWholeCircle = (abs(dphi-wholeCircle) < perMillion) ?
|
||||
true : false;
|
||||
HepDouble delPhi = ifWholeCircle ? wholeCircle : dphi;
|
||||
bool ifWholeCircle = (abs(dphi-wholeCircle) < perMillion) ? true : false;
|
||||
double delPhi = ifWholeCircle ? wholeCircle : dphi;
|
||||
int nSphi = (nstep > 0) ?
|
||||
nstep : int(delPhi*GetNumberOfRotationSteps()/wholeCircle+.5);
|
||||
if (nSphi == 0) nSphi = 1;
|
||||
int nVphi = ifWholeCircle ? nSphi : nSphi+1;
|
||||
HepBoolean ifClosed = np1 > 0 ? false : true;
|
||||
bool ifClosed = np1 > 0 ? false : true;
|
||||
|
||||
// C O U N T V E R T E C E S
|
||||
|
||||
@@ -441,8 +460,8 @@ void HepPolyhedron::RotateAroundZ(int nstep, HepDouble phi, HepDouble dphi,
|
||||
j += (r[i] == 0.) ? 1 : nVphi;
|
||||
}
|
||||
|
||||
HepBoolean ifSide1 = false; // internal nodes
|
||||
HepBoolean ifSide2 = false;
|
||||
bool ifSide1 = false; // internal nodes
|
||||
bool ifSide2 = false;
|
||||
|
||||
if (r[i2beg] != r[i1beg] || z[i2beg] != z[i1beg]) {
|
||||
j += (r[i2beg] == 0.) ? 1 : nVphi;
|
||||
@@ -519,7 +538,7 @@ void HepPolyhedron::RotateAroundZ(int nstep, HepDouble phi, HepDouble dphi,
|
||||
}
|
||||
}
|
||||
|
||||
HepDouble cosPhi, sinPhi;
|
||||
double cosPhi, sinPhi;
|
||||
|
||||
for(j=0; j<nVphi; j++) {
|
||||
cosPhi = cos(phi+j*delPhi/nSphi);
|
||||
@@ -815,7 +834,7 @@ HepPolyhedron & HepPolyhedron::Transform(const HepTransform3D &t)
|
||||
return *this;
|
||||
}
|
||||
|
||||
HepBoolean HepPolyhedron::GetNextVertexIndex(int &index, int &edgeFlag) const
|
||||
bool HepPolyhedron::GetNextVertexIndex(int &index, int &edgeFlag) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::GetNextVertexIndex Date: 03.09.96 *
|
||||
@@ -861,7 +880,7 @@ HepPoint3D HepPolyhedron::GetVertex(int index) const
|
||||
return pV[index];
|
||||
}
|
||||
|
||||
HepBoolean
|
||||
bool
|
||||
HepPolyhedron::GetNextVertex(HepPoint3D &vertex, int &edgeFlag) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
@@ -875,12 +894,12 @@ HepPolyhedron::GetNextVertex(HepPoint3D &vertex, int &edgeFlag) const
|
||||
***********************************************************************/
|
||||
{
|
||||
int index;
|
||||
HepBoolean rep = GetNextVertexIndex(index, edgeFlag);
|
||||
bool rep = GetNextVertexIndex(index, edgeFlag);
|
||||
vertex = pV[index];
|
||||
return rep;
|
||||
}
|
||||
|
||||
HepBoolean HepPolyhedron::GetNextVertex(HepPoint3D &vertex, int &edgeFlag,
|
||||
bool HepPolyhedron::GetNextVertex(HepPoint3D &vertex, int &edgeFlag,
|
||||
HepNormal3D &normal) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
@@ -912,7 +931,7 @@ HepBoolean HepPolyhedron::GetNextVertex(HepPoint3D &vertex, int &edgeFlag,
|
||||
}
|
||||
}
|
||||
|
||||
HepBoolean HepPolyhedron::GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag,
|
||||
bool HepPolyhedron::GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag,
|
||||
int &iface1, int &iface2) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
@@ -964,7 +983,7 @@ HepBoolean HepPolyhedron::GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag,
|
||||
}
|
||||
}
|
||||
|
||||
HepBoolean
|
||||
bool
|
||||
HepPolyhedron::GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
@@ -980,7 +999,7 @@ HepPolyhedron::GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag) const
|
||||
return GetNextEdgeIndeces(i1, i2, edgeFlag, kface1, kface2);
|
||||
}
|
||||
|
||||
HepBoolean
|
||||
bool
|
||||
HepPolyhedron::GetNextEdge(HepPoint3D &p1,
|
||||
HepPoint3D &p2,
|
||||
int &edgeFlag) const
|
||||
@@ -995,13 +1014,13 @@ HepPolyhedron::GetNextEdge(HepPoint3D &p1,
|
||||
***********************************************************************/
|
||||
{
|
||||
int i1,i2;
|
||||
HepBoolean rep = GetNextEdgeIndeces(i1,i2,edgeFlag);
|
||||
bool rep = GetNextEdgeIndeces(i1,i2,edgeFlag);
|
||||
p1 = pV[i1];
|
||||
p2 = pV[i2];
|
||||
return rep;
|
||||
}
|
||||
|
||||
HepBoolean
|
||||
bool
|
||||
HepPolyhedron::GetNextEdge(HepPoint3D &p1, HepPoint3D &p2,
|
||||
int &edgeFlag, int &iface1, int &iface2) const
|
||||
/***********************************************************************
|
||||
@@ -1016,7 +1035,7 @@ HepPolyhedron::GetNextEdge(HepPoint3D &p1, HepPoint3D &p2,
|
||||
***********************************************************************/
|
||||
{
|
||||
int i1,i2;
|
||||
HepBoolean rep = GetNextEdgeIndeces(i1,i2,edgeFlag,iface1,iface2);
|
||||
bool rep = GetNextEdgeIndeces(i1,i2,edgeFlag,iface1,iface2);
|
||||
p1 = pV[i1];
|
||||
p2 = pV[i2];
|
||||
return rep;
|
||||
@@ -1070,14 +1089,14 @@ void HepPolyhedron::GetFacet(int index, int &n, HepPoint3D *nodes,
|
||||
int iNodes[4];
|
||||
GetFacet(index, n, iNodes, edgeFlags);
|
||||
if (n != 0) {
|
||||
for (int i=0; i<4; i++) {
|
||||
for (int i=0; i<n; i++) {
|
||||
nodes[i] = pV[iNodes[i]];
|
||||
if (normals != 0) normals[i] = FindNodeNormal(index,iNodes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HepBoolean
|
||||
bool
|
||||
HepPolyhedron::GetNextFacet(int &n, HepPoint3D *nodes,
|
||||
int *edgeFlags, HepNormal3D *normals) const
|
||||
/***********************************************************************
|
||||
@@ -1158,7 +1177,7 @@ HepNormal3D HepPolyhedron::GetUnitNormal(int iFace) const
|
||||
return ((pV[i2] - pV[i0]).cross(pV[i3] - pV[i1])).unit();
|
||||
}
|
||||
|
||||
HepBoolean HepPolyhedron::GetNextNormal(HepNormal3D &normal) const
|
||||
bool HepPolyhedron::GetNextNormal(HepNormal3D &normal) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::GetNextNormal Date: 22.07.96 *
|
||||
@@ -1179,7 +1198,7 @@ HepBoolean HepPolyhedron::GetNextNormal(HepNormal3D &normal) const
|
||||
}
|
||||
}
|
||||
|
||||
HepBoolean HepPolyhedron::GetNextUnitNormal(HepNormal3D &normal) const
|
||||
bool HepPolyhedron::GetNextUnitNormal(HepNormal3D &normal) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedron::GetNextUnitNormal Date: 16.09.96 *
|
||||
@@ -1190,7 +1209,7 @@ HepBoolean HepPolyhedron::GetNextUnitNormal(HepNormal3D &normal) const
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
HepBoolean rep = GetNextNormal(normal);
|
||||
bool rep = GetNextNormal(normal);
|
||||
normal = normal.unit();
|
||||
return rep;
|
||||
}
|
||||
@@ -1245,9 +1264,109 @@ double HepPolyhedron::GetVolume() const
|
||||
return v/6.;
|
||||
}
|
||||
|
||||
HepPolyhedronTrd2::HepPolyhedronTrd2(HepDouble Dx1, HepDouble Dx2,
|
||||
HepDouble Dy1, HepDouble Dy2,
|
||||
HepDouble Dz)
|
||||
int
|
||||
HepPolyhedron::createTwistedTrap(double Dz,
|
||||
const double xy1[][2],
|
||||
const double xy2[][2])
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: createTwistedTrap Date: 05.11.02 *
|
||||
* Author: E.Chernyaev (IHEP/Protvino) Revised: *
|
||||
* *
|
||||
* Function: Creates polyhedron for twisted trapezoid *
|
||||
* *
|
||||
* Input: Dz - half-length along Z 8----7 *
|
||||
* xy1[2,4] - quadrilateral at Z=-Dz 5----6 ! *
|
||||
* xy2[2,4] - quadrilateral at Z=+Dz ! 4-!--3 *
|
||||
* 1----2 *
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
AllocateMemory(12,18);
|
||||
|
||||
pV[ 1] = HepPoint3D(xy1[0][0],xy1[0][1],-Dz);
|
||||
pV[ 2] = HepPoint3D(xy1[1][0],xy1[1][1],-Dz);
|
||||
pV[ 3] = HepPoint3D(xy1[2][0],xy1[2][1],-Dz);
|
||||
pV[ 4] = HepPoint3D(xy1[3][0],xy1[3][1],-Dz);
|
||||
|
||||
pV[ 5] = HepPoint3D(xy2[0][0],xy2[0][1], Dz);
|
||||
pV[ 6] = HepPoint3D(xy2[1][0],xy2[1][1], Dz);
|
||||
pV[ 7] = HepPoint3D(xy2[2][0],xy2[2][1], Dz);
|
||||
pV[ 8] = HepPoint3D(xy2[3][0],xy2[3][1], Dz);
|
||||
|
||||
pV[ 9] = (pV[1]+pV[2]+pV[5]+pV[6])/4.;
|
||||
pV[10] = (pV[2]+pV[3]+pV[6]+pV[7])/4.;
|
||||
pV[11] = (pV[3]+pV[4]+pV[7]+pV[8])/4.;
|
||||
pV[12] = (pV[4]+pV[1]+pV[8]+pV[5])/4.;
|
||||
|
||||
enum {DUMMY, BOTTOM,
|
||||
LEFT_BOTTOM, LEFT_FRONT, LEFT_TOP, LEFT_BACK,
|
||||
BACK_BOTTOM, BACK_LEFT, BACK_TOP, BACK_RIGHT,
|
||||
RIGHT_BOTTOM, RIGHT_BACK, RIGHT_TOP, RIGHT_FRONT,
|
||||
FRONT_BOTTOM, FRONT_RIGHT, FRONT_TOP, FRONT_LEFT,
|
||||
TOP};
|
||||
|
||||
pF[ 1]=G4Facet(1,LEFT_BOTTOM, 4,BACK_BOTTOM, 3,RIGHT_BOTTOM, 2,FRONT_BOTTOM);
|
||||
|
||||
pF[ 2]=G4Facet(4,BOTTOM, -1,LEFT_FRONT, -12,LEFT_BACK, 0,0);
|
||||
pF[ 3]=G4Facet(1,FRONT_LEFT, -5,LEFT_TOP, -12,LEFT_BOTTOM, 0,0);
|
||||
pF[ 4]=G4Facet(5,TOP, -8,LEFT_BACK, -12,LEFT_FRONT, 0,0);
|
||||
pF[ 5]=G4Facet(8,BACK_LEFT, -4,LEFT_BOTTOM, -12,LEFT_TOP, 0,0);
|
||||
|
||||
pF[ 6]=G4Facet(3,BOTTOM, -4,BACK_LEFT, -11,BACK_RIGHT, 0,0);
|
||||
pF[ 7]=G4Facet(4,LEFT_BACK, -8,BACK_TOP, -11,BACK_BOTTOM, 0,0);
|
||||
pF[ 8]=G4Facet(8,TOP, -7,BACK_RIGHT, -11,BACK_LEFT, 0,0);
|
||||
pF[ 9]=G4Facet(7,RIGHT_BACK, -3,BACK_BOTTOM, -11,BACK_TOP, 0,0);
|
||||
|
||||
pF[10]=G4Facet(2,BOTTOM, -3,RIGHT_BACK, -10,RIGHT_FRONT, 0,0);
|
||||
pF[11]=G4Facet(3,BACK_RIGHT, -7,RIGHT_TOP, -10,RIGHT_BOTTOM, 0,0);
|
||||
pF[12]=G4Facet(7,TOP, -6,RIGHT_FRONT, -10,RIGHT_BACK, 0,0);
|
||||
pF[13]=G4Facet(6,FRONT_RIGHT,-2,RIGHT_BOTTOM,-10,RIGHT_TOP, 0,0);
|
||||
|
||||
pF[14]=G4Facet(1,BOTTOM, -2,FRONT_RIGHT, -9,FRONT_LEFT, 0,0);
|
||||
pF[15]=G4Facet(2,RIGHT_FRONT,-6,FRONT_TOP, -9,FRONT_BOTTOM, 0,0);
|
||||
pF[16]=G4Facet(6,TOP, -5,FRONT_LEFT, -9,FRONT_RIGHT, 0,0);
|
||||
pF[17]=G4Facet(5,LEFT_FRONT, -1,FRONT_BOTTOM, -9,FRONT_TOP, 0,0);
|
||||
|
||||
pF[18]=G4Facet(5,FRONT_TOP, 6,RIGHT_TOP, 7,BACK_TOP, 8,LEFT_TOP);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
HepPolyhedron::createPolyhedron(int Nnodes, int Nfaces,
|
||||
const double xyz[][3],
|
||||
const int faces[][4])
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: createPolyhedron Date: 05.11.02 *
|
||||
* Author: E.Chernyaev (IHEP/Protvino) Revised: *
|
||||
* *
|
||||
* Function: Creates user defined polyhedron *
|
||||
* *
|
||||
* Input: Nnodes - number of nodes *
|
||||
* Nfaces - number of faces *
|
||||
* nodes[][3] - node coordinates *
|
||||
* faces[][4] - faces *
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
AllocateMemory(Nnodes, Nfaces);
|
||||
if (nvert == 0) return 1;
|
||||
|
||||
for (int i=0; i<Nnodes; i++) {
|
||||
pV[i+1] = HepPoint3D(xyz[i][0], xyz[i][1], xyz[i][2]);
|
||||
}
|
||||
for (int k=0; k<Nfaces; k++) {
|
||||
pF[k+1] = G4Facet(faces[k][0],0,faces[k][1],0,faces[k][2],0,faces[k][3],0);
|
||||
}
|
||||
SetReferences();
|
||||
return 0;
|
||||
}
|
||||
|
||||
HepPolyhedronTrd2::HepPolyhedronTrd2(double Dx1, double Dx2,
|
||||
double Dy1, double Dy2,
|
||||
double Dz)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronTrd2 Date: 22.07.96 *
|
||||
@@ -1279,28 +1398,28 @@ HepPolyhedronTrd2::HepPolyhedronTrd2(HepDouble Dx1, HepDouble Dx2,
|
||||
|
||||
HepPolyhedronTrd2::~HepPolyhedronTrd2() {}
|
||||
|
||||
HepPolyhedronTrd1::HepPolyhedronTrd1(HepDouble Dx1, HepDouble Dx2,
|
||||
HepDouble Dy, HepDouble Dz)
|
||||
HepPolyhedronTrd1::HepPolyhedronTrd1(double Dx1, double Dx2,
|
||||
double Dy, double Dz)
|
||||
: HepPolyhedronTrd2(Dx1, Dx2, Dy, Dy, Dz) {}
|
||||
|
||||
HepPolyhedronTrd1::~HepPolyhedronTrd1() {}
|
||||
|
||||
HepPolyhedronBox::HepPolyhedronBox(HepDouble Dx, HepDouble Dy, HepDouble Dz)
|
||||
HepPolyhedronBox::HepPolyhedronBox(double Dx, double Dy, double Dz)
|
||||
: HepPolyhedronTrd2(Dx, Dx, Dy, Dy, Dz) {}
|
||||
|
||||
HepPolyhedronBox::~HepPolyhedronBox() {}
|
||||
|
||||
HepPolyhedronTrap::HepPolyhedronTrap(HepDouble Dz,
|
||||
HepDouble Theta,
|
||||
HepDouble Phi,
|
||||
HepDouble Dy1,
|
||||
HepDouble Dx1,
|
||||
HepDouble Dx2,
|
||||
HepDouble Alp1,
|
||||
HepDouble Dy2,
|
||||
HepDouble Dx3,
|
||||
HepDouble Dx4,
|
||||
HepDouble Alp2)
|
||||
HepPolyhedronTrap::HepPolyhedronTrap(double Dz,
|
||||
double Theta,
|
||||
double Phi,
|
||||
double Dy1,
|
||||
double Dx1,
|
||||
double Dx2,
|
||||
double Alp1,
|
||||
double Dy2,
|
||||
double Dx3,
|
||||
double Dx4,
|
||||
double Alp2)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronTrap Date: 20.11.96 *
|
||||
@@ -1324,10 +1443,10 @@ HepPolyhedronTrap::HepPolyhedronTrap(HepDouble Dz,
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
HepDouble DzTthetaCphi = Dz*tan(Theta)*cos(Phi);
|
||||
HepDouble DzTthetaSphi = Dz*tan(Theta)*sin(Phi);
|
||||
HepDouble Dy1Talp1 = Dy1*tan(Alp1);
|
||||
HepDouble Dy2Talp2 = Dy2*tan(Alp2);
|
||||
double DzTthetaCphi = Dz*tan(Theta)*cos(Phi);
|
||||
double DzTthetaSphi = Dz*tan(Theta)*sin(Phi);
|
||||
double Dy1Talp1 = Dy1*tan(Alp1);
|
||||
double Dy2Talp2 = Dy2*tan(Alp2);
|
||||
|
||||
AllocateMemory(8,6);
|
||||
|
||||
@@ -1345,20 +1464,20 @@ HepPolyhedronTrap::HepPolyhedronTrap(HepDouble Dz,
|
||||
|
||||
HepPolyhedronTrap::~HepPolyhedronTrap() {}
|
||||
|
||||
HepPolyhedronPara::HepPolyhedronPara(HepDouble Dx, HepDouble Dy, HepDouble Dz,
|
||||
HepDouble Alpha, HepDouble Theta,
|
||||
HepDouble Phi)
|
||||
HepPolyhedronPara::HepPolyhedronPara(double Dx, double Dy, double Dz,
|
||||
double Alpha, double Theta,
|
||||
double Phi)
|
||||
: HepPolyhedronTrap(Dz, Theta, Phi, Dy, Dx, Dx, Alpha, Dy, Dx, Dx, Alpha) {}
|
||||
|
||||
HepPolyhedronPara::~HepPolyhedronPara() {}
|
||||
|
||||
HepPolyhedronCons::HepPolyhedronCons(HepDouble Rmn1,
|
||||
HepDouble Rmx1,
|
||||
HepDouble Rmn2,
|
||||
HepDouble Rmx2,
|
||||
HepDouble Dz,
|
||||
HepDouble Phi1,
|
||||
HepDouble Dphi)
|
||||
HepPolyhedronCons::HepPolyhedronCons(double Rmn1,
|
||||
double Rmx1,
|
||||
double Rmn2,
|
||||
double Rmx2,
|
||||
double Dz,
|
||||
double Phi1,
|
||||
double Dphi)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronCons::HepPolyhedronCons Date: 15.12.96 *
|
||||
@@ -1374,7 +1493,7 @@ HepPolyhedronCons::HepPolyhedronCons(HepDouble Rmn1,
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
static HepDouble wholeCircle=2*M_PI;
|
||||
static double wholeCircle=2*M_PI;
|
||||
|
||||
// C H E C K I N P U T P A R A M E T E R S
|
||||
|
||||
@@ -1385,7 +1504,7 @@ HepPolyhedronCons::HepPolyhedronCons(HepDouble Rmn1,
|
||||
|
||||
if (Dz <= 0.) k += 2;
|
||||
|
||||
HepDouble phi1, phi2, dphi;
|
||||
double phi1, phi2, dphi;
|
||||
if (Dphi < 0.) {
|
||||
phi2 = Phi1; phi1 = phi2 - Dphi;
|
||||
}else if (Dphi == 0.) {
|
||||
@@ -1412,7 +1531,7 @@ HepPolyhedronCons::HepPolyhedronCons(HepDouble Rmn1,
|
||||
|
||||
// P R E P A R E T W O P O L Y L I N E S
|
||||
|
||||
HepDouble zz[4], rr[4];
|
||||
double zz[4], rr[4];
|
||||
zz[0] = Dz;
|
||||
zz[1] = -Dz;
|
||||
zz[2] = Dz;
|
||||
@@ -1430,33 +1549,33 @@ HepPolyhedronCons::HepPolyhedronCons(HepDouble Rmn1,
|
||||
|
||||
HepPolyhedronCons::~HepPolyhedronCons() {}
|
||||
|
||||
HepPolyhedronCone::HepPolyhedronCone(HepDouble Rmn1, HepDouble Rmx1,
|
||||
HepDouble Rmn2, HepDouble Rmx2,
|
||||
HepDouble Dz) :
|
||||
HepPolyhedronCone::HepPolyhedronCone(double Rmn1, double Rmx1,
|
||||
double Rmn2, double Rmx2,
|
||||
double Dz) :
|
||||
HepPolyhedronCons(Rmn1, Rmx1, Rmn2, Rmx2, Dz, 0*deg, 360*deg) {}
|
||||
|
||||
HepPolyhedronCone::~HepPolyhedronCone() {}
|
||||
|
||||
HepPolyhedronTubs::HepPolyhedronTubs(HepDouble Rmin, HepDouble Rmax,
|
||||
HepDouble Dz,
|
||||
HepDouble Phi1, HepDouble Dphi)
|
||||
HepPolyhedronTubs::HepPolyhedronTubs(double Rmin, double Rmax,
|
||||
double Dz,
|
||||
double Phi1, double Dphi)
|
||||
: HepPolyhedronCons(Rmin, Rmax, Rmin, Rmax, Dz, Phi1, Dphi) {}
|
||||
|
||||
HepPolyhedronTubs::~HepPolyhedronTubs() {}
|
||||
|
||||
HepPolyhedronTube::HepPolyhedronTube (HepDouble Rmin, HepDouble Rmax,
|
||||
HepDouble Dz)
|
||||
HepPolyhedronTube::HepPolyhedronTube (double Rmin, double Rmax,
|
||||
double Dz)
|
||||
: HepPolyhedronCons(Rmin, Rmax, Rmin, Rmax, Dz, 0*deg, 360*deg) {}
|
||||
|
||||
HepPolyhedronTube::~HepPolyhedronTube () {}
|
||||
|
||||
HepPolyhedronPgon::HepPolyhedronPgon(HepDouble phi,
|
||||
HepDouble dphi,
|
||||
HepPolyhedronPgon::HepPolyhedronPgon(double phi,
|
||||
double dphi,
|
||||
int npdv,
|
||||
int nz,
|
||||
const HepDouble *z,
|
||||
const HepDouble *rmin,
|
||||
const HepDouble *rmax)
|
||||
const double *z,
|
||||
const double *rmin,
|
||||
const double *rmax)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronPgon Date: 09.12.96 *
|
||||
@@ -1510,9 +1629,9 @@ HepPolyhedronPgon::HepPolyhedronPgon(HepDouble phi,
|
||||
|
||||
// P R E P A R E T W O P O L Y L I N E S
|
||||
|
||||
HepDouble *zz, *rr;
|
||||
zz = new HepDouble[2*nz];
|
||||
rr = new HepDouble[2*nz];
|
||||
double *zz, *rr;
|
||||
zz = new double[2*nz];
|
||||
rr = new double[2*nz];
|
||||
|
||||
if (z[0] > z[nz-1]) {
|
||||
for (i=0; i<nz; i++) {
|
||||
@@ -1541,17 +1660,17 @@ HepPolyhedronPgon::HepPolyhedronPgon(HepDouble phi,
|
||||
|
||||
HepPolyhedronPgon::~HepPolyhedronPgon() {}
|
||||
|
||||
HepPolyhedronPcon::HepPolyhedronPcon(HepDouble phi, HepDouble dphi, int nz,
|
||||
const HepDouble *z,
|
||||
const HepDouble *rmin,
|
||||
const HepDouble *rmax)
|
||||
HepPolyhedronPcon::HepPolyhedronPcon(double phi, double dphi, int nz,
|
||||
const double *z,
|
||||
const double *rmin,
|
||||
const double *rmax)
|
||||
: HepPolyhedronPgon(phi, dphi, 0, nz, z, rmin, rmax) {}
|
||||
|
||||
HepPolyhedronPcon::~HepPolyhedronPcon() {}
|
||||
|
||||
HepPolyhedronSphere::HepPolyhedronSphere(HepDouble rmin, HepDouble rmax,
|
||||
HepDouble phi, HepDouble dphi,
|
||||
HepDouble the, HepDouble dthe)
|
||||
HepPolyhedronSphere::HepPolyhedronSphere(double rmin, double rmax,
|
||||
double phi, double dphi,
|
||||
double the, double dthe)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronSphere Date: 11.12.96 *
|
||||
@@ -1614,12 +1733,12 @@ HepPolyhedronSphere::HepPolyhedronSphere(HepDouble rmin, HepDouble rmax,
|
||||
if (np1 <= 1) np1 = 2;
|
||||
int np2 = rmin < perMillion ? 1 : np1;
|
||||
|
||||
HepDouble *zz, *rr;
|
||||
zz = new HepDouble[np1+np2];
|
||||
rr = new HepDouble[np1+np2];
|
||||
double *zz, *rr;
|
||||
zz = new double[np1+np2];
|
||||
rr = new double[np1+np2];
|
||||
|
||||
HepDouble a = dthe/(np1-1);
|
||||
HepDouble cosa, sina;
|
||||
double a = dthe/(np1-1);
|
||||
double cosa, sina;
|
||||
for (int i=0; i<np1; i++) {
|
||||
cosa = cos(the+i*a);
|
||||
sina = sin(the+i*a);
|
||||
@@ -1646,11 +1765,11 @@ HepPolyhedronSphere::HepPolyhedronSphere(HepDouble rmin, HepDouble rmax,
|
||||
|
||||
HepPolyhedronSphere::~HepPolyhedronSphere() {}
|
||||
|
||||
HepPolyhedronTorus::HepPolyhedronTorus(HepDouble rmin,
|
||||
HepDouble rmax,
|
||||
HepDouble rtor,
|
||||
HepDouble phi,
|
||||
HepDouble dphi)
|
||||
HepPolyhedronTorus::HepPolyhedronTorus(double rmin,
|
||||
double rmax,
|
||||
double rtor,
|
||||
double phi,
|
||||
double dphi)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronTorus Date: 11.12.96 *
|
||||
@@ -1688,12 +1807,12 @@ HepPolyhedronTorus::HepPolyhedronTorus(HepDouble rmin,
|
||||
int np1 = GetNumberOfRotationSteps();
|
||||
int np2 = rmin < perMillion ? 1 : np1;
|
||||
|
||||
HepDouble *zz, *rr;
|
||||
zz = new HepDouble[np1+np2];
|
||||
rr = new HepDouble[np1+np2];
|
||||
double *zz, *rr;
|
||||
zz = new double[np1+np2];
|
||||
rr = new double[np1+np2];
|
||||
|
||||
HepDouble a = 2*M_PI/np1;
|
||||
HepDouble cosa, sina;
|
||||
double a = 2*M_PI/np1;
|
||||
double cosa, sina;
|
||||
for (int i=0; i<np1; i++) {
|
||||
cosa = cos(i*a);
|
||||
sina = sin(i*a);
|
||||
|
||||
Reference in New Issue
Block a user