Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TwistTrapFlatSide Class Reference

#include <G4TwistTrapFlatSide.hh>

+ Inheritance diagram for G4TwistTrapFlatSide:

Public Member Functions

 G4TwistTrapFlatSide (const G4String &name, G4double PhiTwist, G4double pDx1, G4double pDx2, G4double pDy, G4double pDz, G4double pAlpha, G4double pPhi, G4double pTheta, G4int handedness)
 
 ~G4TwistTrapFlatSide () override
 
G4ThreeVector GetNormal (const G4ThreeVector &, G4bool isGlobal=false) override
 
G4int DistanceToSurface (const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector gxx[], G4double distance[], G4int areacode[], G4bool isvalid[], EValidate validate=kValidateWithTol) override
 
G4int DistanceToSurface (const G4ThreeVector &gp, G4ThreeVector gxx[], G4double distance[], G4int areacode[]) override
 
G4ThreeVector SurfacePoint (G4double x, G4double y, G4bool isGlobal=false) override
 
G4double GetBoundaryMin (G4double u) override
 
G4double GetBoundaryMax (G4double u) override
 
G4double GetSurfaceArea () override
 
void GetFacets (G4int m, G4int n, G4double xyz[][3], G4int faces[][4], G4int iside) override
 
 G4TwistTrapFlatSide (__void__ &)
 
- Public Member Functions inherited from G4VTwistSurface
 G4VTwistSurface (const G4String &name)
 
 G4VTwistSurface (const G4String &name, const G4RotationMatrix &rot, const G4ThreeVector &tlate, G4int handedness, const EAxis axis1, const EAxis axis2, G4double axis0min=-kInfinity, G4double axis1min=-kInfinity, G4double axis0max=kInfinity, G4double axis1max=kInfinity)
 
virtual ~G4VTwistSurface ()
 
virtual G4int AmIOnLeftSide (const G4ThreeVector &me, const G4ThreeVector &vec, G4bool withTol=true)
 
virtual G4double DistanceToBoundary (G4int areacode, G4ThreeVector &xx, const G4ThreeVector &p)
 
virtual G4double DistanceToIn (const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector &gxxbest)
 
virtual G4double DistanceToOut (const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector &gxxbest)
 
virtual G4double DistanceTo (const G4ThreeVector &gp, G4ThreeVector &gxx)
 
void DebugPrint () const
 
virtual G4String GetName () const
 
virtual void GetBoundaryParameters (const G4int &areacode, G4ThreeVector &d, G4ThreeVector &x0, G4int &boundarytype) const
 
virtual G4ThreeVector GetBoundaryAtPZ (G4int areacode, const G4ThreeVector &p) const
 
G4double DistanceToPlaneWithV (const G4ThreeVector &p, const G4ThreeVector &v, const G4ThreeVector &x0, const G4ThreeVector &n0, G4ThreeVector &xx)
 
G4double DistanceToPlane (const G4ThreeVector &p, const G4ThreeVector &x0, const G4ThreeVector &n0, G4ThreeVector &xx)
 
G4double DistanceToPlane (const G4ThreeVector &p, const G4ThreeVector &x0, const G4ThreeVector &t1, const G4ThreeVector &t2, G4ThreeVector &xx, G4ThreeVector &n)
 
G4double DistanceToLine (const G4ThreeVector &p, const G4ThreeVector &x0, const G4ThreeVector &d, G4ThreeVector &xx)
 
G4bool IsAxis0 (G4int areacode) const
 
G4bool IsAxis1 (G4int areacode) const
 
G4bool IsOutside (G4int areacode) const
 
G4bool IsInside (G4int areacode, G4bool testbitmode=false) const
 
G4bool IsBoundary (G4int areacode, G4bool testbitmode=false) const
 
G4bool IsCorner (G4int areacode, G4bool testbitmode=false) const
 
G4bool IsValidNorm () const
 
