107 :
G4VTwistSurface(a), fDx1(0.), fDx2(0.), fDy(0.), fDz(0.), fPhiTwist(0.),
108 fAlpha(0.), fTAlph(0.), fPhi(0.), fTheta(0.), fdeltaX(0.), fdeltaY(0.)
158 for (i=0; i<2; i++) {
174 if (std::fabs(p.
z()) == 0.) {
203 isvalid[0], 0, validate, &gp, &gv);
207 distance[0] = - (p.
z() / v.
z());
215 if (distance[0] >= 0) isvalid[0] =
true;
220 if (distance[0] >= 0) isvalid[0] =
true;
224 if (distance[0] >= 0) isvalid[0] =
true;
229 isvalid[0], 1, validate, &gp, &gv);
232 G4cerr <<
"ERROR - G4TwistTrapFlatSide::DistanceToSurface(p,v)" <<
G4endl;
268 for (i=0; i<2; i++) {
285 distance[0] = std::fabs(p.
z());
286 xx.
set(p.
x(), p.
y(), 0);
318 if (xx.
x() < wmin + ctol) {
320 if (xx.
x() <= wmin - ctol) isoutside =
true;
322 }
else if (xx.
x() > wmax - ctol) {
324 if (xx.
x() >= wmax + ctol) isoutside =
true;
334 if (xx.
y() <=
fAxisMin[yaxis] - ctol) isoutside =
true;
336 }
else if (xx.
y() >
fAxisMax[yaxis] - ctol) {
341 if (xx.
y() >=
fAxisMax[yaxis] + ctol) isoutside =
true;
349 areacode = tmpareacode;
358 if (xx.
x() < wmin ) {
360 }
else if (xx.
x() > wmax) {
385 "Feature NOT implemented !");
429 message <<
"Feature NOT implemented !" <<
G4endl
431 <<
" fAxis[1] = " <<
fAxis[1];
451 direction = direction.
unit();
457 direction = direction.
unit();
463 direction = direction.
unit();
469 direction = direction.
unit();
475 message <<
"Feature NOT implemented !" <<
G4endl
477 <<
" fAxis[1] = " <<
fAxis[1];
502 for ( i = 0 ; i<
n ; i++ ) {
504 y = -
fDy + i*(2*
fDy)/(n-1) ;
506 for ( j = 0 ; j<k ; j++ ) {
510 x = xmin + j*(xmax-xmin)/(k-1) ;
512 nnode =
GetNode(i,j,k,n,iside) ;
515 xyz[nnode][0] = p.
x() ;
516 xyz[nnode][1] = p.
y() ;
517 xyz[nnode][2] = p.
z() ;
519 if ( i<n-1 && j<k-1 ) {
521 nface =
GetFace(i,j,k,n,iside) ;
G4int GetAreacode(G4int i) const
static const G4int sC0Min1Max
void set(double x, double y, double z)
CurrentStatus fCurStatWithV
static const G4int sInside
G4bool IsInside(G4int areacode, G4bool testbitmode=false) const
virtual G4int GetAreaCode(const G4ThreeVector &xx, G4bool withTol=true)
virtual void SetBoundaries()
std::vector< ExP01TrackerHit * > a
static const G4double kInfinity
static const G4int sAxisX
virtual void SetBoundary(const G4int &axiscode, const G4ThreeVector &direction, const G4ThreeVector &x0, const G4int &boundarytype)
virtual void GetFacets(G4int m, G4int n, G4double xyz[][3], G4int faces[][4], G4int iside)
void message(RunManager *runmanager)
static const G4int sCorner
virtual G4double GetBoundaryMax(G4double u)
void SetCurrentStatus(G4int i, G4ThreeVector &xx, G4double &dist, G4int &areacode, G4bool &isvalid, G4int nxx, EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=0)
G4bool IsOutside(G4int areacode) const
G4int GetEdgeVisibility(G4int i, G4int j, G4int m, G4int n, G4int number, G4int orientation)
static const G4int sC0Min1Min
virtual G4String GetName() const
void ResetfDone(EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=0)
static const G4int sAxis1
virtual G4ThreeVector SurfacePoint(G4double x, G4double y, G4bool isGlobal=false)
double xAxisMax(G4double u, G4double fTanAlpha) const
G4int GetFace(G4int i, G4int j, G4int m, G4int n, G4int iside)
static const G4int sC0Max1Max
void SetCorner(G4int areacode, G4double x, G4double y, G4double z)
G4ThreeVector GetCorner(G4int areacode) const
virtual G4ThreeVector GetNormal(const G4ThreeVector &, G4bool isGlobal=false)
virtual G4double GetBoundaryMin(G4double u)
G4GLOB_DLL std::ostream G4cerr
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ThreeVector ComputeGlobalPoint(const G4ThreeVector &lp) const
G4double GetDistance(G4int i) const
G4TwistTrapFlatSide(const G4String &name, G4double PhiTwist, G4double pDx1, G4double pDx2, G4double pDy, G4double pDz, G4double pAlpha, G4double pPhi, G4double pTheta, G4int handedness)
static const G4int sAxis0
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &gp) const
HepRotation & rotateZ(double delta)
virtual void SetCorners()
virtual ~G4TwistTrapFlatSide()
static const G4int sOutside
G4SurfCurNormal fCurrentNormal
static const G4int sAxisMin
static const G4int sBoundary
G4int GetNode(G4int i, G4int j, G4int m, G4int n, G4int iside)
static const G4int sC0Max1Min
static const G4int sAxisMax
G4ThreeVector GetXX(G4int i) const
static const G4int sAxisY
G4ThreeVector ComputeGlobalDirection(const G4ThreeVector &lp) const
virtual G4int DistanceToSurface(const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector gxx[], G4double distance[], G4int areacode[], G4bool isvalid[], EValidate validate=kValidateWithTol)
G4bool IsValid(G4int i) const
G4ThreeVector ComputeLocalDirection(const G4ThreeVector &gp) const