Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VTwistSurface::CurrentStatus Class Reference

#include <G4VTwistSurface.hh>

Public Member Functions

 CurrentStatus ()
 
virtual ~CurrentStatus ()
 
G4ThreeVector GetXX (G4int i) const
 
G4double GetDistance (G4int i) const
 
G4int GetAreacode (G4int i) const
 
G4int GetNXX () const
 
G4bool IsDone () const
 
G4bool IsValid (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=0)
 
void ResetfDone (EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=0)
 
void DebugPrint () const
 

Detailed Description

Definition at line 251 of file G4VTwistSurface.hh.

Constructor & Destructor Documentation

◆ CurrentStatus()

G4VTwistSurface::CurrentStatus::CurrentStatus ( )

Definition at line 1124 of file G4VTwistSurface.cc.

1125{
1126 for (size_t i=0; i<G4VSURFACENXX; i++)
1127 {
1128 fDistance[i] = kInfinity;
1129 fAreacode[i] = sOutside;
1130 fIsValid[i] = false;
1131 fXX[i].set(kInfinity, kInfinity, kInfinity);
1132 }
1133 fNXX = 0;
1134 fLastp.set(kInfinity, kInfinity, kInfinity);
1135 fLastv.set(kInfinity, kInfinity, kInfinity);
1136 fLastValidate = kUninitialized;
1137 fDone = false;
1138}
#define G4VSURFACENXX
void set(double x, double y, double z)
static const G4int sOutside

◆ ~CurrentStatus()

G4VTwistSurface::CurrentStatus::~CurrentStatus ( )
virtual

Definition at line 1143 of file G4VTwistSurface.cc.

1144{
1145}

Member Function Documentation

◆ DebugPrint()

void G4VTwistSurface::CurrentStatus::DebugPrint ( ) const

Definition at line 1219 of file G4VTwistSurface.cc.

1220{
1221 G4cout << "CurrentStatus::Dist0,1= " << fDistance[0]
1222 << " " << fDistance[1] << " areacode = " << fAreacode[0]
1223 << " " << fAreacode[1] << G4endl;
1224}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ GetAreacode()

◆ GetDistance()

◆ GetNXX()

◆ GetXX()

◆ IsDone()

◆ IsValid()

◆ ResetfDone()

void G4VTwistSurface::CurrentStatus::ResetfDone ( EValidate  validate,
const G4ThreeVector p,
const G4ThreeVector v = 0 
)

Definition at line 1191 of file G4VTwistSurface.cc.

1195{
1196 if (validate == fLastValidate && p && *p == fLastp)
1197 {
1198 if (!v || (v && *v == fLastv)) return;
1199 }
1200 G4ThreeVector xx(kInfinity, kInfinity, kInfinity);
1201 for (size_t i=0; i<G4VSURFACENXX; i++)
1202 {
1203 fDistance[i] = kInfinity;
1204 fAreacode[i] = sOutside;
1205 fIsValid[i] = false;
1206 fXX[i] = xx; // bug in old code ( was fXX[i] = xx[i] )
1207 }
1208 fNXX = 0;
1209 fLastp.set(kInfinity, kInfinity, kInfinity);
1210 fLastv.set(kInfinity, kInfinity, kInfinity);
1211 fLastValidate = kUninitialized;
1212 fDone = false;
1213}

Referenced by G4TwistBoxSide::DistanceToSurface(), G4TwistTrapAlphaSide::DistanceToSurface(), G4TwistTrapFlatSide::DistanceToSurface(), G4TwistTrapParallelSide::DistanceToSurface(), G4TwistTubsFlatSide::DistanceToSurface(), G4TwistTubsHypeSide::DistanceToSurface(), and G4TwistTubsSide::DistanceToSurface().

◆ SetCurrentStatus()

void G4VTwistSurface::CurrentStatus::SetCurrentStatus ( G4int  i,
G4ThreeVector xx,
G4double dist,
G4int areacode,
G4bool isvalid,
G4int  nxx,
EValidate  validate,
const G4ThreeVector p,
const G4ThreeVector v = 0 
)

Definition at line 1151 of file G4VTwistSurface.cc.

1160{
1161 fDistance[i] = dist;
1162 fAreacode[i] = areacode;
1163 fIsValid[i] = isvalid;
1164 fXX[i] = xx;
1165 fNXX = nxx;
1166 fLastValidate = validate;
1167 if (p)
1168 {
1169 fLastp = *p;
1170 }
1171 else
1172 {
1173 G4Exception("G4VTwistSurface::CurrentStatus::SetCurrentStatus()",
1174 "GeomSolids0003", FatalException, "SetCurrentStatus: p = 0!");
1175 }
1176 if (v)
1177 {
1178 fLastv = *v;
1179 }
1180 else
1181 {
1182 fLastv.set(kInfinity, kInfinity, kInfinity);
1183 }
1184 fDone = true;
1185}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Referenced by G4TwistBoxSide::DistanceToSurface(), G4TwistTrapAlphaSide::DistanceToSurface(), G4TwistTrapFlatSide::DistanceToSurface(), G4TwistTrapParallelSide::DistanceToSurface(), G4TwistTubsFlatSide::DistanceToSurface(), G4TwistTubsHypeSide::DistanceToSurface(), and G4TwistTubsSide::DistanceToSurface().


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