G4bool IsSameBoundary (G4VTwistSurface *surface1, G4int areacode1, G4VTwistSurface *surface2, G4int areacode2) const
 
G4int GetAxisType (G4int areacode, G4int whichaxis) const
 
G4ThreeVector ComputeGlobalPoint (const G4ThreeVector &lp) const
 
G4ThreeVector ComputeLocalPoint (const G4ThreeVector &gp) const
 
G4ThreeVector ComputeGlobalDirection (const G4ThreeVector &lp) const
 
G4ThreeVector ComputeLocalDirection (const G4ThreeVector &gp) const
 
void SetAxis (G4int i, const EAxis axis)
 
void SetNeighbours (G4VTwistSurface *ax0min, G4VTwistSurface *ax1min, G4VTwistSurface *ax0max, G4VTwistSurface *ax1max)
 
G4int GetNode (G4int i, G4int j, G4int m, G4int n, G4int iside)
 
G4int GetFace (G4int i, G4int j, G4int m, G4int n, G4int iside)
 
G4int GetEdgeVisibility (G4int i, G4int j, G4int m, G4int n, G4int number, G4int orientation)
 
 G4VTwistSurface (__void__ &)
 

Protected Member Functions

G4int GetAreaCode (const G4ThreeVector &xx, G4bool withTol=true) override
 
- Protected Member Functions inherited from G4VTwistSurface
G4VTwistSurface ** GetNeighbours ()
 
G4int GetNeighbours (G4int areacode, G4VTwistSurface *surfaces[])
 
G4ThreeVector GetCorner (G4int areacode) const
 
void GetBoundaryAxis (G4int areacode, EAxis axis[]) const
 
void GetBoundaryLimit (G4int areacode, G4double limit[]) const
 
virtual void SetBoundary (const G4int &axiscode, const G4ThreeVector &direction, const G4ThreeVector &x0, const G4int &boundarytype)
 
void SetCorner (G4int areacode, G4double x, G4double y, G4double z)
 

Additional Inherited Members

- Public Types inherited from G4VTwistSurface
enum  EValidate { kDontValidate = 0 , kValidateWithTol = 1 , kValidateWithoutTol = 2 , kUninitialized = 3 }
 
- Static Public Attributes inherited from G4VTwistSurface
static const G4int sOutside = 0x00000000
 
static const G4int sInside = 0x10000000
 
static const G4int sBoundary = 0x20000000
 
static const G4int sCorner = 0x40000000
 
static const G4int sC0Min1Min = 0x40000101
 
static const G4int sC0Max1Min = 0x40000201
 
static const G4int sC0Max1Max = 0x40000202
 
static const G4int sC0Min1Max = 0x40000102
 
static const G4int sAxisMin = 0x00000101
 
static const G4int sAxisMax = 0x00000202
 
static const G4int sAxisX = 0x00000404
 
static const G4int sAxisY = 0x00000808
 
static const G4int sAxisZ = 0x00000C0C
 
static const G4int sAxisRho = 0x00001010
 
static const G4int sAxisPhi = 0x00001414
 
static const G4int sAxis0 = 0x0000FF00
 
static const G4int sAxis1 = 0x000000FF
 
static const G4int sSizeMask = 0x00000303
 
static const G4int sAxisMask = 0x0000FCFC
 
static const G4int sAreaMask = 0XF0000000
 
- Protected Attributes inherited from G4VTwistSurface
EAxis fAxis [2]
 
G4double fAxisMin [2]
 
G4double fAxisMax [2]
 
CurrentStatus fCurStatWithV
 
CurrentStatus fCurStat
 
G4RotationMatrix fRot
 
G4ThreeVector fTrans
 
G4int fHandedness
 
G4SurfCurNormal fCurrentNormal
 
G4bool fIsValidNorm
 
G4double kCarTolerance
 

Detailed Description

Definition at line 39 of file G4TwistTrapFlatSide.hh.

Constructor & Destructor Documentation

◆ G4TwistTrapFlatSide() [1/2]

