Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4GenericPolycone.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4GenerciPolycone.hh 72077 2013-07-08 12:31:44Z tnikitin $
28 //
29 //
30 // --------------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 //
34 // G4GenericPolycone
35 //
36 // Class description:
37 //
38 // Class implementing a GenericPolycone constructed by points with
39 // (r,z)coordinates, allows Z 'go back'
40 //
41 //
42 // G4GenericPolycone( const G4String& name,
43 // G4double phiStart, // initial phi starting angle
44 // G4double phiTotal, // total phi angle
45 // G4int numRZ, // number corners in r,z space
46 // const G4double r[], // r coordinate of these corners
47 // const G4double z[]) // z coordinate of these corners
48 //
49 //
50 // --------------------------------------------------------------------
51 #ifndef G4GenericPolycone_hh
52 #define G4GenericPolycone_hh
53 /*
54 #if defined(G4GEOM_USE_USOLIDS)
55 #define G4GEOM_USE_UGENERICPOLYCONE 1
56 #endif
57 
58 #if defined(G4GEOM_USE_UGENERICPOLYCONE)
59  #define G4UGenericPolycone G4GenericPolycone
60  #include "G4UGenericPolycone.hh"
61 #else
62 */
63 #include "G4VCSGfaceted.hh"
64 #include "G4PolyconeSide.hh"
65 
67 class G4ReduciblePolygon;
68 class G4VCSGface;
69 
71 {
72 
73  public: // with description
74 
76  G4double phiStart, // initial phi starting angle
77  G4double phiTotal, // total phi angle
78  G4int numRZ, // number corners in r,z space
79  const G4double r[], // r coordinate of these corners
80  const G4double z[] ); // z coordinate of these corners
81 
82  virtual ~G4GenericPolycone();
83 
84  // Methods for solid
85 
86  EInside Inside( const G4ThreeVector &p ) const;
87  G4double DistanceToIn( const G4ThreeVector &p, const G4ThreeVector &v ) const;
88  G4double DistanceToIn( const G4ThreeVector &p ) const;
89 
90  void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
91  G4bool CalculateExtent(const EAxis pAxis,
92  const G4VoxelLimits& pVoxelLimit,
93  const G4AffineTransform& pTransform,
94  G4double& pmin, G4double& pmax) const;
95 
97 
99 
100  G4VSolid* Clone() const;
101 
102  std::ostream& StreamInfo(std::ostream& os) const;
103 
105 
106  G4bool Reset();
107 
108  // Accessors
109 
110  inline G4double GetStartPhi() const;
111  inline G4double GetEndPhi() const;
112  inline G4double GetSinStartPhi() const;
113  inline G4double GetCosStartPhi() const;
114  inline G4double GetSinEndPhi() const;
115  inline G4double GetCosEndPhi() const;
116  inline G4bool IsOpen() const;
117  inline G4int GetNumRZCorner() const;
118  inline G4PolyconeSideRZ GetCorner(G4int index) const;
119 
120  public: // without description
121 
122  G4GenericPolycone(__void__&);
123  // Fake default constructor for usage restricted to direct object
124  // persistency for clients requiring preallocation of memory for
125  // persistifiable objects.
126 
127  G4GenericPolycone( const G4GenericPolycone &source );
129  // Copy constructor and assignment operator.
130 
131  protected: // without description
132 
133  // Generic initializer, called by all constructors
134 
135  // void SetOriginalParameters(G4ReduciblePolygon *rz);
136 
137  void Create( G4double phiStart, // initial phi starting angle
138  G4double phiTotal, // total phi angle
139  G4ReduciblePolygon *rz ); // r/z coordinate of these corners
140 
141  void CopyStuff( const G4GenericPolycone &source );
142 
143  // Methods for random point generation
144 
145  protected: // without description
146 
147  // Here are our parameters
148 
149  G4double startPhi; // Starting phi value (0 < phiStart < 2pi)
150  G4double endPhi; // end phi value (0 < endPhi-phiStart < 2pi)
151  G4bool phiIsOpen; // true if there is a phi segment
152  G4int numCorner; // number RZ points
153  G4PolyconeSideRZ *corners; // corner r,z points
154 
155  // Our quick test
156 
158 
159 };
160 
161 #include "G4GenericPolycone.icc"
162 
163 //#endif
164 
165 #endif
const XML_Char * name
Definition: expat.h:151
G4bool IsOpen() const
G4double GetStartPhi() const
G4double GetEndPhi() const
G4GenericPolycone(const G4String &name, G4double phiStart, G4double phiTotal, G4int numRZ, const G4double r[], const G4double z[])
const char * p
Definition: xmltok.h:285
G4PolyconeSideRZ * corners
Double_t z
G4double GetCosStartPhi() const
void Create(G4double phiStart, G4double phiTotal, G4ReduciblePolygon *rz)
G4double GetSinEndPhi() const
G4Polyhedron * CreatePolyhedron() const
G4double GetSinStartPhi() const
G4GeometryType GetEntityType() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4GenericPolycone & operator=(const G4GenericPolycone &source)
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
EInside Inside(const G4ThreeVector &p) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
std::ostream & StreamInfo(std::ostream &os) const
G4PolyconeSideRZ GetCorner(G4int index) const
void CopyStuff(const G4GenericPolycone &source)
G4ThreeVector GetPointOnSurface() const
int G4int
Definition: G4Types.hh:78
EInside
Definition: geomdefs.hh:58
EAxis
Definition: geomdefs.hh:54
G4EnclosingCylinder * enclosingCylinder
G4VSolid * Clone() const
G4double GetCosEndPhi() const
G4int GetNumRZCorner() const