Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GeometryCellComp Class Reference

G4GeometryCellComp is a class needed for comparing G4GeometryCell objects, e.g. in STL containers. More...

#include <G4GeometryCellComp.hh>

Public Member Functions

 G4GeometryCellComp ()=default
G4bool operator() (const G4GeometryCell &g1, const G4GeometryCell &g2) const

Detailed Description

G4GeometryCellComp is a class needed for comparing G4GeometryCell objects, e.g. in STL containers.

Definition at line 46 of file G4GeometryCellComp.hh.

Constructor & Destructor Documentation

◆ G4GeometryCellComp()

G4GeometryCellComp::G4GeometryCellComp ( )
default

Default Constructor.

Member Function Documentation

◆ operator()()

G4bool G4GeometryCellComp::operator() ( const G4GeometryCell & g1,
const G4GeometryCell & g2 ) const

Comparison operator, returns true if g1 < g2.

Definition at line 34 of file G4GeometryCellComp.cc.

36{
37 G4bool smaller = false;
38 if (&(k1.GetPhysicalVolume()) != &(k2.GetPhysicalVolume()))
39 {
40 smaller = &(k1.GetPhysicalVolume()) < &(k2.GetPhysicalVolume());
41 }
42 else
43 {
44 smaller = k1.GetReplicaNumber() < k2.GetReplicaNumber();
45 }
46 return smaller;
47}
bool G4bool
Definition G4Types.hh:86
#define smaller(tree, n, m, depth)
Definition trees.c:497

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