G4TwistTrapFlatSide::G4TwistTrapFlatSide ( const G4String & name,
G4double PhiTwist,
G4double pDx1,
G4double pDx2,
G4double pDy,
G4double pDz,
G4double pAlpha,
G4double pPhi,
G4double pTheta,
G4int handedness )

Definition at line 36 of file G4TwistTrapFlatSide.cc.

46 : G4VTwistSurface(name)
47{
48 fHandedness = handedness; // +z = +ve, -z = -ve
49
50 fDx1 = pDx1 ;
51 fDx2 = pDx2 ;
52 fDy = pDy ;
53 fDz = pDz ;
54 fAlpha = pAlpha ;
55 fTAlph = std::tan(fAlpha) ;
56 fPhi = pPhi ;
57 fTheta = pTheta ;
58
59 fdeltaX = 2 * fDz * std::tan(fTheta) * std::cos(fPhi) ;
60 // dx in surface equation
61 fdeltaY = 2 * fDz * std::tan(fTheta) * std::sin(fPhi) ;
62 // dy in surface equation
63
64 fPhiTwist = PhiTwist ;
65
66 fCurrentNormal.normal.set( 0, 0, (fHandedness < 0 ? -1 : 1));
67 // Unit vector, in local coordinate system
69 ? 0.5 * fPhiTwist
70 : -0.5 * fPhiTwist );
71
72 fTrans.set(
73 fHandedness > 0 ? 0.5*fdeltaX : -0.5*fdeltaX ,
74 fHandedness > 0 ? 0.5*fdeltaY : -0.5*fdeltaY ,
75 fHandedness > 0 ? fDz : -fDz ) ;
76
77 fIsValidNorm = true;
78
79
80 fAxis[0] = kXAxis ;
81 fAxis[1] = kYAxis ;
82 fAxisMin[0] = kInfinity ; // x-Axis cannot be fixed, because it
83 fAxisMax[0] = kInfinity ; // depends on y
84 fAxisMin[1] = -fDy ; // y - axis
85 fAxisMax[1] = fDy ;
86
87 SetCorners();
88 SetBoundaries();
89}
void set(double x, double y, double z)
HepRotation & rotateZ(double delta)
Definition Rotation.cc:87
G4VTwistSurface(const G4String &name)
G4RotationMatrix fRot
G4ThreeVector fTrans
G4SurfCurNormal fCurrentNormal
@ kYAxis
Definition geomdefs.hh:56
@ kXAxis
Definition geomdefs.hh:55

◆ ~G4TwistTrapFlatSide()

G4TwistTrapFlatSide::~G4TwistTrapFlatSide ( )
overridedefault

◆ G4TwistTrapFlatSide() [2/2]

G4TwistTrapFlatSide::G4TwistTrapFlatSide ( __void__ & a)

Definition at line 95 of file G4TwistTrapFlatSide.cc.

97{
98}

Member Function Documentation

◆ DistanceToSurface() [1/2]

G4int G4TwistTrapFlatSide::DistanceToSurface ( const G4ThreeVector & gp,
const G4ThreeVector & gv,
G4ThreeVector gxx[],
G4double distance[],
G4int areacode[],
G4bool isvalid[],
EValidate validate = kValidateWithTol )
overridevirtual

Implements G4VTwistSurface.

Definition at line 125 of file G4TwistTrapFlatSide.cc.

132{
133 fCurStatWithV.ResetfDone(validate, &gp, &gv);
134
135 if (fCurStatWithV.IsDone())
136 {
137 for (G4int i=0; i<fCurStatWithV.GetNXX(); ++i)
138 {
139 gxx[i] = fCurStatWithV.GetXX(i);
140 distance[i] = fCurStatWithV.GetDistance(i);
141 areacode[i] = fCurStatWithV.GetAreacode(i);
142 isvalid[i] = fCurStatWithV.IsValid(i);
143 }
144 return fCurStatWithV.GetNXX();
145 }
146 else // initialize
147 {
148 for (auto i=0; i<2; ++i)
149 {
150 distance[i] = kInfinity;
151 areacode[i] = sOutside;
152 isvalid[i] = false;
153 gxx[i].set(kInfinity, kInfinity, kInfinity);
154 }
155 }
156
159
160 //
161 // special case!
162 // if p is on surface, distance = 0.
163 //
164
165 if (std::fabs(p.z()) == 0.) // if p is on the plane
166 {
167 distance[0] = 0;
168 G4ThreeVector xx = p;
169 gxx[0] = ComputeGlobalPoint(xx);
170
171 if (validate == kValidateWithTol)
172 {
173 areacode[0] = GetAreaCode(xx);
174 if (!IsOutside(areacode[0]))
175 {
176 isvalid[0] = true;
177 }
178 }
179 else if (validate == kValidateWithoutTol)
180 {
181 areacode[0] = GetAreaCode(xx, false);
182 if (IsInside(areacode[0]))
183 {
184 isvalid[0] = true;
185 }
186 }
187 else // kDontValidate
188 {
189 areacode[0] = sInside;
190 isvalid[0] = true;
191 }
192 return 1;
193 }
194 //
195 // special case end
196 //
197
198 if (v.z() == 0) {
199
200 fCurStatWithV.SetCurrentStatus(0, gxx[0], distance[0], areacode[0],
201 isvalid[0], 0, validate, &gp, &gv);
202 return 0;
203 }
204
205 distance[0] = - (p.z() / v.z());
206
207 G4ThreeVector xx = p + distance[0]*v;
208 gxx[0] = ComputeGlobalPoint(xx);
209
210 if (validate == kValidateWithTol)
211 {
212 areacode[0] = GetAreaCode(xx);
213 if (!IsOutside(areacode[0]))
214 {
215 if (distance[0] >= 0) isvalid[0] = true;
216 }
217 }
218 else if (validate == kValidateWithoutTol)
219 {
220 areacode[0] = GetAreaCode(xx, false);
221 if (IsInside(areacode[0]))
222 {
223 if (distance[0] >= 0) isvalid[0] = true;
224 }
225 }
226 else // kDontValidate
227 {
228 areacode[0] = sInside;
229 if (distance[0] >= 0) isvalid[0] = true;
230 }
231
232 fCurStatWithV.SetCurrentStatus(0, gxx[0], distance[0], areacode[0],
233 isvalid[0], 1, validate, &gp, &gv);
234
235#ifdef G4TWISTDEBUG
236 G4cerr << "ERROR - G4TwistTrapFlatSide::DistanceToSurface(p,v)" << G4endl;
237 G4cerr << " Name : " << GetName() << G4endl;
238 G4cerr << " xx : " << xx << G4endl;
239 G4cerr << " gxx[0] : " << gxx[0] << G4endl;
240 G4cerr << " dist[0] : " << distance[0] << G4endl;
241 G4cerr << " areacode[0] : " << areacode[0] << G4endl;
242 G4cerr << " isvalid[0] : " << isvalid[0] << G4endl;
243#endif
244 return 1;
245}
int G4int
Definition G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
double z() const
G4int GetAreaCode(const G4ThreeVector &xx, G4bool withTol=true) override
G4double GetDistance(G4int i) const
void SetCurrentStatus(G4int i, G4ThreeVector &xx, G4double &dist, G4int &areacode, G4bool &isvalid, G4int nxx, EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=nullptr)
G4ThreeVector GetXX(G4int i) const
void ResetfDone(EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=nullptr)
static const G4int sOutside
G4ThreeVector ComputeLocalDirection(const G4ThreeVector &gp) const
G4bool IsInside(G4int areacode, G4bool testbitmode=false) const
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &gp) const
G4bool IsOutside(G4int areacode) const
static const G4int sInside
virtual G4String GetName() const
CurrentStatus fCurStatWithV
G4ThreeVector ComputeGlobalPoint(const G4ThreeVector &lp) const

