Geant4 11.4.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 ()
 Internal class defining the surface status.
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 375 of file G4VTwistSurface.hh.

Constructor & Destructor Documentation

◆ CurrentStatus()

G4VTwistSurface::CurrentStatus::CurrentStatus ( )

Internal class defining the surface status.

Definition at line 1117 of file G4VTwistSurface.cc.

1118{
1119 for (size_t i=0; i<G4VSURFACENXX; ++i)
1120 {
1121 fDistance[i] = kInfinity;
1122 fAreacode[i] = sOutside;
1123 fIsValid[i] = false;
1124 fXX[i].set(kInfinity, kInfinity, kInfinity);
1125 }
1126 fNXX = 0;
1127 fLastp.set(kInfinity, kInfinity, kInfinity);
1128 fLastv.set(kInfinity, kInfinity, kInfinity);
1129 fLastValidate = kUninitialized;
1130 fDone = false;
1131}
#define G4VSURFACENXX
static const G4int sOutside

◆ ~CurrentStatus()

G4VTwistSurface::CurrentStatus::~CurrentStatus ( )
virtualdefault

Member Function Documentation

◆ DebugPrint()

void G4VTwistSurface::CurrentStatus::DebugPrint ( ) const

Definition at line 1211 of file G4VTwistSurface.cc.

1212{
1213 G4cout << "CurrentStatus::Dist0,1= " << fDistance[0]
1214 << " " << fDistance[1] << " areacode = " << fAreacode[0]
1215 << " " << fAreacode[1] << G4endl;
1216}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ GetAreacode()

G4int G4VTwistSurface::CurrentStatus::GetAreacode ( G4int i) const
inline

Definition at line 387 of file G4VTwistSurface.hh.

387{ return fAreacode[i]; }

◆ GetDistance()

G4double G4VTwistSurface::CurrentStatus::GetDistance ( G4int i) const
inline

Definition at line 386 of file G4VTwistSurface.hh.

386{ return fDistance[i]; }

◆ GetNXX()

G4int G4VTwistSurface::CurrentStatus::GetNXX ( ) const
inline

Definition at line 388 of file G4VTwistSurface.hh.

388{ return fNXX; }

◆ GetXX()

G4ThreeVector G4VTwistSurface::CurrentStatus::GetXX ( G4int i) const
inline

Definition at line 385 of file G4VTwistSurface.hh.

385{ return fXX[i]; }

◆ IsDone()

G4bool G4VTwistSurface::CurrentStatus::IsDone ( ) const
inline

Definition at line 389 of file G4VTwistSurface.hh.

389{ return fDone; }

◆ IsValid()

G4bool G4VTwistSurface::CurrentStatus::IsValid ( G4int i) const
inline

Definition at line 390 of file G4VTwistSurface.hh.

390{ return fIsValid[i]; }

◆ ResetfDone()

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

Definition at line 1183 of file G4VTwistSurface.cc.

1187{
1188 if (validate == fLastValidate && p != nullptr && *p == fLastp)
1189 {
1190 if (v == nullptr || (*v == fLastv)) { return; }
1191 }
1192 G4ThreeVector xx(kInfinity, kInfinity, kInfinity);
1193 for (size_t i=0; i<G4VSURFACENXX; ++i)
1194 {
1195 fDistance[i] = kInfinity;
1196 fAreacode[i] = sOutside;
1197 fIsValid[i] = false;
1198 fXX[i] = xx; // bug in old code ( was fXX[i] = xx[i] )
1199 }
1200 fNXX = 0;
1201 fLastp.set(kInfinity, kInfinity, kInfinity);
1202 fLastv.set(kInfinity, kInfinity, kInfinity);
1203 fLastValidate = kUninitialized;
1204 fDone = false;
1205}
CLHEP::Hep3Vector G4ThreeVector

◆ 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 1143 of file G4VTwistSurface.cc.

1152{
1153 fDistance[i] = dist;
1154 fAreacode[i] = areacode;
1155 fIsValid[i] = isvalid;
1156 fXX[i] = xx;
1157 fNXX = nxx;
1158 fLastValidate = validate;
1159 if (p != nullptr)
1160 {
1161 fLastp = *p;
1162 }
1163 else
1164 {
1165 G4Exception("G4VTwistSurface::CurrentStatus::SetCurrentStatus()",
1166 "GeomSolids0003", FatalException, "SetCurrentStatus: p = 0!");
1167 }
1168 if (v != nullptr)
1169 {
1170 fLastv = *v;
1171 }
1172 else
1173 {
1174 fLastv.set(kInfinity, kInfinity, kInfinity);
1175 }
1176 fDone = true;
1177}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)

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