34#ifndef G4TWISTTRAPALPHASIDE_HH
35#define G4TWISTTRAPALPHASIDE_HH
63 G4bool isGlobal =
false)
override ;
76 G4int areacode[])
override;
86 G4bool withTol =
true)
override;
87 void SetCorners()
override;
88 void SetBoundaries()
override;
95 G4bool isGlobal =
false )
override;
98 inline G4double GetSurfaceArea()
override;
151 return ( fDx4plus2 + fDx4minus2 * ( 2 * phi ) / fPhiTwist ) ;
157 return ( fDx3plus1 + fDx3minus1 * ( 2 * phi) / fPhiTwist ) ;
163 return ( fDy2plus1 + fDy2minus1 * ( 2 * phi ) / fPhiTwist ) ;
171 return GetValueA(phi)/2. + (GetValueD(phi)-GetValueA(phi))/4.
172 - u*( ( GetValueD(phi)-GetValueA(phi) )/( 2 * GetValueB(phi) ) - fTAlph );
182 - u * std::sin(phi) + fdeltaX*phi/fPhiTwist,
183 Xcoef(u,phi) * std::sin(phi)
184 + u * std::cos(phi) + fdeltaY*phi/fPhiTwist,
185 2*fDz*phi/fPhiTwist );
186 if (isGlobal) {
return (
fRot * SurfPoint +
fTrans); }
193 return -0.5*GetValueB(phi) ;
199 return 0.5*GetValueB(phi) ;
203G4double G4TwistTrapAlphaSide::GetSurfaceArea()
205 return (fDz*(std::sqrt(16*fDy1*fDy1
206 + (fa1md1 + 4*fDy1*fTAlph)*(fa1md1 + 4*fDy1*fTAlph))
207 + std::sqrt(16*fDy2*fDy2 + (fa2md2 + 4*fDy2*fTAlph)
208 * (fa2md2 + 4*fDy2*fTAlph))))/2. ;
218 + (fa1md1 + 4*fDy1*fTAlph)*std::sin(phi)),
219 -(fDy1* fDz*((fa1md1 + 4*fDy1*fTAlph)*std::cos(phi)
220 - 4*fDy1*std::sin(phi))),
221 (fDy1*(-8*(fDx3minus1 + fDx4minus2)*fDy1
222 + fa1md1*(fDx2 + fDx3plus1 + fDx4)*fPhiTwist
223 + 4*(fDx2 + fDx3plus1 + fDx4)*fDy1*fPhiTwist
224 *fTAlph + 2*(fDx3minus1 + fDx4minus2)
225 *(fa1md1 + 4*fDy1*fTAlph)*phi)
226 + fPhiTwist*(16*fDy1*fDy1
227 + (fa1md1 + 4*fDy1*fTAlph)
228 *(fa1md1 + 4*fDy1*fTAlph))*u
229 + 4*fDy1*(fa1md1*fdeltaY - 4*fdeltaX*fDy1
230 + 4*fdeltaY*fDy1*fTAlph)* std::cos(phi)
231 - 4*fDy1*(fa1md1*fdeltaX + 4*fDy1*(fdeltaY
232 + fdeltaX*fTAlph))*std::sin(phi))/ 8. ) ;
~G4TwistTrapAlphaSide() override
G4int DistanceToSurface(const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector gxx[], G4double distance[], G4int areacode[], G4bool isvalid[], EValidate validate=kValidateWithTol) override
G4TwistTrapAlphaSide(const G4String &name, G4double PhiTwist, G4double pDz, G4double pTheta, G4double pPhi, G4double pDy1, G4double pDx1, G4double pDx2, G4double pDy2, G4double pDx3, G4double pDx4, G4double pAlph, G4double AngleSide)
G4ThreeVector GetNormal(const G4ThreeVector &xx, G4bool isGlobal=false) override