◆ DistanceToSurface() [2/2]

G4int G4TwistTrapFlatSide::DistanceToSurface ( const G4ThreeVector & gp,
G4ThreeVector gxx[],
G4double distance[],
G4int areacode[] )
overridevirtual

Implements G4VTwistSurface.

Definition at line 250 of file G4TwistTrapFlatSide.cc.

254{
255 // Calculate distance to plane in local coordinate,
256 // then return distance and global intersection points.
257 //
258
260
261 if (fCurStat.IsDone())
262 {
263 for (G4int i=0; i<fCurStat.GetNXX(); ++i)
264 {
265 gxx[i] = fCurStat.GetXX(i);
266 distance[i] = fCurStat.GetDistance(i);
267 areacode[i] = fCurStat.GetAreacode(i);
268 }
269 return fCurStat.GetNXX();
270 }
271 else // initialize
272 {
273 for (auto i=0; i<2; ++i)
274 {
275 distance[i] = kInfinity;
276 areacode[i] = sOutside;
277 gxx[i].set(kInfinity, kInfinity, kInfinity);
278 }
279 }
280
282 G4ThreeVector xx;
283
284 // The plane is placed on origin with making its normal
285 // parallel to z-axis.
286 if (std::fabs(p.z()) <= 0.5 * kCarTolerance)
287 { // if p is on the plane, return 1
288 distance[0] = 0;
289 xx = p;
290 }
291 else
292 {
293 distance[0] = std::fabs(p.z());
294 xx.set(p.x(), p.y(), 0);
295 }
296
297 gxx[0] = ComputeGlobalPoint(xx);
298 areacode[0] = sInside;
299 G4bool isvalid = true;
300 fCurStat.SetCurrentStatus(0, gxx[0], distance[0], areacode[0],
301 isvalid, 1, kDontValidate, &gp);
302 return 1;
303
304}
bool G4bool
Definition G4Types.hh:86
double x() const
double y() const
CurrentStatus fCurStat

◆ GetAreaCode()

G4int G4TwistTrapFlatSide::GetAreaCode ( const G4ThreeVector & xx,
G4bool withTol = true )
overrideprotectedvirtual

Implements G4VTwistSurface.

Definition at line 309 of file G4TwistTrapFlatSide.cc.

