34#ifndef G4TWISTBOXSIDE_HH
35#define G4TWISTBOXSIDE_HH
89 virtual void SetCorners();
90 virtual void SetBoundaries();
152 return ( fDx4plus2 + fDx4minus2 * ( 2 * phi ) / fPhiTwist ) ;
159 return ( fDy2plus1 + fDy2minus1 * ( 2 * phi ) / fPhiTwist ) ;
166 return GetValueA(phi)/2. + u*fTAlph ;
176 - u * std::sin(phi) + fdeltaX*phi/fPhiTwist,
177 Xcoef(u,phi) * std::sin(phi)
178 + u * std::cos(phi) + fdeltaY*phi/fPhiTwist,
179 2*fDz*phi/fPhiTwist );
181 if (isGlobal) {
return (
fRot * SurfPoint +
fTrans); }
188 return -0.5*GetValueB(phi) ;
194 return 0.5*GetValueB(phi) ;
198G4double G4TwistBoxSide::GetSurfaceArea()
200 return (fDz*(std::sqrt(16*fDy1*fDy1
201 + (fa1md1 + 4*fDy1*fTAlph)*(fa1md1 + 4*fDy1*fTAlph))
202 + std::sqrt(16*fDy1*fDy1 + (fa2md2 + 4*fDy1*fTAlph)
203 * (fa2md2 + 4*fDy1*fTAlph))))/2. ;
212 G4ThreeVector nvec( 4*fDz*(std::cos(phi) + fTAlph*std::sin(phi)) ,
213 4*fDz*(-(fTAlph*std::cos(phi)) + std::sin(phi)),
214 (fDx2 + fDx4)*fPhiTwist*fTAlph
215 + 2*fDx4minus2*(-1 + fTAlph*phi)
216 + 2*fPhiTwist*(1 + fTAlph*fTAlph)*u
217 - 2*(fdeltaX - fdeltaY*fTAlph)*std::cos(phi)
218 - 2*(fdeltaY + fdeltaX*fTAlph)*std::sin(phi) );
virtual ~G4TwistBoxSide()
virtual G4int DistanceToSurface(const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector gxx[], G4double distance[], G4int areacode[], G4bool isvalid[], EValidate validate=kValidateWithTol)
virtual G4ThreeVector GetNormal(const G4ThreeVector &xx, G4bool isGlobal=false)