Geant4 11.2.2
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 229 of file G4VTwistSurface.hh.

Constructor & Destructor Documentation

◆ CurrentStatus()

G4VTwistSurface::CurrentStatus::CurrentStatus ( )

Definition at line 1165 of file G4VTwistSurface.cc.

1166{
1167 for (size_t i=0; i<G4VSURFACENXX; ++i)
1168 {
1169 fDistance[i] = kInfinity;
1170 fAreacode[i] = sOutside;
1171 fIsValid[i] = false;
1172 fXX[i].set(kInfinity, kInfinity, kInfinity);
1173 }
1174 fNXX = 0;
1175 fLastp.set(kInfinity, kInfinity, kInfinity);
1176 fLastv.set(kInfinity, kInfinity, kInfinity);
1177 fLastValidate = kUninitialized;
1178 fDone = false;
1179}
#define G4VSURFACENXX
void set(double x, double y, double z)
static const G4int sOutside

◆ ~CurrentStatus()

G4VTwistSurface::CurrentStatus::~CurrentStatus ( )
virtualdefault

Member Function Documentation

◆ DebugPrint()

void G4VTwistSurface::CurrentStatus::DebugPrint ( ) const

Definition at line 1259 of file G4VTwistSurface.cc.

1260{
1261 G4cout << "CurrentStatus::Dist0,1= " << fDistance[0]
1262 << " " << fDistance[1] << " areacode = " << fAreacode[0]
1263 << " " << fAreacode[1] << G4endl;
1264}
#define G4endl
Definition G4ios.hh:67
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 1231 of file G4VTwistSurface.cc.

1235{
1236 if (validate == fLastValidate && p != nullptr && *p == fLastp)
1237 {
1238 if (v == nullptr || (*v == fLastv)) return;
1239 }
1240 G4ThreeVector xx(kInfinity, kInfinity, kInfinity);
1241 for (size_t i=0; i<G4VSURFACENXX; ++i)
1242 {
1243 fDistance[i] = kInfinity;
1244 fAreacode[i] = sOutside;
1245 fIsValid[i] = false;
1246 fXX[i] = xx; // bug in old code ( was fXX[i] = xx[i] )
1247 }
1248 fNXX = 0;
1249 fLastp.set(kInfinity, kInfinity, kInfinity);
1250 fLastv.set(kInfinity, kInfinity, kInfinity);
1251 fLastValidate = kUninitialized;
1252 fDone = false;
1253}

Referenced by G4TwistBoxSide::DistanceToSurface(), G4TwistBoxSide::DistanceToSurface(), G4TwistTrapAlphaSide::DistanceToSurface(), G4TwistTrapAlphaSide::DistanceToSurface(), G4TwistTrapFlatSide::DistanceToSurface(), G4TwistTrapFlatSide::DistanceToSurface(), G4TwistTrapParallelSide::DistanceToSurface(), G4TwistTrapParallelSide::DistanceToSurface(), G4TwistTubsFlatSide::DistanceToSurface(), G4TwistTubsFlatSide::DistanceToSurface(), G4TwistTubsHypeSide::DistanceToSurface(), G4TwistTubsHypeSide::DistanceToSurface(), G4TwistTubsSide::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 1191 of file G4VTwistSurface.cc.

1200{
1201 fDistance[i] = dist;
1202 fAreacode[i] = areacode;
1203 fIsValid[i] = isvalid;
1204 fXX[i] = xx;
1205 fNXX = nxx;
1206 fLastValidate = validate;
1207 if (p != nullptr)
1208 {
1209 fLastp = *p;
1210 }
1211 else
1212 {
1213 G4Exception("G4VTwistSurface::CurrentStatus::SetCurrentStatus()",
1214 "GeomSolids0003", FatalException, "SetCurrentStatus: p = 0!");
1215 }
1216 if (v != nullptr)
1217 {
1218 fLastv = *v;
1219 }
1220 else
1221 {
1222 fLastv.set(kInfinity, kInfinity, kInfinity);
1223 }
1224 fDone = true;
1225}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)

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


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