Geant4 10.7.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=nullptr)
 
void ResetfDone (EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=nullptr)
 
void DebugPrint () const
 

Detailed Description

Definition at line 239 of file G4VTwistSurface.hh.

Constructor & Destructor Documentation

◆ CurrentStatus()

G4VTwistSurface::CurrentStatus::CurrentStatus ( )

Definition at line 1172 of file G4VTwistSurface.cc.

1173{
1174 for (size_t i=0; i<G4VSURFACENXX; ++i)
1175 {
1176 fDistance[i] = kInfinity;
1177 fAreacode[i] = sOutside;
1178 fIsValid[i] = false;
1179 fXX[i].set(kInfinity, kInfinity, kInfinity);
1180 }
1181 fNXX = 0;
1182 fLastp.set(kInfinity, kInfinity, kInfinity);
1183 fLastv.set(kInfinity, kInfinity, kInfinity);
1184 fLastValidate = kUninitialized;
1185 fDone = false;
1186}
#define G4VSURFACENXX
void set(double x, double y, double z)
static const G4int sOutside

◆ ~CurrentStatus()

G4VTwistSurface::CurrentStatus::~CurrentStatus ( )
virtual

Definition at line 1191 of file G4VTwistSurface.cc.

1192{
1193}

Member Function Documentation

◆ DebugPrint()

void G4VTwistSurface::CurrentStatus::DebugPrint ( ) const

Definition at line 1267 of file G4VTwistSurface.cc.

1268{
1269 G4cout << "CurrentStatus::Dist0,1= " << fDistance[0]
1270 << " " << fDistance[1] << " areacode = " << fAreacode[0]
1271 << " " << fAreacode[1] << G4endl;
1272}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ GetAreacode()

◆ GetDistance()

◆ GetNXX()

◆ GetXX()

◆ IsDone()

◆ IsValid()

◆ ResetfDone()

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

Definition at line 1239 of file G4VTwistSurface.cc.

1243{
1244 if (validate == fLastValidate && p != nullptr && *p == fLastp)
1245 {
1246 if (v == nullptr || (*v == fLastv)) return;
1247 }
1248 G4ThreeVector xx(kInfinity, kInfinity, kInfinity);
1249 for (size_t i=0; i<G4VSURFACENXX; ++i)
1250 {
1251 fDistance[i] = kInfinity;
1252 fAreacode[i] = sOutside;
1253 fIsValid[i] = false;
1254 fXX[i] = xx; // bug in old code ( was fXX[i] = xx[i] )
1255 }
1256 fNXX = 0;
1257 fLastp.set(kInfinity, kInfinity, kInfinity);
1258 fLastv.set(kInfinity, kInfinity, kInfinity);
1259 fLastValidate = kUninitialized;
1260 fDone = false;
1261}

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 = nullptr 
)

Definition at line 1199 of file G4VTwistSurface.cc.

1208{
1209 fDistance[i] = dist;
1210 fAreacode[i] = areacode;
1211 fIsValid[i] = isvalid;
1212 fXX[i] = xx;
1213 fNXX = nxx;
1214 fLastValidate = validate;
1215 if (p != nullptr)
1216 {
1217 fLastp = *p;
1218 }
1219 else
1220 {
1221 G4Exception("G4VTwistSurface::CurrentStatus::SetCurrentStatus()",
1222 "GeomSolids0003", FatalException, "SetCurrentStatus: p = 0!");
1223 }
1224 if (v != nullptr)
1225 {
1226 fLastv = *v;
1227 }
1228 else
1229 {
1230 fLastv.set(kInfinity, kInfinity, kInfinity);
1231 }
1232 fDone = true;
1233}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35

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: