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

Go to the source code of this file.

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 87 of file G4GeometryCell.cc.

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

◆ operator==()

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

Definition at line 75 of file G4GeometryCell.cc.

76{
77 G4bool equal=true;
78 if (&(k1.GetPhysicalVolume()) != &(k2.GetPhysicalVolume())) {
79 equal = false;
80 }
81 else if (k1.GetReplicaNumber() != k2.GetReplicaNumber()) {
82 equal = false;
83 }
84 return equal;
85}

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