Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TwistTubsFlatSide.hh
Go to the documentation of this file.
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// G4TwistTubsFlatSide
27//
28// Class description:
29//
30// Class describing a flat boundary surface for a cylinder.
31
32// 01-Aug-2002 - Kotoyo Hoshina ([email protected]), created.
33// 13-Nov-2003 - O.Link ([email protected]), Integration in Geant4
34// from original version in Jupiter-2.5.02 application.
35// --------------------------------------------------------------------
36#ifndef G4TWISTTUBSFLATSIDE_HH
37#define G4TWISTTUBSFLATSIDE_HH
38
39#include "G4VTwistSurface.hh"
40
42{
43 public:
44
45 G4TwistTubsFlatSide(const G4String& name,
46 const G4RotationMatrix& rot,
47 const G4ThreeVector& tlate,
48 const G4ThreeVector& n,
49 const EAxis axis1 = kRho, // RHO axis !
50 const EAxis axis2 = kPhi, // PHI axis !
51 G4double axis0min = -kInfinity,
52 G4double axis1min = -kInfinity,
53 G4double axis0max = kInfinity,
54 G4double axis1max = kInfinity);
55
56 G4TwistTubsFlatSide(const G4String& name,
57 G4double EndInnerRadius[2],
58 G4double EndOuterRadius[2],
59 G4double DPhi,
60 G4double EndPhi[2],
61 G4double EndZ[2],
62 G4int handedness);
63
65 G4ThreeVector GetNormal(const G4ThreeVector& /* xx */ ,
66 G4bool isGlobal = false) override;
68 const G4ThreeVector& gv,
69 G4ThreeVector gxx[],
70 G4double distance[],
71 G4int areacode[],
72 G4bool isvalid[],
73 EValidate validate = kValidateWithTol) override;
74
76 G4ThreeVector gxx[],
77 G4double distance[],
78 G4int areacode[]) override;
79
81 G4bool isGlobal = false) override;
82 inline G4double GetBoundaryMin(G4double phi) override;
83 inline G4double GetBoundaryMax(G4double phi) override;
84 inline G4double GetSurfaceArea() override { return fSurfaceArea ; }
85 void GetFacets( G4int m, G4int n, G4double xyz[][3],
86 G4int faces[][4], G4int iside ) override;
87
88 G4TwistTubsFlatSide(__void__&);
89 // Fake default constructor for usage restricted to direct object
90 // persistency for clients requiring preallocation of memory for
91 // persistifiable objects.
92
93 protected:
94
96 G4bool withTol = true) override ;
97
98 private:
99
100 void SetCorners() override;
101 void SetBoundaries() override;
102
103 private:
104
105 G4double fSurfaceArea = 0.0;
106};
107
109SurfacePoint(G4double phi , G4double rho , G4bool isGlobal )
110{
111 G4ThreeVector SurfPoint (rho*std::cos(phi) , rho*std::sin(phi) , 0);
112
113 if (isGlobal) { return (fRot * SurfPoint + fTrans); }
114 return SurfPoint;
115}
116
117inline
119{
121 return std::atan2( dphimin.y(), dphimin.x() );
122}
123
124inline
126{
128 return std::atan2( dphimax.y(), dphimax.x() );
129}
130
131#endif
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
double x() const
double y() const
G4int GetAreaCode(const G4ThreeVector &xx, G4bool withTol=true) override
void GetFacets(G4int m, G4int n, G4double xyz[][3], G4int faces[][4], G4int iside) override
G4double GetSurfaceArea() override
~G4TwistTubsFlatSide() override
G4TwistTubsFlatSide(const G4String &name, const G4RotationMatrix &rot, const G4ThreeVector &tlate, const G4ThreeVector &n, const EAxis axis1=kRho, const EAxis axis2=kPhi, G4double axis0min=-kInfinity, G4double axis1min=-kInfinity, G4double axis0max=kInfinity, G4double axis1max=kInfinity)
G4double GetBoundaryMin(G4double phi) override
G4int DistanceToSurface(const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector gxx[], G4double distance[], G4int areacode[], G4bool isvalid[], EValidate validate=kValidateWithTol) override
G4ThreeVector GetNormal(const G4ThreeVector &, G4bool isGlobal=false) override
G4double GetBoundaryMax(G4double phi) override
G4ThreeVector SurfacePoint(G4double, G4double, G4bool isGlobal=false) override
G4RotationMatrix fRot
static const G4int sC0Max1Max
G4ThreeVector fTrans
G4ThreeVector GetCorner(G4int areacode) const
static const G4int sC0Max1Min
EAxis
Definition geomdefs.hh:54
@ kPhi
Definition geomdefs.hh:60
@ kRho
Definition geomdefs.hh:58