Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

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  }
G4int GetTotalOccupancy() const
G4int GetSizeOfOrbit() const
int G4int
Definition: G4Types.hh:78
G4int GetOccupancy(G4int orbit) const

Here is the call graph for this function:


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