Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4UPara.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:$
28 //
29 //
30 // --------------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // G4UPara
34 //
35 // Class description:
36 //
37 // Wrapper class for G4Para to make use of VecGeom Parallelepiped.
38 
39 // History:
40 // 13.09.13 G.Cosmo, CERN/PH
41 // --------------------------------------------------------------------
42 
43 #ifndef G4UPARA_HH
44 #define G4UPARA_HH
45 
46 #include "G4UAdapter.hh"
47 
48 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
49 
50 #include <volumes/UnplacedParallelepiped.h>
51 
52 #include "G4Polyhedron.hh"
53 
54 class G4UPara : public G4UAdapter<vecgeom::UnplacedParallelepiped>
55 {
56  using Shape_t = vecgeom::UnplacedParallelepiped;
57  using Base_t = G4UAdapter<vecgeom::UnplacedParallelepiped>;
58 
59  public: // with description
60 
61  G4UPara(const G4String& pName,
62  G4double pDx, G4double pDy, G4double pDz,
63  G4double pAlpha, G4double pTheta, G4double pPhi);
64 
65  G4UPara(const G4String& pName,
66  const G4ThreeVector pt[8]);
67 
68  ~G4UPara();
69 
70  // Accessors
71 
72  G4double GetZHalfLength() const;
73  G4double GetYHalfLength() const;
74  G4double GetXHalfLength() const;
75  G4ThreeVector GetSymAxis() const;
76  G4double GetTanAlpha() const;
77 
78  // Modifiers
79 
80  void SetXHalfLength(G4double val);
81  void SetYHalfLength(G4double val);
82  void SetZHalfLength(G4double val);
83  void SetAlpha(G4double alpha);
84  void SetTanAlpha(G4double val);
85  void SetThetaAndPhi(double pTheta, double pPhi);
86 
87  void SetAllParameters(G4double pDx, G4double pDy, G4double pDz,
88  G4double pAlpha, G4double pTheta, G4double pPhi);
89 
90  void ComputeDimensions(G4VPVParameterisation* p,
91  const G4int n,
92  const G4VPhysicalVolume* pRep);
93 
94  inline G4GeometryType GetEntityType() const;
95 
96  void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
97 
98  G4bool CalculateExtent(const EAxis pAxis,
99  const G4VoxelLimits& pVoxelLimit,
100  const G4AffineTransform& pTransform,
101  G4double& pMin, G4double& pMax) const;
102 
103  G4VSolid* Clone() const;
104 
105  G4Polyhedron* CreatePolyhedron () const;
106 
107  public: // without description
108 
109  G4UPara(__void__&);
110  // Fake default constructor for usage restricted to direct object
111  // persistency for clients requiring preallocation of memory for
112  // persistifiable objects
113 
114  G4UPara(const G4UPara& rhs);
115  G4UPara& operator=(const G4UPara& rhs);
116  // Copy constructor and assignment operator
117 
118  private:
119 
120  void CheckParameters();
121  // Check parameters
122 
123  void MakePlanes();
124  // Set side planes
125 
126  private:
127 
128  G4double fTalpha,fTthetaCphi,fTthetaSphi;
129  struct { G4double a,b,c,d; } fPlanes[4];
130 };
131 
132 // --------------------------------------------------------------------
133 // Inline methods
134 // --------------------------------------------------------------------
135 
136 inline G4GeometryType G4UPara::GetEntityType() const
137 {
138  return "G4Para";
139 }
140 
141 #endif // G4GEOM_USE_USOLIDS
142 
143 #endif
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
const char * p
Definition: xmltok.h:285
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
static const G4double alpha
TMarker * pt
Definition: egs.C:25
Float_t d
int G4int
Definition: G4Types.hh:78
EAxis
Definition: geomdefs.hh:54
Char_t n[5]