Geant4-11
Public Member Functions
comparator Struct Reference

#include <G4MolecularConfiguration.hh>

Public Member Functions

bool operator() (const G4ElectronOccupancy &occ1, const G4ElectronOccupancy &occ2) const
 

Detailed Description

Definition at line 61 of file G4MolecularConfiguration.hh.

Member Function Documentation

◆ operator()()

bool comparator::operator() ( const G4ElectronOccupancy occ1,
const G4ElectronOccupancy occ2 
) const
inline

Definition at line 63 of file G4MolecularConfiguration.hh.

65 {
66 G4int totalOcc1 = occ1.GetTotalOccupancy();
67 G4int totalOcc2 = occ2.GetTotalOccupancy();
68 if (totalOcc1 != totalOcc2)
69 {
70 return totalOcc1 < totalOcc2;
71 }
72 else
73 {
74 G4int occupancy1 = -1;
75 G4int occupancy2 = -1;
76 const G4int sizeOrbit = occ1.GetSizeOfOrbit();
77 for (G4int i = 0; i < sizeOrbit; i++)
78 {
79 occupancy1 = occ1.GetOccupancy(i);
80 occupancy2 = occ2.GetOccupancy(i);
81
82 if (occupancy1 != occupancy2)
83 {
84 return occupancy1 < occupancy2;
85 }
86 }
87 }
88 return false;
89 }
int G4int
Definition: G4Types.hh:85
G4int GetTotalOccupancy() const
G4int GetOccupancy(G4int orbit) const

References G4ElectronOccupancy::GetOccupancy(), G4ElectronOccupancy::GetSizeOfOrbit(), and G4ElectronOccupancy::GetTotalOccupancy().


The documentation for this struct was generated from the following file: