GamR  0.0.0
GammaROOT
Loading...
Searching...
No Matches
Photon.hh
Go to the documentation of this file.
1#ifndef GAMR_NUCLEUS_PHOTON_HH
2#define GAMR_NUCLEUS_PHOTON_HH
3
4#include "Transition.hh"
5
6namespace GamR {
7namespace Nucleus {
8
9class Photon : public Transition {
10private:
11 Char_t fSpin;
12 Bool_t fElectric;
13
14public:
16
17 void SetElectric() { fElectric = kTRUE; };
18 void SetMagnetic() { fElectric = kFALSE; };
19
20 void SetSpin(Int_t L) { fSpin = L; };
21 Char_t GetSpin() { return fSpin; };
22
23 // Functions
24 Bool_t IsElectric() { return fElectric; };
25 Bool_t IsMagnetic() { return !fElectric; };
26
27 // Operators
28 Bool_t operator==(const Photon &o) const
29 {
30 return (fEnergy == o.fEnergy) && (fSpin == o.fSpin) && (fElectric == o.fElectric);
31 };
32 Bool_t operator!=(const Photon &other) const { return !(*this == other); };
33 Bool_t operator<(const Photon &other) const { return fEnergy < other.fEnergy; };
34 Bool_t operator>(const Photon &other) const { return !(*this < other); };
35
37};
38
39} // namespace Nucleus
40} // namespace GamR
41
42#endif
void SetSpin(Int_t L)
Definition Photon.hh:20
Bool_t operator>(const Photon &other) const
Definition Photon.hh:34
Bool_t operator!=(const Photon &other) const
Definition Photon.hh:32
Bool_t IsMagnetic()
Definition Photon.hh:25
Bool_t operator<(const Photon &other) const
Definition Photon.hh:33
Bool_t operator==(const Photon &o) const
Definition Photon.hh:28
Transition(double E=0, double PL=0, double PH=4096, double BL=0, double BH=4096)
Definition Transition.hh:24
Bool_t IsElectric()
Definition Photon.hh:24
Transition(double E=0, double PL=0, double PH=4096, double BL=0, double BH=4096)
Definition Transition.hh:24
Definition Gain.cc:19