311{
312
313 static const G4double ctol = 0.5 * kCarTolerance;
314 G4int areacode = sInside;
315
316 if (fAxis[0] == kXAxis && fAxis[1] == kYAxis)
317 {
318 G4int yaxis = 1;
319
320 G4double wmax = xAxisMax(xx.y(), fTAlph ) ;
321 G4double wmin = -xAxisMax(xx.y(), -fTAlph ) ;
322
323 if (withTol)
324 {
325 G4bool isoutside = false;
326
327 // test boundary of x-axis
328
329 if (xx.x() < wmin + ctol)
330 {
331 areacode |= (sAxis0 & (sAxisX | sAxisMin)) | sBoundary;
332 if (xx.x() <= wmin - ctol) isoutside = true;
333
334 }
335 else if (xx.x() > wmax - ctol)
336 {
337 areacode |= (sAxis0 & (sAxisX | sAxisMax)) | sBoundary;
338 if (xx.x() >= wmax + ctol) isoutside = true;
339 }
340
341 // test boundary of y-axis
342
343 if (xx.y() < fAxisMin[yaxis] + ctol)
344 {
345 areacode |= (sAxis1 & (sAxisY | sAxisMin));
346
347 if ((areacode & sBoundary) != 0) areacode |= sCorner; // xx is on corner.
348 else areacode |= sBoundary;
349 if (xx.y() <= fAxisMin[yaxis] - ctol) isoutside = true;
350
351 }
352 else if (xx.y() > fAxisMax[yaxis] - ctol)
353 {
354 areacode |= (sAxis1 & (sAxisY | sAxisMax));
355
356 if ((areacode & sBoundary) != 0) areacode |= sCorner; // xx is on corner.
357 else areacode |= sBoundary;
358 if (xx.y() >= fAxisMax[yaxis] + ctol) isoutside = true;
359 }
360
361 // if isoutside = true, clear inside bit.
362 // if not on boundary, add axis information.
363
364 if (isoutside)
365 {
366 G4int tmpareacode = areacode & (~sInside);
367 areacode = tmpareacode;
368 }
369 else if ((areacode & sBoundary) != sBoundary)
370 {
371 areacode |= (sAxis0 & sAxisX) | (sAxis1 & sAxisY);
372 }
373 }
374 else
375 {
376 // boundary of x-axis
377
378 if (xx.x() < wmin )
379 {
380 areacode |= (sAxis0 & (sAxisX | sAxisMin)) | sBoundary;
381 }
382 else if (xx.x() > wmax)
383 {
384 areacode |= (sAxis0 & (sAxisX | sAxisMax)) | sBoundary;
385 }
386
387 // boundary of y-axis
388
389 if (xx.y() < fAxisMin[yaxis])
390 {
391 areacode |= (sAxis1 & (sAxisY | sAxisMin));
392 if ((areacode & sBoundary) != 0) areacode |= sCorner; // xx is on corner.
393 else areacode |= sBoundary;
394
395 }
396 else if (xx.y() > fAxisMax[yaxis])
397 {
398 areacode |= (sAxis1 & (sAxisY | sAxisMax)) ;
399 if ((areacode & sBoundary) != 0) areacode |= sCorner; // xx is on corner.
400 else areacode |= sBoundary;
401 }
402
403 if ((areacode & sBoundary) != sBoundary)
404 {
405 areacode |= (sAxis0 & sAxisX) | (sAxis1 & sAxisY);
406 }
407 }
408 return areacode;
409 }
410 else
411 {
412 G4Exception("G4TwistTrapFlatSide::GetAreaCode()",
413 "GeomSolids0001", FatalException,
414 "Feature NOT implemented !");
415 }
416
417 return areacode;
418}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
double G4double
Definition G4Types.hh:83
static const G4int sAxisMax
static const G4int sAxis0
static const G4int sAxisMin
static const G4int sAxis1
static const G4int sBoundary
static const G4int sCorner
static const G4int sAxisY
static const G4int sAxisX

Referenced by DistanceToSurface().

◆ GetBoundaryMax()

G4double G4TwistTrapFlatSide::GetBoundaryMax ( G4double u)
inlineoverridevirtual

Implements G4VTwistSurface.

Definition at line 136 of file G4TwistTrapFlatSide.hh.

137{
138 return xAxisMax(y, fTAlph) ;
139}

Referenced by GetFacets().

◆ GetBoundaryMin()

G4double G4TwistTrapFlatSide::GetBoundaryMin ( G4double u)
inlineoverridevirtual

Implements G4VTwistSurface.

Definition at line 130 of file G4TwistTrapFlatSide.hh.

131{
132 return -xAxisMax(y, -fTAlph) ;
133}

Referenced by GetFacets().

◆ GetFacets()

void G4TwistTrapFlatSide::GetFacets ( G4int m,
G4int n,
G4double xyz[][3],
G4int faces[][4],
G4int iside )
overridevirtual

Implements G4VTwistSurface.

Definition at line 518 of file G4TwistTrapFlatSide.cc.

