Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:32

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4IsotopeProperty
0027 //
0028 // Class description:
0029 //
0030 // G4IsotopeProperty contains properties of an isotope
0031 
0032 // Author: H.Kurashige, 5 October 1999
0033 // --------------------------------------------------------------------
0034 #ifndef G4IsotopeProperty_hh
0035 #define G4IsotopeProperty_hh 1
0036 
0037 #include "G4Ions.hh"
0038 #include "globals.hh"
0039 
0040 class G4DecayTable;
0041 class G4IsotopeProperty
0042 {
0043   public:
0044     // Constructor & destructor
0045     G4IsotopeProperty() = default;
0046     virtual ~G4IsotopeProperty();
0047 
0048     G4IsotopeProperty(const G4IsotopeProperty& right);
0049     G4IsotopeProperty& operator=(G4IsotopeProperty& right);
0050 
0051     // Equality operators
0052     G4bool operator==(const G4IsotopeProperty& right) const;
0053     G4bool operator!=(const G4IsotopeProperty& right) const;
0054 
0055     // Set/Get Atomic Number
0056     inline G4int GetAtomicNumber() const;
0057     inline void SetAtomicNumber(G4int Z);
0058 
0059     // Set/Get Atomic Mass
0060     inline G4int GetAtomicMass() const;
0061     inline void SetAtomicMass(G4int A);
0062 
0063     // Set/Get spin
0064     inline G4int GetiSpin() const;
0065     inline void SetiSpin(G4int J);
0066 
0067     // Set/Get Magnetic Moment
0068     inline G4double GetMagneticMoment() const;
0069     inline void SetMagneticMoment(G4double M);
0070 
0071     // Set/Get Excited Energy
0072     inline G4double GetEnergy() const;
0073     inline void SetEnergy(G4double E);
0074 
0075     // Set/Get isomer level
0076     inline G4int GetIsomerLevel() const;
0077     inline void SetIsomerLevel(G4int level);
0078 
0079     // Set/Get floating level base
0080     inline G4Ions::G4FloatLevelBase GetFloatLevelBase() const;
0081     inline void SetFloatLevelBase(G4Ions::G4FloatLevelBase flb);
0082     inline void SetFloatLevelBase(G4int flbIndex);
0083 
0084     // Set/Get life time
0085     inline G4double GetLifeTime() const;
0086     inline void SetLifeTime(G4double T);
0087 
0088     // Set/Get decay table
0089     inline G4DecayTable* GetDecayTable() const;
0090     inline void SetDecayTable(G4DecayTable* table);
0091 
0092     // Dump out information
0093     void DumpInfo() const;
0094 
0095   private:
0096     G4int fAtomicNumber = 0;  // number of proton
0097     G4int fAtomicMass = 0;  // number of nucleon
0098     G4int fISpin = 0;  // total angular momentum (in unit of 1/2)
0099     G4double fEnergy = 0.0;  // excited energy
0100     G4double fLifeTime = -1.0;  // lifeTime
0101     G4DecayTable* fDecayTable = nullptr;  // decay Table
0102     G4double fMagneticMoment = 0.0;  // magnetic moment
0103     G4int fIsomerLevel = -1;  // isomer level
0104     G4Ions::G4FloatLevelBase fFloatLevelBase{
0105       G4Ions::G4FloatLevelBase::no_Float};  // floating level base
0106 };
0107 
0108 // ------------------------
0109 // Inline methods
0110 // ------------------------
0111 
0112 inline G4int G4IsotopeProperty::GetAtomicNumber() const
0113 {
0114   return fAtomicNumber;
0115 }
0116 
0117 inline void G4IsotopeProperty::SetAtomicNumber(G4int Z)
0118 {
0119   fAtomicNumber = Z;
0120 }
0121 
0122 inline G4int G4IsotopeProperty::GetAtomicMass() const
0123 {
0124   return fAtomicMass;
0125 }
0126 
0127 inline void G4IsotopeProperty::SetAtomicMass(G4int A)
0128 {
0129   fAtomicMass = A;
0130 }
0131 
0132 inline G4int G4IsotopeProperty::GetiSpin() const
0133 {
0134   return fISpin;
0135 }
0136 
0137 inline void G4IsotopeProperty::SetiSpin(G4int J)
0138 {
0139   fISpin = J;
0140 }
0141 
0142 inline G4double G4IsotopeProperty::GetMagneticMoment() const
0143 {
0144   return fMagneticMoment;
0145 }
0146 
0147 inline void G4IsotopeProperty::SetMagneticMoment(G4double M)
0148 {
0149   fMagneticMoment = M;
0150 }
0151 
0152 inline G4double G4IsotopeProperty::GetEnergy() const
0153 {
0154   return fEnergy;
0155 }
0156 
0157 inline void G4IsotopeProperty::SetEnergy(G4double E)
0158 {
0159   fEnergy = E;
0160 }
0161 
0162 inline G4int G4IsotopeProperty::GetIsomerLevel() const
0163 {
0164   return fIsomerLevel;
0165 }
0166 inline void G4IsotopeProperty::SetIsomerLevel(G4int level)
0167 {
0168   fIsomerLevel = level;
0169 }
0170 
0171 inline G4double G4IsotopeProperty::GetLifeTime() const
0172 {
0173   return fLifeTime;
0174 }
0175 
0176 inline void G4IsotopeProperty::SetLifeTime(G4double T)
0177 {
0178   fLifeTime = T;
0179 }
0180 
0181 inline G4DecayTable* G4IsotopeProperty::GetDecayTable() const
0182 {
0183   return fDecayTable;
0184 }
0185 
0186 inline void G4IsotopeProperty::SetDecayTable(G4DecayTable* table)
0187 {
0188   fDecayTable = table;
0189 }
0190 
0191 inline G4Ions::G4FloatLevelBase G4IsotopeProperty::GetFloatLevelBase() const
0192 {
0193   return fFloatLevelBase;
0194 }
0195 
0196 inline void G4IsotopeProperty::SetFloatLevelBase(G4Ions::G4FloatLevelBase flb)
0197 {
0198   fFloatLevelBase = flb;
0199 }
0200 
0201 inline void G4IsotopeProperty::SetFloatLevelBase(G4int flbIndex)
0202 {
0203   fFloatLevelBase = G4Ions::FloatLevelBase(flbIndex);
0204 }
0205 
0206 #endif