Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GeometryCell.hh File Reference
#include "globals.hh"

Go to the source code of this file.

Classes

class  G4GeometryCell
 

Functions

G4bool operator== (const G4GeometryCell &k1, const G4GeometryCell &k2)
 
G4bool operator!= (const G4GeometryCell &k1, const G4GeometryCell &k2)
 

Function Documentation

◆ operator!=()

G4bool operator!= ( const G4GeometryCell k1,
const G4GeometryCell k2 
)

Definition at line 84 of file G4GeometryCell.cc.

85{
86 G4bool unequal = false;
87 if (&(k1.GetPhysicalVolume()) != &(k2.GetPhysicalVolume()))
88 {
89 unequal = true;
90 }
91 else if (k1.GetReplicaNumber() != k2.GetReplicaNumber())
92 {
93 unequal = true;
94 }
95 return unequal;
96}
bool G4bool
Definition: G4Types.hh:86
G4int GetReplicaNumber() const
const G4VPhysicalVolume & GetPhysicalVolume() const

◆ operator==()

G4bool operator== ( const G4GeometryCell k1,
const G4GeometryCell k2 
)

Definition at line 70 of file G4GeometryCell.cc.

71{
72 G4bool equal = true;
73 if (&(k1.GetPhysicalVolume()) != &(k2.GetPhysicalVolume()))
74 {
75 equal = false;
76 }
77 else if (k1.GetReplicaNumber() != k2.GetReplicaNumber())
78 {
79 equal = false;
80 }
81 return equal;
82}

Referenced by G4Solver< Function >::operator!=().