BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSElectronOccupancy.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSELECTRONOCCUPANCY_H
19#define BDSELECTRONOCCUPANCY_H
20#include "G4Types.hh"
21
22#include <vector>
23
25
33{
34public:
35 BDSElectronOccupancy() = delete;
36 explicit BDSElectronOccupancy(G4int maxn);
38
39 void CreateNewLevel(G4int n, G4int l, G4int j);
40
41 static G4bool CompareEnergy(const BDSElectronQuantumLevel* level1, const BDSElectronQuantumLevel* level2);
42
43 void PopulateLevels();
44 void AddElectrons(G4int number);
45 void AddElectrons(G4int n, G4int l,G4double j, G4int number);
46
47 void RemoveElectrons(G4int n, G4int l,G4double j, G4int number);
48
49 void SetStateLifetime(G4int n, G4int l, G4double lifetime);
50 void SetTimeOfExciation(G4double timeOfExcitationIn, G4int n, G4int l, G4double j);
51
52 G4bool StatePopulated(G4int n, G4int l, G4double j) const;
53 G4double GetStateLifetime(G4int n, G4int l, G4double j) const;
54 G4double GetTimeOfExcitation(G4int n, G4int l, G4double j) const;
55 inline void SetTotalElectrons(G4int totalElectronsIn) {totalElectrons=totalElectronsIn;}
56
57private:
58 std::vector<BDSElectronQuantumLevel*> stateList;
59 G4int totalElectrons;
60};
61
62#endif
Electron Occupancy for more than just n quantum number.
Electron Quantum levels for more than just n quantum number.