520{
521 G4double x,y ; // the two parameters for the surface equation
522 G4ThreeVector p ; // a point on the surface, given by (z,u)
523
524 G4int nnode ;
525 G4int nface ;
526
527 G4double xmin,xmax ;
528
529 // calculate the (n-1)*(k-1) vertices
530
531 for ( G4int i = 0 ; i<n ; ++i )
532 {
533 y = -fDy + i*(2*fDy)/(n-1) ;
534
535 for ( G4int j = 0 ; j<k ; ++j )
536 {
537 xmin = GetBoundaryMin(y) ;
538 xmax = GetBoundaryMax(y) ;
539 x = xmin + j*(xmax-xmin)/(k-1) ;
540
541 nnode = GetNode(i,j,k,n,iside) ;
542 p = SurfacePoint(x,y,true) ; // surface point in global coordinate system
543
544 xyz[nnode][0] = p.x() ;
545 xyz[nnode][1] = p.y() ;
546 xyz[nnode][2] = p.z() ;
547
548 if ( i<n-1 && j<k-1 )
549 {
550 nface = GetFace(i,j,k,n,iside) ;
551
552 if (fHandedness < 0) // lower side
553 {
554 faces[nface][0] = GetEdgeVisibility(i,j,k,n,0,1)
555 * ( GetNode(i ,j ,k,n,iside)+1) ;
556 faces[nface][1] = GetEdgeVisibility(i,j,k,n,1,1)
557 * ( GetNode(i+1,j ,k,n,iside)+1) ;
558 faces[nface][2] = GetEdgeVisibility(i,j,k,n,2,1)
559 * ( GetNode(i+1,j+1,k,n,iside)+1) ;
560 faces[nface][3] = GetEdgeVisibility(i,j,k,n,3,1)
561 * ( GetNode(i ,j+1,k,n,iside)+1) ;
562 }
563 else // upper side
564 {
565 faces[nface][0] = GetEdgeVisibility(i,j,k,n,0,-1)
566 * ( GetNode(i ,j ,k,n,iside)+1) ;
567 faces[nface][1] = GetEdgeVisibility(i,j,k,n,1,-1)
568 * ( GetNode(i ,j+1,k,n,iside)+1) ;
569 faces[nface][2] = GetEdgeVisibility(i,j,k,n,2,-1)
570 * ( GetNode(i+1,j+1,k,n,iside)+1) ;
571 faces[nface][3] = GetEdgeVisibility(i,j,k,n,3,-1)
572 * ( GetNode(i+1,j ,k,n,iside)+1) ;
573 }
574 }
575 }
576 }
577}
G4double GetBoundaryMax(G4double u) override
G4ThreeVector SurfacePoint(G4double x, G4double y, G4bool isGlobal=false) override
G4double GetBoundaryMin(G4double u) override
G4int GetNode(G4int i, G4int j, G4int m, G4int n, G4int iside)
G4int GetFace(G4int i, G4int j, G4int m, G4int n, G4int iside)
G4int GetEdgeVisibility(G4int i, G4int j, G4int m, G4int n, G4int number, G4int orientation)

◆ GetNormal()

G4ThreeVector G4TwistTrapFlatSide::GetNormal ( const G4ThreeVector & ,
G4bool isGlobal = false )
overridevirtual

Implements G4VTwistSurface.

Definition at line 109 of file G4TwistTrapFlatSide.cc.

111{
112 if (isGlobal)
113 {
115 }
116 else
117 {
118 return fCurrentNormal.normal;
119 }
120}
G4ThreeVector ComputeGlobalDirection(const G4ThreeVector &lp) const

◆ GetSurfaceArea()

G4double G4TwistTrapFlatSide::GetSurfaceArea ( )
inlineoverridevirtual

Implements G4VTwistSurface.

Definition at line 142 of file G4TwistTrapFlatSide.hh.

143{
144 return 2*(fDx1 + fDx2)*fDy ;
145}

◆ SurfacePoint()

G4ThreeVector G4TwistTrapFlatSide::SurfacePoint ( G4double x,
G4double y,
G4bool isGlobal = false )
inlineoverridevirtual

Implements G4VTwistSurface.

Definition at line 121 of file G4TwistTrapFlatSide.hh.

122{
123 G4ThreeVector SurfPoint ( x,y,0);
124
125 if (isGlobal) { return (fRot*SurfPoint + fTrans); }
126 return SurfPoint;
127}

Referenced by GetFacets().


The documentation for this class was generated from the following files: