Warning, file /include/Geant4/G4TwistTrapFlatSide.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef G4TWISTTRAPFLATSIDE_HH
0035 #define G4TWISTTRAPFLATSIDE_HH
0036
0037 #include "G4VTwistSurface.hh"
0038
0039 class G4TwistTrapFlatSide : public G4VTwistSurface
0040 {
0041 public:
0042
0043 G4TwistTrapFlatSide( const G4String& name,
0044 G4double PhiTwist,
0045 G4double pDx1,
0046 G4double pDx2,
0047 G4double pDy,
0048 G4double pDz,
0049 G4double pAlpha,
0050 G4double pPhi,
0051 G4double pTheta,
0052 G4int handedness );
0053 ~G4TwistTrapFlatSide() override;
0054
0055 G4ThreeVector GetNormal(const G4ThreeVector& ,
0056 G4bool isGlobal = false) override;
0057 G4int DistanceToSurface(const G4ThreeVector& gp,
0058 const G4ThreeVector& gv,
0059 G4ThreeVector gxx[],
0060 G4double distance[],
0061 G4int areacode[],
0062 G4bool isvalid[],
0063 EValidate validate = kValidateWithTol) override;
0064
0065 G4int DistanceToSurface(const G4ThreeVector& gp,
0066 G4ThreeVector gxx[],
0067 G4double distance[],
0068 G4int areacode[]) override;
0069
0070 inline G4ThreeVector SurfacePoint(G4double x, G4double y,
0071 G4bool isGlobal = false) override;
0072 inline G4double GetBoundaryMin(G4double u) override;
0073 inline G4double GetBoundaryMax(G4double u) override;
0074 inline G4double GetSurfaceArea() override;
0075 void GetFacets( G4int m, G4int n, G4double xyz[][3],
0076 G4int faces[][4], G4int iside ) override;
0077
0078 G4TwistTrapFlatSide(__void__&);
0079
0080
0081
0082
0083 protected:
0084
0085 G4int GetAreaCode(const G4ThreeVector& xx,
0086 G4bool withTol = true) override;
0087
0088 private:
0089
0090 void SetCorners() override;
0091 void SetBoundaries() override;
0092
0093 inline G4double xAxisMax(G4double u, G4double fTanAlpha) const;
0094
0095 private:
0096
0097 G4double fDx1;
0098 G4double fDx2;
0099 G4double fDy;
0100 G4double fDz;
0101 G4double fPhiTwist;
0102 G4double fAlpha;
0103 G4double fTAlph;
0104 G4double fPhi;
0105 G4double fTheta;
0106 G4double fdeltaX;
0107 G4double fdeltaY;
0108 };
0109
0110
0111
0112
0113
0114 inline
0115 G4double G4TwistTrapFlatSide::xAxisMax(G4double u, G4double fTanAlpha) const
0116 {
0117 return ( ( fDx2 + fDx1 )/2. + u*(fDx2 - fDx1)/(2.*fDy) + u *fTanAlpha ) ;
0118 }
0119
0120 inline G4ThreeVector
0121 G4TwistTrapFlatSide::SurfacePoint(G4double x, G4double y, G4bool isGlobal)
0122 {
0123 G4ThreeVector SurfPoint ( x,y,0);
0124
0125 if (isGlobal) { return (fRot*SurfPoint + fTrans); }
0126 return SurfPoint;
0127 }
0128
0129 inline
0130 G4double G4TwistTrapFlatSide::GetBoundaryMin(G4double y)
0131 {
0132 return -xAxisMax(y, -fTAlph) ;
0133 }
0134
0135 inline
0136 G4double G4TwistTrapFlatSide::GetBoundaryMax(G4double y)
0137 {
0138 return xAxisMax(y, fTAlph) ;
0139 }
0140
0141 inline
0142 G4double G4TwistTrapFlatSide::GetSurfaceArea()
0143 {
0144 return 2*(fDx1 + fDx2)*fDy ;
0145 }
0146
0147 #endif